Documentation ¶
Index ¶
- func NewSearch(pool *mongo.Database) *search
- func NewTxs(db *pgxpool.Pool) *txs
- 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 ¶
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, 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 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) GetVotes(ctx context.Context, accountAddress string) ([]*model.VotesTransaction, error) GetPowerEvents(ctx context.Context, accountAddress string, limit int64, offset int64) ([]*models.Tx, int64, error) }
Click to show internal directories.
Click to hide internal directories.