store

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatchStatus

type DispatchStatus struct {
	OtxId  uint
	Status status.Status
}

type OTX

type OTX struct {
	TrackingId string
	Type       string
	RawTx      string
	TxHash     string
	From       string
	Data       string
	GasPrice   uint64
	Nonce      uint64
}

type Opts

type Opts struct {
	PostgresPool *pgxpool.Pool
	Queries      *queries.Queries
}

type PostgresStore

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

func (*PostgresStore) CreateDispatchStatus

func (s *PostgresStore) CreateDispatchStatus(ctx context.Context, dispatch DispatchStatus) error

func (*PostgresStore) CreateOTX

func (s *PostgresStore) CreateOTX(ctx context.Context, otx OTX) (uint, error)

type Status

type Status string

type Store

type Store interface {
	// OTX (Custodial originating transactions).
	CreateOTX(ctx context.Context, otx OTX) (id uint, err error)
	// Dispatch status.
	CreateDispatchStatus(ctx context.Context, dispatch DispatchStatus) error
}

func NewPostgresStore

func NewPostgresStore(o Opts) Store

Jump to

Keyboard shortcuts

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