storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseBackend

func UseBackend(cfg *BackendConfig) (vault.StorageBackend, error)

Types

type BackendConfig

type BackendConfig struct {
	Name     string
	Postgres *PostgresStorage
}

func NewBackendConfig

func NewBackendConfig() *BackendConfig

type BackendInitFunc

type BackendInitFunc func(cfg *BackendConfig) (vault.StorageBackend, error)

type PostgresStorage

type PostgresStorage struct {
	ConnectionURL *url.URL
	// contains filtered or unexported fields
}

func NewPostgresStorage

func NewPostgresStorage(connectionURL *url.URL) (*PostgresStorage, error)

func (*PostgresStorage) ReadInitData

func (s *PostgresStorage) ReadInitData(ctx context.Context) (*vault.InitData, error)

func (*PostgresStorage) Transact

func (s *PostgresStorage) Transact(ctx context.Context, txFunc func(*sql.Tx) error) error

func (*PostgresStorage) WriteInitData

func (s *PostgresStorage) WriteInitData(ctx context.Context, data *vault.InitData) error

Jump to

Keyboard shortcuts

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