Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocks ¶
type Blocks interface {
BlockInfo(ctx context.Context, block int32) (*model.BlockInfo, error)
BlockInfoByHash(ctx context.Context, hash string) (*model.BlockInfo, error)
BlockValidators(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)
}
func NewBlocks ¶
func NewBlocks(blocksRepo repository.Blocks) Blocks
type Search ¶
type Search interface {
SearchByText(ctx context.Context, text string) ([]model.SearchResult, error)
SearchByBlock(ctx context.Context, height int64) ([]model.SearchResult, error)
}
func NewSearch ¶
func NewSearch(repo repository.Search) Search
type Txs ¶
type Txs interface {
ChartTxByDay(ctx context.Context, from time.Time, to time.Time) ([]*model.TxsByDay, error)
GetTxByHash(ctx context.Context, txHash string) (*models.Tx, error)
TotalTransactions(ctx context.Context, to time.Time) (*model.TotalTransactions, error)
Transactions(ctx context.Context, offset int64, limit int64) ([]*models.Tx,
int64, error)
TransactionsByBlock(ctx context.Context, height int64, offset int64,
limit int64) ([]*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)
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)
GetValidatorHistoryEvents(ctx context.Context, accountAddress string,
limit int64, offset int64) ([]*models.Tx, int64, error)
TransactionsByEventValue(ctx context.Context, values []string,
messageType []string, limit int64, offset int64) ([]*models.Tx, int64, error)
GetVotesByAccounts(ctx context.Context, accounts []string, excludeAcc 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)
DelegatesByValidator(ctx context.Context, from, to time.Time, valoperAddress string,
limit int64, offset int64) (data []*models.Tx, totalSum *model.Denom, all int64, err error)
}
func NewTxs ¶
func NewTxs(txRepo repository.Txs) Txs
Click to show internal directories.
Click to hide internal directories.