-
Notifications
You must be signed in to change notification settings - Fork 52
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
Replace gopkg.in/auth0.v5 with github.com/auth0/go-auth0 #395
Conversation
ce30fd9
to
b8e1f71
Compare
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.
Adding comments around the code to give further context on some breaking changes withing the Go SDK.
PRs that introduced the breaking changes:
// | ||
// https://auth0.com/docs/api/management/v2/#!/Actions/get_triggers | ||
ListTriggers(opts ...management.RequestOption) (l *management.ActionTriggerList, err error) | ||
Triggers(opts ...management.RequestOption) (l *management.ActionTriggerList, err error) |
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.
The ListTriggers
has been deprecated in favor of Triggers
. The func signature remains the same.
// | ||
// See: https://auth0.com/docs/api/management/v2/#!/Organizations/patch_organizations_by_id | ||
Update(o *management.Organization, opts ...management.RequestOption) error | ||
Update(id string, o *management.Organization, opts ...management.RequestOption) error |
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.
The signature of this func has changed within the Go SDK to better align how all CRUD funcs behave.
@@ -201,7 +202,7 @@ auth0 actions create --n myaction -t post-login -d "lodash=4.0.0" -s "API_KEY=va | |||
|
|||
action := &management.Action{ | |||
Name: &inputs.Name, | |||
SupportedTriggers: []management.ActionTrigger{ | |||
SupportedTriggers: []*management.ActionTrigger{ |
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.
This has also been changed to a slice of pointers within the Go SDK.
} | ||
|
||
if isAnyColorSet { | ||
o.Branding.Colors = map[string]string{} | ||
o.Branding.Colors = map[string]interface{}{} |
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.
This has also changed within the Go SDK, however the underlying field values remain strings. That's why further down we cast again to .(string)
.
b8e1f71
to
c797de0
Compare
Description
This PR replaces gopkg.in/auth0.v5 (github.com/go-auth0/auth0) with github.com/auth0/go-auth0 as we now have brought the SDK within the Auth0 org.
Checklist
master