Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmailAlreadyExists = errors.New("email already exists")
View Source
var ErrUsernameAlreadyExists = errors.New("username already exists")
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
type AuthProvider = shareduser.AuthProvider
type Store ¶
type Store interface {
Create(ctx context.Context, displayName, username, hashedPassword, role string) (*User, error)
CreateWithEmail(ctx context.Context, displayName, username, hashedPassword, role, email string) (*User, error)
GetByID(ctx context.Context, id string) (*User, error)
GetByIDAdmin(ctx context.Context, id string) (*User, error)
GetByEmail(ctx context.Context, email string) (*User, error)
GetByUsername(ctx context.Context, username string) (*model.User, error)
GetByIDWithPassword(ctx context.Context, id string) (*model.User, error)
UpdateLastLogin(ctx context.Context, id string) error
UpdatePassword(ctx context.Context, id string, hashedPassword string) error
UpdateDisplayName(ctx context.Context, id string, displayName string) error
UpdateUsername(ctx context.Context, id string, username string) error
RequestEmailChange(ctx context.Context, id string, email string) (*User, error)
ClearPendingEmailChange(ctx context.Context, id string) error
ConfirmEmailChange(ctx context.Context, id string, email string) (*User, error)
ListAuthProviders(ctx context.Context, id string) ([]*AuthProvider, error)
UnlinkAuthProvider(ctx context.Context, id string, provider string) error
SetActive(ctx context.Context, id string, active bool) error
SetEmailVerified(ctx context.Context, id string, verified bool) error
List(ctx context.Context, offset, limit int, search string) ([]*User, int, error)
UpsertOAuth(ctx context.Context, provider, providerID, email, displayName, avatarURL string) (*User, error)
UpdateRole(ctx context.Context, id string, role string) error
}
type User ¶
type User = shareduser.User
Click to show internal directories.
Click to hide internal directories.