Documentation ¶
Index ¶
- func RemoveEmpty(s []string) []string
- func ToNullString(value string) sql.NullString
- func ToString(value sql.NullString) string
- type AccountBalanceRow
- type AccountKeyListRow
- type AccountRow
- type AverageTimeRow
- type BlockRow
- type CurrentTableRow
- type CutPercentageRow
- type DbCoin
- type DbCoins
- type DbDecCoin
- type DbDecCoins
- type DelegatorAccountRow
- type DelegatorCommittedRow
- type DelegatorInfoFromAddressRow
- type DelegatorInfoRow
- type GenesisRow
- type LockedAccountBalanceRow
- type LockedAccountRow
- type NodeCommittedTokensRow
- type NodeInfoFromAddressRow
- type NodeInfosFromTableRow
- type NodeTotalCommitmentRow
- type NodeTotalCommitmentWithoutDelegatorsRow
- type ProposedTableRow
- type StakeRequirementsRow
- type StakerAccountRow
- type StakerNodeIdRow
- type StakingTableRow
- type SupplyRow
- type TokenPriceRow
- type TokenRow
- type TokenUnitRow
- type TotalStakeByTypeRow
- type TotalStakeRow
- type WeeklyPayoutRow
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"` Balance float64 `db:"balance"` Code string `db:"code"` ContractMap string `db:"contract_map"` Height uint64 `db:"height"` }
AccountBalanceRow represents a single row inside the account table
func NewAccountBalanceRow ¶
func NewAccountBalanceRow(address string, balance float64, code, contractMap string, height uint64) AccountBalanceRow
NewAccountBalanceRow allows to easily build a new AccountBalanceRow
func (AccountBalanceRow) Equal ¶
func (a AccountBalanceRow) Equal(b AccountBalanceRow) bool
Equal tells whether a and b contain the same data
type AccountKeyListRow ¶
type AccountKeyListRow struct { Address string `db:"address"` Index int `db:"index"` Weight int `db:"weight"` Revoked bool `db:"revoked"` SigAlgo string `db:"sig_algo"` HashAlgo string `db:"hash_algo"` PublicKey string `db:"public_key"` SequenceNumber uint64 `db:"sequence_number"` }
AccountKeyListRow represents a single row of the account_key_list table
func NewAccountKeyListRow ¶
func NewAccountKeyListRow( address string, index int, weight int, revoked bool, sigAlgo string, hashAlgo string, publicKey string, sequenceNumber uint64) AccountKeyListRow
AccountKeyListRow allows to build a new AccountKeyListRow
func (AccountKeyListRow) Equal ¶
func (v AccountKeyListRow) Equal(w AccountKeyListRow) bool
Equal tells whether v and w represent the same rows
type AccountRow ¶
type AccountRow struct {
Address string `db:"address"`
}
AccountRow represents a single row of the account table
func NewAccountRow ¶
func NewAccountRow( address string) AccountRow
AccountRow allows to build a new AccountRow
func (AccountRow) Equal ¶
func (v AccountRow) Equal(w AccountRow) bool
Equal tells whether v and w represent the same rows
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"` Id string `db:"id"` ParentId string `db:"parent_id"` CollectionGuarantees string `db:"collection_guarantees"` Timestamp time.Time `db:"timestamp"` }
BlockRow represents a single block row stored inside the database
type CurrentTableRow ¶
CurrentTableRow represents a single row of the current_table table
func NewCurrentTableRow ¶
func NewCurrentTableRow( height int64, nodeId string) CurrentTableRow
CurrentTableRow allows to build a new CurrentTableRow
func (CurrentTableRow) Equal ¶
func (v CurrentTableRow) Equal(w CurrentTableRow) bool
Equal tells whether v and w represent the same rows
type CutPercentageRow ¶
type CutPercentageRow struct { CutPercentage uint64 `db:"cut_percentage"` Height int64 `db:"height"` }
CutPercentageRow represents a single row of the cut_percentage table
func NewCutPercentageRow ¶
func NewCutPercentageRow( cutPercentage uint64, height int64) CutPercentageRow
CutPercentageRow allows to build a new CutPercentageRow
func (CutPercentageRow) Equal ¶
func (v CutPercentageRow) Equal(w CutPercentageRow) bool
Equal tells whether v and w represent the same rows
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 DelegatorAccountRow ¶
type DelegatorAccountRow struct { AccountAddress string `db:"account_address"` DelegatorId int64 `db:"delegator_id"` DelegatorNodeId string `db:"delegator_node_id"` }
func NewDelegatorAccountRow ¶
func NewDelegatorAccountRow( accountAddress string, delegatorId int64, delegatorNodeId string) DelegatorAccountRow
DelegatorAccountRow allows to build a new DelegatorAccountRow
func (DelegatorAccountRow) Equal ¶
func (v DelegatorAccountRow) Equal(w DelegatorAccountRow) bool
Equal tells whether v and w represent the same rows
type DelegatorCommittedRow ¶
type DelegatorCommittedRow struct { Committed uint64 `db:"committed"` Height uint64 `db:"height"` NodeId string `db:"node_id"` DelegatorID uint32 `db:"delegator_id"` }
DelegatorCommittedRow represents a single row of the delegator_committed table
func NewDelegatorCommittedRow ¶
func NewDelegatorCommittedRow( committed uint64, height uint64, nodeId string, delegatorID uint32) DelegatorCommittedRow
DelegatorCommittedRow allows to build a new DelegatorCommittedRow
func (DelegatorCommittedRow) Equal ¶
func (v DelegatorCommittedRow) Equal(w DelegatorCommittedRow) bool
Equal tells whether v and w represent the same rows
type DelegatorInfoFromAddressRow ¶
type DelegatorInfoFromAddressRow struct { DelegatorInfo string `db:"delegator_info"` Height int64 `db:"height"` Address string `db:"address"` }
DelegatorInfoFromAddressRow represents a single row of the delegator_info_from_address table
func NewDelegatorInfoFromAddressRow ¶
func NewDelegatorInfoFromAddressRow( delegatorInfo string, height int64, address string) DelegatorInfoFromAddressRow
DelegatorInfoFromAddressRow allows to build a new DelegatorInfoFromAddressRow
func (DelegatorInfoFromAddressRow) Equal ¶
func (v DelegatorInfoFromAddressRow) Equal(w DelegatorInfoFromAddressRow) bool
Equal tells whether v and w represent the same rows
type DelegatorInfoRow ¶
type DelegatorInfoRow struct { Id uint32 `db:"id"` NodeId string `db:"node_id"` TokensCommitted uint64 `db:"tokens_committed"` TokensStaked uint64 `db:"tokens_staked"` TokensUnstaking uint64 `db:"tokens_unstaking"` TokensRewarded uint64 `db:"tokens_rewarded"` TokensUnstaked uint64 `db:"tokens_unstaked"` TokensRequestedToUnstake uint64 `db:"tokens_requested_to_unstake"` Height uint64 `db:"height"` }
DelegatorInfoRow represents a single row of the delegator_info table
func NewDelegatorInfoRow ¶
func NewDelegatorInfoRow( id uint32, nodeId string, tokensCommitted uint64, tokensStaked uint64, tokensUnstaking uint64, tokensRewarded uint64, tokensUnstaked uint64, tokensRequestedToUnstake uint64, height uint64) DelegatorInfoRow
DelegatorInfoRow allows to build a new DelegatorInfoRow
func (DelegatorInfoRow) Equal ¶
func (v DelegatorInfoRow) Equal(w DelegatorInfoRow) bool
Equal tells whether v and w represent the same rows
type GenesisRow ¶
type GenesisRow struct { OneRowID bool `db:"one_row_id"` Time time.Time `db:"time"` InitialHeight int64 `db:"initial_height"` ChainId string `db:"chain_id"` }
func NewGenesisRow ¶
func NewGenesisRow(time time.Time, initialHeight int64, chainId string) GenesisRow
func (GenesisRow) Equal ¶
func (r GenesisRow) Equal(s GenesisRow) bool
type LockedAccountBalanceRow ¶
type LockedAccountBalanceRow struct { LockedAddress string `db:"locked_address"` Balance int `db:"balance"` UnlockLimit int `db:"unlock_limit"` Height int `db:"height"` }
func NewLockedAccountBalanceRow ¶
func NewLockedAccountBalanceRow(lockedAddress string, balance, unlockLimit, height int) LockedAccountBalanceRow
func (LockedAccountBalanceRow) Equal ¶
func (a LockedAccountBalanceRow) Equal(b LockedAccountBalanceRow) bool
type LockedAccountRow ¶
type LockedAccountRow struct { Address string `db:"address"` LockedAddress string `db:"locked_address"` }
LockedAccountRow represents a single row of the locked_account table
func NewLockedAccountRow ¶
func NewLockedAccountRow( address string, lockedAddress string) LockedAccountRow
LockedAccountRow allows to build a new LockedAccountRow
func (LockedAccountRow) Equal ¶
func (v LockedAccountRow) Equal(w LockedAccountRow) bool
Equal tells whether v and w represent the same rows
type NodeCommittedTokensRow ¶
type NodeCommittedTokensRow struct { NodeId string `db:"node_id"` CommittedTokens uint64 `db:"committed_tokens"` Height int64 `db:"height"` }
NodeCommittedTokensRow represents a single row of the node_committed_tokens table
func NewNodeCommittedTokensRow ¶
func NewNodeCommittedTokensRow( nodeId string, committedTokens uint64, height int64) NodeCommittedTokensRow
NodeCommittedTokensRow allows to build a new NodeCommittedTokensRow
func (NodeCommittedTokensRow) Equal ¶
func (v NodeCommittedTokensRow) Equal(w NodeCommittedTokensRow) bool
Equal tells whether v and w represent the same rows
type NodeInfoFromAddressRow ¶
type NodeInfoFromAddressRow struct { Address string `db:"address"` NodeInfo string `db:"node_info"` Height int64 `db:"height"` }
NodeInfoFromNodeIDsRow represents a single row of the node_info_from_address table
func NewNodeInfoFromAddressRow ¶
func NewNodeInfoFromAddressRow( address string, nodeInfo string, height int64) NodeInfoFromAddressRow
NodeInfoFromNodeIDsRow allows to build a new NodeInfoFromNodeIDsRow
func (NodeInfoFromAddressRow) Equal ¶
func (v NodeInfoFromAddressRow) Equal(w NodeInfoFromAddressRow) bool
Equal tells whether v and w represent the same rows
type NodeInfosFromTableRow ¶
type NodeInfosFromTableRow struct { Id string `db:"id"` Role uint8 `db:"role"` NetworkingAddress string `db:"networking_address"` NetworkingKey string `db:"networking_key"` StakingKey string `db:"staking_key"` TokensStaked uint64 `db:"tokens_staked"` TokensCommitted uint64 `db:"tokens_committed"` TokensUnstaking uint64 `db:"tokens_unstaking"` TokensUnstaked uint64 `db:"tokens_unstaked"` TokensRewarded uint64 `db:"tokens_rewarded"` Delegators pq.Int32Array `db:"delegators"` DelegatorIDCounter uint32 `db:"delegator_i_d_counter"` TokensRequestedToUnstake uint64 `db:"tokens_requested_to_unstake"` InitialWeight uint64 `db:"initial_weight"` Height uint64 `db:"height"` }
NodeInfosFromTableRow represents a single row of the node_infos_from_table table
func NewNodeInfosFromTableRow ¶
func NewNodeInfosFromTableRow( id string, role uint8, networkingAddress string, networkingKey string, stakingKey string, tokensStaked uint64, tokensCommitted uint64, tokensUnstaking uint64, tokensUnstaked uint64, tokensRewarded uint64, delegators pq.Int32Array, delegatorIDCounter uint32, tokensRequestedToUnstake uint64, initialWeight uint64, height uint64) NodeInfosFromTableRow
func (NodeInfosFromTableRow) Equal ¶
func (v NodeInfosFromTableRow) Equal(w NodeInfosFromTableRow) bool
Equal tells whether v and w represent the same rows
type NodeTotalCommitmentRow ¶
type NodeTotalCommitmentRow struct { NodeId string `db:"node_id"` TotalCommitment uint64 `db:"total_commitment"` Height int64 `db:"height"` }
NodeTotalCommitmentRow represents a single row of the node_total_commitment table
func NewNodeTotalCommitmentRow ¶
func NewNodeTotalCommitmentRow( nodeId string, totalCommitment uint64, height int64) NodeTotalCommitmentRow
NodeTotalCommitmentRow allows to build a new NodeTotalCommitmentRow
func (NodeTotalCommitmentRow) Equal ¶
func (v NodeTotalCommitmentRow) Equal(w NodeTotalCommitmentRow) bool
Equal tells whether v and w represent the same rows
type NodeTotalCommitmentWithoutDelegatorsRow ¶
type NodeTotalCommitmentWithoutDelegatorsRow struct { NodeId string `db:"node_id"` TotalCommitmentWithoutDelegators uint64 `db:"total_commitment_without_delegators"` Height int64 `db:"height"` }
NodeTotalCommitmentWithoutDelegatorsRow represents a single row of the node_total_commitment_without_delegators table
func NewNodeTotalCommitmentWithoutDelegatorsRow ¶
func NewNodeTotalCommitmentWithoutDelegatorsRow( nodeId string, totalCommitmentWithoutDelegators uint64, height int64) NodeTotalCommitmentWithoutDelegatorsRow
NodeTotalCommitmentWithoutDelegatorsRow allows to build a new NodeTotalCommitmentWithoutDelegatorsRow
func (NodeTotalCommitmentWithoutDelegatorsRow) Equal ¶
func (v NodeTotalCommitmentWithoutDelegatorsRow) Equal(w NodeTotalCommitmentWithoutDelegatorsRow) bool
Equal tells whether v and w represent the same rows
type ProposedTableRow ¶
type ProposedTableRow struct { Height int64 `db:"height"` ProposedTable string `db:"proposed_table"` }
ProposedTableRow represents a single row of the proposed_table table
func NewProposedTableRow ¶
func NewProposedTableRow( height int64, proposedTable string) ProposedTableRow
ProposedTableRow allows to build a new ProposedTableRow
func (ProposedTableRow) Equal ¶
func (v ProposedTableRow) Equal(w ProposedTableRow) bool
Equal tells whether v and w represent the same rows
type StakeRequirementsRow ¶
type StakeRequirementsRow struct { Height int64 `db:"height"` Role int8 `db:"role"` Requirements uint64 `db:"requirements"` }
StakeRequirementsRow represents a single row of the stake_requirements table
func NewStakeRequirementsRow ¶
func NewStakeRequirementsRow( height int64, role int8, requirements uint64) StakeRequirementsRow
StakeRequirementsRow allows to build a new StakeRequirementsRow
func (StakeRequirementsRow) Equal ¶
func (v StakeRequirementsRow) Equal(w StakeRequirementsRow) bool
Equal tells whether v and w represent the same rows
type StakerAccountRow ¶
type StakerAccountRow struct { AccountAddress string `db:"account_address"` StakerNodeId string `db:"staker_node_id"` StakerNodeInfo string `db:"staker_node_info"` }
StakerAccountRow represents a single row of the staker_account table
func NewStakerAccountRow ¶
func NewStakerAccountRow( accountAddress string, stakerNodeId string, stakerNodeInfo string) StakerAccountRow
StakerAccountRow allows to build a new StakerAccountRow
func (StakerAccountRow) Equal ¶
func (v StakerAccountRow) Equal(w StakerAccountRow) bool
Equal tells whether v and w represent the same rows
type StakerNodeIdRow ¶
StakerNodeIdRow represents a single row of the staker_node_id table
func NewStakerNodeIdRow ¶
func NewStakerNodeIdRow( address string, nodeId string) StakerNodeIdRow
StakerNodeIdRow allows to build a new StakerNodeIdRow
func (StakerNodeIdRow) Equal ¶
func (v StakerNodeIdRow) Equal(w StakerNodeIdRow) bool
Equal tells whether v and w represent the same rows
type StakingTableRow ¶
type StakingTableRow struct {
NodeId string `db:"node_id"`
}
StakingTableRow represents a single row of the staking_table table
func NewStakingTableRow ¶
func NewStakingTableRow( nodeId string) StakingTableRow
StakingTableRow allows to build a new StakingTableRow
func (StakingTableRow) Equal ¶
func (v StakingTableRow) Equal(w StakingTableRow) bool
Equal tells whether v and w represent the same rows
type SupplyRow ¶
type SupplyRow struct { OneRowId bool `db:"one_row_id"` Height uint64 `db:"height"` Supply uint64 `db:"supply"` }
SupplyRow represents a single row of the supply table
func NewSupplyRow ¶
SupplyRow allows to build a new SupplyRow
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 TotalStakeByTypeRow ¶
type TotalStakeByTypeRow struct { Height int64 `db:"height"` Role int8 `db:"role"` TotalStake uint64 `db:"total_stake"` }
TotalStakeRow represents a single row of the total_stake table
func NewTotalStakeByTypeRow ¶
func NewTotalStakeByTypeRow( height int64, role int8, totalStake uint64) TotalStakeByTypeRow
TotalStakeRow allows to build a new TotalStakeRow
func (TotalStakeByTypeRow) Equal ¶
func (v TotalStakeByTypeRow) Equal(w TotalStakeByTypeRow) bool
Equal tells whether v and w represent the same rows
type TotalStakeRow ¶
TotalStakeRow represents a single row of the total_stake table
func NewTotalStakeRow ¶
func NewTotalStakeRow( height int64, totalStake uint64) TotalStakeRow
TotalStakeRow allows to build a new TotalStakeRow
func (TotalStakeRow) Equal ¶
func (v TotalStakeRow) Equal(w TotalStakeRow) bool
Equal tells whether v and w represent the same rows
type WeeklyPayoutRow ¶
WeeklyPayoutRow represents a single row of the weekly_payout table
func NewWeeklyPayoutRow ¶
func NewWeeklyPayoutRow( height int64, payout uint64) WeeklyPayoutRow
WeeklyPayoutRow allows to build a new WeeklyPayoutRow
func (WeeklyPayoutRow) Equal ¶
func (v WeeklyPayoutRow) Equal(w WeeklyPayoutRow) bool
Equal tells whether v and w represent the same rows