Documentation ¶
Index ¶
- Variables
- func NewAccountAggStore(db *gorm.DB) *accountAggStore
- func NewBalanceEventsStore(db *gorm.DB) *balanceEventsStore
- func NewBalanceSummaryStore(db *gorm.DB) *balanceSummaryStore
- func NewBlockSeqStore(db *gorm.DB) *blockSeqStore
- func NewBlockSummaryStore(db *gorm.DB) *blockSummaryStore
- func NewDatabaseStore(db *gorm.DB) *databaseStore
- func NewDebondingDelegationSeqStore(db *gorm.DB) *debondingDelegationSeqStore
- func NewDelegationSeqStore(db *gorm.DB) *delegationSeqStore
- func NewReportsStore(db *gorm.DB) *reportsStore
- func NewStakingSeqStore(db *gorm.DB) *stakingSeqStore
- func NewSyncablesStore(db *gorm.DB) *syncablesStore
- func NewSystemEventsStore(db *gorm.DB) *systemEventsStore
- func NewTransactionSeqStore(db *gorm.DB) *transactionSeqStore
- func NewValidatorAggStore(db *gorm.DB) *validatorAggStore
- func NewValidatorSeqStore(db *gorm.DB) *validatorSeqStore
- func NewValidatorSummaryStore(db *gorm.DB) *validatorSummaryStore
- type AccountAggStore
- type ActivityPeriodRow
- type BalanceEventsStore
- type BalanceSummaryStore
- type BaseStore
- type BlockSeqStore
- type BlockSeqSummary
- type BlockSummaryStore
- type DatabaseStore
- type DebondingDelegationSeqStore
- type DelegationSeqStore
- type FindSystemEventByActorQuery
- type GetAvgRecentTimesResult
- type GetAvgTimesForIntervalRow
- type GetTotalSizeResult
- type ReportsStore
- type StakingSeqStore
- type Store
- type SyncablesStore
- type SystemEventsStore
- type TransactionSeqStore
- type ValidatorAggStore
- type ValidatorSeqStore
- type ValidatorSeqSummary
- type ValidatorSummaryRow
- type ValidatorSummaryStore
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("record not found")
)
Functions ¶
func NewAccountAggStore ¶
func NewBalanceEventsStore ¶ added in v0.6.0
func NewBalanceSummaryStore ¶ added in v0.6.0
func NewBlockSeqStore ¶
func NewBlockSummaryStore ¶ added in v0.4.0
func NewDatabaseStore ¶ added in v0.4.0
func NewDelegationSeqStore ¶
func NewReportsStore ¶
func NewStakingSeqStore ¶
func NewSyncablesStore ¶
func NewSystemEventsStore ¶ added in v0.5.0
func NewTransactionSeqStore ¶
func NewValidatorAggStore ¶
func NewValidatorSeqStore ¶
func NewValidatorSummaryStore ¶ added in v0.4.0
Types ¶
type AccountAggStore ¶
type AccountAggStore interface { BaseStore FindBy(string, interface{}) (*model.AccountAgg, error) FindByPublicKey(string) (*model.AccountAgg, error) }
type ActivityPeriodRow ¶ added in v0.4.2
type BalanceEventsStore ¶ added in v0.6.0
type BalanceEventsStore interface { BaseStore GetLastEventTime() (types.Time, error) CreateOrUpdate(*model.BalanceEvent) error DeleteOlderThan(time.Time) (*int64, error) Summarize(types.SummaryInterval, []ActivityPeriodRow) ([]model.BalanceSummary, error) }
type BalanceSummaryStore ¶ added in v0.6.0
type BalanceSummaryStore interface { BaseStore Find(*model.BalanceSummary) (*model.BalanceSummary, error) GetDailySummaries(address string, start, end *types.Time) ([]model.BalanceSummary, error) FindActivityPeriods(types.SummaryInterval, int64) ([]ActivityPeriodRow, error) }
type BlockSeqStore ¶
type BlockSeqStore interface { BaseStore FindBy(string, interface{}) (*model.BlockSeq, error) FindByHeight(int64) (*model.BlockSeq, error) GetAvgRecentTimes(int64) (*GetAvgRecentTimesResult, error) FindMostRecent() (*model.BlockSeq, error) DeleteOlderThan(time.Time, []ActivityPeriodRow) (*int64, error) Summarize(types.SummaryInterval, []ActivityPeriodRow) ([]BlockSeqSummary, error) }
type BlockSeqSummary ¶ added in v0.4.0
type BlockSummaryStore ¶ added in v0.4.0
type BlockSummaryStore interface { BaseStore Find(*model.BlockSummary) (*model.BlockSummary, error) FindMostRecentByInterval(types.SummaryInterval) (*model.BlockSummary, error) FindActivityPeriods(types.SummaryInterval, int64) ([]ActivityPeriodRow, error) FindSummary(types.SummaryInterval, string) ([]model.BlockSummary, error) DeleteOlderThan(types.SummaryInterval, time.Time) (*int64, error) }
type DatabaseStore ¶ added in v0.4.0
type DatabaseStore interface {
GetTotalSize() (*GetTotalSizeResult, error)
}
type DebondingDelegationSeqStore ¶
type DebondingDelegationSeqStore interface { BaseStore FindByHeight(int64) ([]model.DebondingDelegationSeq, error) FindRecentByValidatorUID(string, int64) ([]model.DebondingDelegationSeq, error) FindRecentByDelegatorUID(string, int64) ([]model.DebondingDelegationSeq, error) }
type DelegationSeqStore ¶
type DelegationSeqStore interface { BaseStore FindByHeight(int64) ([]model.DelegationSeq, error) FindLastByValidatorUID(string) ([]model.DelegationSeq, error) FindCurrentByDelegatorUID(string) ([]model.DelegationSeq, error) }
type FindSystemEventByActorQuery ¶ added in v0.5.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 ¶ added in v0.4.0
type GetTotalSizeResult struct {
Size float64 `json:"size"`
}
GetAvgTimesForIntervalRow Contains row of data for FindSummary query
type ReportsStore ¶
type StakingSeqStore ¶
type StakingSeqStore interface { BaseStore FindBy(key string, value interface{}) (*model.StakingSeq, error) FindByHeight(height int64) (*model.StakingSeq, error) Recent() (*model.StakingSeq, error) }
type Store ¶
type Store struct { Database DatabaseStore Syncables SyncablesStore Reports ReportsStore SystemEvents SystemEventsStore BalanceEvents BalanceEventsStore BlockSeq BlockSeqStore DebondingDelegationSeq DebondingDelegationSeqStore DelegationSeq DelegationSeqStore StakingSeq StakingSeqStore TransactionSeq TransactionSeqStore ValidatorSeq ValidatorSeqStore BlockSummary BlockSummaryStore ValidatorSummary ValidatorSummaryStore BalanceSummary BalanceSummaryStore AccountAgg AccountAggStore ValidatorAgg ValidatorAggStore // contains filtered or unexported fields }
Store handles all database operations
func (*Store) SetDebugMode ¶
SetDebugMode enabled detailed query logging
type SyncablesStore ¶
type SyncablesStore interface { BaseStore FindByHeight(int64) (*model.Syncable, error) FindMostRecent() (*model.Syncable, error) FindSmallestIndexVersion() (*int64, error) FindFirstByDifferentIndexVersion(int64) (*model.Syncable, error) FindMostRecentByDifferentIndexVersion(int64) (*model.Syncable, error) GetSyncableForMinTime(time time.Time) (result *model.Syncable, err error) CreateOrUpdate(*model.Syncable) error ResetProcessedAtForRange(int64, int64) error }
type SystemEventsStore ¶ added in v0.5.0
type SystemEventsStore interface { BaseStore FindByHeight(int64) ([]model.SystemEvent, error) FindByActor(string, FindSystemEventByActorQuery) ([]model.SystemEvent, error) FindUnique(int64, string, model.SystemEventKind) (*model.SystemEvent, error) CreateOrUpdate(*model.SystemEvent) error FindMostRecent() (*model.SystemEvent, error) DeleteOlderThan(time.Time) (*int64, error) }
type TransactionSeqStore ¶
type TransactionSeqStore interface { BaseStore FindByHeight(h int64) ([]model.TransactionSeq, error) }
type ValidatorAggStore ¶
type ValidatorAggStore interface { BaseStore FindBy(string, interface{}) (*model.ValidatorAgg, error) FindByAddress(string) (*model.ValidatorAgg, error) FindByEntityUID(string) (*model.ValidatorAgg, error) GetAllForHeightGreaterThan(int64) ([]model.ValidatorAgg, error) CreateOrUpdate(val *model.ValidatorAgg) error }
type ValidatorSeqStore ¶
type ValidatorSeqStore interface { BaseStore FindByHeightAndEntityUID(int64, string) (*model.ValidatorSeq, error) FindByHeight(int64) ([]model.ValidatorSeq, error) FindLastByAddress(string, int64) ([]model.ValidatorSeq, error) FindMostRecent() (*model.ValidatorSeq, error) DeleteOlderThan(time.Time) (*int64, error) Summarize(types.SummaryInterval, []ActivityPeriodRow) ([]ValidatorSeqSummary, error) }
type ValidatorSeqSummary ¶ added in v0.4.0
type ValidatorSeqSummary struct { Address string `json:"address"` TimeBucket types.Time `json:"time_bucket"` VotingPowerAvg float64 `json:"voting_power_avg"` VotingPowerMax float64 `json:"voting_power_max"` VotingPowerMin float64 `json:"voting_power_min"` ActiveEscrowBalanceAvg types.Quantity `json:"active_escrow_balance_avg"` ActiveEscrowBalanceMax types.Quantity `json:"active_escrow_balance_max"` ActiveEscrowBalanceMin types.Quantity `json:"active_escrow_balance_min"` CommissionAvg types.Quantity `json:"commission_avg"` CommissionMax types.Quantity `json:"commission_max"` CommissionMin types.Quantity `json:"commission_min"` ValidatedSum int64 `json:"validated_sum"` NotValidatedSum int64 `json:"not_validated_sum"` ProposedSum int64 `json:"proposed_sum"` UptimeAvg float64 `json:"uptime_avg"` }
type ValidatorSummaryRow ¶ added in v0.4.0
type ValidatorSummaryRow struct { TimeBucket string `json:"time_bucket"` TimeInterval string `json:"time_interval"` VotingPowerAvg float64 `json:"voting_power_avg"` VotingPowerMax float64 `json:"voting_power_max"` VotingPowerMin float64 `json:"voting_power_min"` ActiveEscrowBalanceAvg types.Quantity `json:"active_escrow_balance_avg"` ActiveEscrowBalanceMax types.Quantity `json:"active_escrow_balance_max"` ActiveEscrowBalanceMin types.Quantity `json:"active_escrow_balance_min"` CommissionAvg types.Quantity `json:"commission_avg"` CommissionMax types.Quantity `json:"commission_max"` CommissionMin types.Quantity `json:"commission_min"` ValidatedSum int64 `json:"validated_sum"` NotValidatedSum int64 `json:"not_validated_sum"` ProposedSum int64 `json:"proposed_sum"` UptimeAvg float64 `json:"uptime_avg"` }
type ValidatorSummaryStore ¶ added in v0.4.0
type ValidatorSummaryStore interface { BaseStore Find(*model.ValidatorSummary) (*model.ValidatorSummary, error) FindActivityPeriods(types.SummaryInterval, int64) ([]ActivityPeriodRow, error) FindSummary(types.SummaryInterval, string) ([]ValidatorSummaryRow, error) FindSummaryByAddress(string, types.SummaryInterval, string) ([]model.ValidatorSummary, error) FindMostRecent() (*model.ValidatorSummary, error) FindMostRecentByInterval(types.SummaryInterval) (*model.ValidatorSummary, error) DeleteOlderThan(types.SummaryInterval, time.Time) (*int64, error) }
Source Files ¶
- account_agg_store.go
- balance_events_store.go
- balance_summary_queries.go
- balance_summary_store.go
- base_store.go
- block_seq_queries.go
- block_seq_store.go
- block_summary_queries.go
- block_summary_store.go
- common_queries.go
- database_store.go
- debonding_delegation_seq_store.go
- delegation_seq_store.go
- reports_store.go
- staking_seq_store.go
- store.go
- syncables_store.go
- system_events_store.go
- transaction_seq_store.go
- validator_agg_store.go
- validator_seq_queries.go
- validator_seq_store.go
- validator_summary_queries.go
- validator_summary_store.go
Click to show internal directories.
Click to hide internal directories.