Documentation ¶
Overview ¶
Package users provides the user related business logic.
Index ¶
- func ChangePassword(ctx context.Context, be *backend.Backend, username, newPassword string) error
- func DeleteAccountByName(ctx context.Context, be *backend.Backend, username string) error
- func From(ctx context.Context) *types.User
- func GetUserByID(ctx context.Context, be *backend.Backend, id types.ID) (*types.User, error)
- func GetUserByName(ctx context.Context, be *backend.Backend, username string) (*types.User, error)
- func IsCorrectPassword(ctx context.Context, be *backend.Backend, username, password string) (*types.User, error)
- func SignUp(ctx context.Context, be *backend.Backend, username, password string) (*types.User, error)
- func With(ctx context.Context, user *types.User) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangePassword ¶ added in v0.4.29
func ChangePassword( ctx context.Context, be *backend.Backend, username, newPassword string, ) error
ChangePassword changes the password for a user.
func DeleteAccountByName ¶ added in v0.4.29
DeleteAccountByName deletes a user by name.
func GetUserByID ¶ added in v0.4.13
GetUserByID returns a user by ID.
func GetUserByName ¶ added in v0.4.14
func GetUserByName( ctx context.Context, be *backend.Backend, username string, ) (*types.User, error)
GetUserByName returns a user by the given username.
func IsCorrectPassword ¶
func IsCorrectPassword( ctx context.Context, be *backend.Backend, username, password string, ) (*types.User, error)
IsCorrectPassword checks if the password is correct.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.