Documentation ¶
Index ¶
- func NewDBSignatures(signaturesList []types.TxSignatures) []string
- func ToNullString(value string) sql.NullString
- func ToString(value sql.NullString) string
- type BlockRow
- type DbCoin
- type DbCoins
- type GenesisRow
- type TokenPriceRow
- type TokenRow
- type TokenUnitRow
- type ValidatorCommissionRow
- type ValidatorDescriptionRow
- type ValidatorStatusRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDBSignatures ¶
func NewDBSignatures(signaturesList []types.TxSignatures) []string
NewDBSignatures returns signatures in string array
func ToNullString ¶
func ToNullString(value string) sql.NullString
func ToString ¶
func ToString(value sql.NullString) string
Types ¶
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 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 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"` }
GenesisRow represents a single genesis row stored inside the database
func NewGenesisRow ¶
func NewGenesisRow(chainID string, time time.Time, initialHeight int64) GenesisRow
NewGenesisRow allows to create new GenesisRow instance
func (GenesisRow) Equal ¶
func (v GenesisRow) Equal(w GenesisRow) bool
Equal tells whether v and w represent the same rows
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"` }
TokenUnitRow represents a single token unit row stored inside the database
type ValidatorCommissionRow ¶
type ValidatorCommissionRow struct { OperatorAddress string `db:"validator_address"` SelfDelegateAddress string `db:"self_delegate_address"` Commission string `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, selfDelegateAddress, commission, minSelfDelegation string, height int64, ) ValidatorCommissionRow
NewValidatorCommissionRow allows to build new ValidatorCommissionRow instance
func (ValidatorCommissionRow) Equal ¶
func (v ValidatorCommissionRow) Equal(w ValidatorCommissionRow) bool
Equal tells whether v and w represent the same rows
type ValidatorDescriptionRow ¶
type ValidatorDescriptionRow struct { ValAddress string `db:"validator_address"` SelfDelegateAddress string `db:"self_delegate_address"` Moniker sql.NullString `db:"moniker"` Identity sql.NullString `db:"identity"` Details sql.NullString `db:"details"` Height int64 `db:"height"` }
ValidatorDescriptionRow represent a single row in validator_description database table.
func NewValidatorDescriptionRow ¶
func NewValidatorDescriptionRow( valAddress, selfDelegateAddress, moniker, identity, details string, height int64, ) ValidatorDescriptionRow
NewValidatorDescriptionRow allows to build new ValidatorDescriptionRow instance
func (ValidatorDescriptionRow) Equal ¶
func (v ValidatorDescriptionRow) Equal(w ValidatorDescriptionRow) bool
Equal tells whether v and w represent the same rows
type ValidatorStatusRow ¶
type ValidatorStatusRow struct { ConsAddress string `db:"validator_address"` SelfDelegateAddress string `db:"self_delegate_address"` InActiveSet string `db:"in_active_set"` Jailed string `db:"jailed"` Tombstoned string `db:"tombstoned"` Height int64 `db:"height"` }
ValidatorStatusRow represents a single row of the validator_status table
func NewValidatorStatusRow ¶
func NewValidatorStatusRow(consAddess, selfDelegateAddress, inActiveSet, jailed, tombstoned 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