Documentation
¶
Index ¶
- func TransformTxData(tx models.Transaction) resource.Interface
- type BlockFilter
- type BlocksRangeSelectFilter
- type Repository
- func (repository Repository) Get24hTransactionsData() Tx24hData
- func (repository Repository) GetPaginatedTxsByAddresses(addresses []string, filter BlocksRangeSelectFilter, ...) []models.Transaction
- func (repository Repository) GetPaginatedTxsByCoin(coinSymbol string, pagination *tools.Pagination) []models.TransactionOutput
- func (repository Repository) GetPaginatedTxsByFilter(filter tools.Filter, pagination *tools.Pagination) []models.Transaction
- func (repository Repository) GetTotalTransactionCount(startTime *string) int
- func (repository Repository) GetTxByHash(hash string) *models.Transaction
- func (repository Repository) GetTxCountChartDataByFilter(filter tools.Filter) []TxCountChartData
- type Resource
- type ResourceTransactionOutput
- type TransformTxConfig
- type Tx24hData
- type TxCountChartData
- type ValidatorFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformTxData ¶
func TransformTxData(tx models.Transaction) resource.Interface
Types ¶
type BlockFilter ¶
type BlockFilter struct {
BlockId uint64
}
TODO: replace string in StartBlock, EndBlock to int
type BlocksRangeSelectFilter ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *pg.DB) *Repository
func (Repository) Get24hTransactionsData ¶
func (repository Repository) Get24hTransactionsData() Tx24hData
Get transactions data by last 24 hours
func (Repository) GetPaginatedTxsByAddresses ¶
func (repository Repository) GetPaginatedTxsByAddresses(addresses []string, filter BlocksRangeSelectFilter, pagination *tools.Pagination) []models.Transaction
Get paginated list of transactions by address filter
func (Repository) GetPaginatedTxsByCoin ¶
func (repository Repository) GetPaginatedTxsByCoin(coinSymbol string, pagination *tools.Pagination) []models.TransactionOutput
Get paginated list of transactions by coin
func (Repository) GetPaginatedTxsByFilter ¶
func (repository Repository) GetPaginatedTxsByFilter(filter tools.Filter, pagination *tools.Pagination) []models.Transaction
Get paginated list of transactions by select filter
func (Repository) GetTotalTransactionCount ¶
func (repository Repository) GetTotalTransactionCount(startTime *string) int
Get total transaction count
func (Repository) GetTxByHash ¶
func (repository Repository) GetTxByHash(hash string) *models.Transaction
Get transaction by hash
func (Repository) GetTxCountChartDataByFilter ¶
func (repository Repository) GetTxCountChartDataByFilter(filter tools.Filter) []TxCountChartData
Get list of transactions counts filtered by created_at
type Resource ¶
type Resource struct {
Txn uint64 `json:"txn"`
Hash string `json:"hash"`
Nonce uint64 `json:"nonce"`
Block uint64 `json:"block"`
CreatedAt string `json:"created_at"`
Fee string `json:"fee"`
Type uint8 `json:"type"`
Payload string `json:"payload"`
From string `json:"from"`
Data resource.ItemInterface `json:"data"`
Gas uint64 `json:"gas"`
GasPrice uint64 `json:"gas_price"`
GasCoinName string `json:"gas_coin"`
To *string `json:"to,omitempty"`
}
func (Resource) Transform ¶
func (Resource) Transform(model resource.ItemInterface, params ...resource.ParamInterface) resource.Interface
type ResourceTransactionOutput ¶
type ResourceTransactionOutput struct {
Txn uint64 `json:"txn"`
Hash string `json:"hash"`
Nonce uint64 `json:"nonce"`
Block uint64 `json:"block"`
CreatedAt string `json:"created_at"`
Fee string `json:"fee"`
Type uint8 `json:"type"`
From string `json:"from"`
Gas uint64 `json:"gas"`
GasPrice uint64 `json:"gas_price"`
GasCoinName string `json:"gas_coin"`
To *string `json:"to,omitempty"`
Data resource.ItemInterface `json:"data"`
}
func (ResourceTransactionOutput) Transform ¶
func (ResourceTransactionOutput) Transform(model resource.ItemInterface, params ...resource.ParamInterface) resource.Interface
type TransformTxConfig ¶
type TransformTxConfig struct {
Model resource.ItemInterface
Resource resource.Interface
}
type TxCountChartData ¶
Click to show internal directories.
Click to hide internal directories.