Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregate ¶
type Aggregate struct { StartedAtHeight int64 `json:"started_at_height"` StartedAt types.Time `json:"started_at"` RecentAtHeight int64 `json:"recent_at_height"` RecentAt types.Time `json:"recent_at"` }
Aggregate is used for aggregate tables
type BlockSeq ¶
type BlockSummary ¶
type BlockSummary struct { *Model *Summary Count int64 `json:"count"` BlockTimeAvg float64 `json:"block_time_avg"` }
func (BlockSummary) TableName ¶
func (BlockSummary) TableName() string
type EraSequence ¶ added in v0.1.2
type EraSequence struct { Era int64 `json:"era"` StartHeight int64 `json:"start_height"` EndHeight int64 `json:"end_height"` Time types.Time `json:"time"` }
EraSequence is used for sequences recorded per era
func (*EraSequence) Equal ¶ added in v0.1.2
func (s *EraSequence) Equal(m EraSequence) bool
func (*EraSequence) Valid ¶ added in v0.1.2
func (s *EraSequence) Valid() bool
type EventSeq ¶ added in v0.1.2
type Model ¶
type Model struct { ID types.ID `json:"id"` CreatedAt types.Time `json:"created_at"` UpdatedAt types.Time `json:"updated_at"` }
Model is used for general table
type Report ¶
type Report struct { *Model Kind ReportKind IndexVersion int64 StartHeight int64 EndHeight int64 SuccessCount *int64 ErrorCount *int64 ErrorMsg *string Duration time.Duration CompletedAt *types.Time }
type ReportKind ¶
type ReportKind int
const ( ReportKindIndex ReportKind = iota + 1 ReportKindParallelReindex ReportKindSequentialReindex )
func (ReportKind) String ¶
func (k ReportKind) String() string
type SessionSequence ¶ added in v0.1.2
type SessionSequence struct { Session int64 `json:"session"` StartHeight int64 `json:"start_height"` EndHeight int64 `json:"end_height"` Time types.Time `json:"time"` }
SessionSequence is used for sequences recorded per session
func (*SessionSequence) Equal ¶ added in v0.1.2
func (s *SessionSequence) Equal(m SessionSequence) bool
func (*SessionSequence) Valid ¶ added in v0.1.2
func (s *SessionSequence) Valid() bool
type Summary ¶
type Summary struct { IndexVersion int64 `json:"index_version"` TimeInterval types.SummaryInterval `json:"time_interval"` TimeBucket types.Time `json:"time_bucket"` }
Summary is used for summary tables
type Syncable ¶
type Syncable struct { *Model Height int64 `json:"height"` Time types.Time `json:"time"` SpecVersion string `json:"spec_version"` ChainUID string `json:"chain_uid"` Session int64 `json:"session"` Era int64 `json:"era"` LastInSession bool `json:"last_in_session"` LastInEra bool `json:"last_in_era"` IndexVersion int64 `json:"index_version"` Status SyncableStatus `json:"status"` ReportID types.ID `json:"report_id"` StartedAt types.Time `json:"started_at"` ProcessedAt *types.Time `json:"processed_at"` Duration time.Duration `json:"duration"` }
func (*Syncable) MarkProcessed ¶
func (*Syncable) SetStatus ¶
func (s *Syncable) SetStatus(newStatus SyncableStatus)
type SyncableStatus ¶
type SyncableStatus int
const ( SyncableStatusRunning SyncableStatus = iota + 1 SyncableStatusCompleted )
type ValidatorAgg ¶ added in v0.1.2
type ValidatorAgg struct { *Model *Aggregate StashAccount string `json:"stash_account"` RecentAsValidatorHeight int64 `json:"recent_as_validator_height"` AccumulatedUptime int64 `json:"accumulated_uptime"` AccumulatedUptimeCount int64 `json:"accumulated_uptime_count"` }
func (*ValidatorAgg) Equal ¶ added in v0.1.2
func (s *ValidatorAgg) Equal(m ValidatorAgg) bool
func (*ValidatorAgg) Update ¶ added in v0.1.2
func (s *ValidatorAgg) Update(u *ValidatorAgg)
func (*ValidatorAgg) Valid ¶ added in v0.1.2
func (s *ValidatorAgg) Valid() bool
type ValidatorEraSeq ¶ added in v0.1.2
type ValidatorEraSeq struct { ID types.ID `json:"id"` *EraSequence StashAccount string `json:"stash_account"` ControllerAccount string `json:"controller_account"` SessionAccounts pq.StringArray `json:"session_accounts"` Index int64 `json:"index"` TotalStake types.Quantity `json:"total_stake"` OwnStake types.Quantity `json:"own_stake"` StakersStake types.Quantity `json:"stakers_stake"` RewardPoints int64 `json:"reward_points"` Commission int64 `json:"commission"` StakersCount int `json:"stakers_count"` }
func (*ValidatorEraSeq) Equal ¶ added in v0.1.2
func (s *ValidatorEraSeq) Equal(m ValidatorEraSeq) bool
func (ValidatorEraSeq) TableName ¶ added in v0.1.2
func (ValidatorEraSeq) TableName() string
func (*ValidatorEraSeq) Update ¶ added in v0.1.2
func (b *ValidatorEraSeq) Update(m ValidatorEraSeq)
func (*ValidatorEraSeq) Valid ¶ added in v0.1.2
func (s *ValidatorEraSeq) Valid() bool
type ValidatorSessionSeq ¶ added in v0.1.2
type ValidatorSessionSeq struct { ID types.ID `json:"id"` *SessionSequence StashAccount string `json:"stash_account"` Online bool `json:"online"` }
func (*ValidatorSessionSeq) Equal ¶ added in v0.1.2
func (s *ValidatorSessionSeq) Equal(m ValidatorSessionSeq) bool
func (ValidatorSessionSeq) TableName ¶ added in v0.1.2
func (ValidatorSessionSeq) TableName() string
func (*ValidatorSessionSeq) Update ¶ added in v0.1.2
func (s *ValidatorSessionSeq) Update(m ValidatorSessionSeq)
func (*ValidatorSessionSeq) Valid ¶ added in v0.1.2
func (s *ValidatorSessionSeq) Valid() bool
type ValidatorSummary ¶ added in v0.1.2
type ValidatorSummary struct { *Model *Summary StashAccount string `json:"address"` // Era info TotalStakeAvg types.Quantity `json:"total_stake_avg"` TotalStakeMin types.Quantity `json:"total_stake_min"` TotalStakeMax types.Quantity `json:"total_stake_max"` OwnStakeAvg types.Quantity `json:"own_stake_avg"` OwnStakeMin types.Quantity `json:"own_stake_min"` OwnStakeMax types.Quantity `json:"own_stake_max"` StakersStakeAvg types.Quantity `json:"stakers_stake_avg"` StakersStakeMin types.Quantity `json:"stakers_stake_min"` StakersStakeMax types.Quantity `json:"stakers_stake_max"` RewardPointsAvg float64 `json:"reward_points_avg"` RewardPointsMin int64 `json:"reward_points_min"` RewardPointsMax int64 `json:"reward_points_max"` CommissionAvg float64 `json:"commission_avg"` CommissionMin int64 `json:"commission_min"` CommissionMax int64 `json:"commission_max"` StakersCountAvg float64 `json:"stakers_count_avg"` StakersCountMin int64 `json:"stakers_count_min"` StakersCountMax int64 `json:"stakers_count_max"` // Session info UptimeAvg float64 `json:"uptime_avg"` UptimeMax int64 `json:"uptime_max"` UptimeMin int64 `json:"uptime_min"` }
func (ValidatorSummary) TableName ¶ added in v0.1.2
func (ValidatorSummary) TableName() string
Click to show internal directories.
Click to hide internal directories.