store

package
v0.72.5-preview.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT 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) 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