package
0.0.0
Repository: https://github.com/richardknop/pinglist-api.git
Documentation: pkg.go.dev

# Functions

GetAuthenticatedAccount returns *Account from the request context.
GetAuthenticatedUser returns *User from the request context.
MigrateAll executes all migrations.
NewAccount creates new Account instance.
NewAccountAuthMiddleware creates a new AccountAuthMiddleware instance.
NewConfirmation creates new Confirmation instance.
NewConfirmationResponse creates new ConfirmationResponse instance.
NewEmailFactory starts a new emailFactory instance.
NewInvitation creates new Invitation instance.
NewInvitationResponse creates new InvitationResponse instance.
NewPasswordReset creates new PasswordReset instance.
NewPasswordResetResponse creates new PasswordResetResponse instance.
NewService starts a new Service instance.
NewUser creates new User instance.
NewUserAuthMiddleware creates a new UserAuthMiddleware instance.
NewUserResponse creates new UserResponse instance.
RegisterRoutes registers route handlers for the accounts service.

# Variables

ErrAccountAuthenticationRequired ...
ErrAccountNameTaken ...
ErrAccountNotFound ...
ErrConfirmationNotFound ...
ErrGetUserPermission ...
ErrInvitationNotFound ...
ErrPasswordResetNotFound ...
ErrRoleNotFound ...
ErrSuperuserOnlyManually ...
ErrUpdateUserPermission ...
ErrUserAuthenticationRequired ...
ErrUserNotFound ...

# Structs

Account ...
AccountAuthMiddleware takes the client ID and secret from the basic auth, authenticates the account and sets the account object on the request context.
Confirmation ...
ConfirmationResponse ...
ConfirmInvitationRequest ...
ConfirmPasswordResetRequest ...
ContactRequest ...
EmailFactory facilitates construction of email.Email objects.
EmailFactoryMock is a mocked object implementing EmailFactoryInterface.
Invitation ...
InvitationRequest ...
InvitationResponse ...
PasswordRequest ...
PasswordReset ...
PasswordResetRequest ...
PasswordResetResponse ...
Role is a one of roles user can have.
Service struct keeps config and db objects to avoid passing them around.
ServiceMock is a mocked object implementing ServiceInterface.
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.