persistence

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLogPersister

type AuditLogPersister interface {
	Create(auditLog models.AuditLog) error
	Get(id uuid.UUID) (*models.AuditLog, error)
	List(page int, perPage int, startTime *time.Time, endTime *time.Time, types []string, userId string, email string, ip string, searchString string) ([]models.AuditLog, error)
	Delete(auditLog models.AuditLog) error
	Count(startTime *time.Time, endTime *time.Time, types []string, userId string, email string, ip string, searchString string) (int, error)
}

func NewAuditLogPersister

func NewAuditLogPersister(db *pop.Connection) AuditLogPersister

type EmailPersister

type EmailPersister interface {
	Get(emailId uuid.UUID) (*models.Email, error)
	CountByUserId(uuid.UUID) (int, error)
	FindByUserId(uuid.UUID) (models.Emails, error)
	FindByAddress(string) (*models.Email, error)
	Create(models.Email) error
	Update(models.Email) error
	Delete(models.Email) error
}

func NewEmailPersister

func NewEmailPersister(db *pop.Connection) EmailPersister

type IdentityPersister added in v0.5.0

type IdentityPersister interface {
	Get(userProviderID string, providerID string) (*models.Identity, error)
	GetByID(identityID uuid.UUID) (*models.Identity, error)
	Create(identity models.Identity) error
	Update(identity models.Identity) error
	Delete(identity models.Identity) error
}

func NewIdentityPersister added in v0.5.0

func NewIdentityPersister(db *pop.Connection) IdentityPersister

type JwkPersister

type JwkPersister interface {
	Get(int) (*models.Jwk, error)
	GetAll() ([]models.Jwk, error)
	GetLast() (*models.Jwk, error)
	Create(models.Jwk) error
}

func NewJwkPersister

func NewJwkPersister(db *pop.Connection) JwkPersister

type Migrator

type Migrator interface {
	MigrateUp() error
	MigrateDown(int) error
}

type PasscodePersister

type PasscodePersister interface {
	Get(uuid.UUID) (*models.Passcode, error)
	Create(models.Passcode) error
	Update(models.Passcode) error
	Delete(models.Passcode) error
}

func NewPasscodePersister

func NewPasscodePersister(db *pop.Connection) PasscodePersister

type PasswordCredentialPersister

type PasswordCredentialPersister interface {
	Create(password models.PasswordCredential) error
	GetByUserID(userId uuid.UUID) (*models.PasswordCredential, error)
	Update(password models.PasswordCredential) error
	Delete(password models.PasswordCredential) error
}

func NewPasswordCredentialPersister

func NewPasswordCredentialPersister(db *pop.Connection) PasswordCredentialPersister

type Persister

type Persister interface {
	GetConnection() *pop.Connection
	Transaction(func(tx *pop.Connection) error) error
	GetIdentityPersister() IdentityPersister
	GetIdentityPersisterWithConnection(tx *pop.Connection) IdentityPersister
	GetUserPersister() UserPersister
	GetUserPersisterWithConnection(tx *pop.Connection) UserPersister
	GetPasscodePersister() PasscodePersister
	GetPasscodePersisterWithConnection(tx *pop.Connection) PasscodePersister
	GetPasswordCredentialPersister() PasswordCredentialPersister
	GetPasswordCredentialPersisterWithConnection(tx *pop.Connection) PasswordCredentialPersister
	GetWebauthnCredentialPersister() WebauthnCredentialPersister
	GetWebauthnCredentialPersisterWithConnection(tx *pop.Connection) WebauthnCredentialPersister
	GetWebauthnSessionDataPersister() WebauthnSessionDataPersister
	GetWebauthnSessionDataPersisterWithConnection(tx *pop.Connection) WebauthnSessionDataPersister
	GetJwkPersister() JwkPersister
	GetJwkPersisterWithConnection(tx *pop.Connection) JwkPersister
	GetAuditLogPersister() AuditLogPersister
	GetAuditLogPersisterWithConnection(tx *pop.Connection) AuditLogPersister
	GetEmailPersister() EmailPersister
	GetEmailPersisterWithConnection(tx *pop.Connection) EmailPersister
	GetPrimaryEmailPersister() PrimaryEmailPersister
	GetPrimaryEmailPersisterWithConnection(tx *pop.Connection) PrimaryEmailPersister
	GetTokenPersister() TokenPersister
	GetTokenPersisterWithConnection(tx *pop.Connection) TokenPersister
	GetSamlStatePersister() SamlStatePersister
	GetSamlStatePersisterWithConnection(tx *pop.Connection) SamlStatePersister
	GetSamlCertificatePersister() SamlCertificatePersister
	GetSamlCertificatePersisterWithConnection(tx *pop.Connection) SamlCertificatePersister
	GetWebhookPersister(tx *pop.Connection) WebhookPersister
	GetUsernamePersister() UsernamePersister
	GetUsernamePersisterWithConnection(tx *pop.Connection) UsernamePersister
}

type PrimaryEmailPersister

type PrimaryEmailPersister interface {
	Create(models.PrimaryEmail) error
	Update(models.PrimaryEmail) error
	Delete(models.PrimaryEmail) error
}

func NewPrimaryEmailPersister

func NewPrimaryEmailPersister(db *pop.Connection) PrimaryEmailPersister

type SamlCertificatePersister added in v0.9.0

type SamlCertificatePersister interface {
	Create(cert *models.SamlCertificate) error
	GetFirst() (*models.SamlCertificate, error)
	Renew(cert *models.SamlCertificate, serviceName string) error
	Delete(cert *models.SamlCertificate) error
}

func NewSamlCertificatePersister added in v0.9.0

func NewSamlCertificatePersister(db *pop.Connection) SamlCertificatePersister

type SamlStatePersister added in v0.9.0

type SamlStatePersister interface {
	Create(state models.SamlState) error
	GetByNonce(nonce string) (*models.SamlState, error)
	Delete(state models.SamlState) error
}

func NewSamlStatePersister added in v0.9.0

func NewSamlStatePersister(db *pop.Connection) SamlStatePersister

type Storage

type Storage interface {
	Migrator
	Persister
}

func New

func New(config config.Database) (Storage, error)

New return a new Persister Object with given configuration

type TokenPersister added in v0.6.0

type TokenPersister interface {
	Create(token models.Token) error
	GetByValue(value string) (*models.Token, error)
	Delete(token models.Token) error
}

func NewTokenPersister added in v0.6.0

func NewTokenPersister(db *pop.Connection) TokenPersister

type UserPersister

type UserPersister interface {
	Get(uuid.UUID) (*models.User, error)
	GetByEmailAddress(string) (*models.User, error)
	Create(models.User) error
	Update(models.User) error
	Delete(models.User) error
	List(page int, perPage int, userId uuid.UUID, email string, username string, sortDirection string) ([]models.User, error)
	All() ([]models.User, error)
	Count(userId uuid.UUID, email string, username string) (int, error)
	GetByUsername(username string) (*models.User, error)
}

func NewUserPersister

func NewUserPersister(db *pop.Connection) UserPersister

type UsernamePersister added in v1.0.0

type UsernamePersister interface {
	Create(username models.Username) error
	GetByName(name string) (*models.Username, error)
	Update(username *models.Username) error
	Delete(username *models.Username) error
}

func NewUsernamePersister added in v1.0.0

func NewUsernamePersister(db *pop.Connection) UsernamePersister

type WebauthnCredentialPersister

type WebauthnCredentialPersister interface {
	Get(string) (*models.WebauthnCredential, error)
	Create(models.WebauthnCredential) error
	Update(models.WebauthnCredential) error
	Delete(models.WebauthnCredential) error
	GetFromUser(uuid.UUID) ([]models.WebauthnCredential, error)
}

func NewWebauthnCredentialPersister

func NewWebauthnCredentialPersister(db *pop.Connection) WebauthnCredentialPersister

type WebauthnSessionDataPersister

type WebauthnSessionDataPersister interface {
	Get(id uuid.UUID) (*models.WebauthnSessionData, error)
	GetByChallenge(challenge string) (*models.WebauthnSessionData, error)
	Create(sessionData models.WebauthnSessionData) error
	Update(sessionData models.WebauthnSessionData) error
	Delete(sessionData models.WebauthnSessionData) error
}

func NewWebauthnSessionDataPersister

func NewWebauthnSessionDataPersister(db *pop.Connection) WebauthnSessionDataPersister

type WebhookPersister added in v0.10.0

type WebhookPersister interface {
	Create(webhook models.Webhook, events models.WebhookEvents) error
	Update(webhook models.Webhook) error
	Delete(webhook models.Webhook) error
	AddEvent(event models.WebhookEvent) error
	RemoveEvent(event models.WebhookEvent) error
	List(includeDisabled bool) (models.Webhooks, error)
	Get(webhookId uuid.UUID) (*models.Webhook, error)
}

func NewWebhookPersister added in v0.10.0

func NewWebhookPersister(db *pop.Connection) WebhookPersister

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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