store

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TxKey contextKey = "store.tx.state"
	DbKey contextKey = "store.tx.db"
)
View Source
const (
	ConstraintUserEmail           = "unique_user_email"
	ConstraintUserUsername        = "unique_user_username"
	ConstraintPasskeyCredentialID = "unique_passkey_credential_id"
	ConstraintAllowedEmailEmail   = "unique_allowed_email"
	ConstraintPersonalOrgUser     = "unique_personal_org_created_by_user"
	ConstraintInvitationTokenHash = "organization_invitations_token_hash_key"
	ConstraintActiveInvitation    = "unique_active_organization_invitation_email"
)
View Source
const (
	QueueStatePending    = "pending"
	QueueStateRetry      = "retry"
	QueueStateProcessing = "processing"
	QueueStateFailed     = "failed"
)
View Source
const CleanupLeaseName = "cleanup"

Variables

View Source
var (
	ErrUserNotFound                         = errors.New("user not found")
	ErrSessionNotFound                      = errors.New("session not found")
	ErrorAuthProviderNotFound               = errors.New("auth_provider not found")
	ErrorAppleTokenRevocationNotFound       = errors.New("apple token revocation not found")
	ErrRefreshTokenNotFound                 = errors.New("refresh_token not found")
	ErrorChallengeNotFound                  = errors.New("challenge not found")
	ErrorChallengeAlreadyConsumed           = errors.New("challenge already consumed")
	ErrorVerificationCodeNotFound           = errors.New("verification code not found")
	ErrorEmailJobNotFound                   = errors.New("email job not found")
	ErrorEmailJobLeaseLost                  = errors.New("email job processing lease lost")
	ErrorWebhookEventNotFound               = errors.New("webhook event not found")
	ErrorWebhookEventLeaseLost              = errors.New("webhook event processing lease lost")
	ErrorPendingSignupActionNotFound        = errors.New("pending signup action not found")
	ErrorPendingPasswordResetNotFound       = errors.New("pending password reset not found")
	ErrorPendingEmailChangeNotFound         = errors.New("pending email change not found")
	ErrorRoleNotFound                       = errors.New("role not found")
	ErrorPendingProviderLinkNotFound        = errors.New("pending provider link not found")
	ErrPasskeyNotFound                      = errors.New("passkey not found")
	ErrPasskeyAlreadyExists                 = errors.New("passkey already exists")
	ErrWebAuthnChallengeNotFound            = errors.New("webauthn challenge not found")
	ErrWebAuthnChallengeAlreadyConsumed     = errors.New("webauthn challenge already consumed")
	ErrAuthenticationChallengeNotFound      = errors.New("authentication challenge not found")
	ErrOAuthAuthenticationChallengeNotFound = errors.New("oauth authentication challenge not found")
	ErrOAuthAuthenticationChallengeConsumed = errors.New("oauth authentication challenge already consumed")
	ErrEmailVerificationTransactionNotFound = errors.New("email verification transaction not found")
	ErrAllowedEmailNotFound                 = errors.New("allowed email not found")
	ErrAllowedEmailAlreadyExists            = errors.New("allowed email already exists")
	ErrOrganizationNotFound                 = errors.New("organization not found")
	ErrOrganizationMembershipNotFound       = errors.New("organization membership not found")
	ErrOrganizationInvitationNotFound       = errors.New("organization invitation not found")
	ErrEmailTemplateOverrideNotFound        = errors.New("email template override not found")
	ErrEmailTemplateVersionNotFound         = errors.New("email template version not found")
	ErrEmailTemplateRevisionConflict        = errors.New("email template revision conflict")
	ErrInvalidOrganizationName              = errors.New("invalid organization name")
)
View Source
var ErrMaintenanceLeaseNotFound = errors.New("maintenance lease not found")

Functions

func IsUniqueViolation

func IsUniqueViolation(err error, constraint string) bool

Types

type AdminAuditEventFilter added in v0.1.23

type AdminAuditEventFilter struct {
	ActorUserID  *uuid.UUID
	TargetUserID *uuid.UUID
	Action       string
	TargetEmail  string
	Limit        int
	Offset       int
}

type Config

type Config struct {
	Host        string
	Port        int
	Username    string
	Password    string
	Database    string
	Timezone    string
	LogSql      bool
	Logger      *logging.Logger
	SSLMode     string
	SSLRootCert string

	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration
	ConnMaxIdleTime time.Duration
}

Config is the configuration for the database.

type ListCursor added in v0.22.0

type ListCursor struct {
	CreatedAt time.Time
	ID        uuid.UUID
}

ListCursor is the decoded keyset boundary for an ordered collection query.

type MaintenanceLease added in v0.22.0

type MaintenanceLease struct {
	Name       string
	OwnerID    uuid.UUID
	LeaseUntil time.Time
	Generation int64
}

type OperatorAuditEventFilter added in v0.20.0

type OperatorAuditEventFilter struct {
	ActorUserID  *uuid.UUID
	Action       string
	ResourceType string
	ResourceID   string
	Limit        int
	Offset       int
}

type QueueStateStats added in v0.22.0

type QueueStateStats struct {
	State           string
	Count           int64
	OldestCreatedAt *time.Time
}

type QueueStats added in v0.22.0

type QueueStats struct {
	States        []QueueStateStats
	OldestReadyAt *time.Time
	Stuck         int64
}

type ReapResult added in v0.22.0

type ReapResult struct {
	Retried int64
	Failed  int64
}

func (ReapResult) Total added in v0.22.0

func (r ReapResult) Total() int64

type SecurityEventFilter added in v0.22.0

type SecurityEventFilter struct {
	Type            domain.SecurityEventType
	Outcome         domain.SecurityEventOutcome
	UserID          *uuid.UUID
	SessionID       *uuid.UUID
	From            *time.Time
	Before          *time.Time
	CursorCreatedAt *time.Time
	CursorID        *uuid.UUID
	Limit           int
	Offset          int
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Store, error)

func (*Store) AddUserPlatformRoleByName added in v0.1.13

func (s *Store) AddUserPlatformRoleByName(ctx context.Context, userID uuid.UUID, roleName string) error

func (*Store) AttachEmailVerificationChallenge added in v0.22.0

func (s *Store) AttachEmailVerificationChallenge(ctx context.Context, id, challengeID uuid.UUID, targetEmail string) error

func (*Store) ClaimNextEmailJob added in v0.1.12

func (s *Store) ClaimNextEmailJob(ctx context.Context, now time.Time) (domain.EmailJob, error)

func (*Store) ClaimNextWebhookEvent added in v0.1.27

func (s *Store) ClaimNextWebhookEvent(ctx context.Context, now time.Time) (domain.WebhookEvent, error)

func (*Store) Close added in v0.1.21

func (s *Store) Close() error

func (*Store) CompareAndSwapPasswordHash added in v0.22.0

func (s *Store) CompareAndSwapPasswordHash(ctx context.Context, userID uuid.UUID, oldPasswordHash, newPasswordHash string) (bool, error)

func (*Store) ConsumeAuthenticationChallenge added in v0.22.0

func (s *Store) ConsumeAuthenticationChallenge(
	ctx context.Context,
	challengeID uuid.UUID,
	method domain.AuthenticationMethod,
	consumedAt time.Time,
) error

func (*Store) ConsumeChallenge added in v0.1.12

func (s *Store) ConsumeChallenge(ctx context.Context, challengeID uuid.UUID, now time.Time) error

func (*Store) ConsumeEmailVerificationTransaction added in v0.22.0

func (s *Store) ConsumeEmailVerificationTransaction(ctx context.Context, id uuid.UUID, consumedAt time.Time) error

func (*Store) ConsumeOAuthAuthenticationChallenge added in v0.26.0

func (s *Store) ConsumeOAuthAuthenticationChallenge(ctx context.Context, id uuid.UUID, now time.Time) error
func (s *Store) ConsumePendingProviderLink(ctx context.Context, id uuid.UUID, now time.Time) error

func (*Store) ConsumeRefreshToken

func (s *Store) ConsumeRefreshToken(ctx context.Context, tokenID uuid.UUID, consumedAt time.Time) error

func (*Store) ConsumeWebAuthnChallenge added in v0.1.21

func (s *Store) ConsumeWebAuthnChallenge(ctx context.Context, challengeID uuid.UUID, now time.Time) error

func (*Store) CountActiveOrFailedEmailJobs added in v0.22.0

func (s *Store) CountActiveOrFailedEmailJobs(ctx context.Context) (int, error)

func (*Store) CountActiveSessions added in v0.1.23

func (s *Store) CountActiveSessions(ctx context.Context, now time.Time) (int, error)

func (*Store) CountActiveSessionsByUserID added in v0.1.23

func (s *Store) CountActiveSessionsByUserID(ctx context.Context, userID uuid.UUID, now time.Time) (int, error)

func (*Store) CountActiveUsersWithRole added in v0.1.23

func (s *Store) CountActiveUsersWithRole(ctx context.Context, roleName string) (int, error)

func (*Store) CountAllowedEmails added in v0.1.23

func (s *Store) CountAllowedEmails(ctx context.Context, query string) (int, error)

func (*Store) CountAuthMethods added in v0.1.21

func (s *Store) CountAuthMethods(ctx context.Context, userID uuid.UUID) (int, error)

func (*Store) CountDisabledUsers added in v0.1.23

func (s *Store) CountDisabledUsers(ctx context.Context) (int, error)

func (*Store) CountRecentRiskyChallenges added in v0.1.23

func (s *Store) CountRecentRiskyChallenges(ctx context.Context, now time.Time) (int, error)

func (*Store) CountUsers added in v0.1.23

func (s *Store) CountUsers(ctx context.Context) (int, error)

func (*Store) CountUsersCreatedSince added in v0.1.23

func (s *Store) CountUsersCreatedSince(ctx context.Context, since time.Time) (int, error)

func (*Store) CountUsersWithRole added in v0.1.23

func (s *Store) CountUsersWithRole(ctx context.Context, roleName string) (int, error)

func (*Store) CreateAdminAuditEvent added in v0.1.23

func (s *Store) CreateAdminAuditEvent(ctx context.Context, event domain.AdminAuditEvent) (domain.AdminAuditEvent, error)

func (*Store) CreateAllowedEmail added in v0.1.10

func (s *Store) CreateAllowedEmail(ctx context.Context, allowedEmail domain.AllowedEmail) error

func (*Store) CreateAppleTokenRevocation added in v0.22.0

func (s *Store) CreateAppleTokenRevocation(ctx context.Context, revocation domain.AppleTokenRevocation) error

func (*Store) CreateAppleTokenRevocationForUser added in v0.22.0

func (s *Store) CreateAppleTokenRevocationForUser(ctx context.Context, id uuid.UUID, userID uuid.UUID) error

func (*Store) CreateAuthProvider

func (s *Store) CreateAuthProvider(ctx context.Context, provider domain.AuthProvider) (domain.AuthProvider, error)

func (*Store) CreateChallenge added in v0.1.12

func (s *Store) CreateChallenge(ctx context.Context, in domain.Challenge) (domain.Challenge, error)

func (*Store) CreateEmailJob added in v0.1.12

func (s *Store) CreateEmailJob(ctx context.Context, in domain.EmailJob) (domain.EmailJob, error)

CreateEmailJob inserts a job when delivery for its template is enabled. Missing delivery settings default to enabled; a disabled template returns a zero job without an error so the surrounding business transaction can commit.

func (*Store) CreateOAuthAuthenticationChallenge added in v0.26.0

func (s *Store) CreateOAuthAuthenticationChallenge(ctx context.Context, challenge domain.OAuthAuthenticationChallenge) (domain.OAuthAuthenticationChallenge, error)

func (*Store) CreateOrganization added in v0.1.24

func (s *Store) CreateOrganization(ctx context.Context, org domain.Organization) (domain.Organization, error)

func (*Store) CreateOrganizationInvitation added in v0.1.24

func (s *Store) CreateOrganizationInvitation(ctx context.Context, invitation domain.OrganizationInvitation) (domain.OrganizationInvitation, error)

func (*Store) CreateOrganizationMembership added in v0.1.24

func (s *Store) CreateOrganizationMembership(ctx context.Context, membership domain.OrganizationMembership) (domain.OrganizationMembership, error)

func (*Store) CreatePasskey added in v0.1.21

func (s *Store) CreatePasskey(ctx context.Context, passkey domain.Passkey) (domain.Passkey, error)

func (*Store) CreatePendingEmailChange added in v0.1.15

func (s *Store) CreatePendingEmailChange(ctx context.Context, in domain.PendingEmailChange) (domain.PendingEmailChange, error)

func (*Store) CreatePendingPasswordReset added in v0.1.14

func (s *Store) CreatePendingPasswordReset(ctx context.Context, in domain.PendingPasswordReset) (domain.PendingPasswordReset, error)
func (s *Store) CreatePendingProviderLink(ctx context.Context, link domain.PendingProviderLink) (domain.PendingProviderLink, error)

func (*Store) CreatePendingSignupAction added in v0.1.12

func (s *Store) CreatePendingSignupAction(ctx context.Context, in domain.PendingSignupAction) (domain.PendingSignupAction, error)

func (*Store) CreateRefreshToken

func (s *Store) CreateRefreshToken(ctx context.Context, token domain.RefreshToken) error

func (*Store) CreateSecurityEvent added in v0.22.0

func (s *Store) CreateSecurityEvent(ctx context.Context, event domain.SecurityEvent) (domain.SecurityEvent, error)

func (*Store) CreateSession

func (s *Store) CreateSession(ctx context.Context, session domain.Session) (domain.Session, error)

func (*Store) CreateUser

func (s *Store) CreateUser(ctx context.Context, user domain.User) (domain.User, error)

func (*Store) CreateWebAuthnChallenge added in v0.1.21

func (s *Store) CreateWebAuthnChallenge(ctx context.Context, in domain.WebAuthnChallenge) (domain.WebAuthnChallenge, error)

func (*Store) CreateWebhookEvent added in v0.1.27

func (s *Store) CreateWebhookEvent(ctx context.Context, event domain.WebhookEvent) (domain.WebhookEvent, error)

func (*Store) CurrentSchemaVersion

func (s *Store) CurrentSchemaVersion(ctx context.Context) (int, error)

func (*Store) DB

func (s *Store) DB() *sql.DB

func (*Store) DeleteAdminAuditEventsBefore added in v0.1.23

func (s *Store) DeleteAdminAuditEventsBefore(ctx context.Context, cutoff time.Time, batchSize int) (int64, error)

func (*Store) DeleteAllowedEmail added in v0.1.10

func (s *Store) DeleteAllowedEmail(ctx context.Context, email string) error

func (*Store) DeleteAllowedEmailByID added in v0.1.23

func (s *Store) DeleteAllowedEmailByID(ctx context.Context, id uuid.UUID) (domain.AllowedEmail, error)

func (*Store) DeleteAppleTokenRevocation added in v0.22.0

func (s *Store) DeleteAppleTokenRevocation(ctx context.Context, id uuid.UUID) error

func (*Store) DeleteAuthProviderByMethodAndUserID added in v0.1.17

func (s *Store) DeleteAuthProviderByMethodAndUserID(ctx context.Context, provider domain.Provider, userID uuid.UUID) error

func (*Store) DeleteEmailTemplateOverride added in v0.20.0

func (s *Store) DeleteEmailTemplateOverride(
	ctx context.Context,
	key domain.EmailTemplate,
	expectedRevision int64,
	actorUserID uuid.UUID,
) error

func (*Store) DeleteExpiredChallenges added in v0.1.18

func (s *Store) DeleteExpiredChallenges(ctx context.Context, now time.Time, batchSize int) (int64, error)

func (*Store) DeleteExpiredEmailVerificationTransactions added in v0.22.0

func (s *Store) DeleteExpiredEmailVerificationTransactions(ctx context.Context, now time.Time, batchSize int) (int64, error)

func (*Store) DeleteExpiredOAuthAuthenticationChallenges added in v0.26.0

func (s *Store) DeleteExpiredOAuthAuthenticationChallenges(ctx context.Context, now time.Time, batchSize int) (int64, error)

func (*Store) DeleteExpiredRefreshTokens

func (s *Store) DeleteExpiredRefreshTokens(ctx context.Context, now time.Time, batchSize int) (int64, error)

func (*Store) DeleteExpiredSessions

func (s *Store) DeleteExpiredSessions(ctx context.Context, now time.Time, batchSize int) (int64, error)

func (*Store) DeleteExpiredWebAuthnChallenges added in v0.1.21

func (s *Store) DeleteExpiredWebAuthnChallenges(ctx context.Context, now time.Time, batchSize int) (int64, error)

func (*Store) DeleteExpiredWebhookEvents added in v0.1.27

func (s *Store) DeleteExpiredWebhookEvents(
	ctx context.Context, deliveredBefore, failedBefore time.Time, batchSize int,
) (int64, error)

func (*Store) DeleteFailedEmailJobsBefore added in v0.1.12

func (s *Store) DeleteFailedEmailJobsBefore(ctx context.Context, t time.Time, batchSize int) (int64, error)

func (*Store) DeleteOperatorAuditEventsBefore added in v0.22.0

func (s *Store) DeleteOperatorAuditEventsBefore(ctx context.Context, cutoff time.Time, batchSize int) (int64, error)

func (*Store) DeleteOrganization added in v0.14.0

func (s *Store) DeleteOrganization(ctx context.Context, organizationID uuid.UUID) error

func (*Store) DeleteOrganizationMembership added in v0.1.24

func (s *Store) DeleteOrganizationMembership(ctx context.Context, organizationID uuid.UUID, userID uuid.UUID) error

func (*Store) DeletePasskeyByIDAndUserID added in v0.1.21

func (s *Store) DeletePasskeyByIDAndUserID(ctx context.Context, passkeyID, userID uuid.UUID) error

func (*Store) DeletePendingEmailChangesByUserID added in v0.22.0

func (s *Store) DeletePendingEmailChangesByUserID(ctx context.Context, userID uuid.UUID) error

func (*Store) DeletePendingPasswordResetByChallengeID added in v0.1.14

func (s *Store) DeletePendingPasswordResetByChallengeID(ctx context.Context, challengeID uuid.UUID) error

func (*Store) DeletePendingPasswordResetsByUserID added in v0.12.0

func (s *Store) DeletePendingPasswordResetsByUserID(ctx context.Context, userID uuid.UUID) error

func (*Store) DeleteRefreshTokensBySession

func (s *Store) DeleteRefreshTokensBySession(ctx context.Context, sessionID uuid.UUID) error

func (*Store) DeleteRefreshTokensByUserID added in v0.1.18

func (s *Store) DeleteRefreshTokensByUserID(ctx context.Context, userID uuid.UUID) error

func (*Store) DeleteRefreshTokensForOtherSessions added in v0.1.16

func (s *Store) DeleteRefreshTokensForOtherSessions(ctx context.Context, userID uuid.UUID, keepSessionID uuid.UUID) error

func (*Store) DeleteRevokedSessions added in v0.22.0

func (s *Store) DeleteRevokedSessions(ctx context.Context, batchSize int) (int64, error)

func (*Store) DeleteRuntimeSettingOverride added in v0.21.0

func (s *Store) DeleteRuntimeSettingOverride(
	ctx context.Context,
	key configruntime.Key,
	expectedRevision int64,
	expectedStateRevision int64,
	actorUserID uuid.UUID,
	auditMetadata json.RawMessage,
) (int64, error)

func (*Store) DeleteSecurityEventsBefore added in v0.22.0

func (s *Store) DeleteSecurityEventsBefore(ctx context.Context, cutoff time.Time, batchSize int) (int64, error)

func (*Store) DeleteSentEmailJobsBefore added in v0.1.12

func (s *Store) DeleteSentEmailJobsBefore(ctx context.Context, t time.Time, batchSize int) (int64, error)

func (*Store) DeleteSessionsByOrganization added in v0.14.0

func (s *Store) DeleteSessionsByOrganization(ctx context.Context, organizationID uuid.UUID) error

func (*Store) DeleteSessionsByOrganizationMembership added in v0.14.0

func (s *Store) DeleteSessionsByOrganizationMembership(ctx context.Context, organizationID uuid.UUID, userID uuid.UUID) error

func (*Store) DeleteUser

func (s *Store) DeleteUser(ctx context.Context, userID uuid.UUID) error

func (*Store) DeleteUserEmailReferences added in v0.1.27

func (s *Store) DeleteUserEmailReferences(ctx context.Context, userID uuid.UUID, email string) error

func (*Store) DisableUser

func (s *Store) DisableUser(ctx context.Context, userID uuid.UUID, disabledAt time.Time) error

func (*Store) EmailQueueStats added in v0.22.0

func (s *Store) EmailQueueStats(ctx context.Context, now, staleBefore time.Time) (QueueStats, error)

func (*Store) EnableUser added in v0.1.23

func (s *Store) EnableUser(ctx context.Context, userID uuid.UUID) error

func (*Store) EnsureAllowedEmail added in v0.1.25

func (s *Store) EnsureAllowedEmail(ctx context.Context, email string) error

func (*Store) EnsureDefaultOrganizationForUser added in v0.1.24

func (s *Store) EnsureDefaultOrganizationForUser(ctx context.Context, userID uuid.UUID, name string) (domain.Organization, domain.OrganizationMembership, error)

func (*Store) EnsureOrganizationForUser added in v0.1.24

func (s *Store) EnsureOrganizationForUser(ctx context.Context, userID uuid.UUID, name string, kind domain.OrganizationKind) (domain.Organization, domain.OrganizationMembership, error)

func (*Store) EnsureOrganizationForUserWithCreated added in v0.1.24

func (s *Store) EnsureOrganizationForUserWithCreated(ctx context.Context, userID uuid.UUID, name string, kind domain.OrganizationKind) (domain.Organization, domain.OrganizationMembership, bool, error)

func (*Store) EnsureOrganizationMode added in v0.1.24

func (s *Store) EnsureOrganizationMode(ctx context.Context, mode string) error

func (*Store) GetActiveOrganizationInvitationByOrganizationAndEmail added in v0.1.24

func (s *Store) GetActiveOrganizationInvitationByOrganizationAndEmail(ctx context.Context, organizationID uuid.UUID, email string) (domain.OrganizationInvitation, error)

func (*Store) GetActiveSessionByID added in v0.1.16

func (s *Store) GetActiveSessionByID(ctx context.Context, sessionID uuid.UUID, now time.Time) (domain.Session, error)

func (*Store) GetActiveSessionByIDForUpdate added in v0.22.0

func (s *Store) GetActiveSessionByIDForUpdate(ctx context.Context, sessionID uuid.UUID, now time.Time) (domain.Session, error)

func (*Store) GetAllowedEmailByID added in v0.10.0

func (s *Store) GetAllowedEmailByID(ctx context.Context, id uuid.UUID) (domain.AllowedEmail, error)

func (*Store) GetAppleCredentialByAuthProviderID added in v0.22.0

func (s *Store) GetAppleCredentialByAuthProviderID(ctx context.Context, authProviderID uuid.UUID) (domain.AppleCredential, error)

func (*Store) GetAppleCredentialByUserID added in v0.22.0

func (s *Store) GetAppleCredentialByUserID(ctx context.Context, userID uuid.UUID) (domain.AppleCredential, error)

func (*Store) GetAppleTokenRevocationByIDForUpdate added in v0.22.0

func (s *Store) GetAppleTokenRevocationByIDForUpdate(ctx context.Context, id uuid.UUID) (domain.AppleTokenRevocation, error)

func (*Store) GetAuthProviderByMethodAndUserID

func (s *Store) GetAuthProviderByMethodAndUserID(ctx context.Context, provider domain.Provider, userID uuid.UUID) (domain.AuthProvider, error)

func (*Store) GetAuthProviderByMethodAndUserIDForUpdate added in v0.22.0

func (s *Store) GetAuthProviderByMethodAndUserIDForUpdate(ctx context.Context, provider domain.Provider, userID uuid.UUID) (domain.AuthProvider, error)

func (*Store) GetAuthProviderByProviderAndProviderUserID

func (s *Store) GetAuthProviderByProviderAndProviderUserID(ctx context.Context, provider domain.Provider, providerUserID string) (domain.AuthProvider, error)

func (*Store) GetAuthenticationChallengeByID added in v0.22.0

func (s *Store) GetAuthenticationChallengeByID(
	ctx context.Context,
	challengeID uuid.UUID,
) (domain.AuthenticationChallenge, error)

func (*Store) GetAuthenticationChallengeByIDForUpdate added in v0.22.0

func (s *Store) GetAuthenticationChallengeByIDForUpdate(
	ctx context.Context,
	challengeID uuid.UUID,
) (domain.AuthenticationChallenge, error)

func (*Store) GetAuthenticationChallengeBySessionIDForUpdate added in v0.22.0

func (s *Store) GetAuthenticationChallengeBySessionIDForUpdate(
	ctx context.Context,
	sessionID uuid.UUID,
) (domain.AuthenticationChallenge, error)

func (*Store) GetChallengeByID added in v0.1.12

func (s *Store) GetChallengeByID(ctx context.Context, challengeID uuid.UUID) (domain.Challenge, error)

func (*Store) GetChallengeByIDForUpdate added in v0.1.18

func (s *Store) GetChallengeByIDForUpdate(ctx context.Context, challengeID uuid.UUID) (domain.Challenge, error)

func (*Store) GetEmailJobByID added in v0.22.0

func (s *Store) GetEmailJobByID(ctx context.Context, jobID uuid.UUID) (domain.EmailJob, error)

func (*Store) GetEmailTemplateOverride added in v0.20.0

func (s *Store) GetEmailTemplateOverride(ctx context.Context, key domain.EmailTemplate) (domain.EmailTemplateOverride, error)

func (*Store) GetEmailTemplateVersion added in v0.20.0

func (s *Store) GetEmailTemplateVersion(ctx context.Context, key domain.EmailTemplate, version int64) (domain.EmailTemplateVersion, error)

func (*Store) GetEmailVerificationTransactionByChallengeID added in v0.22.0

func (s *Store) GetEmailVerificationTransactionByChallengeID(ctx context.Context, challengeID uuid.UUID) (domain.EmailVerificationTransaction, error)

func (*Store) GetEmailVerificationTransactionByChallengeIDForUpdate added in v0.22.0

func (s *Store) GetEmailVerificationTransactionByChallengeIDForUpdate(ctx context.Context, challengeID uuid.UUID) (domain.EmailVerificationTransaction, error)

func (*Store) GetEmailVerificationTransactionByID added in v0.22.0

func (s *Store) GetEmailVerificationTransactionByID(ctx context.Context, id uuid.UUID) (domain.EmailVerificationTransaction, error)

func (*Store) GetEmailVerificationTransactionByIDForUpdate added in v0.22.0

func (s *Store) GetEmailVerificationTransactionByIDForUpdate(ctx context.Context, id uuid.UUID) (domain.EmailVerificationTransaction, error)

func (*Store) GetNextAppleTokenRevocation added in v0.22.0

func (s *Store) GetNextAppleTokenRevocation(ctx context.Context, now time.Time) (domain.AppleTokenRevocation, error)

func (*Store) GetOAuthAuthenticationChallengeForUpdate added in v0.26.0

func (s *Store) GetOAuthAuthenticationChallengeForUpdate(ctx context.Context, id uuid.UUID) (domain.OAuthAuthenticationChallenge, error)

func (*Store) GetOrganizationByID added in v0.1.24

func (s *Store) GetOrganizationByID(ctx context.Context, organizationID uuid.UUID) (domain.Organization, error)

func (*Store) GetOrganizationByIDForUpdate added in v0.14.0

func (s *Store) GetOrganizationByIDForUpdate(ctx context.Context, organizationID uuid.UUID) (domain.Organization, error)

func (*Store) GetOrganizationInvitationByID added in v0.1.24

func (s *Store) GetOrganizationInvitationByID(ctx context.Context, invitationID uuid.UUID) (domain.OrganizationInvitation, error)

func (*Store) GetOrganizationInvitationByIDForUpdate added in v0.1.24

func (s *Store) GetOrganizationInvitationByIDForUpdate(ctx context.Context, invitationID uuid.UUID) (domain.OrganizationInvitation, error)

func (*Store) GetOrganizationInvitationByTokenHash added in v0.1.24

func (s *Store) GetOrganizationInvitationByTokenHash(ctx context.Context, tokenHash string) (domain.OrganizationInvitation, error)

func (*Store) GetOrganizationInvitationByTokenHashForUpdate added in v0.1.24

func (s *Store) GetOrganizationInvitationByTokenHashForUpdate(ctx context.Context, tokenHash string) (domain.OrganizationInvitation, error)

func (*Store) GetOrganizationMember added in v0.1.25

func (s *Store) GetOrganizationMember(ctx context.Context, organizationID uuid.UUID, userID uuid.UUID) (domain.OrganizationMember, error)

func (*Store) GetOrganizationMembership added in v0.1.24

func (s *Store) GetOrganizationMembership(ctx context.Context, organizationID uuid.UUID, userID uuid.UUID) (domain.OrganizationMembership, error)

func (*Store) GetPasskeyByCredentialID added in v0.1.21

func (s *Store) GetPasskeyByCredentialID(ctx context.Context, credentialID []byte) (domain.Passkey, error)

func (*Store) GetPasskeyByID added in v0.1.21

func (s *Store) GetPasskeyByID(ctx context.Context, passkeyID uuid.UUID) (domain.Passkey, error)

func (*Store) GetPendingEmailChangeByChallengeID added in v0.1.15

func (s *Store) GetPendingEmailChangeByChallengeID(ctx context.Context, challengeID uuid.UUID) (domain.PendingEmailChange, error)

func (*Store) GetPendingEmailChangeByChallengeIDForUpdate added in v0.22.0

func (s *Store) GetPendingEmailChangeByChallengeIDForUpdate(ctx context.Context, challengeID uuid.UUID) (domain.PendingEmailChange, error)

func (*Store) GetPendingPasswordResetByChallengeID added in v0.1.14

func (s *Store) GetPendingPasswordResetByChallengeID(ctx context.Context, challengeID uuid.UUID) (domain.PendingPasswordReset, error)

func (*Store) GetPendingProviderLinkByID added in v0.1.17

func (s *Store) GetPendingProviderLinkByID(ctx context.Context, id uuid.UUID) (domain.PendingProviderLink, error)

func (*Store) GetPendingSignupActionByChallengeID added in v0.1.12

func (s *Store) GetPendingSignupActionByChallengeID(ctx context.Context, challengeID uuid.UUID) (domain.PendingSignupAction, error)

func (*Store) GetPersonalOrganizationForUser added in v0.1.24

func (s *Store) GetPersonalOrganizationForUser(ctx context.Context, userID uuid.UUID) (domain.Organization, domain.OrganizationMembership, error)

func (*Store) GetRefreshTokenByHash

func (s *Store) GetRefreshTokenByHash(ctx context.Context, hash string) (domain.RefreshToken, error)

func (*Store) GetRefreshTokenByHashForUpdate added in v0.22.0

func (s *Store) GetRefreshTokenByHashForUpdate(ctx context.Context, hash string) (domain.RefreshToken, error)

func (*Store) GetSessionByID

func (s *Store) GetSessionByID(ctx context.Context, sessionID uuid.UUID) (domain.Session, error)

func (*Store) GetUserByEmail

func (s *Store) GetUserByEmail(ctx context.Context, email string) (domain.User, error)

func (*Store) GetUserByEmailOrUsername added in v0.1.23

func (s *Store) GetUserByEmailOrUsername(ctx context.Context, query string) (domain.User, error)

func (*Store) GetUserByID

func (s *Store) GetUserByID(ctx context.Context, userID uuid.UUID) (domain.User, error)

func (*Store) GetUserByIDForUpdate added in v0.14.0

func (s *Store) GetUserByIDForUpdate(ctx context.Context, userID uuid.UUID) (domain.User, error)

func (*Store) GetUserPlatformRoleNames added in v0.1.13

func (s *Store) GetUserPlatformRoleNames(ctx context.Context, userID uuid.UUID) ([]string, error)

func (*Store) GetVerificationCodeByChallengeID added in v0.1.12

func (s *Store) GetVerificationCodeByChallengeID(ctx context.Context, challengeID uuid.UUID) (domain.VerificationCode, error)

func (*Store) GetWebAuthnChallengeByIDForUpdate added in v0.1.21

func (s *Store) GetWebAuthnChallengeByIDForUpdate(ctx context.Context, challengeID uuid.UUID) (domain.WebAuthnChallenge, error)

func (*Store) GetWebhookEventByID added in v0.1.27

func (s *Store) GetWebhookEventByID(ctx context.Context, eventID string) (domain.WebhookEvent, error)

func (*Store) IncrementChallengeAttemptCount added in v0.1.12

func (s *Store) IncrementChallengeAttemptCount(ctx context.Context, challengeID uuid.UUID) error

func (*Store) IncrementChallengeResendCount added in v0.1.12

func (s *Store) IncrementChallengeResendCount(ctx context.Context, challengeID uuid.UUID, now time.Time) (bool, error)

func (*Store) IsEmailAllowed added in v0.1.10

func (s *Store) IsEmailAllowed(ctx context.Context, email string) (bool, error)

func (*Store) IsUserDisabled

func (s *Store) IsUserDisabled(ctx context.Context, userID uuid.UUID) (bool, error)

func (*Store) ListActiveOrFailedEmailJobs added in v0.22.0

func (s *Store) ListActiveOrFailedEmailJobs(ctx context.Context, limit, offset int) ([]domain.EmailJob, error)

func (*Store) ListActiveSessionsByUserID added in v0.1.16

func (s *Store) ListActiveSessionsByUserID(ctx context.Context, userID uuid.UUID, now time.Time) ([]domain.Session, error)

func (*Store) ListActiveSessionsPageByUserID added in v0.22.0

func (s *Store) ListActiveSessionsPageByUserID(ctx context.Context, userID uuid.UUID, now time.Time, cursor *ListCursor, limit int) ([]domain.Session, error)

func (*Store) ListAdminAuditEvents added in v0.1.23

func (s *Store) ListAdminAuditEvents(ctx context.Context, filter AdminAuditEventFilter) ([]domain.AdminAuditEvent, error)

func (*Store) ListAllowedEmails added in v0.1.13

func (s *Store) ListAllowedEmails(ctx context.Context) ([]domain.AllowedEmail, error)

func (*Store) ListAllowedEmailsPage added in v0.1.23

func (s *Store) ListAllowedEmailsPage(ctx context.Context, query string, limit, offset int) ([]domain.AllowedEmail, error)

func (*Store) ListAuthProvidersByUserID added in v0.1.17

func (s *Store) ListAuthProvidersByUserID(ctx context.Context, userID uuid.UUID) ([]domain.AuthProvider, error)

func (*Store) ListEmailTemplateDeliverySettings added in v0.21.0

func (s *Store) ListEmailTemplateDeliverySettings(ctx context.Context) ([]domain.EmailTemplateDeliverySetting, error)

func (*Store) ListEmailTemplateOverrides added in v0.20.0

func (s *Store) ListEmailTemplateOverrides(ctx context.Context) ([]domain.EmailTemplateOverride, error)

func (*Store) ListEmailTemplateVersions added in v0.20.0

func (s *Store) ListEmailTemplateVersions(ctx context.Context, key domain.EmailTemplate) ([]domain.EmailTemplateVersion, error)

func (*Store) ListEmailTemplateVersionsPage added in v0.22.0

func (s *Store) ListEmailTemplateVersionsPage(ctx context.Context, key domain.EmailTemplate, limit, offset int) ([]domain.EmailTemplateVersion, error)

func (*Store) ListOperatorAuditEvents added in v0.20.0

func (s *Store) ListOperatorAuditEvents(ctx context.Context, filter OperatorAuditEventFilter) ([]domain.OperatorAuditEvent, error)

func (*Store) ListOrganizationInvitationsByOrganizationID added in v0.1.24

func (s *Store) ListOrganizationInvitationsByOrganizationID(ctx context.Context, organizationID uuid.UUID) ([]domain.OrganizationInvitation, error)

func (*Store) ListOrganizationInvitationsPage added in v0.22.0

func (s *Store) ListOrganizationInvitationsPage(ctx context.Context, organizationID uuid.UUID, cursor *ListCursor, limit int) ([]domain.OrganizationInvitation, error)

func (*Store) ListOrganizationMembersByOrganizationID added in v0.1.25

func (s *Store) ListOrganizationMembersByOrganizationID(ctx context.Context, organizationID uuid.UUID) ([]domain.OrganizationMember, error)

func (*Store) ListOrganizationMembersPage added in v0.22.0

func (s *Store) ListOrganizationMembersPage(ctx context.Context, organizationID uuid.UUID, cursor *ListCursor, limit int) ([]domain.OrganizationMember, error)

func (*Store) ListOrganizationMembershipsByOrganizationID added in v0.1.24

func (s *Store) ListOrganizationMembershipsByOrganizationID(ctx context.Context, organizationID uuid.UUID) ([]domain.OrganizationMembership, error)

func (*Store) ListOrganizationMembershipsByUserID added in v0.1.24

func (s *Store) ListOrganizationMembershipsByUserID(ctx context.Context, userID uuid.UUID) ([]domain.OrganizationMembership, error)

func (*Store) ListPasskeysByUserID added in v0.1.21

func (s *Store) ListPasskeysByUserID(ctx context.Context, userID uuid.UUID) ([]domain.Passkey, error)

func (*Store) ListPasskeysByUserIDOffsetPage added in v0.22.0

func (s *Store) ListPasskeysByUserIDOffsetPage(ctx context.Context, userID uuid.UUID, limit, offset int) ([]domain.Passkey, error)

func (*Store) ListPasskeysPageByUserID added in v0.22.0

func (s *Store) ListPasskeysPageByUserID(ctx context.Context, userID uuid.UUID, cursor *ListCursor, limit int) ([]domain.Passkey, error)

func (*Store) ListRecentRiskyChallenges added in v0.1.23

func (s *Store) ListRecentRiskyChallenges(ctx context.Context, now time.Time, limit, offset int) ([]domain.Challenge, error)

func (*Store) ListSecurityEvents added in v0.22.0

func (s *Store) ListSecurityEvents(ctx context.Context, limit, offset int) ([]domain.SecurityEvent, error)

func (*Store) ListSessionsByUserID added in v0.1.23

func (s *Store) ListSessionsByUserID(ctx context.Context, userID uuid.UUID) ([]domain.Session, error)

func (*Store) ListSessionsPageByUserID added in v0.22.0

func (s *Store) ListSessionsPageByUserID(ctx context.Context, userID uuid.UUID, limit, offset int) ([]domain.Session, error)

func (*Store) ListUserOrganizationsPage added in v0.22.0

func (s *Store) ListUserOrganizationsPage(ctx context.Context, userID uuid.UUID, cursor *ListCursor, limit int) ([]UserOrganization, error)

func (*Store) ListenForWebhookEvents added in v0.30.1

func (s *Store) ListenForWebhookEvents(ctx context.Context, notify func()) error

ListenForWebhookEvents holds a dedicated PostgreSQL connection and calls notify after committed webhook inserts. The queue remains the source of truth.

func (*Store) LoadRuntimeSettings added in v0.21.0

func (s *Store) LoadRuntimeSettings(ctx context.Context) (configruntime.PersistedState, error)

func (*Store) LockOrganizationForKeyShare added in v0.14.0

func (s *Store) LockOrganizationForKeyShare(ctx context.Context, organizationID uuid.UUID) error

func (*Store) LockPlatformRoleByName added in v0.1.23

func (s *Store) LockPlatformRoleByName(ctx context.Context, roleName string) error

func (*Store) LockUserForAuthMethodMutation added in v0.1.21

func (s *Store) LockUserForAuthMethodMutation(ctx context.Context, userID uuid.UUID) error

func (*Store) LockUserForKeyShare added in v0.14.0

func (s *Store) LockUserForKeyShare(ctx context.Context, userID uuid.UUID) error

func (*Store) LockUserForUpdate added in v0.22.0

func (s *Store) LockUserForUpdate(ctx context.Context, userID uuid.UUID) error

func (*Store) MarkEmailJobFailed added in v0.1.12

func (s *Store) MarkEmailJobFailed(
	ctx context.Context,
	jobID uuid.UUID,
	processingStartedAt time.Time,
	lastError string,
	terminalReason string,
	failedAt time.Time,
) error

func (*Store) MarkEmailJobSent added in v0.1.12

func (s *Store) MarkEmailJobSent(ctx context.Context, jobID uuid.UUID, processingStartedAt, now time.Time) error

func (*Store) MarkOrganizationInvitationAccepted added in v0.1.24

func (s *Store) MarkOrganizationInvitationAccepted(ctx context.Context, invitationID uuid.UUID, acceptedByUserID uuid.UUID, now time.Time) error

func (*Store) MarkOrganizationInvitationRevoked added in v0.1.24

func (s *Store) MarkOrganizationInvitationRevoked(ctx context.Context, invitationID uuid.UUID, revokedByUserID *uuid.UUID, now time.Time) error

func (*Store) MarkUserEmailVerified added in v0.22.0

func (s *Store) MarkUserEmailVerified(ctx context.Context, userID uuid.UUID, email string, verifiedAt time.Time) (bool, error)

func (*Store) MarkWebhookEventDelivered added in v0.1.27

func (s *Store) MarkWebhookEventDelivered(
	ctx context.Context,
	eventID string,
	processingStartedAt time.Time,
	deliveredAt time.Time,
) error

func (*Store) MarkWebhookEventFailed added in v0.1.27

func (s *Store) MarkWebhookEventFailed(
	ctx context.Context,
	eventID string,
	processingStartedAt time.Time,
	lastError string,
) error

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

func (*Store) QuerySecurityEvents added in v0.22.0

func (s *Store) QuerySecurityEvents(ctx context.Context, filter SecurityEventFilter) ([]domain.SecurityEvent, error)

func (*Store) ReapStaleEmailJobs added in v0.22.0

func (s *Store) ReapStaleEmailJobs(
	ctx context.Context,
	staleBefore time.Time,
	now time.Time,
	maxAttempts int,
	batchSize int,
	retryBaseDelay time.Duration,
	retryMaxDelay time.Duration,
) (ReapResult, error)

func (*Store) ReapStaleWebhookEvents added in v0.1.27

func (s *Store) ReapStaleWebhookEvents(
	ctx context.Context,
	staleBefore time.Time,
	nextAttemptAt time.Time,
	maxAttempts int,
	batchSize int,
) (ReapResult, error)

func (*Store) ReleaseMaintenanceLease added in v0.22.0

func (s *Store) ReleaseMaintenanceLease(ctx context.Context, lease MaintenanceLease) (bool, error)

func (*Store) RemoveUserPlatformRoleByName added in v0.1.13

func (s *Store) RemoveUserPlatformRoleByName(ctx context.Context, userID uuid.UUID, roleName string) error

func (*Store) RenewMaintenanceLease added in v0.22.0

func (s *Store) RenewMaintenanceLease(
	ctx context.Context,
	lease MaintenanceLease,
	duration time.Duration,
) (MaintenanceLease, bool, error)

func (*Store) ReplaceAuthenticationChallenge added in v0.22.0

func (s *Store) ReplaceAuthenticationChallenge(
	ctx context.Context,
	challenge domain.AuthenticationChallenge,
) (domain.AuthenticationChallenge, error)

func (*Store) RequeueEmailJob added in v0.1.12

func (s *Store) RequeueEmailJob(ctx context.Context, jobID uuid.UUID, processingStartedAt time.Time, lastError string, nextAttemptAt time.Time) error

func (*Store) RequeueWebhookEvent added in v0.1.27

func (s *Store) RequeueWebhookEvent(
	ctx context.Context,
	eventID string,
	processingStartedAt time.Time,
	lastError string,
	nextAttemptAt time.Time,
) error

func (*Store) RescheduleAppleTokenRevocation added in v0.22.0

func (s *Store) RescheduleAppleTokenRevocation(ctx context.Context, id uuid.UUID, nextAttemptAt time.Time, lastError string) error

func (*Store) RestrictPasskey added in v0.22.0

func (s *Store) RestrictPasskey(ctx context.Context, passkeyID uuid.UUID, now time.Time) error

func (*Store) RevokeAllActiveSessionsForUser added in v0.1.23

func (s *Store) RevokeAllActiveSessionsForUser(ctx context.Context, userID uuid.UUID, revokedAt time.Time) (int64, error)

func (*Store) RevokeAllSessionsForUser

func (s *Store) RevokeAllSessionsForUser(ctx context.Context, userID uuid.UUID, revokedAt time.Time) error

func (*Store) RevokeOtherSessionsByUserID added in v0.1.16

func (s *Store) RevokeOtherSessionsByUserID(ctx context.Context, userID uuid.UUID, keepSessionID uuid.UUID, revokedAt time.Time) error

func (*Store) RevokeSession

func (s *Store) RevokeSession(ctx context.Context, sessionID uuid.UUID, revokedAt time.Time) error

func (*Store) RevokeSessionByIDAndUserID added in v0.1.23

func (s *Store) RevokeSessionByIDAndUserID(ctx context.Context, sessionID uuid.UUID, userID uuid.UUID, revokedAt time.Time) error

func (*Store) RunMaintenanceBatch added in v0.22.0

func (s *Store) RunMaintenanceBatch(
	ctx context.Context,
	lease MaintenanceLease,
	batch func(context.Context) (int64, bool, error),
) (rows int64, more bool, owned bool, err error)

func (*Store) SetChallengeLastSentAt added in v0.1.12

func (s *Store) SetChallengeLastSentAt(ctx context.Context, challengeID uuid.UUID, now time.Time) error

func (*Store) SetEmailTemplateDeliveryEnabled added in v0.21.0

func (s *Store) SetEmailTemplateDeliveryEnabled(
	ctx context.Context,
	key domain.EmailTemplate,
	enabled bool,
	actorUserID uuid.UUID,
) (domain.EmailTemplateDeliverySetting, error)

func (*Store) TryAcquireMaintenanceLease added in v0.22.0

func (s *Store) TryAcquireMaintenanceLease(
	ctx context.Context,
	name string,
	ownerID uuid.UUID,
	duration time.Duration,
) (MaintenanceLease, bool, error)

func (*Store) UpdateAuthProviderIdentity added in v0.16.0

func (s *Store) UpdateAuthProviderIdentity(ctx context.Context, userID uuid.UUID, provider domain.Provider, providerUserID string) error

func (*Store) UpdateOrganizationMembershipRole added in v0.1.24

func (s *Store) UpdateOrganizationMembershipRole(ctx context.Context, organizationID uuid.UUID, userID uuid.UUID, role domain.OrganizationRole) (domain.OrganizationMembership, error)

func (*Store) UpdateOrganizationName added in v0.1.24

func (s *Store) UpdateOrganizationName(ctx context.Context, organizationID uuid.UUID, name string) (domain.Organization, error)

func (*Store) UpdatePasskeyAfterLogin added in v0.1.21

func (s *Store) UpdatePasskeyAfterLogin(ctx context.Context, credentialID []byte, signCount uint32, cloneWarning bool, now time.Time) error

func (*Store) UpdatePasswordHash added in v0.1.14

func (s *Store) UpdatePasswordHash(ctx context.Context, userID uuid.UUID, passwordHash string) error

func (*Store) UpdatePendingProviderLinkOAuthIdentity added in v0.1.19

func (s *Store) UpdatePendingProviderLinkOAuthIdentity(
	ctx context.Context,
	id uuid.UUID,
	providerUserID string,
	providerEmail string,
	providerEmailVerified bool,
) error

func (*Store) UpdateSessionActiveOrganization added in v0.1.24

func (s *Store) UpdateSessionActiveOrganization(ctx context.Context, sessionID uuid.UUID, organizationID uuid.UUID) error

func (*Store) UpdateSessionAuthentication added in v0.22.0

func (s *Store) UpdateSessionAuthentication(
	ctx context.Context,
	userID uuid.UUID,
	sessionID uuid.UUID,
	method domain.AuthenticationMethod,
	authenticatedAt time.Time,
) error

func (*Store) UpdateUserEmailIfCurrent added in v0.22.0

func (s *Store) UpdateUserEmailIfCurrent(ctx context.Context, userID uuid.UUID, currentEmail, newEmail string) (bool, error)

func (*Store) UpdateUserEmailVerifiedIfCurrent added in v0.22.0

func (s *Store) UpdateUserEmailVerifiedIfCurrent(ctx context.Context, userID uuid.UUID, currentEmail, newEmail string, verifiedAt time.Time) (bool, error)

func (*Store) UpdateUsername

func (s *Store) UpdateUsername(ctx context.Context, userID uuid.UUID, username string) error

func (*Store) UpsertAppleCredential added in v0.22.0

func (s *Store) UpsertAppleCredential(ctx context.Context, credential domain.AppleCredential, revocationID uuid.UUID) error

func (*Store) UpsertEmailTemplateOverride added in v0.20.0

func (s *Store) UpsertEmailTemplateOverride(ctx context.Context, in domain.EmailTemplateOverride, expectedRevision int64) (domain.EmailTemplateOverride, error)

func (*Store) UpsertEmailVerificationTransaction added in v0.22.0

func (s *Store) UpsertEmailVerificationTransaction(ctx context.Context, in domain.EmailVerificationTransaction) (domain.EmailVerificationTransaction, error)

func (*Store) UpsertRuntimeSettingOverride added in v0.21.0

func (s *Store) UpsertRuntimeSettingOverride(ctx context.Context, mutation configruntime.Mutation) (configruntime.PersistedOverride, error)

func (*Store) UpsertVerificationCode added in v0.1.12

func (s *Store) UpsertVerificationCode(ctx context.Context, in domain.VerificationCode) error

func (*Store) UserExistsByEmail

func (s *Store) UserExistsByEmail(ctx context.Context, email string) (bool, error)

func (*Store) UserHasPlatformRole added in v0.1.23

func (s *Store) UserHasPlatformRole(ctx context.Context, userID uuid.UUID, roleName string) (bool, error)

func (*Store) WebhookQueueStats added in v0.22.0

func (s *Store) WebhookQueueStats(ctx context.Context, now, staleBefore time.Time) (QueueStats, error)

type UserOrganization added in v0.22.0

type UserOrganization struct {
	Organization domain.Organization
	Membership   domain.OrganizationMembership
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL