Documentation ¶
Index ¶
- Constants
- func WithTransaction(ctx context.Context, tx *pop.Connection) context.Context
- type Persister
- func (p *Persister) Add(ctx context.Context, csrfToken string, errs error) (uuid.UUID, error)
- func (p *Persister) AddMessage(ctx context.Context, m *courier.Message) error
- func (p *Persister) CleanupDatabase(ctx context.Context, wait time.Duration, older time.Duration, batchSize int) error
- func (p *Persister) Clear(ctx context.Context, olderThan time.Duration, force bool) (err error)
- func (p *Persister) Close(ctx context.Context) error
- func (p *Persister) Connection(ctx context.Context) *pop.Connection
- func (p *Persister) CountIdentities(ctx context.Context) (int64, error)
- func (p *Persister) CreateIdentity(ctx context.Context, i *identity.Identity) error
- func (p *Persister) CreateLoginFlow(ctx context.Context, r *login.Flow) error
- func (p *Persister) CreateRecoveryFlow(ctx context.Context, r *recovery.Flow) error
- func (p *Persister) CreateRecoveryToken(ctx context.Context, token *link.RecoveryToken) error
- func (p *Persister) CreateRegistrationFlow(ctx context.Context, r *registration.Flow) error
- func (p *Persister) CreateSettingsFlow(ctx context.Context, r *settings.Flow) error
- func (p *Persister) CreateVerificationFlow(ctx context.Context, r *verification.Flow) error
- func (p *Persister) CreateVerificationToken(ctx context.Context, token *link.VerificationToken) error
- func (p *Persister) DeleteContinuitySession(ctx context.Context, id uuid.UUID) error
- func (p *Persister) DeleteExpiredContinuitySessions(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteExpiredLoginFlows(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteExpiredRecoveryFlows(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteExpiredRegistrationFlows(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteExpiredSessions(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteExpiredSettingsFlows(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteExpiredVerificationFlows(ctx context.Context, expiresAt time.Time, limit int) error
- func (p *Persister) DeleteIdentity(ctx context.Context, id uuid.UUID) error
- func (p *Persister) DeleteRecoveryToken(ctx context.Context, token string) error
- func (p *Persister) DeleteSession(ctx context.Context, sid uuid.UUID) error
- func (p *Persister) DeleteSessionByToken(ctx context.Context, token string) error
- func (p *Persister) DeleteSessionsByIdentity(ctx context.Context, identityID uuid.UUID) error
- func (p *Persister) DeleteVerificationToken(ctx context.Context, token string) error
- func (p *Persister) DetermineNetwork(ctx context.Context) (*networkx.Network, error)
- func (p *Persister) FindByCredentialsIdentifier(ctx context.Context, ct identity.CredentialsType, match string) (*identity.Identity, *identity.Credentials, error)
- func (p *Persister) FindRecoveryAddressByValue(ctx context.Context, via identity.RecoveryAddressType, value string) (*identity.RecoveryAddress, error)
- func (p *Persister) FindVerifiableAddressByValue(ctx context.Context, via identity.VerifiableAddressType, value string) (*identity.VerifiableAddress, error)
- func (p *Persister) ForceLoginFlow(ctx context.Context, id uuid.UUID) error
- func (p *Persister) GetConnection(ctx context.Context) *pop.Connection
- func (p *Persister) GetContinuitySession(ctx context.Context, id uuid.UUID) (*continuity.Container, error)
- func (p *Persister) GetIdentity(ctx context.Context, id uuid.UUID) (*identity.Identity, error)
- func (p *Persister) GetIdentityConfidential(ctx context.Context, id uuid.UUID) (*identity.Identity, error)
- func (p *Persister) GetLoginFlow(ctx context.Context, id uuid.UUID) (*login.Flow, error)
- func (p *Persister) GetRecoveryFlow(ctx context.Context, id uuid.UUID) (*recovery.Flow, error)
- func (p *Persister) GetRegistrationFlow(ctx context.Context, id uuid.UUID) (*registration.Flow, error)
- func (p *Persister) GetSession(ctx context.Context, sid uuid.UUID, expandables session.Expandables) (*session.Session, error)
- func (p *Persister) GetSessionByToken(ctx context.Context, token string, expandables session.Expandables) (*session.Session, error)
- func (p *Persister) GetSettingsFlow(ctx context.Context, id uuid.UUID) (*settings.Flow, error)
- func (p *Persister) GetVerificationFlow(ctx context.Context, id uuid.UUID) (*verification.Flow, error)
- func (p *Persister) IncrementMessageSendCount(ctx context.Context, id uuid.UUID) error
- func (p *Persister) LatestQueuedMessage(ctx context.Context) (*courier.Message, error)
- func (p *Persister) ListIdentities(ctx context.Context, page, perPage int) ([]identity.Identity, error)
- func (p *Persister) ListMessages(ctx context.Context, filter courier.MessagesFilter) ([]courier.Message, int64, error)
- func (p *Persister) ListRecoveryAddresses(ctx context.Context, page, itemsPerPage int) (a []identity.RecoveryAddress, err error)
- func (p *Persister) ListSessionsByIdentity(ctx context.Context, iID uuid.UUID, active *bool, page, perPage int, ...) ([]*session.Session, error)
- func (p *Persister) ListVerifiableAddresses(ctx context.Context, page, itemsPerPage int) (a []identity.VerifiableAddress, err error)
- func (p *Persister) MigrateDown(ctx context.Context, steps int) error
- func (p *Persister) MigrateUp(ctx context.Context) error
- func (p *Persister) MigrationStatus(ctx context.Context) (popx.MigrationStatuses, error)
- func (p *Persister) Migrator() *popx.Migrator
- func (p *Persister) NetworkID(ctx context.Context) uuid.UUID
- func (p *Persister) NextMessages(ctx context.Context, limit uint8) (messages []courier.Message, err error)
- func (p *Persister) Ping() error
- func (p *Persister) Read(ctx context.Context, id uuid.UUID) (*errorx.ErrorContainer, error)
- func (p *Persister) RevokeSession(ctx context.Context, iID, sID uuid.UUID) error
- func (p *Persister) RevokeSessionByToken(ctx context.Context, token string) error
- func (p *Persister) RevokeSessionsIdentityExcept(ctx context.Context, iID, sID uuid.UUID) (int, error)
- func (p *Persister) SaveContinuitySession(ctx context.Context, c *continuity.Container) error
- func (p *Persister) SetMessageStatus(ctx context.Context, id uuid.UUID, ms courier.MessageStatus) error
- func (p *Persister) Transaction(ctx context.Context, ...) error
- func (p *Persister) UpdateIdentity(ctx context.Context, i *identity.Identity) error
- func (p *Persister) UpdateLoginFlow(ctx context.Context, r *login.Flow) error
- func (p *Persister) UpdateRecoveryFlow(ctx context.Context, r *recovery.Flow) error
- func (p *Persister) UpdateRegistrationFlow(ctx context.Context, r *registration.Flow) error
- func (p *Persister) UpdateSettingsFlow(ctx context.Context, r *settings.Flow) error
- func (p *Persister) UpdateVerifiableAddress(ctx context.Context, address *identity.VerifiableAddress) error
- func (p *Persister) UpdateVerificationFlow(ctx context.Context, r *verification.Flow) error
- func (p *Persister) UpsertSession(ctx context.Context, s *session.Session) error
- func (p *Persister) UseRecoveryToken(ctx context.Context, fID uuid.UUID, token string) (*link.RecoveryToken, error)
- func (p *Persister) UseVerificationToken(ctx context.Context, fID uuid.UUID, token string) (*link.VerificationToken, error)
- func (p *Persister) VerifyAddress(ctx context.Context, code string) error
- func (p Persister) WithNetworkID(sid uuid.UUID) persistence.Persister
Constants ¶
View Source
const SessionDeviceLocationMaxLength = 512
View Source
const SessionDeviceUserAgentMaxLength = 512
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Persister ¶
type Persister struct {
// contains filtered or unexported fields
}
func NewPersister ¶
func (*Persister) AddMessage ¶
func (*Persister) CleanupDatabase ¶ added in v0.11.0
func (*Persister) Connection ¶
func (*Persister) CountIdentities ¶
func (*Persister) CreateIdentity ¶
func (*Persister) CreateLoginFlow ¶
func (*Persister) CreateRecoveryFlow ¶
func (*Persister) CreateRecoveryToken ¶
func (*Persister) CreateRegistrationFlow ¶
func (*Persister) CreateSettingsFlow ¶
func (*Persister) CreateVerificationFlow ¶
func (*Persister) CreateVerificationToken ¶
func (*Persister) DeleteContinuitySession ¶
func (*Persister) DeleteExpiredContinuitySessions ¶ added in v0.11.0
func (*Persister) DeleteExpiredLoginFlows ¶ added in v0.11.0
func (*Persister) DeleteExpiredRecoveryFlows ¶ added in v0.11.0
func (*Persister) DeleteExpiredRegistrationFlows ¶ added in v0.11.0
func (*Persister) DeleteExpiredSessions ¶ added in v0.11.0
func (*Persister) DeleteExpiredSettingsFlows ¶ added in v0.11.0
func (*Persister) DeleteExpiredVerificationFlows ¶ added in v0.11.0
func (*Persister) DeleteIdentity ¶
func (*Persister) DeleteRecoveryToken ¶
func (*Persister) DeleteSession ¶
func (*Persister) DeleteSessionByToken ¶
func (*Persister) DeleteSessionsByIdentity ¶
func (*Persister) DeleteVerificationToken ¶
func (*Persister) DetermineNetwork ¶
func (*Persister) FindByCredentialsIdentifier ¶
func (*Persister) FindRecoveryAddressByValue ¶
func (p *Persister) FindRecoveryAddressByValue(ctx context.Context, via identity.RecoveryAddressType, value string) (*identity.RecoveryAddress, error)
func (*Persister) FindVerifiableAddressByValue ¶
func (p *Persister) FindVerifiableAddressByValue(ctx context.Context, via identity.VerifiableAddressType, value string) (*identity.VerifiableAddress, error)
func (*Persister) ForceLoginFlow ¶
func (*Persister) GetConnection ¶
func (*Persister) GetContinuitySession ¶
func (*Persister) GetIdentity ¶
func (*Persister) GetIdentityConfidential ¶
func (*Persister) GetLoginFlow ¶
func (*Persister) GetRecoveryFlow ¶
func (*Persister) GetRegistrationFlow ¶
func (*Persister) GetSession ¶
func (*Persister) GetSessionByToken ¶
func (*Persister) GetSettingsFlow ¶
func (*Persister) GetVerificationFlow ¶
func (*Persister) IncrementMessageSendCount ¶ added in v0.11.0
func (*Persister) LatestQueuedMessage ¶
func (*Persister) ListIdentities ¶
func (*Persister) ListMessages ¶ added in v0.11.0
func (*Persister) ListRecoveryAddresses ¶
func (*Persister) ListSessionsByIdentity ¶
func (p *Persister) ListSessionsByIdentity(ctx context.Context, iID uuid.UUID, active *bool, page, perPage int, except uuid.UUID, expandables session.Expandables) ([]*session.Session, error)
ListSessionsByIdentity retrieves sessions for an identity from the store.
func (*Persister) ListVerifiableAddresses ¶
func (*Persister) MigrateDown ¶
func (*Persister) MigrationStatus ¶
func (*Persister) NextMessages ¶
func (*Persister) RevokeSession ¶
RevokeSession revokes a given session. If the session does not exist or was not modified, it effectively has been revoked already, and therefore that case does not return an error.
func (*Persister) RevokeSessionByToken ¶
func (*Persister) RevokeSessionsIdentityExcept ¶
func (p *Persister) RevokeSessionsIdentityExcept(ctx context.Context, iID, sID uuid.UUID) (int, error)
RevokeSessionsIdentityExcept marks all except the given session of an identity inactive.
func (*Persister) SaveContinuitySession ¶
func (*Persister) SetMessageStatus ¶
func (*Persister) Transaction ¶
func (*Persister) UpdateIdentity ¶
func (*Persister) UpdateLoginFlow ¶
func (*Persister) UpdateRecoveryFlow ¶
func (*Persister) UpdateRegistrationFlow ¶
func (*Persister) UpdateSettingsFlow ¶
func (*Persister) UpdateVerifiableAddress ¶
func (*Persister) UpdateVerificationFlow ¶
func (*Persister) UpsertSession ¶
UpsertSession creates a session if not found else updates. This operation also inserts Session device records when a session is being created. The update operation skips updating Session device records since only one record would need to be updated in this case.
func (*Persister) UseRecoveryToken ¶
func (*Persister) UseVerificationToken ¶
func (*Persister) VerifyAddress ¶
func (Persister) WithNetworkID ¶
func (p Persister) WithNetworkID(sid uuid.UUID) persistence.Persister
Source Files ¶
Click to show internal directories.
Click to hide internal directories.