Documentation ¶
Index ¶
- type Blocks
- type BlocksCache
- type Cache
- func (s *Cache) AddBlock(ctx context.Context, info *model.BlockInfo) error
- func (s *Cache) AddTotals(ctx context.Context, info *model.AggregatedInfo) error
- func (s *Cache) AddTransaction(ctx context.Context, transaction *models.Tx) error
- func (s *Cache) GetBlocks(ctx context.Context, start, stop int64) ([]*model.BlockInfo, int64, error)
- func (s *Cache) GetTotals(ctx context.Context) (*model.AggregatedInfo, error)
- func (s *Cache) GetTransactions(ctx context.Context, start, stop int64) ([]*models.Tx, int64, error)
- func (s *Cache) PublishBlock(ctx context.Context, info *models.Block) error
- func (s *Cache) PublishTx(ctx context.Context, tx *models.Tx) error
- type PubSubCache
- type Search
- type TotalsCache
- type TransactionsCache
- type Txs
- type TxsFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocks ¶
type Blocks interface { GetBlockInfo(ctx context.Context, block int32) (*model.BlockInfo, error) GetBlockInfoByHash(ctx context.Context, hash string) (*model.BlockInfo, error) GetBlockValidators(ctx context.Context, block int32) ([]string, error) TotalBlocks(ctx context.Context, to time.Time) (*model.TotalBlocks, error) Blocks(ctx context.Context, limit int64, offset int64) ([]*model.BlockInfo, int64, error) BlockSignatures(ctx context.Context, height int64, valAddress []string, limit int64, offset int64) ([]*model.BlockSigners, int64, error) BlockUptime(ctx context.Context, blockWindow, height int64, validatorAddr string) (float32, error) UptimeByBlocks(ctx context.Context, blockWindow, height int64, validatorAddr string) ([]*model.BlockSigned, float32, error) }
type BlocksCache ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) AddTransaction ¶
func (*Cache) GetTransactions ¶
func (*Cache) PublishBlock ¶
type PubSubCache ¶
type Search ¶
type TotalsCache ¶
type TotalsCache interface { AddTotals(ctx context.Context, info *model.AggregatedInfo) error GetTotals(ctx context.Context) (*model.AggregatedInfo, error) }
type TransactionsCache ¶
type Txs ¶
type Txs interface { ChartTxByDay(ctx context.Context, from time.Time, to time.Time) ([]*model.TxsByDay, error) TransactionsPerPeriod(ctx context.Context, to time.Time) (allTx, all24H, all48H, all30D int64, err error) VolumePerPeriod(ctx context.Context, to time.Time) (decimal.Decimal, decimal.Decimal, error) Transactions(ctx context.Context, limit int64, offset int64, filter *TxsFilter) ([]*models.Tx, int64, error) TransactionRawLog(ctx context.Context, hash string) ([]byte, error) TransactionSigners(ctx context.Context, hash string) ([]*models.SignerInfo, error) Messages(ctx context.Context, hash string) ([]*models.Message, error) GetSenderAndReceiver(ctx context.Context, hash string) (*model.TxSenderReceiver, error) GetWalletsCount(ctx context.Context) (*model.TotalWallets, error) ChartTransactionsByHour(ctx context.Context, to time.Time) (*model.TxByHourWithCount, error) ChartTransactionsVolume(ctx context.Context, to time.Time) ([]*model.TxVolumeByHour, error) GetPowerEvents(ctx context.Context, accountAddress string, limit int64, offset int64) ([]*models.Tx, int64, error) GetValidatorHistory(ctx context.Context, accountAddress string, limit int64, offset int64) ([]*models.Tx, int64, error) TransactionsByEventValue(ctx context.Context, values []string, messageType []string, includeEvents bool, limit int64, offset int64) ([]*models.Tx, int64, error) GetVotes(ctx context.Context, accountAddress string) ([]*model.VotesTransaction, error) GetVotesByAccounts(ctx context.Context, accounts []string, excludeAccounts bool, voteType string, proposalID int, limit int64, offset int64) ([]*model.VotesTransaction, int64, error) GetWalletsCountPerPeriod(ctx context.Context, startDate, endDate time.Time) (int64, error) GetWalletsWithTx(ctx context.Context, limit int64, offset int64) ([]*model.WalletWithTxs, int64, error) TxCountByAccounts(ctx context.Context, accounts []string) ([]*model.WalletWithTxs, error) AccountInfo(ctx context.Context, account string) (*model.AccountInfo, error) GetEvents(ctx context.Context, txID uint) ([]*model.TxEvents, error) UpdateViews(ctx context.Context) error ExtractNumber(value string) (decimal.Decimal, string, error) DelegatesByValidator(ctx context.Context, from, to time.Time, valoperAddress string, limit int64, offset int64) (data []*models.Tx, totalSum *model.Denom, all int64, err error) }
Click to show internal directories.
Click to hide internal directories.