-
Notifications
You must be signed in to change notification settings - Fork 10
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
Inconsistent AccountID type #12
Comments
let's standardize on much as it pains me, i think the golang way is to create new functions that return the correct type until cutting a v2 release. what does that mean here? 😬 |
That's a good question. If we start adding new methods that work with an func (c *Client) ImportAccountContext(ctx context.Context, user, pass string, locked bool) (int, error) {}
func (c *Client) GetAccountContext(ctx context.Context, accountID int) (*Account, error) {}
// ... Though the name of the functions become somewhat awkward so I'd go with a new struct/interface definition. In the best case people using the new struct/interface type will not have too much breaking API changes when cutting a v2. I'd also consider adding a warning to the README so users are aware of the new type and the upcoming type changes so they can either directly use |
A new client with support for |
Hi,
first of all thanks for the awesome authn-server project. I just noticed that
authn-go
has some inconsistencies regarding the accountID type. InImportAccount
andint
is returned while the other APIs all like to get astring
. Though, the API it self returns the Account ID as a number.I'd be happy to file a PR to fix that inconsistency but what is the type you actually want to expose to authn-go users? Since the API uses a number I guess an
int
would be more correct but that would break backwards-compatibility with v1.0.0.The text was updated successfully, but these errors were encountered: