qldb

package
v0.0.0-...-3d48b77 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAccountAndInitializeBalance

func CreateAccountAndInitializeBalance(
	ctx context.Context,
	userId, currency string,
	initialBalance *big.Int,
) error

func CreateTransactionAndPlaceHold

func CreateTransactionAndPlaceHold(
	ctx context.Context,
	t *model.QldbTransaction,
	amount *big.Int,
) error

func FillOrder

func FillOrder(req *api.PostFillRequest) error

func FinalizeTransactionAndReleaseHold

func FinalizeTransactionAndReleaseHold(
	ctx context.Context,
	venueOrderId, status string) error

func GetAccount

func GetAccount(
	ctx context.Context,
	accountId string,
) (*model.QldbAccount, error)

func GetTransaction

func GetTransaction(
	ctx context.Context,
	venueOrderId string,
) (*model.QldbTransaction, error)

func GetUserAccounts

func GetUserAccounts(
	ctx context.Context,
	userId string,
) ([]*model.QldbAccount, error)

func NewRepository

func NewRepository(l *log.Entry, a *config.AppConfig, cfg *aws.Config)

Types

type AccountNotFoundError

type AccountNotFoundError struct {
	Id string
}

func (*AccountNotFoundError) Error

func (e *AccountNotFoundError) Error() string

type InsufficientBalanceError

type InsufficientBalanceError struct {
}

func (*InsufficientBalanceError) Error

func (e *InsufficientBalanceError) Error() string

type Repository

type Repository struct {
	Driver *qldbdriver.QLDBDriver
	App    *config.AppConfig
}
var Repo *Repository

Jump to

Keyboard shortcuts

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