Documentation ¶
Index ¶
- func NewWebAuthnUser(ctx context.Context, log *logrus.Entry, repo *Repo, usr models.User) webauthn.User
- func Query[T any](ctx context.Context, stmt stmts.Statement[T], conn *gorqlite.Connection, ...) ([]T, error)
- func QueryOne[T any](ctx context.Context, stmt stmts.Statement[T], conn *gorqlite.Connection, ...) (T, error)
- type Repo
- func (repo *Repo) AddUserAddress(ctx context.Context, address models.Address) (models.Address, error)
- func (repo *Repo) AddUserPhoneNumber(ctx context.Context, model models.PhoneNumber) (models.PhoneNumber, error)
- func (repo *Repo) AddWebauthnCred(ctx context.Context, userID string, cred webauthn.Credential, ...) error
- func (repo *Repo) AssignRoleToUser(ctx context.Context, userID string, roleID string) error
- func (repo *Repo) CheckAndDeleteRecoveryCode(ctx context.Context, userID string, code string) error
- func (repo *Repo) CreateRegistrationToken(ctx context.Context, token models.RegistrationToken) error
- func (repo *Repo) CreateRole(ctx context.Context, group models.Role) (models.Role, error)
- func (repo *Repo) CreateUser(ctx context.Context, user models.User) (models.User, error)
- func (repo *Repo) CreateUserEmail(ctx context.Context, mail models.EMail) (models.EMail, error)
- func (repo *Repo) CreateWebPushSubscriptionForUser(ctx context.Context, userID string, userAgent string, tokenID string, ...) (string, error)
- func (repo *Repo) DeleteEMailFromUser(ctx context.Context, userID string, mailID string) error
- func (repo *Repo) DeleteRejectedTokens(ctx context.Context, threshold time.Time) error
- func (repo *Repo) DeleteRole(ctx context.Context, id string) error
- func (repo *Repo) DeleteUser(ctx context.Context, id string) error
- func (repo *Repo) DeleteUserAddress(ctx context.Context, userID, addressID string) error
- func (repo *Repo) DeleteUserPhoneNumber(ctx context.Context, userID string, phoneNumberID string) error
- func (repo *Repo) DeleteWebPushSubscriptionByID(ctx context.Context, id string) error
- func (repo *Repo) DeleteWebPushSubscriptionForToken(ctx context.Context, tokenID string) error
- func (repo *Repo) GetAddressesByID(ctx context.Context, userID, id string) (models.Address, error)
- func (repo *Repo) GetPasskeys(ctx context.Context, userID string) ([]models.Passkey, error)
- func (repo *Repo) GetRoleByID(ctx context.Context, id string) (models.Role, error)
- func (repo *Repo) GetRoleByName(ctx context.Context, name string) (models.Role, error)
- func (repo *Repo) GetRoles(ctx context.Context) ([]models.Role, error)
- func (repo *Repo) GetUserAddresses(ctx context.Context, userID string) ([]models.Address, error)
- func (repo *Repo) GetUserByEMail(ctx context.Context, name string) (models.User, bool, error)
- func (repo *Repo) GetUserByID(ctx context.Context, id string) (models.User, error)
- func (repo *Repo) GetUserByName(ctx context.Context, name string) (models.User, error)
- func (repo *Repo) GetUserEmailByID(ctx context.Context, userID, id string) (models.EMail, error)
- func (repo *Repo) GetUserEmails(ctx context.Context, userID string) ([]models.EMail, error)
- func (repo *Repo) GetUserPhoneNumberByID(ctx context.Context, id, userID string) (models.PhoneNumber, error)
- func (repo *Repo) GetUserPhoneNumbers(ctx context.Context, userID string) ([]models.PhoneNumber, error)
- func (repo *Repo) GetUserPrimaryMail(ctx context.Context, userID string) (models.EMail, error)
- func (repo *Repo) GetUserPrimaryPhoneNumber(ctx context.Context, userID string) (models.PhoneNumber, error)
- func (repo *Repo) GetUserRoles(ctx context.Context, userID string) ([]models.Role, error)
- func (repo *Repo) GetUsers(ctx context.Context) ([]models.User, error)
- func (repo *Repo) GetUsersByRole(ctx context.Context, roleID string) ([]models.User, error)
- func (repo *Repo) GetWebPushSubscriptionsForUser(ctx context.Context, userID string) ([]models.Webpush, error)
- func (repo *Repo) GetWebauthnCreds(ctx context.Context, userID string) ([]webauthn.Credential, error)
- func (repo *Repo) IsTokenRejected(ctx context.Context, tokenID string) (bool, error)
- func (repo *Repo) MarkEmailAsPrimary(ctx context.Context, userID string, mailID string) error
- func (repo *Repo) MarkEmailAsVerified(ctx context.Context, userID string, mailID string) error
- func (repo *Repo) MarkPhoneNumberAsPrimary(ctx context.Context, userID string, phoneNumberID string) error
- func (repo *Repo) MarkPhoneNumberAsVerified(ctx context.Context, userID string, phoneNumberID string) error
- func (repo *Repo) MarkRegistrationTokenUsed(ctx context.Context, token string) error
- func (repo *Repo) MarkTokenRejected(ctx context.Context, token models.RejectedToken) error
- func (repo *Repo) Migrate(ctx context.Context) error
- func (repo *Repo) RemoveUserTotpSecret(ctx context.Context, userID string) error
- func (repo *Repo) RemoveWebauthnCred(ctx context.Context, userID, id string) error
- func (repo *Repo) ReplaceUserRecoveryCodes(ctx context.Context, userID string, codes []string) error
- func (repo *Repo) SetUserPassword(ctx context.Context, userID string, password string) error
- func (repo *Repo) SetUserTotpSecret(ctx context.Context, userID string, totpSecret string) error
- func (repo *Repo) UnassignRoleFromUser(ctx context.Context, userID string, roleID string) error
- func (repo *Repo) UpdateRole(ctx context.Context, role models.Role) error
- func (repo *Repo) UpdateUser(ctx context.Context, user models.User) error
- func (repo *Repo) UpdateUserAddress(ctx context.Context, address models.Address) error
- func (repo *Repo) UserHasRecoveryCodes(ctx context.Context, userID string) (bool, error)
- func (repo *Repo) ValidateRegistrationToken(ctx context.Context, token string) (models.RegistrationToken, error)
- type WebauthnUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebAuthnUser ¶
Types ¶
type Repo ¶
type Repo struct {
Conn *gorqlite.Connection
}
func (*Repo) AddUserAddress ¶
func (*Repo) AddUserPhoneNumber ¶
func (repo *Repo) AddUserPhoneNumber(ctx context.Context, model models.PhoneNumber) (models.PhoneNumber, error)
func (*Repo) AddWebauthnCred ¶
func (*Repo) AssignRoleToUser ¶
func (*Repo) CheckAndDeleteRecoveryCode ¶
func (*Repo) CreateRegistrationToken ¶
func (*Repo) CreateRole ¶
func (*Repo) CreateUser ¶
func (*Repo) CreateUserEmail ¶
func (*Repo) CreateWebPushSubscriptionForUser ¶ added in v1.1.0
func (*Repo) DeleteEMailFromUser ¶
func (*Repo) DeleteRejectedTokens ¶
func (*Repo) DeleteUserAddress ¶
func (*Repo) DeleteUserPhoneNumber ¶
func (*Repo) DeleteWebPushSubscriptionByID ¶ added in v1.1.0
func (*Repo) DeleteWebPushSubscriptionForToken ¶ added in v1.1.0
func (*Repo) GetAddressesByID ¶
func (*Repo) GetPasskeys ¶
func (*Repo) GetRoleByID ¶
func (*Repo) GetRoleByName ¶
func (*Repo) GetUserAddresses ¶
func (*Repo) GetUserByEMail ¶
func (*Repo) GetUserByID ¶
func (*Repo) GetUserByName ¶
func (*Repo) GetUserEmailByID ¶
func (*Repo) GetUserEmails ¶
func (*Repo) GetUserPhoneNumberByID ¶
func (*Repo) GetUserPhoneNumbers ¶
func (*Repo) GetUserPrimaryMail ¶
func (*Repo) GetUserPrimaryPhoneNumber ¶
func (*Repo) GetUserRoles ¶
func (*Repo) GetUsersByRole ¶
func (*Repo) GetWebPushSubscriptionsForUser ¶ added in v1.1.0
func (*Repo) GetWebauthnCreds ¶
func (*Repo) IsTokenRejected ¶
func (*Repo) MarkEmailAsPrimary ¶
func (*Repo) MarkEmailAsVerified ¶
func (*Repo) MarkPhoneNumberAsPrimary ¶
func (*Repo) MarkPhoneNumberAsVerified ¶
func (*Repo) MarkRegistrationTokenUsed ¶
func (*Repo) MarkTokenRejected ¶
func (*Repo) RemoveUserTotpSecret ¶
func (*Repo) RemoveWebauthnCred ¶
func (*Repo) ReplaceUserRecoveryCodes ¶
func (*Repo) SetUserPassword ¶
func (*Repo) SetUserTotpSecret ¶
func (*Repo) UnassignRoleFromUser ¶
func (*Repo) UpdateUserAddress ¶
func (*Repo) UserHasRecoveryCodes ¶
func (*Repo) ValidateRegistrationToken ¶
type WebauthnUser ¶
func (*WebauthnUser) WebAuthnCredentials ¶
func (usr *WebauthnUser) WebAuthnCredentials() []webauthn.Credential
func (*WebauthnUser) WebAuthnDisplayName ¶
func (usr *WebauthnUser) WebAuthnDisplayName() string
func (*WebauthnUser) WebAuthnID ¶
func (usr *WebauthnUser) WebAuthnID() []byte
func (*WebauthnUser) WebAuthnIcon ¶
func (usr *WebauthnUser) WebAuthnIcon() string
func (*WebauthnUser) WebAuthnName ¶
func (usr *WebauthnUser) WebAuthnName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.