Versions in this module Expand all Collapse all v0 v0.0.2 Feb 19, 2026 v0.0.1 Feb 16, 2026 Changes in this version + const DefaultAdminEmail + const DefaultAdminPassword + const DefaultAdminUsername + const ModuleName + var DefaultQuerySettings = &queryhelper.QuerySettings + var ErrEmailExists = errors.New("email already exists") + var ErrInvalidCredentials = errors.New("invalid credentials") + var ErrInvalidInput = errors.New("invalid input") + var ErrInvalidPassword = errors.New("invalid password") + var ErrNotFound = errors.New("user not found") + var ErrOperationFailed = errors.New("operation failed") + var ErrPasswordTooShort = errors.New("password must be at least 8 characters") + var ErrUsernameExists = errors.New("username already exists") + func Module(scope string) fx.Option + type ListUsersRequest struct + Email *string + Role *string + Status *string + Username *string + type ListUsersResp struct + Data []*User + QueryHelper *queryhelper.QueryHelper + type Params struct + Database database.DatabaseConnector + type User struct + CreatedAt time.Time + DisplayName string + Email string + ID string + LastLoginAt *time.Time + Roles []string + Status string + UpdatedAt time.Time + Username string + type UserConfig struct + DisplayName string + Email string + Password string + Roles []string + Status string + Username string + type UserManager struct + func (m *UserManager) Authenticate(ctx context.Context, identifier string, password string) (*User, error) + func (m *UserManager) Create(ctx context.Context, cfg *UserConfig) (*User, error) + func (m *UserManager) Delete(ctx context.Context, userID string) error + func (m *UserManager) Get(ctx context.Context, userID string) (*User, error) + func (m *UserManager) GetByEmail(ctx context.Context, email string) (*User, error) + func (m *UserManager) GetByUsername(ctx context.Context, username string) (*User, error) + func (m *UserManager) InitDefaultConfigs() + func (m *UserManager) List(ctx context.Context, req *ListUsersRequest, qh *queryhelper.QueryHelper) (*ListUsersResp, error) + func (m *UserManager) OnStart(ctx context.Context) error + func (m *UserManager) OnStop(ctx context.Context) error + func (m *UserManager) Update(ctx context.Context, userID string, cfg *UserConfig) (*User, error) + func (m *UserManager) UpdatePassword(ctx context.Context, userID string, newPassword string) error + func (m *UserManager) VerifyPassword(ctx context.Context, userID string, password string) error