Documentation ¶
Index ¶
- func RemoveEmpty(s []string) []string
- func ToNullString(value string) sql.NullString
- func ToString(value sql.NullString) string
- type AccountBalanceRow
- type AccountRow
- type AverageTimeRow
- type BlockRow
- type CommunityPoolRow
- type ConsensusRow
- type DbCoin
- type DbCoins
- type DbDecCoin
- type DbDecCoins
- type DelegationRewardRow
- type DelegationRow
- type DepositRow
- type DistributionParamsRow
- type DoubleSignEvidenceRow
- type DoubleSignVoteRow
- type GenesisRow
- type GovParamsRow
- type InflationRow
- type MintParamsRow
- type ModuleRow
- type ModuleRows
- type ProposalRow
- type ProposalStakingPoolSnapshotRow
- type ProposalValidatorVotingPowerSnapshotRow
- type RedelegationRow
- type SlashingParamsRow
- type StakingParamsRow
- type StakingPoolRow
- type SupplyRow
- type TallyResultRow
- type TokenPriceRow
- type TokenRow
- type TokenUnitRow
- type UnbondingDelegationRow
- type ValidatorCommissionAmountRow
- type ValidatorCommissionHistoryRow
- type ValidatorCommissionRow
- type ValidatorData
- func (v ValidatorData) GetConsAddr() string
- func (v ValidatorData) GetConsPubKey() string
- func (v ValidatorData) GetHeight() int64
- func (v ValidatorData) GetMaxChangeRate() *sdk.Dec
- func (v ValidatorData) GetMaxRate() *sdk.Dec
- func (v ValidatorData) GetOperator() string
- func (v ValidatorData) GetSelfDelegateAddress() string
- type ValidatorDescriptionRow
- type ValidatorInfoRow
- type ValidatorRow
- type ValidatorSigningInfoRow
- type ValidatorStatusRow
- type ValidatorVotingPowerRow
- type VoteRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveEmpty ¶
func ToNullString ¶
func ToNullString(value string) sql.NullString
func ToString ¶
func ToString(value sql.NullString) string
Types ¶
type AccountBalanceRow ¶
type AccountBalanceRow struct { Address string `db:"address"` Coins *DbCoins `db:"coins"` Height int64 `db:"height"` }
AccountBalanceRow represents a single row inside the account_balance table
func NewAccountBalanceRow ¶
func NewAccountBalanceRow(address string, coins DbCoins, height int64) AccountBalanceRow
NewAccountBalanceRow allows to build a new AccountBalanceRow instance
func (AccountBalanceRow) Equal ¶
func (a AccountBalanceRow) Equal(b AccountBalanceRow) bool
Equal tells whether a and b contain the same data
type AccountRow ¶
type AccountRow struct {
Address string `db:"address"`
}
AccountRow represents a single row inside the account table
func NewAccountRow ¶
func NewAccountRow(address string) AccountRow
NewAccountRow allows to easily build a new AccountRow
func (AccountRow) Equal ¶
func (a AccountRow) Equal(b AccountRow) bool
Equal tells whether a and b contain the same data
type AverageTimeRow ¶
type AverageTimeRow struct { OneRowID bool `db:"one_row_id"` AverageTime float64 `db:"average_time"` Height int64 `db:"height"` }
AverageTimeRow is the average block time each minute/hour/day
func NewAverageTimeRow ¶
func NewAverageTimeRow(averageTime float64, height int64) AverageTimeRow
func (AverageTimeRow) Equal ¶
func (r AverageTimeRow) Equal(s AverageTimeRow) bool
Equal return true if two AverageTimeRow are true
type BlockRow ¶
type BlockRow struct { Height int64 `db:"height"` Hash string `db:"hash"` TxNum int64 `db:"num_txs"` TotalGas int64 `db:"total_gas"` ProposerAddress sql.NullString `db:"proposer_address"` PreCommitsNum int64 `db:"pre_commits"` Timestamp time.Time `db:"timestamp"` }
BlockRow represents a single block row stored inside the database
type CommunityPoolRow ¶
type CommunityPoolRow struct { OneRowID bool `db:"one_row_id"` Coins *DbDecCoins `db:"coins"` Height int64 `db:"height"` }
CommunityPoolRow represents a single row inside the total_supply table
func NewCommunityPoolRow ¶
func NewCommunityPoolRow(coins DbDecCoins, height int64) CommunityPoolRow
NewCommunityPoolRow allows to easily create a new CommunityPoolRow
func (CommunityPoolRow) Equals ¶
func (v CommunityPoolRow) Equals(w CommunityPoolRow) bool
Equals return true if one CommunityPoolRow representing the same row as the original one
type ConsensusRow ¶
type ConsensusRow struct { Step string `db:"step"` Height int64 `db:"height"` Round int32 `db:"round"` OneRowID bool `db:"one_row_id"` }
ConsensusRow represents a single row inside the consensus table
func NewConsensusRow ¶
func NewConsensusRow(height int64, round int32, step string) ConsensusRow
NewConsensusRow allows to build a new ConsensusRow instance
func (ConsensusRow) Equal ¶
func (r ConsensusRow) Equal(s ConsensusRow) bool
Equal tells whether r and s contain the same data
type DbCoin ¶
DbCoin represents the information stored inside the database about a single coin
type DbCoins ¶
type DbCoins []*DbCoin
DbCoins represents an array of coins
func NewDbCoins ¶
NewDbCoins build a new DbCoins object starting from an array of coins
type DbDecCoin ¶
DbDecCoin represents the information stored inside the database about a single coin
func NewDbDecCoin ¶
NewDbDecCoin builds a DbDecCoin starting from an SDK Coin
func (DbDecCoin) Equal ¶
Equal tells whether coin and d represent the same coin with the same amount
type DbDecCoins ¶
type DbDecCoins []*DbDecCoin
DbDecCoins represents an array of coins
func NewDbDecCoins ¶
func NewDbDecCoins(coins sdk.DecCoins) DbDecCoins
NewDbDecCoins build a new DbDecCoins object starting from an array of coins
func (DbDecCoins) Equal ¶
func (coins DbDecCoins) Equal(d *DbDecCoins) bool
Equal tells whether c and d contain the same items in the same order
func (*DbDecCoins) Scan ¶
func (coins *DbDecCoins) Scan(src interface{}) error
Scan implements sql.Scanner
func (DbDecCoins) ToDecCoins ¶
func (coins DbDecCoins) ToDecCoins() sdk.DecCoins
ToDecCoins converts this DbDecCoins to sdk.DecCoins
type DelegationRewardRow ¶
type DelegationRewardRow struct { ValidatorConsAddress string `db:"validator_address"` DelegatorAddress string `db:"delegator_address"` WithdrawAddress string `db:"withdraw_address"` Amount DbDecCoins `db:"amount"` Height int64 `db:"height"` }
DelegationRewardRow represents a single row inside the "delegation_reward" table
func NewDelegationRewardRow ¶
func NewDelegationRewardRow(delegatorAddr, valConsAddr, withdrawAddr string, amount DbDecCoins, height int64) DelegationRewardRow
NewDelegationRewardRow returns a new DelegationRewardRow instance
func (DelegationRewardRow) Equals ¶
func (v DelegationRewardRow) Equals(w DelegationRewardRow) bool
Equals returns true iff v and w contain the same data
type DelegationRow ¶
type DelegationRow struct { ID string `db:"id"` ValidatorAddress string `db:"validator_address"` DelegatorAddress string `db:"delegator_address"` Amount DbCoin `db:"amount"` Height int64 `db:"height"` }
DelegationRow represents a single delegation table row
func NewDelegationRow ¶
func NewDelegationRow(delegator, consAddr string, amount DbCoin, height int64) DelegationRow
NewDelegationRow allows to build a new DelegationRow
func (DelegationRow) Equal ¶
func (v DelegationRow) Equal(w DelegationRow) bool
Equal tells whether v and w represent the same row
type DepositRow ¶
type DepositRow struct { ProposalID int64 `db:"proposal_id"` Depositor string `db:"depositor_address"` Amount DbCoins `db:"amount"` Height int64 `db:"height"` }
DepositRow represents a single row inside the deposit table
func NewDepositRow ¶
func NewDepositRow( proposalID int64, depositor string, amount DbCoins, height int64, ) DepositRow
NewDepositRow allows to easily create a new NewDepositRow
func (DepositRow) Equals ¶
func (w DepositRow) Equals(v DepositRow) bool
Equals return true if two VoteDepositRow are the same
type DistributionParamsRow ¶
type DistributionParamsRow struct { OneRowID bool `db:"one_row_id"` Params string `db:"params"` Height int64 `db:"height"` }
DistributionParamsRow represents a single row inside the distribution_params table
type DoubleSignEvidenceRow ¶
type DoubleSignEvidenceRow struct { Height int64 `db:"height"` VoteAID int64 `db:"vote_a_id"` VoteBID int64 `db:"vote_b_id"` }
DoubleSignEvidenceRow represents a single row of the double_sign_evidence table
func NewDoubleSignEvidenceRow ¶
func NewDoubleSignEvidenceRow(height int64, voteAID int64, voteBID int64) DoubleSignEvidenceRow
NewDoubleSignEvidenceRow allows to build a new NewDoubleSignEvidenceRow
func (DoubleSignEvidenceRow) Equal ¶
func (v DoubleSignEvidenceRow) Equal(w DoubleSignEvidenceRow) bool
Equal tells whether v and w represent the same rows
type DoubleSignVoteRow ¶
type DoubleSignVoteRow struct { ID int64 `db:"id"` VoteType int `db:"type"` Height int64 `db:"height"` Round int `db:"round"` BlockID string `db:"block_id"` ValidatorAddress string `db:"validator_address"` ValidatorIndex int `db:"validator_index"` Signature string `db:"signature"` }
DoubleSignVoteRow represents a single row of the double_sign_vote table
func NewDoubleSignVoteRow ¶
func NewDoubleSignVoteRow( id int64, voteType int, height int64, round int, blockID string, validatorAddress string, validatorIndex int, signature string, ) DoubleSignVoteRow
NewDoubleSignVoteRow allows to build a new NewDoubleSignVoteRow
func (DoubleSignVoteRow) Equal ¶
func (v DoubleSignVoteRow) Equal(w DoubleSignVoteRow) bool
Equal tells whether v and w represent the same rows
type GenesisRow ¶
type GenesisRow struct { OneRowID bool `db:"one_row_id"` ChainID string `db:"chain_id"` Time time.Time `db:"time"` InitialHeight int64 `db:"initial_height"` }
func NewGenesisRow ¶
func NewGenesisRow(chainID string, time time.Time, initialHeight int64) GenesisRow
func (GenesisRow) Equal ¶
func (r GenesisRow) Equal(s GenesisRow) bool
type GovParamsRow ¶
type GovParamsRow struct { OneRowID bool `db:"one_row_id"` DepositParams string `db:"deposit_params"` VotingParams string `db:"voting_params"` TallyParams string `db:"tally_params"` Height int64 `db:"height"` }
GovParamsRow represents a single row of the "gov_params" table
type InflationRow ¶
type InflationRow struct { OneRowID bool `db:"one_row_id"` Value float64 `db:"value"` Height int64 `db:"height"` }
InflationRow represents a single row inside the inflation table
func NewInflationRow ¶
func NewInflationRow(value float64, height int64) InflationRow
NewInflationRow builds a new InflationRows instance
func (InflationRow) Equal ¶
func (i InflationRow) Equal(j InflationRow) bool
Equal reports whether i and j represent the same table rows.
type MintParamsRow ¶
type MintParamsRow struct { OneRowID bool `db:"one_row_id"` Params string `db:"params"` Height int64 `db:"height"` }
MintParamsRow represents a single row inside the mint_params table
func NewMintParamsRow ¶
func NewMintParamsRow( params string, height int64, ) MintParamsRow
NewMintParamsRow builds a new MintParamsRow instance
func (MintParamsRow) Equal ¶
func (m MintParamsRow) Equal(n MintParamsRow) bool
Equal reports whether m and n represent the same table rows.
type ModuleRow ¶
type ModuleRow struct {
Module string `db:"module_name"`
}
ModuleRow represents a single row inside the modules table
type ModuleRows ¶
type ModuleRows []*ModuleRow
ModuleRows represent an array of ModulerRow
func NewModuleRows ¶
func NewModuleRows(names []string) ModuleRows
NewModuleRows return a new instance of ModuleRows
func (ModuleRows) Equal ¶
func (v ModuleRows) Equal(w *ModuleRows) bool
Equal return true if two ModulesRow is equal
type ProposalRow ¶
type ProposalRow struct { Title string `db:"title"` Description string `db:"description"` Content string `db:"content"` ProposalRoute string `db:"proposal_route"` ProposalType string `db:"proposal_type"` ProposalID uint64 `db:"id"` SubmitTime time.Time `db:"submit_time"` DepositEndTime time.Time `db:"deposit_end_time"` VotingStartTime time.Time `db:"voting_start_time"` VotingEndTime time.Time `db:"voting_end_time"` Proposer string `db:"proposer_address"` Status string `db:"status"` }
ProposalRow represents a single row inside the proposal table
func NewProposalRow ¶
func NewProposalRow( proposalID uint64, proposalRoute string, proposalType string, title string, description string, content string, submitTime time.Time, depositEndTime time.Time, votingStartTime time.Time, votingEndTime time.Time, proposer string, status string, ) ProposalRow
NewProposalRow allows to easily create a new ProposalRow
func (ProposalRow) Equals ¶
func (w ProposalRow) Equals(v ProposalRow) bool
Equals return true if two ProposalRow are the same
type ProposalStakingPoolSnapshotRow ¶
type ProposalStakingPoolSnapshotRow struct { ProposalID uint64 `db:"proposal_id"` BondedTokens int64 `db:"bonded_tokens"` NotBondedTokens int64 `db:"not_bonded_tokens"` Height int64 `db:"height"` }
func NewProposalStakingPoolSnapshotRow ¶
func NewProposalStakingPoolSnapshotRow(proposalID uint64, bondedTokens, notBondedTokens, height int64) ProposalStakingPoolSnapshotRow
type ProposalValidatorVotingPowerSnapshotRow ¶
type ProposalValidatorVotingPowerSnapshotRow struct { ID int64 `db:"id"` ProposalID int64 `db:"proposal_id"` ValidatorAddress string `db:"validator_address"` VotingPower int64 `db:"voting_power"` Status int `db:"status"` Jailed bool `db:"jailed"` Height int64 `db:"height"` }
type RedelegationRow ¶
type RedelegationRow struct { DelegatorAddress string `db:"delegator_address"` SrcValidatorAddress string `db:"src_validator_address"` DstValidatorAddress string `db:"dst_validator_address"` Amount DbCoin `db:"amount"` CompletionTime time.Time `db:"completion_time"` Height int64 `db:"height"` }
RedelegationRow represents a single row of the redelegation database table
func NewRedelegationRow ¶
func NewRedelegationRow( delegator, srcConsAddr, dstConsAddr string, amount DbCoin, completionTime time.Time, height int64, ) RedelegationRow
NewRedelegationRow allows to easily build a new RedelegationRow instance
func (RedelegationRow) Equal ¶
func (v RedelegationRow) Equal(w RedelegationRow) bool
Equal tells whether v and w represent the same database rows
type SlashingParamsRow ¶
type SlashingParamsRow struct { OneRowID bool `db:"one_row_id"` Params string `db:"params"` Height int64 `db:"height"` }
SlashingParamsRow represents a single row inside the slashing_params table
func NewSlashingParamsRow ¶
func NewSlashingParamsRow(params string, height int64) SlashingParamsRow
NewSlashingParamsRow allows to create a new instance SlashingParamsRow
type StakingParamsRow ¶
type StakingParamsRow struct { OneRowID bool `db:"one_row_id"` Params string `db:"params"` Height int64 `db:"height"` }
StakingParamsRow represents a single row inside the staking_params table
type StakingPoolRow ¶
type StakingPoolRow struct { OneRowID bool `db:"one_row_id"` BondedTokens int64 `db:"bonded_tokens"` NotBondedTokens int64 `db:"not_bonded_tokens"` Height int64 `db:"height"` }
StakingPoolRow represents a single row inside the staking_pool table
func NewStakingPoolRow ¶
func NewStakingPoolRow(bondedTokens, notBondedTokens int64, height int64) StakingPoolRow
NewStakingPoolRow allows to easily create a new StakingPoolRow
func (StakingPoolRow) Equal ¶
func (r StakingPoolRow) Equal(s StakingPoolRow) bool
Equal allows to tells whether r and as represent the same rows
type SupplyRow ¶
type SupplyRow struct { OneRowID bool `db:"one_row_id"` Coins *DbCoins `db:"coins"` Height int64 `db:"height"` }
SupplyRow represents a single row inside the "supply" table
func NewSupplyRow ¶
NewSupplyRow allows to easily create a new NewSupplyRow
type TallyResultRow ¶
type TallyResultRow struct { ProposalID int64 `db:"proposal_id"` Yes string `db:"yes"` Abstain string `db:"abstain"` No string `db:"no"` NoWithVeto string `db:"no_with_veto"` Height int64 `db:"height"` }
TallyResultRow represents a single row inside the tally_result table
func NewTallyResultRow ¶
func NewTallyResultRow( proposalID int64, yes string, abstain string, no string, noWithVeto string, height int64, ) TallyResultRow
NewTallyResultRow return a new TallyResultRow instance
func (TallyResultRow) Equals ¶
func (w TallyResultRow) Equals(v TallyResultRow) bool
Equals return true if two TallyResultRow are the same
type TokenPriceRow ¶
type TokenPriceRow struct { ID string `db:"id"` Name string `db:"unit_name"` Price float64 `db:"price"` MarketCap int64 `db:"market_cap"` Timestamp time.Time `db:"timestamp"` }
TokenPriceRow represent a row of the table token_price in the database
func NewTokenPriceRow ¶
func NewTokenPriceRow(name string, currentPrice float64, marketCap int64, timestamp time.Time) TokenPriceRow
NewTokenPriceRow allows to easily create a new NewTokenPriceRow
func (TokenPriceRow) Equals ¶
func (u TokenPriceRow) Equals(v TokenPriceRow) bool
Equals return true if u and v represent the same row
type TokenUnitRow ¶
type TokenUnitRow struct { TokenName string `db:"token_name"` Denom string `db:"denom"` Exponent int `db:"exponent"` Aliases pq.StringArray `db:"aliases"` PriceID sql.NullString `db:"price_id"` }
type UnbondingDelegationRow ¶
type UnbondingDelegationRow struct { ConsensusAddress string `db:"validator_address"` DelegatorAddress string `db:"delegator_address"` Amount DbCoin `db:"amount"` CompletionTimestamp time.Time `db:"completion_timestamp"` Height int64 `db:"height"` }
UnbondingDelegationRow represents a single row of the unbonding_delegation table
func NewUnbondingDelegationRow ¶
func NewUnbondingDelegationRow( delegator, consAddr string, amount DbCoin, completionTimestamp time.Time, height int64, ) UnbondingDelegationRow
NewUnbondingDelegationRow allows to build a new UnbondingDelegationRow instance
func (UnbondingDelegationRow) Equal ¶
func (v UnbondingDelegationRow) Equal(w UnbondingDelegationRow) bool
Equal tells whether v and w represent the same rows
type ValidatorCommissionAmountRow ¶
type ValidatorCommissionAmountRow struct { ValidatorAddr string `db:"validator_address"` Amount DbDecCoins `db:"amount"` Height int64 `db:"height"` }
ValidatorCommissionAmountRow represents a single row of the "validator_commission_amount" table
func NewValidatorCommissionAmountRow ¶
func NewValidatorCommissionAmountRow(valAddr string, amount DbDecCoins, height int64) ValidatorCommissionAmountRow
NewValidatorCommissionAmountRow returns a new ValidatorCommissionAmountRow instance
func (ValidatorCommissionAmountRow) Equals ¶
func (v ValidatorCommissionAmountRow) Equals(w ValidatorCommissionAmountRow) bool
Equals returns true iff v and w contain the same data
type ValidatorCommissionHistoryRow ¶
type ValidatorCommissionHistoryRow struct { CommissionID int64 `db:"commission_id"` Height int64 `db:"height"` Timestamp time.Time `db:"timestamp"` }
ValidatorCommissionHistoryRow represents a single row of the validator_commission_history table
func NewValidatorCommissionHistoryRow ¶
func NewValidatorCommissionHistoryRow( commissionID int64, height int64, timestamp time.Time, ) ValidatorCommissionHistoryRow
NewValidatorCommissionHistoryRow allows to easily build a new ValidatorCommissionHistoryRow instance
func (ValidatorCommissionHistoryRow) Equal ¶
func (v ValidatorCommissionHistoryRow) Equal(w ValidatorCommissionHistoryRow) bool
Equal tells whether v and w represent the same rows
type ValidatorCommissionRow ¶
type ValidatorCommissionRow struct { OperatorAddress string `db:"validator_address"` Commission sql.NullString `db:"commission"` MinSelfDelegation sql.NullString `db:"min_self_delegation"` Height int64 `db:"height"` }
ValidatorCommissionRow represents a single row of the validator_commission database table
func NewValidatorCommissionRow ¶
func NewValidatorCommissionRow( operatorAddress string, commission string, minSelfDelegation string, height int64, ) ValidatorCommissionRow
NewValidatorCommissionRow allows to easily build a new ValidatorCommissionRow instance
func (ValidatorCommissionRow) Equal ¶
func (v ValidatorCommissionRow) Equal(w ValidatorCommissionRow) bool
Equal tells whether v and w represent the same rows
type ValidatorData ¶
type ValidatorData struct { ConsAddress string `db:"consensus_address"` ValAddress string `db:"operator_address"` ConsPubKey string `db:"consensus_pubkey"` SelfDelegateAddress string `db:"self_delegate_address"` MaxRate string `db:"max_rate"` MaxChangeRate string `db:"max_change_rate"` Height int64 `db:"height"` }
ValidatorData contains all the data of a single validator. It implements types.Validator interface
func NewValidatorData ¶
func NewValidatorData( consAddress, valAddress, consPubKey, selfDelegateAddress, maxRate, maxChangeRate string, height int64, ) ValidatorData
NewValidatorData allows to build a new ValidatorData
func (ValidatorData) GetConsAddr ¶
func (v ValidatorData) GetConsAddr() string
GetConsAddr implements types.Validator
func (ValidatorData) GetConsPubKey ¶
func (v ValidatorData) GetConsPubKey() string
GetConsPubKey implements types.Validator
func (ValidatorData) GetHeight ¶
func (v ValidatorData) GetHeight() int64
GetHeight implements types.Validator
func (ValidatorData) GetMaxChangeRate ¶
func (v ValidatorData) GetMaxChangeRate() *sdk.Dec
GetMaxChangeRate implements types.Validator
func (ValidatorData) GetMaxRate ¶
func (v ValidatorData) GetMaxRate() *sdk.Dec
GetMaxRate implements types.Validator
func (ValidatorData) GetOperator ¶
func (v ValidatorData) GetOperator() string
GetOperator implements types.Validator
func (ValidatorData) GetSelfDelegateAddress ¶
func (v ValidatorData) GetSelfDelegateAddress() string
GetSelfDelegateAddress implements types.Validator
type ValidatorDescriptionRow ¶
type ValidatorDescriptionRow struct { ValAddress string `db:"validator_address"` Moniker sql.NullString `db:"moniker"` Identity sql.NullString `db:"identity"` AvatarURL sql.NullString `db:"avatar_url"` Website sql.NullString `db:"website"` SecurityContact sql.NullString `db:"security_contact"` Details sql.NullString `db:"details"` Height int64 `db:"height"` }
ValidatorDescriptionRow represent a row in validator_description
func NewValidatorDescriptionRow ¶
func NewValidatorDescriptionRow( valAddress, moniker, identity, avatarURL, website, securityContact, details string, height int64, ) ValidatorDescriptionRow
NewValidatorDescriptionRow return a row representing data structure in validator_description
func (ValidatorDescriptionRow) Equals ¶
func (w ValidatorDescriptionRow) Equals(v ValidatorDescriptionRow) bool
Equals return true if two ValidatorDescriptionRow are equal
type ValidatorInfoRow ¶
type ValidatorInfoRow struct { ConsAddress string `db:"consensus_address"` ValAddress string `db:"operator_address"` SelfDelegateAddress string `db:"self_delegate_address"` MaxChangeRate string `db:"max_change_rate"` MaxRate string `db:"max_rate"` Height int64 `db:"height"` }
ValidatorInfoRow represents a single row of the validator_info table
func NewValidatorInfoRow ¶
func NewValidatorInfoRow( consAddress, valAddress, selfDelegateAddress, maxRate, maxChangeRate string, height int64, ) ValidatorInfoRow
NewValidatorInfoRow allows to build a new ValidatorInfoRow
func (ValidatorInfoRow) Equal ¶
func (v ValidatorInfoRow) Equal(w ValidatorInfoRow) bool
Equal tells whether v and w represent the same rows
type ValidatorRow ¶
type ValidatorRow struct { ConsAddress string `db:"consensus_address"` ConsPubKey string `db:"consensus_pubkey"` }
ValidatorRow represents a single row of the validator table
func NewValidatorRow ¶
func NewValidatorRow(consAddress, consPubKey string) ValidatorRow
NewValidatorRow returns a new ValidatorRow
func (ValidatorRow) Equal ¶
func (v ValidatorRow) Equal(w ValidatorRow) bool
Equal tells whether v and w contain the same data
type ValidatorSigningInfoRow ¶
type ValidatorSigningInfoRow struct { ValidatorAddress string `db:"validator_address"` StartHeight int64 `db:"start_height"` IndexOffset int64 `db:"index_offset"` JailedUntil time.Time `db:"jailed_until"` Tombstoned bool `db:"tombstoned"` MissedBlocksCounter int64 `db:"missed_blocks_counter"` Height int64 `db:"height"` }
ValidatorSigningInfoRow represents a single row of the validator_signing_info table
func NewValidatorSigningInfoRow ¶
func NewValidatorSigningInfoRow( validatorAddress string, startHeight int64, indexOffset int64, jailedUntil time.Time, tombstoned bool, missedBlocksCounter int64, height int64, ) ValidatorSigningInfoRow
NewValidatorSigningInfoRow allows to build a new ValidatorSigningInfoRow
func (ValidatorSigningInfoRow) Equal ¶
func (v ValidatorSigningInfoRow) Equal(w ValidatorSigningInfoRow) bool
Equal tells whether v and w represent the same rows
type ValidatorStatusRow ¶
type ValidatorStatusRow struct { Status int `db:"status"` Jailed bool `db:"jailed"` Tombstoned bool `db:"tombstoned"` ConsAddress string `db:"validator_address"` Height int64 `db:"height"` }
ValidatorStatusRow represents a single row of the validator_status table
func NewValidatorStatusRow ¶
func NewValidatorStatusRow(status int, jailed bool, tombstoned bool, consAddess string, height int64) ValidatorStatusRow
NewValidatorStatusRow builds a new ValidatorStatusRow
func (ValidatorStatusRow) Equal ¶
func (v ValidatorStatusRow) Equal(w ValidatorStatusRow) bool
Equal tells whether v and w contain the same data
type ValidatorVotingPowerRow ¶
type ValidatorVotingPowerRow struct { ValidatorAddress string `db:"validator_address"` VotingPower int64 `db:"voting_power"` Height int64 `db:"height"` }
ValidatorVotingPowerRow represents a single row of the validator_voting_power database table
func NewValidatorVotingPowerRow ¶
func NewValidatorVotingPowerRow(address string, votingPower int64, height int64) ValidatorVotingPowerRow
NewValidatorVotingPowerRow allows to easily build a new ValidatorVotingPowerRow instance
func (ValidatorVotingPowerRow) Equal ¶
func (v ValidatorVotingPowerRow) Equal(w ValidatorVotingPowerRow) bool
Equal tells whether v and w represent the same rows