Documentation ¶
Index ¶
- type BlockTransactions
- type BlockTransactionsView
- func (transactionsView *BlockTransactionsView) Count() (int64, error)
- func (transactionsView *BlockTransactionsView) FindByHash(txHash string) (*TransactionRow, error)
- func (transactionsView *BlockTransactionsView) Insert(transaction *TransactionRow) error
- func (transactionsView *BlockTransactionsView) InsertAll(transactions []TransactionRow) error
- func (transactionsView *BlockTransactionsView) List(filter TransactionsListFilter, order TransactionsListOrder, ...) ([]TransactionRow, *pagination_interface.PaginationResult, error)
- func (transactionsView *BlockTransactionsView) Search(keyword string) ([]TransactionRow, error)
- type MockTransactionsTotalView
- func (view *MockTransactionsTotalView) DecrementAll(identities []string, total int64) error
- func (view *MockTransactionsTotalView) FindBy(identity string) (int64, error)
- func (view *MockTransactionsTotalView) Increment(identity string, total int64) error
- func (view *MockTransactionsTotalView) IncrementAll(identities []string, total int64) error
- func (view *MockTransactionsTotalView) Set(identity string, total int64) error
- func (view *MockTransactionsTotalView) SumBy(identities []string) (int64, error)
- type MockTransactionsView
- func (transactionsView *MockTransactionsView) Count() (int64, error)
- func (transactionsView *MockTransactionsView) FindByHash(txHash string) (*TransactionRow, error)
- func (transactionsView *MockTransactionsView) Insert(row *TransactionRow) error
- func (transactionsView *MockTransactionsView) InsertAll(transactions []TransactionRow) error
- func (transactionsView *MockTransactionsView) List(filter TransactionsListFilter, order TransactionsListOrder, ...) ([]TransactionRow, *pagination_interface.PaginationResult, error)
- func (transactionsView *MockTransactionsView) Search(keyword string) ([]TransactionRow, error)
- type TransactionRow
- type TransactionRowMessage
- type TransactionRowSigner
- type TransactionRowSignerKeyInfo
- type TransactionsListFilter
- type TransactionsListOrder
- type TransactionsTotal
- type TransactionsTotalView
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 (transactionsView *BlockTransactionsView) List( filter TransactionsListFilter, order TransactionsListOrder, pagination *pagination_interface.Pagination, ) ([]TransactionRow, *pagination_interface.PaginationResult, error)
func (*BlockTransactionsView) Search ¶
func (transactionsView *BlockTransactionsView) Search(keyword string) ([]TransactionRow, error)
type MockTransactionsTotalView ¶
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
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 (transactionsView *MockTransactionsView) List( filter TransactionsListFilter, order TransactionsListOrder, pagination *pagination_interface.Pagination, ) ([]TransactionRow, *pagination_interface.PaginationResult, error)
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 TransactionsListFilter ¶
type TransactionsListFilter struct {
MaybeBlockHeight *int64
}
type TransactionsListOrder ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.