Versions in this module Expand all Collapse all v0 v0.3.0 Aug 26, 2026 Changes in this version + type DeviceAuthorizationAdapter struct + DB sqlb.Executor + DeviceCodeHashColumn string + UserCodeColumn string + func (a DeviceAuthorizationAdapter[R]) CreateDeviceAuthorization(ctx context.Context, d *store.DeviceAuthorization) error + func (a DeviceAuthorizationAdapter[R]) DeleteDeviceAuthorization(ctx context.Context, id string) error + func (a DeviceAuthorizationAdapter[R]) GetDeviceAuthorizationByDeviceCodeHash(ctx context.Context, hash string) (*store.DeviceAuthorization, error) + func (a DeviceAuthorizationAdapter[R]) GetDeviceAuthorizationByUserCode(ctx context.Context, userCode string) (*store.DeviceAuthorization, error) + func (a DeviceAuthorizationAdapter[R]) UpdateDeviceAuthorization(ctx context.Context, d *store.DeviceAuthorization) error + type EmailVerificationAdapter struct + DB sqlb.Executor + TokenHashColumn string + UsedAtColumn string + UserIDColumn string + func (a EmailVerificationAdapter[R]) CreateEmailVerificationToken(ctx context.Context, t *store.EmailVerificationToken) error + func (a EmailVerificationAdapter[R]) DeleteUserEmailVerificationTokens(ctx context.Context, userID string) error + func (a EmailVerificationAdapter[R]) GetEmailVerificationTokenByHash(ctx context.Context, hash string) (*store.EmailVerificationToken, error) + func (a EmailVerificationAdapter[R]) MarkEmailVerificationTokenUsed(ctx context.Context, id string) error + type InvitationAdapter struct + DB sqlb.Executor + TeamIDColumn string + TokenHashColumn string + func (a InvitationAdapter[R]) CreateInvitation(ctx context.Context, i *store.Invitation) error + func (a InvitationAdapter[R]) GetInvitation(ctx context.Context, id string) (*store.Invitation, error) + func (a InvitationAdapter[R]) GetInvitationByTokenHash(ctx context.Context, hash string) (*store.Invitation, error) + func (a InvitationAdapter[R]) ListInvitationsByTeam(ctx context.Context, teamID string) ([]*store.Invitation, error) + func (a InvitationAdapter[R]) UpdateInvitation(ctx context.Context, i *store.Invitation) error + type LockoutAdapter struct + AttemptCreatedAtColumn string + AttemptEmailColumn string + Attempts Table[A, store.FailedLoginAttempt] + AttemptsDB sqlb.Executor + LockUserIDColumn string + LocksDB sqlb.Executor + NewLockRow func(userID string) L + func (a LockoutAdapter[A, L]) ClearFailedLoginAttempts(ctx context.Context, email string) error + func (a LockoutAdapter[A, L]) CountRecentFailedLoginAttempts(ctx context.Context, email string, since time.Time) (int, error) + func (a LockoutAdapter[A, L]) IsAccountLocked(ctx context.Context, userID string) (bool, error) + func (a LockoutAdapter[A, L]) LockAccount(ctx context.Context, userID string) error + func (a LockoutAdapter[A, L]) RecordFailedLoginAttempt(ctx context.Context, at *store.FailedLoginAttempt) error + func (a LockoutAdapter[A, L]) UnlockAccount(ctx context.Context, userID string) error + type MemberAdapter struct + DB sqlb.Executor + TeamIDColumn string + UserIDColumn string + func (a MemberAdapter[R]) CreateMember(ctx context.Context, m *store.Member) error + func (a MemberAdapter[R]) DeleteMember(ctx context.Context, id string) error + func (a MemberAdapter[R]) GetMember(ctx context.Context, id string) (*store.Member, error) + func (a MemberAdapter[R]) GetMemberByUserAndTeam(ctx context.Context, userID, teamID string) (*store.Member, error) + func (a MemberAdapter[R]) ListMembersByTeam(ctx context.Context, teamID string) ([]*store.Member, error) + func (a MemberAdapter[R]) ListMembershipsByUser(ctx context.Context, userID string) ([]*store.Member, error) + func (a MemberAdapter[R]) UpdateMember(ctx context.Context, m *store.Member) error + type PasswordResetAdapter struct + DB sqlb.Executor + TokenHashColumn string + UsedAtColumn string + UserIDColumn string + func (a PasswordResetAdapter[R]) CreatePasswordResetToken(ctx context.Context, t *store.PasswordResetToken) error + func (a PasswordResetAdapter[R]) DeleteUserPasswordResetTokens(ctx context.Context, userID string) error + func (a PasswordResetAdapter[R]) GetPasswordResetTokenByHash(ctx context.Context, hash string) (*store.PasswordResetToken, error) + func (a PasswordResetAdapter[R]) MarkPasswordResetTokenUsed(ctx context.Context, id string) error + type PendingTwoFactorAdapter struct + DB sqlb.Executor + TokenHashColumn string + func (a PendingTwoFactorAdapter[R]) CreatePendingTwoFactorSession(ctx context.Context, s *store.PendingTwoFactorSession) error + func (a PendingTwoFactorAdapter[R]) DeletePendingTwoFactorSession(ctx context.Context, id string) error + func (a PendingTwoFactorAdapter[R]) GetPendingTwoFactorSessionByHash(ctx context.Context, hash string) (*store.PendingTwoFactorSession, error) + type PersonalAccessTokenAdapter struct + DB sqlb.Executor + TokenHashColumn string + UserIDColumn string + func (a PersonalAccessTokenAdapter[R]) CreatePersonalAccessToken(ctx context.Context, t *store.PersonalAccessToken) error + func (a PersonalAccessTokenAdapter[R]) GetPersonalAccessToken(ctx context.Context, id string) (*store.PersonalAccessToken, error) + func (a PersonalAccessTokenAdapter[R]) GetPersonalAccessTokenByHash(ctx context.Context, hash string) (*store.PersonalAccessToken, error) + func (a PersonalAccessTokenAdapter[R]) ListPersonalAccessTokensByUser(ctx context.Context, userID string) ([]*store.PersonalAccessToken, error) + func (a PersonalAccessTokenAdapter[R]) UpdatePersonalAccessToken(ctx context.Context, t *store.PersonalAccessToken) error + type RefreshTokenAdapter struct + DB sqlb.Executor + ExpiresAtColumn string + RevokedAtColumn string + TokenHashColumn string + UserIDColumn string + func (a RefreshTokenAdapter[R]) CreateRefreshToken(ctx context.Context, t *store.RefreshToken) error + func (a RefreshTokenAdapter[R]) GetRefreshTokenByHash(ctx context.Context, hash string) (*store.RefreshToken, error) + func (a RefreshTokenAdapter[R]) ListActiveRefreshTokens(ctx context.Context, userID string) ([]*store.RefreshToken, error) + func (a RefreshTokenAdapter[R]) RevokeAllUserRefreshTokens(ctx context.Context, userID string) error + func (a RefreshTokenAdapter[R]) RevokeRefreshToken(ctx context.Context, id string) error + type SuperuserAdapter struct + DB sqlb.Executor + EmailColumn string + func (a SuperuserAdapter[R]) CountSuperusers(ctx context.Context) (int, error) + func (a SuperuserAdapter[R]) CreateSuperuser(ctx context.Context, s *store.Superuser) error + func (a SuperuserAdapter[R]) GetSuperuserByEmail(ctx context.Context, email string) (*store.Superuser, error) + func (a SuperuserAdapter[R]) GetSuperuserByID(ctx context.Context, id string) (*store.Superuser, error) + func (a SuperuserAdapter[R]) ListSuperusers(ctx context.Context) ([]*store.Superuser, error) + func (a SuperuserAdapter[R]) UpdateSuperuser(ctx context.Context, s *store.Superuser) error + type SuperuserRefreshTokenAdapter struct + DB sqlb.Executor + RevokedAtColumn string + SuperuserIDColumn string + TokenHashColumn string + func (a SuperuserRefreshTokenAdapter[R]) CreateSuperuserRefreshToken(ctx context.Context, t *store.SuperuserRefreshToken) error + func (a SuperuserRefreshTokenAdapter[R]) GetSuperuserRefreshTokenByHash(ctx context.Context, hash string) (*store.SuperuserRefreshToken, error) + func (a SuperuserRefreshTokenAdapter[R]) RevokeAllSuperuserRefreshTokens(ctx context.Context, superuserID string) error + func (a SuperuserRefreshTokenAdapter[R]) RevokeSuperuserRefreshToken(ctx context.Context, id string) error + type TOTPAdapter struct + DB sqlb.Executor + UserIDColumn string + func (a TOTPAdapter[R]) CreateTOTPSettings(ctx context.Context, t *store.TOTPSettings) error + func (a TOTPAdapter[R]) DeleteTOTPSettings(ctx context.Context, userID string) error + func (a TOTPAdapter[R]) GetTOTPSettingsByUserID(ctx context.Context, userID string) (*store.TOTPSettings, error) + func (a TOTPAdapter[R]) UpdateTOTPSettings(ctx context.Context, t *store.TOTPSettings) error + type Table struct + FromRow func(R) T + GetID func(T) string + IDColumn string + SetID func(R, string) R + ToRow func(T) R + ToUpdateColumns func(T) map[string]any + func (t Table[R, T]) CountWhere(ctx context.Context, db sqlb.Executor, preds ...sqlb.Pred) (int64, error) + func (t Table[R, T]) Create(ctx context.Context, db sqlb.Executor, v T) (T, error) + func (t Table[R, T]) Delete(ctx context.Context, db sqlb.Executor, id string) error + func (t Table[R, T]) DeleteWhere(ctx context.Context, db sqlb.Executor, preds ...sqlb.Pred) (int64, error) + func (t Table[R, T]) ExistsWhere(ctx context.Context, db sqlb.Executor, preds ...sqlb.Pred) (bool, error) + func (t Table[R, T]) GetBy(ctx context.Context, db sqlb.Executor, column string, value any) (T, error) + func (t Table[R, T]) GetWhere(ctx context.Context, db sqlb.Executor, preds ...sqlb.Pred) (T, error) + func (t Table[R, T]) ListBy(ctx context.Context, db sqlb.Executor, column string, value any) ([]T, error) + func (t Table[R, T]) ListWhere(ctx context.Context, db sqlb.Executor, preds ...sqlb.Pred) ([]T, error) + func (t Table[R, T]) SetColumnWhere(ctx context.Context, db sqlb.Executor, column string, value any, ...) error + func (t Table[R, T]) Update(ctx context.Context, db sqlb.Executor, v T) error + type TeamAdapter struct + DB sqlb.Executor + SlugColumn string + func (a TeamAdapter[R]) CreateTeam(ctx context.Context, t *store.Team) error + func (a TeamAdapter[R]) DeleteTeam(ctx context.Context, id string) error + func (a TeamAdapter[R]) GetTeam(ctx context.Context, id string) (*store.Team, error) + func (a TeamAdapter[R]) GetTeamBySlug(ctx context.Context, slug string) (*store.Team, error) + func (a TeamAdapter[R]) UpdateTeam(ctx context.Context, t *store.Team) error + type UserAdapter struct + DB sqlb.Executor + EmailColumn string + func (a UserAdapter[R]) CreateUser(ctx context.Context, u *store.User) error + func (a UserAdapter[R]) GetUserByEmail(ctx context.Context, email string) (*store.User, error) + func (a UserAdapter[R]) GetUserByID(ctx context.Context, id string) (*store.User, error) + func (a UserAdapter[R]) UpdateUser(ctx context.Context, u *store.User) error