view

package
v1.7.41 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTransactions

type BlockTransactions interface {
	InsertAll(transactions []TransactionRow) error
	Insert(transaction *TransactionRow) error
	FindByHash(txHash string) (*TransactionRow, error)
	List(
		filter TransactionsListFilter,
		order TransactionsListOrder,
		pagination *pagination_interface.Pagination,
	) ([]TransactionRow, *pagination_interface.PaginationResult, error)
	Search(keyword string) ([]TransactionRow, error)
	Count() (int64, error)
}

func NewMockTransactionsView

func NewMockTransactionsView(_ *rdb.Handle) BlockTransactions

func NewTransactionsView

func NewTransactionsView(handle *rdb.Handle) BlockTransactions

type BlockTransactionsView

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

BlockTransactions projection view implemented by relational database

func (*BlockTransactionsView) Count

func (transactionsView *BlockTransactionsView) Count() (int64, error)

func (*BlockTransactionsView) FindByHash

func (transactionsView *BlockTransactionsView) FindByHash(txHash string) (*TransactionRow, error)

func (*BlockTransactionsView) Insert

func (transactionsView *BlockTransactionsView) Insert(transaction *TransactionRow) error

func (*BlockTransactionsView) InsertAll

func (transactionsView *BlockTransactionsView) InsertAll(transactions []TransactionRow) error

func (*BlockTransactionsView) List

func (*BlockTransactionsView) Search

func (transactionsView *BlockTransactionsView) Search(keyword string) ([]TransactionRow, error)

type MockTransactionsTotalView

type MockTransactionsTotalView struct {
	mock.Mock
}

func (*MockTransactionsTotalView) DecrementAll

func (view *MockTransactionsTotalView) DecrementAll(identities []string, total int64) error

func (*MockTransactionsTotalView) FindBy

func (view *MockTransactionsTotalView) FindBy(identity string) (int64, error)

func (*MockTransactionsTotalView) Increment

func (view *MockTransactionsTotalView) Increment(identity string, total int64) error

func (*MockTransactionsTotalView) IncrementAll

func (view *MockTransactionsTotalView) IncrementAll(identities []string, total int64) error

func (*MockTransactionsTotalView) Set

func (view *MockTransactionsTotalView) Set(identity string, total int64) error

func (*MockTransactionsTotalView) SumBy

func (view *MockTransactionsTotalView) SumBy(identities []string) (int64, error)

type MockTransactionsView

type MockTransactionsView struct {
	testify_mock.Mock
}

func (*MockTransactionsView) Count

func (transactionsView *MockTransactionsView) Count() (int64, error)

func (*MockTransactionsView) FindByHash

func (transactionsView *MockTransactionsView) FindByHash(txHash string) (*TransactionRow, error)

func (*MockTransactionsView) Insert

func (transactionsView *MockTransactionsView) Insert(row *TransactionRow) error

func (*MockTransactionsView) InsertAll

func (transactionsView *MockTransactionsView) InsertAll(transactions []TransactionRow) error

func (*MockTransactionsView) List

func (*MockTransactionsView) Search

func (transactionsView *MockTransactionsView) Search(keyword string) ([]TransactionRow, error)

type TransactionRow

type TransactionRow struct {
	BlockHeight   int64                   `json:"blockHeight"`
	BlockHash     string                  `json:"blockHash"`
	BlockTime     utctime.UTCTime         `json:"blockTime"`
	Hash          string                  `json:"hash"`
	Index         int                     `json:"index"`
	Success       bool                    `json:"success"`
	Code          int                     `json:"code"`
	Log           string                  `json:"log"`
	Fee           coin.Coins              `json:"fee"`
	FeePayer      string                  `json:"feePayer"`
	FeeGranter    string                  `json:"feeGranter"`
	GasWanted     int                     `json:"gasWanted"`
	GasUsed       int                     `json:"gasUsed"`
	Memo          string                  `json:"memo"`
	TimeoutHeight int64                   `json:"timeoutHeight"`
	Messages      []TransactionRowMessage `json:"messages"`
	Signers       []TransactionRowSigner  `json:"signers"`
}

type TransactionRowMessage

type TransactionRowMessage struct {
	Type    string      `json:"type"`
	Content interface{} `json:"content"`
}

type TransactionRowSigner

type TransactionRowSigner struct {
	MaybeKeyInfo *TransactionRowSignerKeyInfo `json:"keyInfo"`

	Address         string `json:"address"`
	AccountSequence uint64 `json:"accountSequence"`
}

type TransactionRowSignerKeyInfo added in v1.3.5

type TransactionRowSignerKeyInfo struct {
	Type           string   `json:"type"`
	IsMultiSig     bool     `json:"isMultiSig"`
	Pubkeys        []string `json:"pubkeys"`
	MaybeThreshold *int     `json:"threshold,omitempty"`
}

type TransactionsListFilter

type TransactionsListFilter struct {
	MaybeBlockHeight *int64
}

type TransactionsListOrder

type TransactionsListOrder struct {
	Height view.ORDER
}

type TransactionsTotal

type TransactionsTotal interface {
	Set(string, int64) error
	Increment(string, int64) error
	IncrementAll([]string, int64) error
	DecrementAll([]string, int64) error
	FindBy(string) (int64, error)
	SumBy([]string) (int64, error)
}

func NewMockTransactionsTotalView

func NewMockTransactionsTotalView(_ *rdb.Handle) TransactionsTotal

func NewTransactionsTotalView

func NewTransactionsTotalView(rdbHandle *rdb.Handle) TransactionsTotal

type TransactionsTotalView

type TransactionsTotalView struct {
	*view.Total
}

Jump to

Keyboard shortcuts

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