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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockRawTransactions

type BlockRawTransactions interface {
	InsertAll(transactions []RawTransactionRow) error
	Insert(transaction *RawTransactionRow) error
	FindByHash(txHash string) (*RawTransactionRow, error)
	List(
		filter RawTransactionsListFilter,
		order RawTransactionsListOrder,
		pagination *pagination_interface.Pagination,
	) ([]RawTransactionRow, *pagination_interface.PaginationResult, error)
	Count() (int64, error)
}

func NewMockRawTransactionsView

func NewMockRawTransactionsView(_ *rdb.Handle) BlockRawTransactions

func NewRawTransactionsView

func NewRawTransactionsView(handle *rdb.Handle) BlockRawTransactions

type BlockRawTransactionsView

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

BlockRawTransactions projection view implemented by relational database

func (*BlockRawTransactionsView) Count

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

func (*BlockRawTransactionsView) FindByHash

func (transactionsView *BlockRawTransactionsView) FindByHash(txHash string) (*RawTransactionRow, error)

func (*BlockRawTransactionsView) Insert

func (transactionsView *BlockRawTransactionsView) Insert(transaction *RawTransactionRow) error

func (*BlockRawTransactionsView) InsertAll

func (transactionsView *BlockRawTransactionsView) InsertAll(transactions []RawTransactionRow) error

func (*BlockRawTransactionsView) List

type MockRawTransactionsTotalView

type MockRawTransactionsTotalView struct {
	mock.Mock
}

func (*MockRawTransactionsTotalView) DecrementAll

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

func (*MockRawTransactionsTotalView) FindBy

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

func (*MockRawTransactionsTotalView) Increment

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

func (*MockRawTransactionsTotalView) IncrementAll

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

func (*MockRawTransactionsTotalView) Set

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

func (*MockRawTransactionsTotalView) SumBy

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

type MockRawTransactionsView

type MockRawTransactionsView struct {
	testify_mock.Mock
}

func (*MockRawTransactionsView) Count

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

func (*MockRawTransactionsView) FindByHash

func (transactionsView *MockRawTransactionsView) FindByHash(txHash string) (*RawTransactionRow, error)

func (*MockRawTransactionsView) Insert

func (transactionsView *MockRawTransactionsView) Insert(row *RawTransactionRow) error

func (*MockRawTransactionsView) InsertAll

func (transactionsView *MockRawTransactionsView) InsertAll(transactions []RawTransactionRow) error

func (*MockRawTransactionsView) List

type RawTransactionRow

type RawTransactionRow 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      []map[string]interface{}  `json:"messages"`
	Signers       []RawTransactionRowSigner `json:"signers"`
}

type RawTransactionRowSigner

type RawTransactionRowSigner struct {
	MaybeKeyInfo *RawTransactionRowSignerKeyInfo `json:"keyInfo"`

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

type RawTransactionRowSignerKeyInfo

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

type RawTransactionsListFilter

type RawTransactionsListFilter struct {
	MaybeBlockHeight *int64
}

type RawTransactionsListOrder

type RawTransactionsListOrder struct {
	Height view.ORDER
}

type RawTransactionsTotal

type RawTransactionsTotal 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 NewMockRawTransactionsTotalView

func NewMockRawTransactionsTotalView(_ *rdb.Handle) RawTransactionsTotal

func NewRawTransactionsTotalView

func NewRawTransactionsTotalView(rdbHandle *rdb.Handle) RawTransactionsTotal

type RawTransactionsTotalView

type RawTransactionsTotalView struct {
	*view.Total
}

Jump to

Keyboard shortcuts

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