-
Notifications
You must be signed in to change notification settings - Fork 0
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
created universal controller that reconciles all resources related to… #7
created universal controller that reconciles all resources related to… #7
Conversation
… magento.web7.md, allowing manage of resources from magento API based on standard RESTful API definitions
fa7a756
to
99d672f
Compare
… to beginning of file
internal/controller/magento.go
Outdated
|
||
// isValidGVK returns true if the GroupVersionKind is a valid Magento API resource. | ||
func isValidGVK(gvk schema.GroupVersionKind) bool { | ||
return gvk.Group == "magento.web7.md" && gvk.Version == "v1alpha1" && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ca7alindev Please move Group and Version to constants.
internal/client/magento.go
Outdated
if id == "" { | ||
return nil, errors.New("resource with ID" + id + " in " + c.Path + " not found") | ||
} | ||
resp, _ := c.Create().R().Get(c.Path + "/" + id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ca7alindev Separators to constants please.
@ca7alindev Ready for review? |
ready |
…ed on standard RESTful API definitions