Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCredentials = errors.New("invalid credentials")
ErrInvalidCredentials is returned by UsersSvc when the given credentials such as email/password or session token are incorrect.
View Source
var ErrUserAlreadyExists = errors.New("user already exists")
ErrUserAlreadyExists is returned by UsersSvc when a user already exists. For example, signing up with an email with which a user already exists.
View Source
var ErrUserNotFound = gorm.ErrRecordNotFound
ErrUserNotFound is returned when the user is not found when queried by a unique attribute such as id or email.
View Source
var Fx = fx.Provide( NewSQLRepo, NewSvc, NewAuthMiddleware, )
View Source
var FxMigrations = fx.Invoke( RunMigrations, )
Functions ¶
func GetCurrentUserUUID ¶
func RunMigrations ¶
Types ¶
type Middleware ¶
func NewAuthMiddleware ¶
func NewAuthMiddleware(p MiddlewareParams) Middleware
type MiddlewareParams ¶
type Module ¶
type Module struct { Svc Svc Middleware Middleware }
type Repo ¶
type Repo interface { GetUser(ctx context.Context, uuid string) (*User, error) AddUser(ctx context.Context, user *User) error }
func NewSQLRepo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.