store

package
v0.0.0-...-43207eb Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	GetTransaction(ctx context.Context, hash string) (Transaction, error)
	UpsertTransaction(ctx context.Context, WebhookURL string, txHash string, txXDR string, status tss.RPCTXStatus) error
	UpsertTry(ctx context.Context, transactionHash string, feeBumpTxHash string, feeBumpTxXDR string, status tss.RPCTXStatus, code tss.RPCTXCode, resultXDR string) error
	GetTry(ctx context.Context, hash string) (Try, error)
	GetTryByXDR(ctx context.Context, xdr string) (Try, error)
	GetTransactionsWithStatus(ctx context.Context, status tss.RPCTXStatus) ([]Transaction, error)
	GetLatestTry(ctx context.Context, txHash string) (Try, error)
}

func NewStore

func NewStore(db db.ConnectionPool) (Store, error)

type Transaction

type Transaction struct {
	Hash         string       `db:"transaction_hash"`
	XDR          string       `db:"transaction_xdr"`
	WebhookURL   string       `db:"webhook_url"`
	Status       string       `db:"current_status"`
	CreatedAt    time.Time    `db:"created_at"`
	UpdatedAt    time.Time    `db:"updated_at"`
	ClaimedUntil sql.NullTime `db:"claimed_until"`
}

type Try

type Try struct {
	Hash       string    `db:"try_transaction_hash"`
	OrigTxHash string    `db:"original_transaction_hash"`
	XDR        string    `db:"try_transaction_xdr"`
	Status     string    `db:"status"`
	Code       int32     `db:"code"`
	ResultXDR  string    `db:"result_xdr"`
	CreatedAt  time.Time `db:"updated_at"`
}

Jump to

Keyboard shortcuts

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