Documentation ¶
Index ¶
- func GetObjectsPage[T Paginated](s *Storage, address string, from, count uint64) (ret []T, pagination *models.PaginatedResponse)
- func GetTotal[T Paginated](s *Storage, address string) (r uint64)
- func GetTypeName[T any]() string
- type AddressStats
- type Batch
- type FinalizationData
- type GenesisHash
- type Paginated
- type Storage
- func (s *Storage) Clean() error
- func (s *Storage) Close() error
- func (s *Storage) GenesisHashExist() bool
- func (s *Storage) GetAddressStats(addr string) *AddressStats
- func (s *Storage) GetFinalizationData() *FinalizationData
- func (s *Storage) GetGenesisHash() GenesisHash
- func (s *Storage) GetTotalSupply() *TotalSupply
- func (s *Storage) GetWeekStats(year, week int32) WeekStats
- func (s *Storage) NewBatch() *Batch
- type TotalSupply
- type WeekStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectsPage ¶
func GetTypeName ¶
Types ¶
type AddressStats ¶
type AddressStats struct { models.StatsResponse Address string `json:"address"` // contains filtered or unexported fields }
AddressStats defines the model for an address aggregate.
func MakeEmptyAddressStats ¶
func MakeEmptyAddressStats(addr string) *AddressStats
func (*AddressStats) AddTransaction ¶
func (a *AddressStats) AddTransaction(timestamp models.Timestamp) uint64
type Batch ¶
func (*Batch) AddToBatch ¶
func (*Batch) CommitBatch ¶
func (b *Batch) CommitBatch()
func (*Batch) SetFinalizationData ¶
func (b *Batch) SetFinalizationData(f *FinalizationData)
func (*Batch) SetGenesisHash ¶
func (b *Batch) SetGenesisHash(h GenesisHash)
func (*Batch) SetTotalSupply ¶
func (b *Batch) SetTotalSupply(s *TotalSupply)
func (*Batch) UpdateWeekStats ¶
type FinalizationData ¶
type FinalizationData struct { DagCount uint64 `json:"dag_blocks_executed"` TrxCount uint64 `json:"transactions_executed"` PbftCount uint64 `json:"pbft_period"` }
func (*FinalizationData) Check ¶
func (local *FinalizationData) Check(remote *FinalizationData)
type GenesisHash ¶
type GenesisHash string
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) GenesisHashExist ¶
func (*Storage) GetAddressStats ¶
func (s *Storage) GetAddressStats(addr string) *AddressStats
func (*Storage) GetFinalizationData ¶
func (s *Storage) GetFinalizationData() *FinalizationData
func (*Storage) GetGenesisHash ¶
func (s *Storage) GetGenesisHash() GenesisHash
func (*Storage) GetTotalSupply ¶
func (s *Storage) GetTotalSupply() *TotalSupply
func (*Storage) GetWeekStats ¶
type TotalSupply ¶
type WeekStats ¶
type WeekStats struct { Validators []models.Validator Total uint32 // contains filtered or unexported fields }
func MakeEmptyWeekStats ¶
func MakeEmptyWeekStats() *WeekStats
func (*WeekStats) AddPbftBlock ¶
func (*WeekStats) GetPaginated ¶
Click to show internal directories.
Click to hide internal directories.