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

Refactor user model to include private fields explicitly #353

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

Conversation

ajlacey
Copy link
Collaborator

@ajlacey ajlacey commented Sep 29, 2024

This update to the user model declares the fields which are private and should not be displayed to other users. These fields are embedded into the User type as PrivateUser and can be directly accessed as they were previously called via User.Email or User.APIKey. This change allows the Private fields to be accessed/retrieved as a whole instead of individually knowing what is or is not private. This also helps us prevent these fields from being accidentally leaked.

ApiKey was renamed to APIKey to be consistent with language standards for initialisms https://go.dev/wiki/CodeReviewComments#initialisms

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

Successfully merging this pull request may close these issues.

1 participant