Documentation ¶
Index ¶
- Constants
- type AccountActivitySeq
- type Aggregate
- type BlockSeq
- type BlockSummary
- type GovernanceActivitySeq
- type Job
- type JobID
- type Model
- type ModelWithTimestamps
- type ProposalAgg
- type Report
- type ReportKind
- type Sequence
- type Summary
- type Syncable
- type SyncableStatus
- type SystemEvent
- type SystemEventKind
- type ValidatorAgg
- type ValidatorGroupAgg
- type ValidatorGroupSeq
- type ValidatorGroupSummary
- type ValidatorSeq
- type ValidatorSummary
Constants ¶
View Source
const ( VoteAbstain = 1 VoteNo = 2 VoteYes = 3 ProposalStageProposed = "proposed" ProposalStageApproved = "approved" ProposalStageExecuted = "executed" ProposalStageDequeued = "dequeued" ProposalStageExpired = "expired" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountActivitySeq ¶ added in v0.1.0
type AccountActivitySeq struct { *Model *Sequence TransactionHash string `json:"transaction_hash"` Address string `json:"address"` Amount types.Quantity `json:"amount"` Kind string `json:"kind"` Data types.Jsonb `json:"data"` }
func (AccountActivitySeq) TableName ¶ added in v0.1.0
func (AccountActivitySeq) TableName() string
func (*AccountActivitySeq) Update ¶ added in v0.1.0
func (b *AccountActivitySeq) Update(m AccountActivitySeq)
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 GovernanceActivitySeq ¶ added in v0.1.0
type GovernanceActivitySeq struct { *Model *Sequence ProposalId uint64 `json:"proposal_id"` Account string `json:"account"` TransactionHash string `json:"transaction_hash"` Kind string `json:"kind"` Data types.Jsonb `json:"data"` }
func (GovernanceActivitySeq) TableName ¶ added in v0.1.0
func (GovernanceActivitySeq) TableName() string
func (*GovernanceActivitySeq) Update ¶ added in v0.1.0
func (b *GovernanceActivitySeq) Update(m GovernanceActivitySeq)
type Job ¶ added in v0.2.0
type Job struct { ID JobID `json:"-"` Height *int64 `json:"height"` RunCount uint64 `json:"run_count"` LastError *string `json:"last_error"` StartedAt *time.Time `json:"started_at"` FinishedAt *time.Time `json:"finished_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"-"` }
Job represents a worker job
type ModelWithTimestamps ¶ added in v0.1.0
type ModelWithTimestamps struct { ID types.ID `json:"id"` CreatedAt types.Time `json:"created_at"` UpdatedAt types.Time `json:"updated_at"` }
ModelWithTimestamps is used for general table with timestamps
func (*ModelWithTimestamps) Equal ¶ added in v0.1.0
func (e *ModelWithTimestamps) Equal(m ModelWithTimestamps) bool
func (*ModelWithTimestamps) Valid ¶ added in v0.1.0
func (e *ModelWithTimestamps) Valid() bool
type ProposalAgg ¶ added in v0.1.0
type ProposalAgg struct { *ModelWithTimestamps *Aggregate ProposalId uint64 `json:"proposal_id"` ProposerAddress string `json:"proposer_address"` DescriptionUrl string `json:"description_url"` Deposit string `json:"deposit"` TransactionCount int64 `json:"transaction_count"` ProposedAtHeight int64 `json:"proposed_at_height"` ProposedAt types.Time `json:"proposed_at"` RecentStage string `json:"recent_stage"` DequeueAddress string `json:"dequeue_address"` DequeuedAtHeight int64 `json:"dequeued_at_height"` DequeuedAt types.Time `json:"dequeued_at"` ApprovalAddress string `json:"approval_address"` ApprovedAtHeight int64 `json:"approved_at_height"` ApprovedAt types.Time `json:"approved_at"` ExecutorAddress string `json:"executor_address"` ExecutedAtHeight int64 `json:"executed_at_height"` ExecutedAt types.Time `json:"executed_at"` ExpiredAtHeight int64 `json:"expired_at_height"` ExpiredAt types.Time `json:"expired_at"` UpvotesTotal string `json:"upvotes_total"` YesVotesTotal uint64 `json:"yes_votes_total"` YesVotesWeightTotal string `json:"yes_votes_weight_total"` NoVotesTotal uint64 `json:"no_votes_total"` NoVotesWeightTotal string `json:"no_votes_weight_total"` AbstainVotesTotal uint64 `json:"abstain_votes_total"` AbstainVotesWeightTotal string `json:"abstain_votes_weight_total"` VotesTotal uint64 `json:"votes_total"` VotesWeightTotal string `json:"votes_weight_total"` }
func (*ProposalAgg) Equal ¶ added in v0.1.0
func (s *ProposalAgg) Equal(m ProposalAgg) bool
func (ProposalAgg) TableName ¶ added in v0.1.0
func (ProposalAgg) TableName() string
func (*ProposalAgg) Valid ¶ added in v0.1.0
func (s *ProposalAgg) Valid() bool
type Report ¶
type Report struct { *ModelWithTimestamps 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 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 { *ModelWithTimestamps Height int64 `json:"height"` Time *types.Time `json:"time"` ChainId uint64 `json:"chain_id"` Epoch *int64 `json:"epoch"` LastInEpoch *bool `json:"last_in_epoch"` 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"` RequestsCount uint64 `json:"requests_count"` }
func (*Syncable) MarkProcessed ¶
func (*Syncable) SetStatus ¶
func (s *Syncable) SetStatus(newStatus SyncableStatus)
type SyncableStatus ¶
type SyncableStatus int
const ( SyncableStatusRunning SyncableStatus = iota + 1 SyncableStatusCompleted )
type SystemEvent ¶ added in v0.1.0
type SystemEvent struct { *Model Height int64 `json:"height"` Time types.Time `json:"time"` Actor string `json:"actor"` Kind SystemEventKind `json:"kind"` Data types.Jsonb `json:"data"` // JOIN ActorRecentName string `json:"actor_recent_name"` }
func (SystemEvent) Update ¶ added in v0.1.0
func (o SystemEvent) Update(m SystemEvent)
type SystemEventKind ¶ added in v0.1.0
type SystemEventKind string
const ( SystemEventGroupRewardChange1 SystemEventKind = "group_reward_change_1" SystemEventGroupRewardChange2 SystemEventKind = "group_reward_change_2" SystemEventGroupRewardChange3 SystemEventKind = "group_reward_change_3" SystemEventJoinedActiveSet SystemEventKind = "joined_active_set" SystemEventLeftActiveSet SystemEventKind = "left_active_set" SystemEventMissedNConsecutive SystemEventKind = "missed_n_consecutive" SystemEventMissedNofM SystemEventKind = "missed_n_of_m" )
func (SystemEventKind) String ¶ added in v0.1.0
func (o SystemEventKind) String() string
type ValidatorAgg ¶
type ValidatorAgg struct { *ModelWithTimestamps *Aggregate Address string `json:"address"` RecentName string `json:"recent_name"` RecentMetadataUrl string `json:"recent_metadata_url"` RecentAsValidatorHeight int64 `json:"recent_as_validator_height"` AccumulatedUptime int64 `json:"accumulated_uptime"` AccumulatedUptimeCount int64 `json:"accumulated_uptime_count"` }
func (*ValidatorAgg) Equal ¶
func (s *ValidatorAgg) Equal(m ValidatorAgg) bool
func (*ValidatorAgg) Update ¶
func (s *ValidatorAgg) Update(u *ValidatorAgg)
func (*ValidatorAgg) Valid ¶
func (s *ValidatorAgg) Valid() bool
type ValidatorGroupAgg ¶
type ValidatorGroupAgg struct { *ModelWithTimestamps *Aggregate Address string `json:"address"` RecentName string `json:"recent_name"` RecentMetadataUrl string `json:"recent_metadata_url"` AccumulatedUptime int64 `json:"accumulated_uptime"` AccumulatedUptimeCount int64 `json:"accumulated_uptime_count"` }
func (*ValidatorGroupAgg) Equal ¶
func (s *ValidatorGroupAgg) Equal(m ValidatorGroupAgg) bool
func (ValidatorGroupAgg) TableName ¶
func (ValidatorGroupAgg) TableName() string
func (*ValidatorGroupAgg) Update ¶
func (s *ValidatorGroupAgg) Update(u *ValidatorGroupAgg)
func (*ValidatorGroupAgg) Valid ¶
func (s *ValidatorGroupAgg) Valid() bool
type ValidatorGroupSeq ¶
type ValidatorGroupSeq struct { *Model *Sequence Address string `json:"address"` Commission types.Quantity `json:"commission"` ActiveVotes types.Quantity `json:"active_votes"` PendingVotes types.Quantity `json:"pending_votes"` VotingCap types.Quantity `json:"voting_cap"` MembersCount int `json:"members_count"` MembersAvgSigned float64 `json:"members_avg_signed"` // Join fields Name string `json:"name"` MetadataUrl string `json:"metadata_url"` }
func (*ValidatorGroupSeq) Equal ¶
func (s *ValidatorGroupSeq) Equal(m ValidatorGroupSeq) bool
func (*ValidatorGroupSeq) IsValidated ¶ added in v0.1.9
func (s *ValidatorGroupSeq) IsValidated() bool
func (ValidatorGroupSeq) TableName ¶
func (ValidatorGroupSeq) TableName() string
func (*ValidatorGroupSeq) Update ¶
func (s *ValidatorGroupSeq) Update(m ValidatorGroupSeq)
func (*ValidatorGroupSeq) Valid ¶
func (s *ValidatorGroupSeq) Valid() bool
type ValidatorGroupSummary ¶
type ValidatorGroupSummary struct { *Model *Summary Address string `json:"address"` 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"` PendingVotesAvg types.Quantity `json:"pending_votes_avg"` PendingVotesMin types.Quantity `json:"pending_votes_min"` PendingVotesMax types.Quantity `json:"pending_votes_max"` }
func (ValidatorGroupSummary) TableName ¶
func (ValidatorGroupSummary) TableName() string
type ValidatorSeq ¶
type ValidatorSeq struct { *Model *Sequence Address string `json:"address"` Affiliation string `json:"affiliation"` Signed *bool `json:"signed"` Score types.Quantity `json:"score"` // Join fields RecentName string `json:"recent_name"` RecentMetadataUrl string `json:"recent_metadata_url"` }
func (*ValidatorSeq) Equal ¶
func (s *ValidatorSeq) Equal(m ValidatorSeq) bool
func (*ValidatorSeq) IsValidated ¶ added in v0.1.9
func (s *ValidatorSeq) IsValidated() bool
func (*ValidatorSeq) ScoreAsPercentage ¶ added in v0.1.0
func (s *ValidatorSeq) ScoreAsPercentage() float64
func (ValidatorSeq) TableName ¶
func (ValidatorSeq) TableName() string
func (*ValidatorSeq) Update ¶
func (s *ValidatorSeq) Update(m ValidatorSeq)
func (*ValidatorSeq) Valid ¶
func (s *ValidatorSeq) Valid() bool
type ValidatorSummary ¶
type ValidatorSummary struct { *Model *Summary Address string `json:"address"` ScoreAvg types.Quantity `json:"score_avg"` ScoreMin types.Quantity `json:"score_min"` ScoreMax types.Quantity `json:"score_max"` SignedAvg float64 `json:"signed_avg"` SignedMax int64 `json:"signed_max"` SignedMin int64 `json:"signed_min"` }
func (ValidatorSummary) TableName ¶
func (ValidatorSummary) TableName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.