# Packages
No description provided by the author
# Functions
AccountPreload sets up Gorm preloads for an account object.
AccountPreloadWithPrefix sets up Gorm preloads for an account object, and prefixes with prefix for nested objects.
ConfirmationPreload sets up Gorm preloads for a confirmation object.
ConfirmationPreloadWithPrefix sets up Gorm preloads for a confirmation object, and prefixes with prefix for nested objects.
GetAuthenticatedAccount returns *Account from the request context.
GetAuthenticatedUser returns *User from the request context.
InvitationPreload sets up Gorm preloads for an invitation object.
InvitationPreloadWithPrefix sets up Gorm preloads for an invitation object, and prefixes with prefix for nested objects.
MigrateAll executes all migrations.
NewAccount creates new Account instance.
NewAccountAuthMiddleware creates a new AccountAuthMiddleware instance.
NewConfirmation creates new Confirmation instance.
NewEmailFactory starts a new emailFactory instance.
NewInvitation creates new Invitation instance.
NewOptionalUserAuthMiddleware creates a new OptionalUserAuthMiddleware instance.
NewPasswordReset creates new PasswordReset instance.
NewService starts a new Service instance.
NewUser creates new User instance.
NewUserAuthMiddleware creates a new UserAuthMiddleware instance.
NewUserResponse creates new UserResponse instance.
PasswordResetPreload sets up Gorm preloads for a password reset object.
PasswordResetPreloadWithPrefix sets up Gorm preloads for a password reset object, and prefixes with prefix for nested objects.
RegisterRoutes registers route handlers for the accounts service.
UserPreload sets up Gorm preloads for a user object.
UserPreloadWithPrefix sets up Gorm preloads for a user object, and prefixes with prefix for nested objects.
# Variables
ErrAccountAuthenticationRequired ...
ErrAccountNameTaken ...
ErrAccountNotFound ...
ErrConfirmationNotFound ...
ErrGetUserPermission ...
ErrInvitationNotFound ...
ErrPasswordResetNotFound ...
ErrRoleNotFound ...
ErrSuperuserOnlyManually ...
ErrUpdateUserPermission ...
ErrUserAuthenticationRequired ...
ErrUserNotFound ...
# Structs
Account represents an extension of Oauth 2.0 client, can be used to group users together.
AccountAuthMiddleware takes the client ID and secret from the basic auth, authenticates the account and sets the account object on the request context.
Confirmation objects is created when we send user a confirmation email It is then fetched when user clicks on the verification link in the email so we can verify his/her email.
ConfirmInvitationRequest ...
ConfirmPasswordResetRequest ...
EmailFactory facilitates construction of email.Email objects.
Invitation is created when user invites another user to the platform.
InvitationRequest ...
OptionalUserAuthMiddleware takes the bearer token from the Authorization header, authenticates the user and sets the user object on the request context.
PasswordRequest ...
PasswordReset is created when user forgets his/her password and requests a new one.
PasswordResetRequest ...
Role is a one of roles user can have (currently superuser or user).
Service struct keeps config and db objects to avoid passing them around.
User represents a platform user.
UserAuthMiddleware takes the bearer token from the Authorization header, authenticates the user and sets the user object on the request context.
UserRequest ...
UserResponse ...
# Interfaces
EmailFactoryInterface defines exported methods.
ServiceInterface defines exported methods.