Documentation ¶
Index ¶
- type AccountEraSeqStore
- func (s AccountEraSeqStore) BulkUpsert(records []model.AccountEraSeq) error
- func (s AccountEraSeqStore) Create(record interface{}) error
- func (s AccountEraSeqStore) DeleteByHeight(height int64) error
- func (s AccountEraSeqStore) FindByEra(era int64) ([]model.AccountEraSeq, error)
- func (s AccountEraSeqStore) FindLastByStashAccount(stashAccount string) ([]model.AccountEraSeq, error)
- func (s AccountEraSeqStore) FindLastByValidatorStashAccount(validatorStashAccount string) ([]model.AccountEraSeq, error)
- func (s AccountEraSeqStore) GetAllByTime(stash string, start, end types.Time) ([]model.AccountEraSeq, error)
- func (s AccountEraSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s AccountEraSeqStore) Save(record interface{}) error
- func (s AccountEraSeqStore) Truncate() error
- func (s AccountEraSeqStore) Update(record interface{}) error
- type BlockSeqStore
- func (s BlockSeqStore) Create(record interface{}) error
- func (s BlockSeqStore) CreateIfNotExists(block *model.BlockSeq) error
- func (s BlockSeqStore) CreateSeq(block *model.BlockSeq) error
- func (s BlockSeqStore) DeleteByHeight(height int64) error
- func (s *BlockSeqStore) DeleteSeqOlderThan(purgeThreshold time.Time, activityPeriods []store.ActivityPeriodRow) (*int64, error)
- func (s BlockSeqStore) FindBy(key string, value interface{}) (*model.BlockSeq, error)
- func (s BlockSeqStore) FindByID(id int64) (*model.BlockSeq, error)
- func (s *BlockSeqStore) FindMostRecentSeq() (*model.BlockSeq, error)
- func (s BlockSeqStore) FindSeqByHeight(height int64) (*model.BlockSeq, error)
- func (s *BlockSeqStore) GetAvgRecentTimes(limit int64) store.GetAvgRecentTimesResult
- func (s BlockSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s BlockSeqStore) Save(record interface{}) error
- func (s BlockSeqStore) SaveSeq(block *model.BlockSeq) error
- func (s *BlockSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []store.ActivityPeriodRow) ([]model.BlockSeqSummary, error)
- func (s BlockSeqStore) Truncate() error
- func (s BlockSeqStore) Update(record interface{}) error
- type BlockSummaryStore
- func (s BlockSummaryStore) Create(record interface{}) error
- func (s BlockSummaryStore) CreateSummary(val *model.BlockSummary) error
- func (s BlockSummaryStore) DeleteByHeight(height int64) error
- func (s *BlockSummaryStore) DeleteOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
- func (s *BlockSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]store.ActivityPeriodRow, error)
- func (s *BlockSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.BlockSummary, error)
- func (s *BlockSummaryStore) FindMostRecentSummary() (*model.BlockSummary, error)
- func (s *BlockSummaryStore) FindSummaries(interval types.SummaryInterval, period string) ([]model.BlockSummary, error)
- func (s BlockSummaryStore) FindSummary(query *model.BlockSummary) (*model.BlockSummary, error)
- func (s BlockSummaryStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s BlockSummaryStore) Save(record interface{}) error
- func (s BlockSummaryStore) SaveSummary(val *model.BlockSummary) error
- func (s BlockSummaryStore) Truncate() error
- func (s BlockSummaryStore) Update(record interface{}) error
- type DatabaseStore
- type EventSeqStore
- func (s EventSeqStore) BulkUpsert(records []model.EventSeq) error
- func (s EventSeqStore) Create(record interface{}) error
- func (s EventSeqStore) DeleteByHeight(height int64) error
- func (s *EventSeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s EventSeqStore) FindBalanceDeposits(address string) ([]model.EventSeqWithTxHash, error)
- func (s EventSeqStore) FindBalanceTransfers(address string) ([]model.EventSeqWithTxHash, error)
- func (s EventSeqStore) FindBonded(address string) ([]model.EventSeqWithTxHash, error)
- func (s EventSeqStore) FindByHeight(height int64) ([]model.EventSeq, error)
- func (s EventSeqStore) FindByHeightAndIndex(height int64, index int64) (*model.EventSeq, error)
- func (s *EventSeqStore) FindMostRecent() (*model.EventSeq, error)
- func (s *EventSeqStore) FindRewardsForTimePeriod(address string, start, end time.Time) ([]model.EventSeq, error)
- func (s EventSeqStore) FindUnbonded(address string) ([]model.EventSeqWithTxHash, error)
- func (s EventSeqStore) FindWithdrawn(address string) ([]model.EventSeqWithTxHash, error)
- func (s EventSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s EventSeqStore) Save(record interface{}) error
- func (s EventSeqStore) Truncate() error
- func (s EventSeqStore) Update(record interface{}) error
- type GetAvgTimesForIntervalRow
- 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) Import(query string, rows int, fn bulk.RowFunc) 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 RewardEraSeqStore
- func (s RewardEraSeqStore) BulkUpsert(records []model.RewardEraSeq) error
- func (s RewardEraSeqStore) Create(record interface{}) error
- func (s RewardEraSeqStore) DeleteByHeight(height int64) error
- func (s RewardEraSeqStore) GetAll(stash, validatorStash string, start, end int64) ([]model.RewardEraSeq, error)
- func (s RewardEraSeqStore) GetAllByTime(stash string, start, end types.Time) ([]model.RewardEraSeq, error)
- func (s *RewardEraSeqStore) GetByStashAndEra(validatorStash, stash string, era int64) (model.RewardEraSeq, error)
- func (s RewardEraSeqStore) GetCount(validatorStash string, era int64) (int64, error)
- func (s RewardEraSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s RewardEraSeqStore) MarkAllClaimed(validatorStash string, era int64, txHash string) error
- func (s RewardEraSeqStore) Save(record interface{}) error
- func (s RewardEraSeqStore) Truncate() error
- func (s RewardEraSeqStore) Update(record interface{}) error
- type Store
- func (s *Store) Close() error
- func (s *Store) GetAccounts() *accounts
- func (s *Store) GetBlocks() *blocks
- func (s *Store) GetDatabase() *database
- func (s *Store) GetEvents() *events
- func (s *Store) GetReports() *reports
- func (s *Store) GetRewards() *rewards
- func (s *Store) GetSyncables() *syncables
- func (s *Store) GetSystemEvents() *systemEvents
- func (s *Store) GetTransactions() *transactions
- func (s *Store) GetValidators() *validators
- func (s *Store) SetDebugMode(enabled bool)
- func (s *Store) Test() error
- 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) FindAllByLastInSessionOrEra(indexVersion int64, isLastInSession, isLastInEra bool, start, end int64) ([]model.Syncable, error)
- func (s SyncablesStore) FindByHeight(height int64) (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindFirstByDifferentIndexVersion(indexVersion int64) (*model.Syncable, error)
- func (s SyncablesStore) FindLastEndOfEra() (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindLastEndOfSession() (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindLastInEra(era int64) (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindLastInSession(session int64) (syncable *model.Syncable, err error)
- func (s SyncablesStore) FindLastInSessionForHeight(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) Import(query string, rows int, fn bulk.RowFunc) error
- func (s SyncablesStore) Save(record interface{}) error
- func (s SyncablesStore) SaveSyncable(val *model.Syncable) 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 SystemEventStore
- func (s SystemEventStore) BulkUpsert(records []model.SystemEvent) error
- func (s SystemEventStore) Create(record interface{}) error
- func (s SystemEventStore) DeleteByHeight(height int64) error
- func (s SystemEventStore) FindByActor(actorAddress string, kind *model.SystemEventKind, minHeight *int64) ([]model.SystemEvent, error)
- func (s SystemEventStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s SystemEventStore) Save(record interface{}) error
- func (s SystemEventStore) Truncate() error
- func (s SystemEventStore) Update(record interface{}) error
- type TransactionSeqStore
- func (s TransactionSeqStore) BulkUpsert(records []model.TransactionSeq) error
- func (s TransactionSeqStore) Create(record interface{}) error
- func (s TransactionSeqStore) DeleteByHeight(height int64) error
- func (s TransactionSeqStore) GetTransactionsByTransactionKind(kind model.TransactionKind, start, end int64) ([]model.TransactionSeq, error)
- func (s TransactionSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s TransactionSeqStore) Save(record interface{}) error
- func (s TransactionSeqStore) Truncate() error
- func (s TransactionSeqStore) Update(record interface{}) error
- type ValidatorAggStore
- func (s ValidatorAggStore) All() ([]model.ValidatorAgg, error)
- func (s ValidatorAggStore) Create(record interface{}) error
- func (s ValidatorAggStore) CreateAgg(val *model.ValidatorAgg) error
- func (s ValidatorAggStore) DeleteByHeight(height int64) error
- func (s *ValidatorAggStore) FindAggByStashAccount(key string) (*model.ValidatorAgg, error)
- func (s ValidatorAggStore) FindBy(key string, value interface{}) (*model.ValidatorAgg, error)
- func (s ValidatorAggStore) FindByID(id int64) (*model.ValidatorAgg, error)
- func (s *ValidatorAggStore) GetAllForHeightGreaterThan(height int64) ([]model.ValidatorAgg, error)
- func (s ValidatorAggStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s ValidatorAggStore) Save(record interface{}) error
- func (s ValidatorAggStore) SaveAgg(val *model.ValidatorAgg) error
- func (s ValidatorAggStore) Truncate() error
- func (s ValidatorAggStore) Update(record interface{}) error
- type ValidatorEraSeqStore
- func (s ValidatorEraSeqStore) BulkUpsertEraSeqs(records []model.ValidatorEraSeq) error
- func (s ValidatorEraSeqStore) Create(record interface{}) error
- func (s ValidatorEraSeqStore) DeleteByHeight(height int64) error
- func (s *ValidatorEraSeqStore) DeleteEraSeqsOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s ValidatorEraSeqStore) FindByEra(era int64) ([]model.ValidatorEraSeq, error)
- func (s ValidatorEraSeqStore) FindByEraAndStashAccount(era int64, stash string) (*model.ValidatorEraSeq, error)
- func (s ValidatorEraSeqStore) FindByHeightAndStashAccount(height int64, stash string) (*model.ValidatorEraSeq, error)
- func (s ValidatorEraSeqStore) FindEraSeqsByHeight(h int64) ([]model.ValidatorEraSeq, error)
- func (s ValidatorEraSeqStore) FindLastEraSeqByStashAccount(stashAccount string, limit int64) ([]model.ValidatorEraSeq, error)
- func (s *ValidatorEraSeqStore) FindMostRecentEraSeq() (*model.ValidatorEraSeq, error)
- func (s ValidatorEraSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s ValidatorEraSeqStore) Save(record interface{}) error
- func (s *ValidatorEraSeqStore) SummarizeEraSeqs(interval types.SummaryInterval, activityPeriods []store.ActivityPeriodRow) ([]model.ValidatorEraSeqSummary, error)
- func (s ValidatorEraSeqStore) Truncate() error
- func (s ValidatorEraSeqStore) Update(record interface{}) error
- type ValidatorSeqStore
- func (s ValidatorSeqStore) BulkUpsertSeqs(records []model.ValidatorSeq) error
- func (s ValidatorSeqStore) Create(record interface{}) error
- func (s ValidatorSeqStore) DeleteByHeight(height int64) error
- func (s *ValidatorSeqStore) DeleteSeqsOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s ValidatorSeqStore) FindAllByHeight(height int64) ([]model.ValidatorSeq, error)
- func (s *ValidatorSeqStore) FindMostRecentSeq() (*model.ValidatorSeq, error)
- func (s ValidatorSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s ValidatorSeqStore) Save(record interface{}) error
- func (s ValidatorSeqStore) Truncate() error
- func (s ValidatorSeqStore) Update(record interface{}) error
- type ValidatorSessionSeqStore
- func (s ValidatorSessionSeqStore) BulkUpsertSessionSeqs(records []model.ValidatorSessionSeq) error
- func (s ValidatorSessionSeqStore) Create(record interface{}) error
- func (s ValidatorSessionSeqStore) DeleteByHeight(height int64) error
- func (s *ValidatorSessionSeqStore) DeleteSessionSeqsOlderThan(purgeThreshold time.Time) (*int64, error)
- func (s ValidatorSessionSeqStore) FindByHeightAndStashAccount(height int64, stash string) (*model.ValidatorSessionSeq, error)
- func (s ValidatorSessionSeqStore) FindBySession(session int64) ([]model.ValidatorSessionSeq, error)
- func (s ValidatorSessionSeqStore) FindBySessionAndStashAccount(session int64, stash string) (*model.ValidatorSessionSeq, error)
- func (s ValidatorSessionSeqStore) FindLastSessionSeqByStashAccount(stashAccount string, limit int64) ([]model.ValidatorSessionSeq, error)
- func (s *ValidatorSessionSeqStore) FindMostRecentSessionSeq() (*model.ValidatorSessionSeq, error)
- func (s ValidatorSessionSeqStore) FindSessionSeqsByHeight(h int64) ([]model.ValidatorSessionSeq, error)
- func (s ValidatorSessionSeqStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s ValidatorSessionSeqStore) Save(record interface{}) error
- func (s *ValidatorSessionSeqStore) SummarizeSessionSeqs(interval types.SummaryInterval, activityPeriods []store.ActivityPeriodRow) ([]model.ValidatorSessionSeqSummary, error)
- func (s ValidatorSessionSeqStore) Truncate() error
- func (s ValidatorSessionSeqStore) Update(record interface{}) error
- type ValidatorSummaryStore
- func (s ValidatorSummaryStore) Create(record interface{}) error
- func (s ValidatorSummaryStore) CreateSummary(val *model.ValidatorSummary) error
- func (s ValidatorSummaryStore) DeleteByHeight(height int64) error
- func (s *ValidatorSummaryStore) DeleteSummaryOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
- func (s *ValidatorSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]store.ActivityPeriodRow, error)
- func (s *ValidatorSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.ValidatorSummary, error)
- func (s *ValidatorSummaryStore) FindMostRecentSummary() (*model.ValidatorSummary, error)
- func (s *ValidatorSummaryStore) FindSummaries(interval types.SummaryInterval, period string) ([]store.ValidatorSummaryRow, error)
- func (s ValidatorSummaryStore) FindSummary(query *model.ValidatorSummary) (*model.ValidatorSummary, error)
- func (s *ValidatorSummaryStore) FindSummaryByStashAccount(stashAccount string, interval types.SummaryInterval, period string) ([]store.ValidatorSummaryRow, error)
- func (s ValidatorSummaryStore) Import(query string, rows int, fn bulk.RowFunc) error
- func (s ValidatorSummaryStore) Save(record interface{}) error
- func (s ValidatorSummaryStore) SaveSummary(val *model.ValidatorSummary) error
- func (s ValidatorSummaryStore) Truncate() error
- func (s ValidatorSummaryStore) Update(record interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountEraSeqStore ¶
type AccountEraSeqStore struct {
// contains filtered or unexported fields
}
AccountEraSeqStore handles operations on accounts
func NewAccountEraSeqStore ¶
func NewAccountEraSeqStore(db *gorm.DB) *AccountEraSeqStore
func (AccountEraSeqStore) BulkUpsert ¶ added in v0.5.0
func (s AccountEraSeqStore) BulkUpsert(records []model.AccountEraSeq) error
BulkUpsert imports new records and updates existing ones
func (AccountEraSeqStore) Create ¶
func (s AccountEraSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (AccountEraSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (AccountEraSeqStore) FindByEra ¶
func (s AccountEraSeqStore) FindByEra(era int64) ([]model.AccountEraSeq, error)
FindByHeight finds account era sequences by era
func (AccountEraSeqStore) FindLastByStashAccount ¶
func (s AccountEraSeqStore) FindLastByStashAccount(stashAccount string) ([]model.AccountEraSeq, error)
FindLastByStashAccount finds last account era sequences for given stash account
func (AccountEraSeqStore) FindLastByValidatorStashAccount ¶
func (s AccountEraSeqStore) FindLastByValidatorStashAccount(validatorStashAccount string) ([]model.AccountEraSeq, error)
FindLastByValidatorStashAccount finds last account era sequences for given validator stash account
func (AccountEraSeqStore) GetAllByTime ¶ added in v0.9.0
func (s AccountEraSeqStore) GetAllByTime(stash string, start, end types.Time) ([]model.AccountEraSeq, error)
GetAllByTime Gets all seqs for given stash
func (AccountEraSeqStore) Save ¶
func (s AccountEraSeqStore) Save(record interface{}) error
Save saves record to database
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) CreateSeq ¶
func (s BlockSeqStore) CreateSeq(block *model.BlockSeq) error
Create creates the block
func (BlockSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*BlockSeqStore) DeleteSeqOlderThan ¶
func (s *BlockSeqStore) DeleteSeqOlderThan(purgeThreshold time.Time, activityPeriods []store.ActivityPeriodRow) (*int64, error)
DeleteSeqOlderThan 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) FindByID ¶
func (s BlockSeqStore) FindByID(id int64) (*model.BlockSeq, error)
FindByID returns a block with matching ID
func (*BlockSeqStore) FindMostRecentSeq ¶
func (s *BlockSeqStore) FindMostRecentSeq() (*model.BlockSeq, error)
FindMostRecentSeq finds most recent block sequence
func (BlockSeqStore) FindSeqByHeight ¶
func (s BlockSeqStore) FindSeqByHeight(height int64) (*model.BlockSeq, error)
FindSeqByHeight returns a block with the matching height
func (*BlockSeqStore) GetAvgRecentTimes ¶
func (s *BlockSeqStore) GetAvgRecentTimes(limit int64) store.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) SaveSeq ¶
func (s BlockSeqStore) SaveSeq(block *model.BlockSeq) error
Save saves the block
func (*BlockSeqStore) Summarize ¶
func (s *BlockSeqStore) Summarize(interval types.SummaryInterval, activityPeriods []store.ActivityPeriodRow) ([]model.BlockSeqSummary, error)
Summarize gets the summarized version of block sequences
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) CreateSummary ¶
func (s BlockSummaryStore) CreateSummary(val *model.BlockSummary) error
CreateSummary creates the summary
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) FindActivityPeriods ¶
func (s *BlockSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]store.ActivityPeriodRow, error)
FindActivityPeriods Finds activity periods
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) FindMostRecentSummary ¶
func (s *BlockSummaryStore) FindMostRecentSummary() (*model.BlockSummary, error)
FindMostRecentSummary finds most recent block summary
func (*BlockSummaryStore) FindSummaries ¶
func (s *BlockSummaryStore) FindSummaries(interval types.SummaryInterval, period string) ([]model.BlockSummary, error)
FindSummaries Gets summary of block sequences
func (BlockSummaryStore) FindSummary ¶
func (s BlockSummaryStore) FindSummary(query *model.BlockSummary) (*model.BlockSummary, error)
FindSummary find block summary by query
func (BlockSummaryStore) Save ¶
func (s BlockSummaryStore) Save(record interface{}) error
Save saves record to database
func (BlockSummaryStore) SaveSummary ¶
func (s BlockSummaryStore) SaveSummary(val *model.BlockSummary) error
SaveSummary saves the summary
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() (*store.GetTotalSizeResult, error)
FindSummary Gets average block times for interval
type EventSeqStore ¶
type EventSeqStore struct {
// contains filtered or unexported fields
}
EventSeqStore handles operations on events
func NewEventSeqStore ¶
func NewEventSeqStore(db *gorm.DB) *EventSeqStore
func (EventSeqStore) BulkUpsert ¶ added in v0.5.0
func (s EventSeqStore) BulkUpsert(records []model.EventSeq) error
BulkUpsert imports new records and updates existing ones
func (EventSeqStore) Create ¶
func (s EventSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (EventSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*EventSeqStore) DeleteOlderThan ¶
func (s *EventSeqStore) DeleteOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteOlderThan deletes event sequence older than given threshold
func (EventSeqStore) FindBalanceDeposits ¶
func (s EventSeqStore) FindBalanceDeposits(address string) ([]model.EventSeqWithTxHash, error)
FindBalanceDeposits finds balance deposits event sequences for given address
func (EventSeqStore) FindBalanceTransfers ¶
func (s EventSeqStore) FindBalanceTransfers(address string) ([]model.EventSeqWithTxHash, error)
FindBalanceTransfers finds balance transfers event sequences for given address
func (EventSeqStore) FindBonded ¶
func (s EventSeqStore) FindBonded(address string) ([]model.EventSeqWithTxHash, error)
FindBonded finds bonded event sequences for given address
func (EventSeqStore) FindByHeight ¶
func (s EventSeqStore) FindByHeight(height int64) ([]model.EventSeq, error)
FindByHeight finds event sequences by height
func (EventSeqStore) FindByHeightAndIndex ¶
FindByHeightAndStashAccount finds event by height and index
func (*EventSeqStore) FindMostRecent ¶
func (s *EventSeqStore) FindMostRecent() (*model.EventSeq, error)
FindMostRecent finds most recent event session sequence
func (*EventSeqStore) FindRewardsForTimePeriod ¶ added in v0.7.0
func (s *EventSeqStore) FindRewardsForTimePeriod(address string, start, end time.Time) ([]model.EventSeq, error)
FindRewardsForTimePeriod find rewards events for an account for given time period
func (EventSeqStore) FindUnbonded ¶
func (s EventSeqStore) FindUnbonded(address string) ([]model.EventSeqWithTxHash, error)
FindUnbonded finds unbonded event sequences for given address
func (EventSeqStore) FindWithdrawn ¶
func (s EventSeqStore) FindWithdrawn(address string) ([]model.EventSeqWithTxHash, error)
FindWithdrawn finds withdrawn event sequences for given address
func (EventSeqStore) Save ¶
func (s EventSeqStore) Save(record interface{}) error
Save saves record to database
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 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 RewardEraSeqStore ¶ added in v0.6.0
type RewardEraSeqStore struct {
// contains filtered or unexported fields
}
RewardEraSeqStore handles operations on rewardEraSeq
func NewRewardEraSeqStore ¶ added in v0.6.0
func NewRewardEraSeqStore(db *gorm.DB) *RewardEraSeqStore
func (RewardEraSeqStore) BulkUpsert ¶ added in v0.6.0
func (s RewardEraSeqStore) BulkUpsert(records []model.RewardEraSeq) error
BulkUpsert imports new records and updates existing ones
func (RewardEraSeqStore) Create ¶ added in v0.6.0
func (s RewardEraSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (RewardEraSeqStore) DeleteByHeight ¶ added in v0.6.0
DeleteByHeight removes all records associated with a height
func (RewardEraSeqStore) GetAll ¶ added in v0.6.0
func (s RewardEraSeqStore) GetAll(stash, validatorStash string, start, end int64) ([]model.RewardEraSeq, error)
GetAll Gets all rewards for given stash
func (RewardEraSeqStore) GetAllByTime ¶ added in v0.9.0
func (s RewardEraSeqStore) GetAllByTime(stash string, start, end types.Time) ([]model.RewardEraSeq, error)
GetAllByTime Gets all rewards for given stash
func (*RewardEraSeqStore) GetByStashAndEra ¶ added in v0.8.3
func (s *RewardEraSeqStore) GetByStashAndEra(validatorStash, stash string, era int64) (model.RewardEraSeq, error)
GetByStashAndEra returns for given stash for validatorStash and era
func (RewardEraSeqStore) GetCount ¶ added in v0.6.0
func (s RewardEraSeqStore) GetCount(validatorStash string, era int64) (int64, error)
GetCount returns record count for given validatorStash at era
func (RewardEraSeqStore) MarkAllClaimed ¶ added in v0.6.0
func (s RewardEraSeqStore) MarkAllClaimed(validatorStash string, era int64, txHash string) error
MarkAllClaimed updates all rewards for validatorStash and era as claimed. Returns error if nothing updates
func (RewardEraSeqStore) Save ¶ added in v0.6.0
func (s RewardEraSeqStore) Save(record interface{}) error
Save saves record to database
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetRewards ¶ added in v0.6.0
func (s *Store) GetRewards() *rewards
GetRewards gets rewards
func (*Store) GetSystemEvents ¶ added in v0.5.0
func (s *Store) GetSystemEvents() *systemEvents
GetSystemEvents gets syncables
func (*Store) GetTransactions ¶
func (s *Store) GetTransactions() *transactions
GetTransactions gets transactions
func (*Store) GetValidators ¶
func (s *Store) GetValidators() *validators
GetValidators gets validators
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) FindAllByLastInSessionOrEra ¶ added in v0.5.0
func (s SyncablesStore) FindAllByLastInSessionOrEra(indexVersion int64, isLastInSession, isLastInEra bool, start, end int64) ([]model.Syncable, error)
FindAllByLastInSessionOrEra returns end syncs of sessions and eras
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) FindLastEndOfEra ¶
func (s SyncablesStore) FindLastEndOfEra() (syncable *model.Syncable, err error)
FindLastEndOfEra finds last end of era syncable
func (SyncablesStore) FindLastEndOfSession ¶
func (s SyncablesStore) FindLastEndOfSession() (syncable *model.Syncable, err error)
FindLastEndOfSession finds last end of session syncable
func (SyncablesStore) FindLastInEra ¶
func (s SyncablesStore) FindLastInEra(era int64) (syncable *model.Syncable, err error)
FindLastInEra finds last syncable in given era
func (SyncablesStore) FindLastInSession ¶
func (s SyncablesStore) FindLastInSession(session int64) (syncable *model.Syncable, err error)
FindLastInSession finds last syncable in given session
func (SyncablesStore) FindLastInSessionForHeight ¶
func (s SyncablesStore) FindLastInSessionForHeight(height int64) (syncable *model.Syncable, err error)
FindLastInSessionForHeight finds last_in_session 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) SaveSyncable ¶
func (s SyncablesStore) SaveSyncable(val *model.Syncable) error
func (SyncablesStore) SetProcessedAtForRange ¶
func (s SyncablesStore) SetProcessedAtForRange(reportID types.ID, startHeight int64, endHeight int64) error
SetProcessedAtForRange creates a new syncable or updates an existing one
type SystemEventStore ¶ added in v0.5.0
type SystemEventStore struct {
// contains filtered or unexported fields
}
SystemEventStore handles operations on syncables
func NewSystemEventsStore ¶ added in v0.5.0
func NewSystemEventsStore(db *gorm.DB) *SystemEventStore
func (SystemEventStore) BulkUpsert ¶ added in v0.5.0
func (s SystemEventStore) BulkUpsert(records []model.SystemEvent) error
BulkUpsert imports new records and updates existing ones
func (SystemEventStore) Create ¶ added in v0.5.0
func (s SystemEventStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (SystemEventStore) DeleteByHeight ¶ added in v0.5.0
DeleteByHeight removes all records associated with a height
func (SystemEventStore) FindByActor ¶ added in v0.5.0
func (s SystemEventStore) FindByActor(actorAddress string, kind *model.SystemEventKind, minHeight *int64) ([]model.SystemEvent, error)
FindByActor returns system events by actor
func (SystemEventStore) Save ¶ added in v0.5.0
func (s SystemEventStore) Save(record interface{}) error
Save saves record to database
type TransactionSeqStore ¶
type TransactionSeqStore struct {
// contains filtered or unexported fields
}
TransactionSeqStore handles operations on balance events
func NewTransactionSeqStore ¶
func NewTransactionSeqStore(db *gorm.DB) *TransactionSeqStore
func (TransactionSeqStore) BulkUpsert ¶ added in v0.5.0
func (s TransactionSeqStore) BulkUpsert(records []model.TransactionSeq) error
BulkUpsert imports new records and updates existing ones
func (TransactionSeqStore) Create ¶
func (s TransactionSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (TransactionSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (TransactionSeqStore) GetTransactionsByTransactionKind ¶ added in v0.8.0
func (s TransactionSeqStore) GetTransactionsByTransactionKind(kind model.TransactionKind, start, end int64) ([]model.TransactionSeq, error)
GetTransactionsByTransactionKind gets transactions by kind
func (TransactionSeqStore) Save ¶
func (s TransactionSeqStore) Save(record interface{}) error
Save saves record to database
type ValidatorAggStore ¶
type ValidatorAggStore struct {
// contains filtered or unexported fields
}
ValidatorAgg 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) CreateAgg ¶
func (s ValidatorAggStore) CreateAgg(val *model.ValidatorAgg) error
CreateAgg creates the validator aggregate
func (ValidatorAggStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorAggStore) FindAggByStashAccount ¶
func (s *ValidatorAggStore) FindAggByStashAccount(key string) (*model.ValidatorAgg, error)
FindAggByStashAccount return validator by stash account
func (ValidatorAggStore) FindBy ¶
func (s ValidatorAggStore) FindBy(key string, value interface{}) (*model.ValidatorAgg, error)
FindBy returns an validator for a matching attribute
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
func (ValidatorAggStore) SaveAgg ¶
func (s ValidatorAggStore) SaveAgg(val *model.ValidatorAgg) error
SaveAgg creates the validator aggregate
type ValidatorEraSeqStore ¶
type ValidatorEraSeqStore struct {
// contains filtered or unexported fields
}
ValidatorEraSeqStore handles operations on validators
func NewValidatorEraSeqStore ¶
func NewValidatorEraSeqStore(db *gorm.DB) *ValidatorEraSeqStore
func (ValidatorEraSeqStore) BulkUpsertEraSeqs ¶ added in v0.5.0
func (s ValidatorEraSeqStore) BulkUpsertEraSeqs(records []model.ValidatorEraSeq) error
BulkUpsertEraSeqs imports new records and updates existing ones
func (ValidatorEraSeqStore) Create ¶
func (s ValidatorEraSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorEraSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorEraSeqStore) DeleteEraSeqsOlderThan ¶
func (s *ValidatorEraSeqStore) DeleteEraSeqsOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteEraSeqsOlderThan deletes validator sequence older than given threshold
func (ValidatorEraSeqStore) FindByEra ¶
func (s ValidatorEraSeqStore) FindByEra(era int64) ([]model.ValidatorEraSeq, error)
FindByEra finds validator era sequences by era
func (ValidatorEraSeqStore) FindByEraAndStashAccount ¶
func (s ValidatorEraSeqStore) FindByEraAndStashAccount(era int64, stash string) (*model.ValidatorEraSeq, error)
FindByEraAndStashAccount finds validator by era and stash account
func (ValidatorEraSeqStore) FindByHeightAndStashAccount ¶
func (s ValidatorEraSeqStore) FindByHeightAndStashAccount(height int64, stash string) (*model.ValidatorEraSeq, error)
FindByHeightAndStashAccount finds validator by height and stash account
func (ValidatorEraSeqStore) FindEraSeqsByHeight ¶
func (s ValidatorEraSeqStore) FindEraSeqsByHeight(h int64) ([]model.ValidatorEraSeq, error)
FindEraSeqsByHeight finds validator era sequences by height
func (ValidatorEraSeqStore) FindLastEraSeqByStashAccount ¶
func (s ValidatorEraSeqStore) FindLastEraSeqByStashAccount(stashAccount string, limit int64) ([]model.ValidatorEraSeq, error)
FindLastEraSeqByStashAccount finds last validator era sequences for given stash account
func (*ValidatorEraSeqStore) FindMostRecentEraSeq ¶
func (s *ValidatorEraSeqStore) FindMostRecentEraSeq() (*model.ValidatorEraSeq, error)
FindMostRecentEraSeq finds most recent validator era sequence
func (ValidatorEraSeqStore) Save ¶
func (s ValidatorEraSeqStore) Save(record interface{}) error
Save saves record to database
func (*ValidatorEraSeqStore) SummarizeEraSeqs ¶
func (s *ValidatorEraSeqStore) SummarizeEraSeqs(interval types.SummaryInterval, activityPeriods []store.ActivityPeriodRow) ([]model.ValidatorEraSeqSummary, error)
SummarizeEraSeqs gets the summarized version of validator sequences
type ValidatorSeqStore ¶ added in v0.5.0
type ValidatorSeqStore struct {
// contains filtered or unexported fields
}
ValidatorSeqStore handles operations on validators
func NewValidatorSeqStore ¶ added in v0.5.0
func NewValidatorSeqStore(db *gorm.DB) *ValidatorSeqStore
func (ValidatorSeqStore) BulkUpsertSeqs ¶ added in v0.5.0
func (s ValidatorSeqStore) BulkUpsertSeqs(records []model.ValidatorSeq) error
BulkUpsertSeqs imports new records and updates existing ones
func (ValidatorSeqStore) Create ¶ added in v0.5.0
func (s ValidatorSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorSeqStore) DeleteByHeight ¶ added in v0.5.0
DeleteByHeight removes all records associated with a height
func (*ValidatorSeqStore) DeleteSeqsOlderThan ¶ added in v0.5.0
func (s *ValidatorSeqStore) DeleteSeqsOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteSeqsOlderThan deletes validator sequences older than given threshold
func (ValidatorSeqStore) FindAllByHeight ¶ added in v0.5.0
func (s ValidatorSeqStore) FindAllByHeight(height int64) ([]model.ValidatorSeq, error)
FindAllByHeight returns all validators for provided height
func (*ValidatorSeqStore) FindMostRecentSeq ¶ added in v0.5.0
func (s *ValidatorSeqStore) FindMostRecentSeq() (*model.ValidatorSeq, error)
FindMostRecentSeq finds most recent validator sequences
func (ValidatorSeqStore) Save ¶ added in v0.5.0
func (s ValidatorSeqStore) Save(record interface{}) error
Save saves record to database
type ValidatorSessionSeqStore ¶
type ValidatorSessionSeqStore struct {
// contains filtered or unexported fields
}
ValidatorSessionSeqStore handles operations on validators
func NewValidatorSessionSeqStore ¶
func NewValidatorSessionSeqStore(db *gorm.DB) *ValidatorSessionSeqStore
func (ValidatorSessionSeqStore) BulkUpsertSessionSeqs ¶ added in v0.5.0
func (s ValidatorSessionSeqStore) BulkUpsertSessionSeqs(records []model.ValidatorSessionSeq) error
BulkUpsertSessionSeqs imports new records and updates existing ones
func (ValidatorSessionSeqStore) Create ¶
func (s ValidatorSessionSeqStore) Create(record interface{}) error
Create creates a new record. Must pass a pointer.
func (ValidatorSessionSeqStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorSessionSeqStore) DeleteSessionSeqsOlderThan ¶
func (s *ValidatorSessionSeqStore) DeleteSessionSeqsOlderThan(purgeThreshold time.Time) (*int64, error)
DeleteSessionSeqsOlderThan deletes validator sequence older than given threshold
func (ValidatorSessionSeqStore) FindByHeightAndStashAccount ¶
func (s ValidatorSessionSeqStore) FindByHeightAndStashAccount(height int64, stash string) (*model.ValidatorSessionSeq, error)
FindByHeightAndStashAccount finds validator by height and stash account
func (ValidatorSessionSeqStore) FindBySession ¶
func (s ValidatorSessionSeqStore) FindBySession(session int64) ([]model.ValidatorSessionSeq, error)
FindBySession finds validator session sequences by session
func (ValidatorSessionSeqStore) FindBySessionAndStashAccount ¶
func (s ValidatorSessionSeqStore) FindBySessionAndStashAccount(session int64, stash string) (*model.ValidatorSessionSeq, error)
FindBySessionAndStashAccount finds validator by session and stash account
func (ValidatorSessionSeqStore) FindLastSessionSeqByStashAccount ¶
func (s ValidatorSessionSeqStore) FindLastSessionSeqByStashAccount(stashAccount string, limit int64) ([]model.ValidatorSessionSeq, error)
FindLastSessionSeqByStashAccount finds last validator session sequences for given stash account
func (*ValidatorSessionSeqStore) FindMostRecentSessionSeq ¶
func (s *ValidatorSessionSeqStore) FindMostRecentSessionSeq() (*model.ValidatorSessionSeq, error)
FindMostRecentSessionSeq finds most recent validator session sequence
func (ValidatorSessionSeqStore) FindSessionSeqsByHeight ¶
func (s ValidatorSessionSeqStore) FindSessionSeqsByHeight(h int64) ([]model.ValidatorSessionSeq, error)
FindSessionSeqsByHeight finds validator session sequences by height
func (ValidatorSessionSeqStore) Save ¶
func (s ValidatorSessionSeqStore) Save(record interface{}) error
Save saves record to database
func (*ValidatorSessionSeqStore) SummarizeSessionSeqs ¶
func (s *ValidatorSessionSeqStore) SummarizeSessionSeqs(interval types.SummaryInterval, activityPeriods []store.ActivityPeriodRow) ([]model.ValidatorSessionSeqSummary, error)
SummarizeSessionSeqs gets the summarized version of validator sequences
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) CreateSummary ¶
func (s ValidatorSummaryStore) CreateSummary(val *model.ValidatorSummary) error
CreateSummary creates the validator aggregate
func (ValidatorSummaryStore) DeleteByHeight ¶
DeleteByHeight removes all records associated with a height
func (*ValidatorSummaryStore) DeleteSummaryOlderThan ¶
func (s *ValidatorSummaryStore) DeleteSummaryOlderThan(interval types.SummaryInterval, purgeThreshold time.Time) (*int64, error)
DeleteSummaryOlderThan deleted validator summary records older than given threshold
func (*ValidatorSummaryStore) FindActivityPeriods ¶
func (s *ValidatorSummaryStore) FindActivityPeriods(interval types.SummaryInterval, indexVersion int64) ([]store.ActivityPeriodRow, error)
FindActivityPeriods Finds activity periods
func (*ValidatorSummaryStore) FindMostRecentByInterval ¶
func (s *ValidatorSummaryStore) FindMostRecentByInterval(interval types.SummaryInterval) (*model.ValidatorSummary, error)
FindMostRecentByInterval finds most recent validator summary for interval
func (*ValidatorSummaryStore) FindMostRecentSummary ¶
func (s *ValidatorSummaryStore) FindMostRecentSummary() (*model.ValidatorSummary, error)
FindMostRecentSummary finds most recent validator summary
func (*ValidatorSummaryStore) FindSummaries ¶
func (s *ValidatorSummaryStore) FindSummaries(interval types.SummaryInterval, period string) ([]store.ValidatorSummaryRow, error)
FindSummaries gets summary for validator summary
func (ValidatorSummaryStore) FindSummary ¶
func (s ValidatorSummaryStore) FindSummary(query *model.ValidatorSummary) (*model.ValidatorSummary, error)
FindSummary find validator summary by query
func (*ValidatorSummaryStore) FindSummaryByStashAccount ¶
func (s *ValidatorSummaryStore) FindSummaryByStashAccount(stashAccount string, interval types.SummaryInterval, period string) ([]store.ValidatorSummaryRow, error)
FindSummaryByStashAccount gets summary for given validator
func (ValidatorSummaryStore) Save ¶
func (s ValidatorSummaryStore) Save(record interface{}) error
Save saves record to database
func (ValidatorSummaryStore) SaveSummary ¶
func (s ValidatorSummaryStore) SaveSummary(val *model.ValidatorSummary) error
SaveSummary creates the validator aggregate
Source Files ¶
- account_era_seq_store.go
- base_store.go
- block_seq_store.go
- block_summary_store.go
- common_queries.go
- database_store.go
- event_seq_store.go
- reports_store.go
- reward_era_seq_store.go
- store.go
- syncables_store.go
- system_event_store.go
- transaction_seq_store.go
- validator_agg_store.go
- validator_era_seq_store.go
- validator_seq_store.go
- validator_session_seq_store.go
- validator_summary_store.go