persistence

package
v0.0.0-...-9d4acdc Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

func NewPasswordCredentialPersister

func NewPasswordCredentialPersister(db *pop.Connection) PasswordCredentialPersister

type Persister

type Persister interface {
	GetConnection() *pop.Connection
	Transaction(func(tx *pop.Connection) error) error
	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
}

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 UserPersister

type UserPersister interface {
	Get(uuid.UUID) (*models.User, error)
	GetByEmail(email string) (*models.User, error)
	Create(models.User) error
	Update(models.User) error
	Delete(models.User) error
	List(page int, perPage int) ([]models.User, error)
}

func NewUserPersister

func NewUserPersister(db *pop.Connection) UserPersister

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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