Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting on resource-group scaffolding #27

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jessemillar
Copy link
Collaborator

No description provided.

@jessemillar jessemillar self-assigned this Oct 14, 2020
@jessemillar jessemillar linked an issue Oct 14, 2020 that may be closed by this pull request
@jessemillar jessemillar marked this pull request as ready for review October 14, 2020 19:17
@jessemillar
Copy link
Collaborator Author

Bleh. Didn't realize until just now that the map method we're using for HTTP endpoints won't work in the (likely common) scenario of the same URI being used for multiple HTTP verbs. Thinking up a fix since the API for Resource Groups (intelligently) uses the same URI for GET and PUT.

@jessemillar
Copy link
Collaborator Author

This PR now also proposes a fix for the duplicate URI issue described in the comment above. I'm instead using the actual Echo Route class/struct instead of abstracting out into a map. Works with duplicate URIs, removes some boilerplate code from cerulean.go, and allows future endpoints to use all Echo functions if necessary (e.g. middleware).

cerulean.go Outdated Show resolved Hide resolved
@jessemillar
Copy link
Collaborator Author

jessemillar commented Oct 28, 2020

@goshlanguage I'm not sold on the models package I added as part of this PR (it only contains CloudError currently). I think we're gonna end up using CloudError in other services than just resourcegroups though so we probably want it abstracted. Thoughts on better package/directory naming?

@jessemillar
Copy link
Collaborator Author

@goshlanguage I'm kinda stumped on why my unit test in /internal/services/resourcegroups/handlers_test.go isn't working. It's not passing the :subscriptionID and :resourceGroupName URI params through to the new handlers I've defined. Might need to just step away from it for a bit and come back, but if you're feeling kind and want to help debug, I wouldn't be opposed. <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ResourceGroups
2 participants