store

package
v0.73.0-preview.15 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SQLMigrationsDir = "migrations"

Variables

View Source
var (
	ErrTxNotFound      = errors.New("transaction not found")
	ErrMultipleTxFound = errors.New("multiple transactions found")
)
View Source
var EmbedMigrations embed.FS

Functions

func DropAllTablesAndViews added in v0.58.0

func DropAllTablesAndViews(log *logging.Logger, config Config) error

func MigrateToLatestSchema added in v0.58.0

func MigrateToLatestSchema(log *logging.Logger, config Config) error

Types

type Config

type Config struct {
	Postgres config.PostgresConnection `group:"database" namespace:"postgres"`
}

func NewDefaultConfig

func NewDefaultConfig() Config

type Store

type Store struct {
	// contains filtered or unexported fields
}

func MustNewStore

func MustNewStore(config Config, log *logging.Logger) *Store

func NewStore

func NewStore(config Config, log *logging.Logger) (*Store, error)

func (*Store) Close added in v0.73.0

func (s *Store) Close()

func (*Store) GetTransaction added in v0.58.0

func (s *Store) GetTransaction(ctx context.Context, txID string) (*pb.Transaction, error)

func (*Store) ListTransactions

func (s *Store) ListTransactions(ctx context.Context,
	filters map[string]string,
	cmdTypes, exclCmdTypes, parties []string,
	first uint32,
	after *entities.TxCursor,
	last uint32,
	before *entities.TxCursor,
) ([]*pb.Transaction, error)

Jump to

Keyboard shortcuts

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