database

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	ETHAccounts(storeID string) ETHAccounts
	Ping(ctx context.Context) error
	Keys(storeID string) Keys
	Secrets(storeID string) Secrets
}

type ETHAccounts

type ETHAccounts interface {
	RunInTransaction(ctx context.Context, persistFunc func(dbtx ETHAccounts) error) error
	Get(ctx context.Context, addr string) (*entities.ETHAccount, error)
	GetDeleted(ctx context.Context, addr string) (*entities.ETHAccount, error)
	GetAll(ctx context.Context) ([]*entities.ETHAccount, error)
	GetAllDeleted(ctx context.Context) ([]*entities.ETHAccount, error)
	SearchAddresses(ctx context.Context, isDeleted bool, limit, offset uint64) ([]string, error)
	Add(ctx context.Context, account *entities.ETHAccount) (*entities.ETHAccount, error)
	Update(ctx context.Context, account *entities.ETHAccount) (*entities.ETHAccount, error)
	Delete(ctx context.Context, addr string) error
	Restore(ctx context.Context, addr string) error
	Purge(ctx context.Context, addr string) error
}

type Keys

type Keys interface {
	RunInTransaction(ctx context.Context, persistFunc func(dbtx Keys) error) error
	Get(ctx context.Context, id string) (*entities.Key, error)
	GetDeleted(ctx context.Context, id string) (*entities.Key, error)
	GetAll(ctx context.Context) ([]*entities.Key, error)
	GetAllDeleted(ctx context.Context) ([]*entities.Key, error)
	SearchIDs(ctx context.Context, isDeleted bool, limit, offset uint64) ([]string, error)
	Add(ctx context.Context, key *entities.Key) (*entities.Key, error)
	Update(ctx context.Context, key *entities.Key) (*entities.Key, error)
	Delete(ctx context.Context, id string) error
	Restore(ctx context.Context, id string) error
	Purge(ctx context.Context, id string) error
}

type Secrets

type Secrets interface {
	RunInTransaction(ctx context.Context, persistFunc func(dbtx Secrets) error) error
	Get(ctx context.Context, id, version string) (*entities.Secret, error)
	GetLatestVersion(ctx context.Context, id string, isDeleted bool) (string, error)
	ListVersions(ctx context.Context, id string, isDeleted bool) ([]string, error)
	SearchIDs(ctx context.Context, isDeleted bool, limit, offset uint64) ([]string, error)
	GetDeleted(ctx context.Context, id string) (*entities.Secret, error)
	GetAll(ctx context.Context) ([]*entities.Secret, error)
	GetAllDeleted(ctx context.Context) ([]*entities.Secret, error)
	Add(ctx context.Context, secret *entities.Secret) (*entities.Secret, error)
	Update(ctx context.Context, secret *entities.Secret) (*entities.Secret, error)
	Delete(ctx context.Context, id string) error
	Restore(ctx context.Context, id string) error
	Purge(ctx context.Context, id string) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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