Versions in this module Expand all Collapse all v0 v0.0.1 Oct 25, 2021 Changes in this version + var ErrTokenCannotBeCreated = errors.New("token cannot be created") + var ErrUserAlreadyExist = errors.New("user already exist") + var ErrUserNotFound = errors.New("user not found") + type Repository interface + ActivateUser func(ctx context.Context, username string) error + CreateToken func(ctx context.Context, token string, user auth.User, expiresBy time.Time) error + CreateUser func(ctx context.Context, user auth.User) error + DeleteUserByUsername func(ctx context.Context, username string) error + GetUserByToken func(ctx context.Context, token string) (auth.User, error) + GetUserByUsername func(ctx context.Context, username string) (auth.User, error) + ListUsers func(ctx context.Context) ([]auth.User, error) + ListUsersByIsActivated func(ctx context.Context, isActivated bool) ([]auth.User, error) + func NewMongo(mongoUri, database string) (Repository, error)