-
Notifications
You must be signed in to change notification settings - Fork 284
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
GoCloak is not an interface like documentation describe it #438
Comments
The change has been done to adhere to the https://github.com/golang/go/wiki/CodeReviewComments#interfaces Although yes, maybe the readme should be updated to not get people confused on this |
I think the interface should be part of the libary and can adhere to the principal. Checks should be made that the implemented struct methods satisfy the interface. |
GoCloak being a struct breaks the |
Fixes Nerzal#438 Generates interface from struct and verify implementation
Fixes Nerzal#438 Generates interface from struct and verify implementation
Related Nerzal#438 Generates interface from struct and verifies implementation. This doesn't modify `NewClient` as that requires a larger refactor.
* chore: update workflows and lint fixes * chore: update golang version and dependencies * feat: provide generated and verified interface Related #438 Generates interface from struct and verifies implementation. This doesn't modify `NewClient` as that requires a larger refactor. * test: fix message to match logic * test: fix up codeQL
Is your feature request related to a problem? Please describe.
The go doc reference for gocloak package describe the client like a GoCloak interface.
It seems to be a good approach to abstract the core Client.
The interface assume a succefull instantiate struct and a strong API Contract.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'm always frustrated when i manipulate the core struct instance with the tentation for changing the internal fields.
Whats is the motivation to expose the struct instead of Interface ?
Describe the solution you'd like
The change to an interface cause an error inside the options parameters for the NewClient method.
The solution should to have an internal type option.
I purpose you to make this rollback change.
i didn't find any resources about this topics ;)
The text was updated successfully, but these errors were encountered: