Documentation ¶
Index ¶
- Variables
- type AccountActivitySeqStore
- func (s AccountActivitySeqStore) Create(record interface{}) error
- func (s AccountActivitySeqStore) CreateIfNotExists(accountActivity *model.AccountActivitySeq) error
- func (s AccountActivitySeqStore) DeleteByHeight(height int64) error
- func (s *AccountActivitySeqStore) DeleteForHeight(h int64) (*int64, error)
- func (s *AccountActivitySeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s AccountActivitySeqStore) FindByHeight(h int64) ([]model.AccountActivitySeq, error)
- func (s AccountActivitySeqStore) FindByHeightAndAddress(height int64, address string) ([]model.AccountActivitySeq, error)
- func (s AccountActivitySeqStore) FindLastByAddress(address string, limit int64) ([]model.AccountActivitySeq, error)
- func (s AccountActivitySeqStore) FindLastByAddressAndKind(address string, kind string, limit int64) ([]model.AccountActivitySeq, error)
- func (s *AccountActivitySeqStore) FindMostRecent() (*model.AccountActivitySeq, error)
- func (s AccountActivitySeqStore) Save(record interface{}) error
- func (s AccountActivitySeqStore) Truncate() error
- func (s AccountActivitySeqStore) Update(record interface{}) error
- type ActivityPeriodRow
- type BlockSeqStore
- func (s BlockSeqStore) Create(record interface{}) error
- func (s BlockSeqStore) CreateIfNotExists(block *model.BlockSeq) error
- func (s BlockSeqStore) DeleteByHeight(height int64) error
- func (s *BlockSeqStore) DeleteOlderThan(purgeThreshold time.Time, activityPeriods []ActivityPeriodRow) (*int64, error)
- func (s BlockSeqStore) FindBy(key string, value interface{}) (*model.BlockSeq, error)
- func (s BlockSeqStore) FindByHeight(height int64) (*model.BlockSeq, error)
- func (s BlockSeqStore) FindByID(id int64) (*model.BlockSeq, error)
- func (s *BlockSeqStore) FindMostRecent() (*model.BlockSeq, error)
- func (s *BlockSeqStore) GetAvgRecentTimes(limit int64) GetAvgRecentTimesResult
- func (s BlockSeqStore) Save(record interface{}) error
- func (s *BlockSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []ActivityPeriodRow) ([]BlockSeqSummary, error)
- func (s BlockSeqStore) Truncate() error
- func (s BlockSeqStore) Update(record interface{}) error
- type BlockSeqSummary
- type BlockSummaryStore
- func (s BlockSummaryStore) Create(record interface{}) error
- func (s BlockSummaryStore) DeleteByHeight(height int64) error
- func (s *BlockSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
- func (s BlockSummaryStore) Find(query *model.BlockSummary) (*model.BlockSummary, error)
- func (s *BlockSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]ActivityPeriodRow, error)
- func (s *BlockSummaryStore) FindMostRecent() (*model.BlockSummary, error)
- func (s *BlockSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.BlockSummary, error)
- func (s *BlockSummaryStore) FindSummary(interval types.SummaryInterval, period string) ([]model.BlockSummary, error)
- func (s BlockSummaryStore) Save(record interface{}) error
- func (s BlockSummaryStore) Truncate() error
- func (s BlockSummaryStore) Update(record interface{}) error
- type DatabaseStore
- type FindSystemEventByActorQuery
- type GetAvgRecentTimesResult
- type GetAvgTimesForIntervalRow
- type GetTotalSizeResult
- type GovernanceActivitySeqStore
- func (s GovernanceActivitySeqStore) Create(record interface{}) error
- func (s GovernanceActivitySeqStore) CreateIfNotExists(governanceActivity *model.GovernanceActivitySeq) error
- func (s GovernanceActivitySeqStore) DeleteByHeight(height int64) error
- func (s *GovernanceActivitySeqStore) DeleteForHeight(h int64) (*int64, error)
- func (s *GovernanceActivitySeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s GovernanceActivitySeqStore) FindByHeight(h int64) ([]model.GovernanceActivitySeq, error)
- func (s GovernanceActivitySeqStore) FindByHeightAndProposalId(height int64, proposalId uint64) ([]model.GovernanceActivitySeq, error)
- func (s GovernanceActivitySeqStore) FindByProposalId(proposalId uint64, limit int64, cursor *int64) ([]model.GovernanceActivitySeq, *int64, error)
- func (s GovernanceActivitySeqStore) FindLastByProposalId(proposalId uint64, limit int64) ([]model.GovernanceActivitySeq, error)
- func (s GovernanceActivitySeqStore) FindLastByProposalIdAndKind(proposalId uint64, kind string, limit int64) ([]model.GovernanceActivitySeq, error)
- func (s *GovernanceActivitySeqStore) FindMostRecent() (*model.GovernanceActivitySeq, error)
- func (s GovernanceActivitySeqStore) Save(record interface{}) error
- func (s GovernanceActivitySeqStore) Truncate() error
- func (s GovernanceActivitySeqStore) Update(record interface{}) error
- type ProposalAggStore
- func (s ProposalAggStore) All(limit int64, cursor *int64) ([]model.ProposalAgg, *int64, error)
- func (s ProposalAggStore) Create(record interface{}) error
- func (s ProposalAggStore) CreateOrUpdate(val *model.ProposalAgg) error
- func (s ProposalAggStore) DeleteByHeight(height int64) error
- func (s ProposalAggStore) FindBy(key string, value interface{}) (*model.ProposalAgg, error)
- func (s ProposalAggStore) FindByID(id int64) (*model.ProposalAgg, error)
- func (s *ProposalAggStore) FindByProposalId(proposalId uint64) (*model.ProposalAgg, error)
- func (s ProposalAggStore) Save(record interface{}) error
- func (s ProposalAggStore) Truncate() error
- func (s ProposalAggStore) Update(record interface{}) error
- type ReportsStore
- func (s ReportsStore) Create(record interface{}) error
- func (s ReportsStore) DeleteByHeight(height int64) error
- func (s *ReportsStore) DeleteByKinds(kinds []model.ReportKind) error
- func (s ReportsStore) FindNotCompletedByIndexVersion(indexVersion int64, kinds ...model.ReportKind) (*model.Report, error)
- func (s ReportsStore) FindNotCompletedByKind(kinds ...model.ReportKind) (*model.Report, error)
- func (s ReportsStore) Last() (*model.Report, error)
- func (s ReportsStore) Save(record interface{}) error
- func (s ReportsStore) Truncate() error
- func (s ReportsStore) Update(record interface{}) error
- type Store
- type SyncablesStore
- func (s SyncablesStore) Create(record interface{}) error
- func (s SyncablesStore) CreateOrUpdate(val *model.Syncable) error
- func (s SyncablesStore) DeleteByHeight(height int64) error
- func (s SyncablesStore) FindByHeight(height int64) (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindFirstByDifferentIndexVersion(indexVersion int64) (*model.Syncable, error)
- func (s SyncablesStore) FindLastInEpoch(epoch int64) (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindLastInEpochForHeight(height int64) (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindMostRecent() (*model.Syncable, error)
- func (s SyncablesStore) FindMostRecentByDifferentIndexVersion(indexVersion int64) (*model.Syncable, error)
- func (s SyncablesStore) FindSmallestIndexVersion() (*int64, error)
- func (s SyncablesStore) Save(record interface{}) error
- func (s SyncablesStore) SetProcessedAtForRange(reportID types.ID, startHeight int64, endHeight int64) error
- func (s SyncablesStore) Truncate() error
- func (s SyncablesStore) Update(record interface{}) error
- type SystemEventsStore
- func (s SystemEventsStore) Create(record interface{}) error
- func (s SystemEventsStore) CreateOrUpdate(val *model.SystemEvent) error
- func (s SystemEventsStore) DeleteByHeight(height int64) error
- func (s *SystemEventsStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s SystemEventsStore) FindByActor(actorAddress string, query FindSystemEventByActorQuery) ([]model.SystemEvent, error)
- func (s SystemEventsStore) FindByHeight(height int64) ([]model.SystemEvent, error)
- func (s *SystemEventsStore) FindMostRecent() (*model.SystemEvent, error)
- func (s SystemEventsStore) FindUnique(height int64, address string, kind model.SystemEventKind) (*model.SystemEvent, error)
- func (s SystemEventsStore) Save(record interface{}) error
- func (s SystemEventsStore) Truncate() error
- func (s SystemEventsStore) Update(record interface{}) error
- type ValidatorAggStore
- func (s ValidatorAggStore) All() ([]model.ValidatorAgg, error)
- func (s ValidatorAggStore) Create(record interface{}) error
- func (s ValidatorAggStore) CreateOrUpdate(val *model.ValidatorAgg) error
- func (s ValidatorAggStore) DeleteByHeight(height int64) error
- func (s ValidatorAggStore) FindBy(key string, value interface{}) (*model.ValidatorAgg, error)
- func (s *ValidatorAggStore) FindByAddress(key string) (*model.ValidatorAgg, error)
- func (s ValidatorAggStore) FindByID(id int64) (*model.ValidatorAgg, error)
- func (s *ValidatorAggStore) GetAllForHeightGreaterThan(height int64) ([]model.ValidatorAgg, error)
- func (s ValidatorAggStore) Save(record interface{}) error
- func (s ValidatorAggStore) Truncate() error
- func (s ValidatorAggStore) Update(record interface{}) error
- type ValidatorGroupAggStore
- func (s ValidatorGroupAggStore) All() ([]model.ValidatorGroupAgg, error)
- func (s ValidatorGroupAggStore) Create(record interface{}) error
- func (s ValidatorGroupAggStore) CreateOrUpdate(val *model.ValidatorGroupAgg) error
- func (s ValidatorGroupAggStore) DeleteByHeight(height int64) error
- func (s ValidatorGroupAggStore) FindBy(key string, value interface{}) (*model.ValidatorGroupAgg, error)
- func (s *ValidatorGroupAggStore) FindByAddress(key string) (*model.ValidatorGroupAgg, error)
- func (s ValidatorGroupAggStore) FindByID(id int64) (*model.ValidatorGroupAgg, error)
- func (s ValidatorGroupAggStore) Save(record interface{}) error
- func (s ValidatorGroupAggStore) Truncate() error
- func (s ValidatorGroupAggStore) Update(record interface{}) error
- type ValidatorGroupSeqStore
- func (s ValidatorGroupSeqStore) Create(record interface{}) error
- func (s ValidatorGroupSeqStore) CreateIfNotExists(validator *model.ValidatorGroupSeq) error
- func (s ValidatorGroupSeqStore) DeleteByHeight(height int64) error
- func (s *ValidatorGroupSeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s ValidatorGroupSeqStore) FindByHeight(h int64) ([]model.ValidatorGroupSeq, error)
- func (s ValidatorGroupSeqStore) FindByHeightAndAddress(height int64, address string) (*model.ValidatorGroupSeq, error)
- func (s ValidatorGroupSeqStore) FindLastByAddress(address string, limit int64) ([]model.ValidatorGroupSeq, error)
- func (s *ValidatorGroupSeqStore) FindMostRecent() (*model.ValidatorGroupSeq, error)
- func (s ValidatorGroupSeqStore) Save(record interface{}) error
- func (s *ValidatorGroupSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []ActivityPeriodRow) ([]ValidatorGroupSeqSummary, error)
- func (s ValidatorGroupSeqStore) Truncate() error
- func (s ValidatorGroupSeqStore) Update(record interface{}) error
- type ValidatorGroupSeqSummary
- type ValidatorGroupSummaryRow
- type ValidatorGroupSummaryStore
- func (s ValidatorGroupSummaryStore) Create(record interface{}) error
- func (s ValidatorGroupSummaryStore) DeleteByHeight(height int64) error
- func (s *ValidatorGroupSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
- func (s ValidatorGroupSummaryStore) Find(query *model.ValidatorGroupSummary) (*model.ValidatorGroupSummary, error)
- func (s *ValidatorGroupSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]ActivityPeriodRow, error)
- func (s *ValidatorGroupSummaryStore) FindMostRecent() (*model.ValidatorGroupSummary, error)
- func (s *ValidatorGroupSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.ValidatorGroupSummary, error)
- func (s *ValidatorGroupSummaryStore) FindSummary(interval types.SummaryInterval, period string) ([]ValidatorGroupSummaryRow, error)
- func (s *ValidatorGroupSummaryStore) FindSummaryByAddress(address string, interval types.SummaryInterval, period string) ([]model.ValidatorGroupSummary, error)
- func (s ValidatorGroupSummaryStore) Save(record interface{}) error
- func (s ValidatorGroupSummaryStore) Truncate() error
- func (s ValidatorGroupSummaryStore) Update(record interface{}) error
- type ValidatorSeqStore
- func (s ValidatorSeqStore) Create(record interface{}) error
- func (s ValidatorSeqStore) CreateIfNotExists(validator *model.ValidatorSeq) error
- func (s ValidatorSeqStore) DeleteByHeight(height int64) error
- func (s *ValidatorSeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s ValidatorSeqStore) FindByHeight(h int64) ([]model.ValidatorSeq, error)
- func (s ValidatorSeqStore) FindByHeightAndAddress(height int64, address string) (*model.ValidatorSeq, error)
- func (s ValidatorSeqStore) FindLastByAddress(address string, limit int64) ([]model.ValidatorSeq, error)
- func (s *ValidatorSeqStore) FindMostRecent() (*model.ValidatorSeq, error)
- func (s ValidatorSeqStore) Save(record interface{}) error
- func (s *ValidatorSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []ActivityPeriodRow) ([]ValidatorSeqSummary, error)
- func (s ValidatorSeqStore) Truncate() error
- func (s ValidatorSeqStore) Update(record interface{}) error
- type ValidatorSeqSummary
- type ValidatorSummaryRow
- type ValidatorSummaryStore
- func (s ValidatorSummaryStore) Create(record interface{}) error
- func (s ValidatorSummaryStore) DeleteByHeight(height int64) error
- func (s *ValidatorSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
- func (s ValidatorSummaryStore) Find(query *model.ValidatorSummary) (*model.ValidatorSummary, error)
- func (s *ValidatorSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]ActivityPeriodRow, error)
- func (s *ValidatorSummaryStore) FindMostRecent() (*model.ValidatorSummary, error)
- func (s *ValidatorSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.ValidatorSummary, error)
- func (s *ValidatorSummaryStore) FindSummary(interval types.SummaryInterval, period string) ([]ValidatorSummaryRow, error)
- func (s *ValidatorSummaryStore) FindSummaryByAddress(address string, interval types.SummaryInterval, period string) ([]model.ValidatorSummary, error)
- func (s ValidatorSummaryStore) Save(record interface{}) error
- func (s ValidatorSummaryStore) Truncate() error
- func (s ValidatorSummaryStore) Update(record interface{}) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotFound = errors.New("record not found")
)
Functions ¶
This section is empty.
Types ¶
type AccountActivitySeqStore ¶ added in v0.1.0
type AccountActivitySeqStore struct {
// contains filtered or unexported fields
}
AccountActivitySeqStore handles operations on account activities
func NewAccountActivitySeqStore ¶ added in v0.1.0
func NewAccountActivitySeqStore(db *gorm.DB) *AccountActivitySeqStore
func (AccountActivitySeqStore) Create ¶ added in v0.1.0
func (s AccountActivitySeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (AccountActivitySeqStore) CreateIfNotExists ¶ added in v0.1.0
func (s AccountActivitySeqStore) CreateIfNotExists(accountActivity *model.AccountActivitySeq) error
CreateIfNotExists creates the account activity if it does not exist
func (AccountActivitySeqStore) DeleteByHeight ¶ added in v0.1.0
DeleteByHeight removes all records associated with a height
func (*AccountActivitySeqStore) DeleteForHeight ¶ added in v0.1.0
func (s *AccountActivitySeqStore) DeleteForHeight(h int64) (*int64, error)
DeleteForHeight deletes account activity sequence for given height
func (*AccountActivitySeqStore) DeleteOlderThan ¶ added in v0.1.0
func (s *AccountActivitySeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes account activity sequence older than given threshold
func (AccountActivitySeqStore) FindByHeight ¶ added in v0.1.0
func (s AccountActivitySeqStore) FindByHeight(h int64) ([]model.AccountActivitySeq, error)
FindByHeight finds account activity sequences by height
func (AccountActivitySeqStore) FindByHeightAndAddress ¶ added in v0.1.0
func (s AccountActivitySeqStore) FindByHeightAndAddress(height int64, address string) ([]model.AccountActivitySeq, error)
FindByHeightAndAddress finds account activities by height and address
func (AccountActivitySeqStore) FindLastByAddress ¶ added in v0.1.0
func (s AccountActivitySeqStore) FindLastByAddress(address string, limit int64) ([]model.AccountActivitySeq, error)
FindLastByAddress finds last account activity sequences for given address
func (AccountActivitySeqStore) FindLastByAddressAndKind ¶ added in v0.1.0
func (s AccountActivitySeqStore) FindLastByAddressAndKind(address string, kind string, limit int64) ([]model.AccountActivitySeq, error)
FindLastByAddressAndKind finds last account activity sequences for given address and kind
func (*AccountActivitySeqStore) FindMostRecent ¶ added in v0.1.0
func (s *AccountActivitySeqStore) FindMostRecent() (*model.AccountActivitySeq, error)
FindMostRecent finds most recent account activity sequence
func (AccountActivitySeqStore) Save ¶ added in v0.1.0
func (s AccountActivitySeqStore) Save(record interface{}) error
Save saves record to database
type ActivityPeriodRow ¶
type BlockSeqStore ¶
type BlockSeqStore struct {
// contains filtered or unexported fields
}
BlockSeqStore handles operations on blocks
func NewBlockSeqStore ¶
func NewBlockSeqStore(db *gorm.DB) *BlockSeqStore
func (BlockSeqStore) Create ¶
func (s BlockSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (BlockSeqStore) CreateIfNotExists ¶
func (s BlockSeqStore) CreateIfNotExists(block *model.BlockSeq) error
CreateIfNotExists creates the block if it does not exist
func (BlockSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*BlockSeqStore) DeleteOlderThan ¶
func (s *BlockSeqStore) DeleteOlderThan(purgeThreshold time.Time, activityPeriods []ActivityPeriodRow) (*int64, error)
DeleteOlderThan deletes block sequence older than given threshold
func (BlockSeqStore) FindBy ¶
func (s BlockSeqStore) FindBy(key string, value interface{}) (*model.BlockSeq, error)
FindBy returns a block for a matching attribute
func (BlockSeqStore) FindByHeight ¶
func (s BlockSeqStore) FindByHeight(height int64) (*model.BlockSeq, error)
FindByHeight returns a block with the matching height
func (BlockSeqStore) FindByID ¶
func (s BlockSeqStore) FindByID(id int64) (*model.BlockSeq, error)
FindByID returns a block with matching ID
func (*BlockSeqStore) FindMostRecent ¶
func (s *BlockSeqStore) FindMostRecent() (*model.BlockSeq, error)
FindMostRecent finds most recent block sequence
func (*BlockSeqStore) GetAvgRecentTimes ¶
func (s *BlockSeqStore) GetAvgRecentTimes(limit int64) GetAvgRecentTimesResult
GetAvgRecentTimes Gets average block times for recent blocks by limit
func (BlockSeqStore) Save ¶
func (s BlockSeqStore) Save(record interface{}) error
Save saves record to database
func (*BlockSeqStore) Summarize ¶
func (s *BlockSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []ActivityPeriodRow) ([]BlockSeqSummary, error)
Summarize gets the summarized version of block sequences
type BlockSeqSummary ¶
type BlockSummaryStore ¶
type BlockSummaryStore struct {
// contains filtered or unexported fields
}
BlockSummaryStore handles operations on block summary
func NewBlockSummaryStore ¶
func NewBlockSummaryStore(db *gorm.DB) *BlockSummaryStore
func (BlockSummaryStore) Create ¶
func (s BlockSummaryStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (BlockSummaryStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*BlockSummaryStore) DeleteOlderThan ¶
func (s *BlockSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes block summary records older than given threshold
func (BlockSummaryStore) Find ¶
func (s BlockSummaryStore) Find(query *model.BlockSummary) (*model.BlockSummary, error)
Find find block summary by query
func (*BlockSummaryStore) FindActivityPeriods ¶
func (s *BlockSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]ActivityPeriodRow, error)
FindActivityPeriods Finds activity periods
func (*BlockSummaryStore) FindMostRecent ¶
func (s *BlockSummaryStore) FindMostRecent() (*model.BlockSummary, error)
FindMostRecent finds most recent block summary
func (*BlockSummaryStore) FindMostRecentByInterval ¶
func (s *BlockSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.BlockSummary, error)
FindMostRecentByInterval finds most recent block summary for given time interval
func (*BlockSummaryStore) FindSummary ¶
func (s *BlockSummaryStore) FindSummary(interval types.SummaryInterval, period string) ([]model.BlockSummary, error)
FindSummary Gets summary of block sequences
func (BlockSummaryStore) Save ¶
func (s BlockSummaryStore) Save(record interface{}) error
Save saves record to database
type DatabaseStore ¶
type DatabaseStore struct {
// contains filtered or unexported fields
}
DatabaseStore handles operations on blocks
func NewDatabaseStore ¶
func NewDatabaseStore(db *gorm.DB) *DatabaseStore
func (*DatabaseStore) GetTotalSize ¶
func (s *DatabaseStore) GetTotalSize() (*GetTotalSizeResult, error)
FindSummary Gets average block times for interval
type FindSystemEventByActorQuery ¶ added in v0.1.0
type FindSystemEventByActorQuery struct { Kind *model.SystemEventKind MinHeight *int64 }
type GetAvgRecentTimesResult ¶
type GetAvgRecentTimesResult struct { StartHeight int64 `json:"start_height"` EndHeight int64 `json:"end_height"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Count int64 `json:"count"` Diff float64 `json:"diff"` Avg float64 `json:"avg"` }
GetAvgRecentTimesResult Contains results for GetAvgRecentTimes query
type GetAvgTimesForIntervalRow ¶
type GetAvgTimesForIntervalRow struct { TimeInterval string `json:"time_interval"` Count int64 `json:"count"` Avg float64 `json:"avg"` }
GetAvgTimesForIntervalRow Contains row of data for FindSummary query
type GetTotalSizeResult ¶
type GetTotalSizeResult struct {
Size float64 `json:"size"`
}
GetAvgTimesForIntervalRow Contains row of data for FindSummary query
type GovernanceActivitySeqStore ¶ added in v0.1.0
type GovernanceActivitySeqStore struct {
// contains filtered or unexported fields
}
GovernanceActivitySeqStore handles operations on governance activities
func NewGovernanceActivitySeqStore ¶ added in v0.1.0
func NewGovernanceActivitySeqStore(db *gorm.DB) *GovernanceActivitySeqStore
func (GovernanceActivitySeqStore) Create ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (GovernanceActivitySeqStore) CreateIfNotExists ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) CreateIfNotExists(governanceActivity *model.GovernanceActivitySeq) error
CreateIfNotExists creates the governance activity if it does not exist
func (GovernanceActivitySeqStore) DeleteByHeight ¶ added in v0.1.0
DeleteByHeight removes all records associated with a height
func (*GovernanceActivitySeqStore) DeleteForHeight ¶ added in v0.1.0
func (s *GovernanceActivitySeqStore) DeleteForHeight(h int64) (*int64, error)
DeleteForHeight deletes governance activity sequence for given height
func (*GovernanceActivitySeqStore) DeleteOlderThan ¶ added in v0.1.0
func (s *GovernanceActivitySeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes governance activity sequence older than given threshold
func (GovernanceActivitySeqStore) FindByHeight ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) FindByHeight(h int64) ([]model.GovernanceActivitySeq, error)
FindByHeight finds governance activity sequences by height
func (GovernanceActivitySeqStore) FindByHeightAndProposalId ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) FindByHeightAndProposalId(height int64, proposalId uint64) ([]model.GovernanceActivitySeq, error)
FindByHeightAndProposalId finds governance activities by height and proposal Id
func (GovernanceActivitySeqStore) FindByProposalId ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) FindByProposalId(proposalId uint64, limit int64, cursor *int64) ([]model.GovernanceActivitySeq, *int64, error)
FindByProposalId finds governance activities by proposal Id
func (GovernanceActivitySeqStore) FindLastByProposalId ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) FindLastByProposalId(proposalId uint64, limit int64) ([]model.GovernanceActivitySeq, error)
FindLastByProposalId finds last governance activity sequences for given proposal Id
func (GovernanceActivitySeqStore) FindLastByProposalIdAndKind ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) FindLastByProposalIdAndKind(proposalId uint64, kind string, limit int64) ([]model.GovernanceActivitySeq, error)
FindLastByProposalIdAndKind finds last governance activity sequences for given proposal Id and kind
func (*GovernanceActivitySeqStore) FindMostRecent ¶ added in v0.1.0
func (s *GovernanceActivitySeqStore) FindMostRecent() (*model.GovernanceActivitySeq, error)
FindMostRecent finds most recent governance activity sequence
func (GovernanceActivitySeqStore) Save ¶ added in v0.1.0
func (s GovernanceActivitySeqStore) Save(record interface{}) error
Save saves record to database
type ProposalAggStore ¶ added in v0.1.0
type ProposalAggStore struct {
// contains filtered or unexported fields
}
ProposalAggStore handles operations on proposals
func NewProposalAggStore ¶ added in v0.1.0
func NewProposalAggStore(db *gorm.DB) *ProposalAggStore
func (ProposalAggStore) All ¶ added in v0.1.0
func (s ProposalAggStore) All(limit int64, cursor *int64) ([]model.ProposalAgg, *int64, error)
All returns all proposals
func (ProposalAggStore) Create ¶ added in v0.1.0
func (s ProposalAggStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ProposalAggStore) CreateOrUpdate ¶ added in v0.1.0
func (s ProposalAggStore) CreateOrUpdate(val *model.ProposalAgg) error
CreateOrUpdate creates a new proposal or updates an existing one
func (ProposalAggStore) DeleteByHeight ¶ added in v0.1.0
DeleteByHeight removes all records associated with a height
func (ProposalAggStore) FindBy ¶ added in v0.1.0
func (s ProposalAggStore) FindBy(key string, value interface{}) (*model.ProposalAgg, error)
FindBy returns an proposal for a matching attribute
func (ProposalAggStore) FindByID ¶ added in v0.1.0
func (s ProposalAggStore) FindByID(id int64) (*model.ProposalAgg, error)
FindByID returns an proposal for the ID
func (*ProposalAggStore) FindByProposalId ¶ added in v0.1.0
func (s *ProposalAggStore) FindByProposalId(proposalId uint64) (*model.ProposalAgg, error)
FindByProposalId return proposal by proposal Id
func (ProposalAggStore) Save ¶ added in v0.1.0
func (s ProposalAggStore) Save(record interface{}) error
Save saves record to database
type ReportsStore ¶
type ReportsStore struct {
// contains filtered or unexported fields
}
ReportsStore handles operations on reports
func NewReportsStore ¶
func NewReportsStore(db *gorm.DB) *ReportsStore
func (ReportsStore) Create ¶
func (s ReportsStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ReportsStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ReportsStore) DeleteByKinds ¶
func (s *ReportsStore) DeleteByKinds(kinds []model.ReportKind) error
DeleteByKinds deletes reports with kind reindexing sequential or parallel
func (ReportsStore) FindNotCompletedByIndexVersion ¶
func (s ReportsStore) FindNotCompletedByIndexVersion(indexVersion int64, kinds ...model.ReportKind) (*model.Report, error)
FindNotCompletedByIndexVersion returns the report by index version and kind
func (ReportsStore) FindNotCompletedByKind ¶
func (s ReportsStore) FindNotCompletedByKind(kinds ...model.ReportKind) (*model.Report, error)
Last returns the last report
func (ReportsStore) Last ¶
func (s ReportsStore) Last() (*model.Report, error)
Last returns the last report
func (ReportsStore) Save ¶
func (s ReportsStore) Save(record interface{}) error
Save saves record to database
type Store ¶
type Store struct { Database *DatabaseStore Syncables *SyncablesStore Reports *ReportsStore BlockSeq *BlockSeqStore ValidatorSeq *ValidatorSeqStore ValidatorGroupSeq *ValidatorGroupSeqStore AccountActivitySeq *AccountActivitySeqStore GovernanceActivitySeq *GovernanceActivitySeqStore ValidatorAgg *ValidatorAggStore ValidatorGroupAgg *ValidatorGroupAggStore ProposalAgg *ProposalAggStore BlockSummary *BlockSummaryStore ValidatorSummary *ValidatorSummaryStore ValidatorGroupSummary *ValidatorGroupSummaryStore SystemEvents *SystemEventsStore // contains filtered or unexported fields }
Store handles all database operations
func (*Store) SetDebugMode ¶
SetDebugMode enabled detailed query logging
type SyncablesStore ¶
type SyncablesStore struct {
// contains filtered or unexported fields
}
SyncablesStore handles operations on syncables
func NewSyncablesStore ¶
func NewSyncablesStore(db *gorm.DB) *SyncablesStore
func (SyncablesStore) Create ¶
func (s SyncablesStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (SyncablesStore) CreateOrUpdate ¶
func (s SyncablesStore) CreateOrUpdate(val *model.Syncable) error
CreateOrUpdate creates a new syncable or updates an existing one
func (SyncablesStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (SyncablesStore) FindByHeight ¶
func (s SyncablesStore) FindByHeight(height int64) (syncable *model.Syncable, err error)
Exists returns true if a syncable exists at give height
func (SyncablesStore) FindFirstByDifferentIndexVersion ¶
func (s SyncablesStore) FindFirstByDifferentIndexVersion(indexVersion int64) (*model.Syncable, error)
FindFirstByDifferentIndexVersion returns first syncable with different index version
func (SyncablesStore) FindLastInEpoch ¶
func (s SyncablesStore) FindLastInEpoch(epoch int64) (syncable *model.Syncable, err error)
FindLastInEpoch finds last syncable in given epoch
func (SyncablesStore) FindLastInEpochForHeight ¶
func (s SyncablesStore) FindLastInEpochForHeight(height int64) (syncable *model.Syncable, err error)
FindLastInEpochForHeight finds last_in_epoch syncable for given height
func (SyncablesStore) FindMostRecent ¶
func (s SyncablesStore) FindMostRecent() (*model.Syncable, error)
FindMostRecent returns the most recent syncable
func (SyncablesStore) FindMostRecentByDifferentIndexVersion ¶
func (s SyncablesStore) FindMostRecentByDifferentIndexVersion(indexVersion int64) (*model.Syncable, error)
FindMostRecentByDifferentIndexVersion returns the most recent syncable with different index version
func (SyncablesStore) FindSmallestIndexVersion ¶
func (s SyncablesStore) FindSmallestIndexVersion() (*int64, error)
FindSmallestIndexVersion returns smallest index version
func (SyncablesStore) Save ¶
func (s SyncablesStore) Save(record interface{}) error
Save saves record to database
func (SyncablesStore) SetProcessedAtForRange ¶
func (s SyncablesStore) SetProcessedAtForRange(reportID types.ID, startHeight int64, endHeight int64) error
CreateOrUpdate creates a new syncable or updates an existing one
type SystemEventsStore ¶ added in v0.1.0
type SystemEventsStore struct {
// contains filtered or unexported fields
}
SystemEventsStore handles operations on syncables
func NewSystemEventsStore ¶ added in v0.1.0
func NewSystemEventsStore(db *gorm.DB) *SystemEventsStore
func (SystemEventsStore) Create ¶ added in v0.1.0
func (s SystemEventsStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (SystemEventsStore) CreateOrUpdate ¶ added in v0.1.0
func (s SystemEventsStore) CreateOrUpdate(val *model.SystemEvent) error
CreateOrUpdate creates a new system event or updates an existing one
func (SystemEventsStore) DeleteByHeight ¶ added in v0.1.0
DeleteByHeight removes all records associated with a height
func (*SystemEventsStore) DeleteOlderThan ¶ added in v0.1.0
func (s *SystemEventsStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes system events older than given threshold
func (SystemEventsStore) FindByActor ¶ added in v0.1.0
func (s SystemEventsStore) FindByActor(actorAddress string, query FindSystemEventByActorQuery) ([]model.SystemEvent, error)
FindByActor returns system events by actor
func (SystemEventsStore) FindByHeight ¶ added in v0.1.0
func (s SystemEventsStore) FindByHeight(height int64) ([]model.SystemEvent, error)
FindByHeight returns system events by height
func (*SystemEventsStore) FindMostRecent ¶ added in v0.1.0
func (s *SystemEventsStore) FindMostRecent() (*model.SystemEvent, error)
FindMostRecent finds most recent system event
func (SystemEventsStore) FindUnique ¶ added in v0.1.0
func (s SystemEventsStore) FindUnique(height int64, address string, kind model.SystemEventKind) (*model.SystemEvent, error)
FindUnique returns unique system
func (SystemEventsStore) Save ¶ added in v0.1.0
func (s SystemEventsStore) Save(record interface{}) error
Save saves record to database
type ValidatorAggStore ¶
type ValidatorAggStore struct {
// contains filtered or unexported fields
}
ValidatorAggStore handles operations on validators
func NewValidatorAggStore ¶
func NewValidatorAggStore(db *gorm.DB) *ValidatorAggStore
func (ValidatorAggStore) All ¶
func (s ValidatorAggStore) All() ([]model.ValidatorAgg, error)
All returns all validators
func (ValidatorAggStore) Create ¶
func (s ValidatorAggStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorAggStore) CreateOrUpdate ¶
func (s ValidatorAggStore) CreateOrUpdate(val *model.ValidatorAgg) error
CreateOrUpdate creates a new validator or updates an existing one
func (ValidatorAggStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (ValidatorAggStore) FindBy ¶
func (s ValidatorAggStore) FindBy(key string, value interface{}) (*model.ValidatorAgg, error)
FindBy returns an validator for a matching attribute
func (*ValidatorAggStore) FindByAddress ¶
func (s *ValidatorAggStore) FindByAddress(key string) (*model.ValidatorAgg, error)
FindByAddress return validator by address
func (ValidatorAggStore) FindByID ¶
func (s ValidatorAggStore) FindByID(id int64) (*model.ValidatorAgg, error)
FindByID returns an validator for the ID
func (*ValidatorAggStore) GetAllForHeightGreaterThan ¶
func (s *ValidatorAggStore) GetAllForHeightGreaterThan(height int64) ([]model.ValidatorAgg, error)
GetAllForHeightGreaterThan returns validators who have been validating since given height
func (ValidatorAggStore) Save ¶
func (s ValidatorAggStore) Save(record interface{}) error
Save saves record to database
type ValidatorGroupAggStore ¶
type ValidatorGroupAggStore struct {
// contains filtered or unexported fields
}
ValidatorGroupAggStore handles operations on validators
func NewValidatorGroupAggStore ¶
func NewValidatorGroupAggStore(db *gorm.DB) *ValidatorGroupAggStore
func (ValidatorGroupAggStore) All ¶
func (s ValidatorGroupAggStore) All() ([]model.ValidatorGroupAgg, error)
All returns all validator groups
func (ValidatorGroupAggStore) Create ¶
func (s ValidatorGroupAggStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorGroupAggStore) CreateOrUpdate ¶
func (s ValidatorGroupAggStore) CreateOrUpdate(val *model.ValidatorGroupAgg) error
CreateOrUpdate creates a new validator group or updates an existing one
func (ValidatorGroupAggStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (ValidatorGroupAggStore) FindBy ¶
func (s ValidatorGroupAggStore) FindBy(key string, value interface{}) (*model.ValidatorGroupAgg, error)
FindBy returns an validator group for a matching attribute
func (*ValidatorGroupAggStore) FindByAddress ¶
func (s *ValidatorGroupAggStore) FindByAddress(key string) (*model.ValidatorGroupAgg, error)
FindByAddress return validator group by address
func (ValidatorGroupAggStore) FindByID ¶
func (s ValidatorGroupAggStore) FindByID(id int64) (*model.ValidatorGroupAgg, error)
FindByID returns an validator group for the ID
func (ValidatorGroupAggStore) Save ¶
func (s ValidatorGroupAggStore) Save(record interface{}) error
Save saves record to database
type ValidatorGroupSeqStore ¶
type ValidatorGroupSeqStore struct {
// contains filtered or unexported fields
}
ValidatorGroupSeqStore handles operations on validator groups
func NewValidatorGroupSeqStore ¶
func NewValidatorGroupSeqStore(db *gorm.DB) *ValidatorGroupSeqStore
func (ValidatorGroupSeqStore) Create ¶
func (s ValidatorGroupSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorGroupSeqStore) CreateIfNotExists ¶
func (s ValidatorGroupSeqStore) CreateIfNotExists(validator *model.ValidatorGroupSeq) error
CreateIfNotExists creates the validator group if it does not exist
func (ValidatorGroupSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorGroupSeqStore) DeleteOlderThan ¶
func (s *ValidatorGroupSeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes validator group sequence older than given threshold
func (ValidatorGroupSeqStore) FindByHeight ¶
func (s ValidatorGroupSeqStore) FindByHeight(h int64) ([]model.ValidatorGroupSeq, error)
FindByHeight finds validator group sequences by height
func (ValidatorGroupSeqStore) FindByHeightAndAddress ¶
func (s ValidatorGroupSeqStore) FindByHeightAndAddress(height int64, address string) (*model.ValidatorGroupSeq, error)
FindByHeightAndAddress finds validator group by height and address
func (ValidatorGroupSeqStore) FindLastByAddress ¶
func (s ValidatorGroupSeqStore) FindLastByAddress(address string, limit int64) ([]model.ValidatorGroupSeq, error)
FindLastByAddress finds last validator group sequences for given address
func (*ValidatorGroupSeqStore) FindMostRecent ¶
func (s *ValidatorGroupSeqStore) FindMostRecent() (*model.ValidatorGroupSeq, error)
FindMostRecent finds most recent validator group sequence
func (ValidatorGroupSeqStore) Save ¶
func (s ValidatorGroupSeqStore) Save(record interface{}) error
Save saves record to database
func (*ValidatorGroupSeqStore) Summarize ¶
func (s *ValidatorGroupSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []ActivityPeriodRow) ([]ValidatorGroupSeqSummary, error)
Summarize gets the summarized version of validator sequences
type ValidatorGroupSeqSummary ¶
type ValidatorGroupSeqSummary struct { Address string `json:"address"` TimeBucket types.Time `json:"time_bucket"` CommissionAvg types.Quantity `json:"commission_avg"` CommissionMin types.Quantity `json:"commission_min"` CommissionMax types.Quantity `json:"commission_max"` ActiveVotesAvg types.Quantity `json:"active_votes_avg"` ActiveVotesMin types.Quantity `json:"active_votes_min"` ActiveVotesMax types.Quantity `json:"active_votes_max"` ActiveVoteUnitsAvg types.Quantity `json:"active_vote_units_avg"` ActiveVoteUnitsMin types.Quantity `json:"active_vote_units_min"` ActiveVoteUnitsMax types.Quantity `json:"active_vote_units_max"` PendingVotesAvg types.Quantity `json:"pending_votes_avg"` PendingVotesMin types.Quantity `json:"pending_votes_min"` PendingVotesMax types.Quantity `json:"pending_votes_max"` }
type ValidatorGroupSummaryRow ¶
type ValidatorGroupSummaryRow struct { TimeBucket string `json:"time_bucket"` TimeInterval string `json:"time_interval"` CommissionAvg string `json:"commission_avg"` CommissionMin string `json:"commission_min"` CommissionMax string `json:"commission_max"` ActiveVotesAvg string `json:"active_votes_avg"` ActiveVotesMin string `json:"active_votes_min"` ActiveVotesMax string `json:"active_votes_max"` ActiveVoteUnitsAvg string `json:"active_vote_units_avg"` ActiveVoteUnitsMin string `json:"active_vote_units_min"` ActiveVoteUnitsMax string `json:"active_vote_units_max"` PendingVotesAvg string `json:"pending_votes_avg"` PendingVotesMin string `json:"pending_votes_min"` PendingVotesMax string `json:"pending_votes_max"` }
type ValidatorGroupSummaryStore ¶
type ValidatorGroupSummaryStore struct {
// contains filtered or unexported fields
}
ValidatorGroupSummaryStore handles operations on validator group summaries
func NewValidatorGroupSummaryStore ¶
func NewValidatorGroupSummaryStore(db *gorm.DB) *ValidatorGroupSummaryStore
func (ValidatorGroupSummaryStore) Create ¶
func (s ValidatorGroupSummaryStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorGroupSummaryStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorGroupSummaryStore) DeleteOlderThan ¶
func (s *ValidatorGroupSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deleted validator group summary records older than given threshold
func (ValidatorGroupSummaryStore) Find ¶
func (s ValidatorGroupSummaryStore) Find(query *model.ValidatorGroupSummary) (*model.ValidatorGroupSummary, error)
Find find validator group summary by query
func (*ValidatorGroupSummaryStore) FindActivityPeriods ¶
func (s *ValidatorGroupSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]ActivityPeriodRow, error)
FindActivityPeriods Finds activity periods
func (*ValidatorGroupSummaryStore) FindMostRecent ¶
func (s *ValidatorGroupSummaryStore) FindMostRecent() (*model.ValidatorGroupSummary, error)
FindMostRecent finds most recent validator group summary
func (*ValidatorGroupSummaryStore) FindMostRecentByInterval ¶
func (s *ValidatorGroupSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.ValidatorGroupSummary, error)
FindMostRecentByInterval finds most recent validator group summary for interval
func (*ValidatorGroupSummaryStore) FindSummary ¶
func (s *ValidatorGroupSummaryStore) FindSummary(interval types.SummaryInterval, period string) ([]ValidatorGroupSummaryRow, error)
FindSummary gets summary for validator group summary
func (*ValidatorGroupSummaryStore) FindSummaryByAddress ¶
func (s *ValidatorGroupSummaryStore) FindSummaryByAddress(address string, interval types.SummaryInterval, period string) ([]model.ValidatorGroupSummary, error)
FindSummaryByAddress gets summary for given validator group
func (ValidatorGroupSummaryStore) Save ¶
func (s ValidatorGroupSummaryStore) Save(record interface{}) error
Save saves record to database
type ValidatorSeqStore ¶
type ValidatorSeqStore struct {
// contains filtered or unexported fields
}
ValidatorSeqStore handles operations on validators
func NewValidatorSeqStore ¶
func NewValidatorSeqStore(db *gorm.DB) *ValidatorSeqStore
func (ValidatorSeqStore) Create ¶
func (s ValidatorSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorSeqStore) CreateIfNotExists ¶
func (s ValidatorSeqStore) CreateIfNotExists(validator *model.ValidatorSeq) error
CreateIfNotExists creates the validator if it does not exist
func (ValidatorSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorSeqStore) DeleteOlderThan ¶
func (s *ValidatorSeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes validator sequence older than given threshold
func (ValidatorSeqStore) FindByHeight ¶
func (s ValidatorSeqStore) FindByHeight(h int64) ([]model.ValidatorSeq, error)
FindByHeight finds validator sequences by height
func (ValidatorSeqStore) FindByHeightAndAddress ¶
func (s ValidatorSeqStore) FindByHeightAndAddress(height int64, address string) (*model.ValidatorSeq, error)
FindByHeightAndAddress finds validator by height and address
func (ValidatorSeqStore) FindLastByAddress ¶
func (s ValidatorSeqStore) FindLastByAddress(address string, limit int64) ([]model.ValidatorSeq, error)
FindLastByAddress finds last validator sequences for given address
func (*ValidatorSeqStore) FindMostRecent ¶
func (s *ValidatorSeqStore) FindMostRecent() (*model.ValidatorSeq, error)
FindMostRecent finds most recent validator era sequence
func (ValidatorSeqStore) Save ¶
func (s ValidatorSeqStore) Save(record interface{}) error
Save saves record to database
func (*ValidatorSeqStore) Summarize ¶
func (s *ValidatorSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []ActivityPeriodRow) ([]ValidatorSeqSummary, error)
Summarize gets the summarized version of validator sequences
type ValidatorSeqSummary ¶
type ValidatorSeqSummary struct { Address string `json:"address"` TimeBucket types.Time `json:"time_bucket"` SignedAvg float64 `json:"signed_avg"` SignedMin int64 `json:"signed_min"` SignedMax int64 `json:"signed_max"` ScoreAvg types.Quantity `json:"score_avg"` ScoreMin types.Quantity `json:"score_min"` ScoreMax types.Quantity `json:"score_max"` }
type ValidatorSummaryRow ¶
type ValidatorSummaryStore ¶
type ValidatorSummaryStore struct {
// contains filtered or unexported fields
}
ValidatorSummaryStore handles operations on validators
func NewValidatorSummaryStore ¶
func NewValidatorSummaryStore(db *gorm.DB) *ValidatorSummaryStore
func (ValidatorSummaryStore) Create ¶
func (s ValidatorSummaryStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorSummaryStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorSummaryStore) DeleteOlderThan ¶
func (s *ValidatorSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deleted validator summary records older than given threshold
func (ValidatorSummaryStore) Find ¶
func (s ValidatorSummaryStore) Find(query *model.ValidatorSummary) (*model.ValidatorSummary, error)
Find find validator summary by query
func (*ValidatorSummaryStore) FindActivityPeriods ¶
func (s *ValidatorSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]ActivityPeriodRow, error)
FindActivityPeriods Finds activity periods
func (*ValidatorSummaryStore) FindMostRecent ¶
func (s *ValidatorSummaryStore) FindMostRecent() (*model.ValidatorSummary, error)
FindMostRecent finds most recent validator summary
func (*ValidatorSummaryStore) FindMostRecentByInterval ¶
func (s *ValidatorSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.ValidatorSummary, error)
FindMostRecentByInterval finds most recent validator summary for interval
func (*ValidatorSummaryStore) FindSummary ¶
func (s *ValidatorSummaryStore) FindSummary(interval types.SummaryInterval, period string) ([]ValidatorSummaryRow, error)
FindSummary gets summary for validator summary
func (*ValidatorSummaryStore) FindSummaryByAddress ¶
func (s *ValidatorSummaryStore) FindSummaryByAddress(address string, interval types.SummaryInterval, period string) ([]model.ValidatorSummary, error)
FindSummaryByAddress gets summary for given validator
func (ValidatorSummaryStore) Save ¶
func (s ValidatorSummaryStore) Save(record interface{}) error
Save saves record to database
Source Files ¶
- account_activity_seq_store.go
- base_store.go
- block_seq_queries.go
- block_seq_store.go
- block_summary_queries.go
- block_summary_store.go
- database_store.go
- governance_activity_seq_store.go
- proposal_agg_store.go
- reports_store.go
- store.go
- syncables_store.go
- system_events_store.go
- validator_agg_store.go
- validator_group_agg_store.go
- validator_group_seq_queries.go
- validator_group_seq_store.go
- validator_group_summary_queries.go
- validator_group_summary_store.go
- validator_seq_queries.go
- validator_seq_store.go
- validator_summary_queries.go
- validator_summary_store.go