Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { CreateUser(ctx context.Context, user auth.User) error GetUserByUsername(ctx context.Context, username string) (auth.User, error) ListUsers(ctx context.Context) ([]auth.User, error) ListUsersByIsActivated(ctx context.Context, isActivated bool) ([]auth.User, error) ActivateUser(ctx context.Context, username string) error DeleteUserByUsername(ctx context.Context, username string) error CreateToken(ctx context.Context, token string, user auth.User, expiresBy time.Time) error GetUserByToken(ctx context.Context, token string) (auth.User, error) }
func NewMongo ¶
func NewMongo(mongoUri, database string) (Repository, error)
Click to show internal directories.
Click to hide internal directories.