dmodels

package
v0.0.0-...-e01acf0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RangeStateTotalStakingBalance   = "total_staking_balance"
	RangeStateNumberDelegators      = "number_delegators"
	RangeStateNumberMultiDelegators = "number_multi_delegators"
	RangeStateTransfersVolume       = "transfer_volume"
	RangeStateFeeVolume             = "fee_volume"
	RangeStateHighestFee            = "highest_fee"
	RangeStateUndelegationVolume    = "undelegation_volume"
	RangeStateBlockDelay            = "block_delay"
)
View Source
const (
	StatsTotalStakingBalance   = "total_staking_balance"
	StatsNumberDelegators      = "number_delegators"
	StatsTotalDelegators       = "total_delegators"
	StatsNumberMultiDelegators = "number_multi_delegators"
	StatsTransfersVolume       = "transfer_volume"
	StatsFeeVolume             = "fee_volume"
	StatsHighestFee            = "highest_fee"
	StatsUndelegationVolume    = "undelegation_volume"
	StatsBlockDelay            = "block_delay"
	StatsNetworkSize           = "network_size"
	StatsTotalAccounts         = "total_accounts"
	StatsTotalWhaleAccounts    = "total_whale_accounts"
	StatsTotalSmallAccounts    = "total_small_accounts"
	StatsTotalJailers          = "total_jailers"
	StatsValidatorsWith33Power = "validators_with_33_power"
)
View Source
const AccountsTable = "accounts"
View Source
const BalanceUpdatesTable = "balance_updates"
View Source
const BlocksTable = "blocks"
View Source
const DelegationsTable = "delegations"
View Source
const DelegatorRewardsTable = "delegator_rewards"
View Source
const HistoricalStates = "historical_states"
View Source
const HistoryProposalsTable = "history_proposals"
View Source
const JailersTable = "jailers"
View Source
const MissedBlocks = "missed_blocks"
View Source
const ParsersTable = "parsers"
View Source
const ProposalDepositsTable = "proposal_deposits"
View Source
const ProposalVotesTable = "proposal_votes"
View Source
const ProposalsTable = "proposals"
View Source
const RangeStatesTable = "range_states"
View Source
const StatsTable = "stats"
View Source
const TransactionsTable = "transactions"
View Source
const TransfersTable = "transfers"
View Source
const ValidatorRewardsTable = "validator_rewards"
View Source
const ValidatorsTable = "validators"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Address   string          `db:"acc_address"`
	Balance   decimal.Decimal `db:"acc_balance"`
	Stake     decimal.Decimal `db:"acc_stake"`
	Unbonding decimal.Decimal `db:"acc_unbonding"`
	CreatedAt time.Time       `db:"acc_created_at"`
}

type BalanceUpdate

type BalanceUpdate struct {
	ID        string          `db:"bau_id"`
	Address   string          `db:"bau_address"`
	Stake     decimal.Decimal `db:"bau_stake"`
	Balance   decimal.Decimal `db:"bau_balance"`
	Unbonding decimal.Decimal `db:"bau_unbonding"`
	CreatedAt time.Time       `db:"bau_created_at"`
}

type Block

type Block struct {
	ID        uint64    `db:"blk_id"`
	Hash      string    `db:"blk_hash"`
	Proposer  string    `db:"blk_proposer"`
	CreatedAt time.Time `db:"blk_created_at"`
}

type Delegation

type Delegation struct {
	ID        string          `db:"dlg_id"`
	TxHash    string          `db:"dlg_tx_hash"`
	Delegator string          `db:"dlg_delegator"`
	Validator string          `db:"dlg_validator"`
	Amount    decimal.Decimal `db:"dlg_amount"`
	CreatedAt time.Time       `db:"dlg_created_at"`
}

type DelegatorReward

type DelegatorReward struct {
	ID        string          `db:"der_id"`
	TxHash    string          `db:"der_tx_hash"`
	Delegator string          `db:"der_delegator"`
	Validator string          `db:"der_validator"`
	Amount    decimal.Decimal `db:"der_amount"`
	CreatedAt time.Time       `db:"der_created_at"`
}

type HistoricalState

type HistoricalState struct {
	Price             decimal.Decimal `db:"his_price" json:"price"`
	MarketCap         decimal.Decimal `db:"his_market_cap" json:"market_cap"`
	CirculatingSupply decimal.Decimal `db:"his_circulating_supply" json:"circulating_supply"`
	TradingVolume     decimal.Decimal `db:"his_trading_volume" json:"trading_volume"`
	StakedRatio       decimal.Decimal `db:"his_staked_ratio" json:"staked_ratio"`
	InflationRate     decimal.Decimal `db:"his_inflation_rate" json:"inflation_rate"`
	TransactionsCount uint64          `db:"his_transactions_count" json:"transactions_count"`
	CommunityPool     decimal.Decimal `db:"his_community_pool" json:"community_pool"`
	Top20Weight       decimal.Decimal `db:"his_top_20_weight" json:"top20_weight"`
	CreatedAt         Time            `db:"his_created_at" json:"created_at"`
}

type HistoryProposal

type HistoryProposal struct {
	ID          uint64          `db:"hpr_id"`
	TxHash      string          `db:"hpr_tx_hash"`
	Title       string          `db:"hpr_title"`
	Description string          `db:"hpr_description"`
	Recipient   string          `db:"hpr_recipient"`
	Amount      decimal.Decimal `db:"hpr_amount"`
	InitDeposit decimal.Decimal `db:"hpr_init_deposit"`
	Proposer    string          `db:"hpr_proposer"`
	CreatedAt   time.Time       `db:"hpr_created_at"`
}

type Jailer

type Jailer struct {
	ID        string    `db:"jlr_id"`
	Address   string    `db:"jlr_address"`
	CreatedAt time.Time `db:"jlr_created_at"`
}

type MissedBlock

type MissedBlock struct {
	ID        string    `db:"mib_id"`
	Height    uint64    `db:"mib_height"`
	Validator string    `db:"mib_validator"`
	CreatedAt time.Time `db:"mib_created_at"`
}

type Parser

type Parser struct {
	ID     uint64 `db:"par_id"`
	Title  string `db:"par_title"`
	Height uint64 `db:"par_height"`
}

type Proposal

type Proposal struct {
	ID                uint64          `db:"pro_id" json:"id"`
	TxHash            string          `db:"pro_tx_hash" json:"tx_hash"`
	Type              string          `db:"pro_type" json:"type"`
	Proposer          string          `db:"pro_proposer" json:"proposer"`
	ProposerAddress   string          `db:"pro_proposer_address" json:"proposer_address"`
	Title             string          `db:"pro_title" json:"title"`
	Description       string          `db:"pro_description" json:"description"`
	Status            string          `db:"pro_status" json:"status"`
	VotesYes          decimal.Decimal `db:"pro_votes_yes" json:"votes_yes"`
	VotesAbstain      decimal.Decimal `db:"pro_votes_abstain" json:"votes_abstain"`
	VotesNo           decimal.Decimal `db:"pro_votes_no" json:"votes_no"`
	VotesNoWithVeto   decimal.Decimal `db:"pro_votes_no_with_veto" json:"votes_no_with_veto"`
	SubmitTime        Time            `db:"pro_submit_time" json:"submit_time"`
	DepositEndTime    Time            `db:"pro_deposit_end_time" json:"deposit_end_time"`
	TotalDeposits     decimal.Decimal `db:"pro_total_deposits" json:"total_deposits"`
	VotingStartTime   Time            `db:"pro_voting_start_time" json:"voting_start_time"`
	VotingEndTime     Time            `db:"pro_voting_end_time" json:"voting_end_time"`
	Voters            uint64          `db:"pro_voters" json:"voters"`
	ParticipationRate decimal.Decimal `db:"pro_participation_rate" json:"participation_rate"`
	Turnout           decimal.Decimal `db:"pro_turnout" json:"turnout"`
	Activity          json.RawMessage `db:"pro_activity" json:"activity"`
}

type ProposalDeposit

type ProposalDeposit struct {
	ID         string          `db:"prd_id" json:"-"`
	ProposalID uint64          `db:"prd_proposal_id" json:"proposal_id"`
	Depositor  string          `db:"prd_depositor" json:"depositor"`
	Amount     decimal.Decimal `db:"prd_amount" json:"amount"`
	CreatedAt  Time            `db:"prd_created_at" json:"created_at"`
}

type ProposalVote

type ProposalVote struct {
	ID         string `db:"prv_id" json:"-"`
	ProposalID uint64 `db:"prv_proposal_id" json:"proposal_id"`
	Voter      string `db:"prv_voter" json:"voter"`
	TxHash     string `db:"prv_tx_hash" json:"tx_hash"`
	Option     string `db:"prv_option" json:"option"`
	CreatedAt  Time   `db:"prv_created_at" json:"created_at"`
}

type RangeState

type RangeState struct {
	Title     string    `db:"rst_title"`
	Value1d   string    `db:"rst_value_1d"`
	Value7d   string    `db:"rst_value_7d"`
	Value30d  string    `db:"rst_value_30d"`
	Value90d  string    `db:"rst_value_90d"`
	UpdatedAt time.Time `db:"rst_updated_at"`
}

type Stat

type Stat struct {
	ID        string          `db:"stt_id"`
	Title     string          `db:"stt_title"`
	Value     decimal.Decimal `db:"stt_value"`
	CreatedAt time.Time       `db:"stt_created_at"`
}

type Time

type Time struct {
	time.Time
}

func NewTime

func NewTime(t time.Time) Time

func (Time) IsZero

func (t Time) IsZero() bool

IsZero returns true for null strings (omitempty support)

func (Time) MarshalBinary

func (t Time) MarshalBinary() ([]byte, error)

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (*Time) Scan

func (t *Time) Scan(value interface{}) (err error)

Scan implements the Scanner interface. The value type must be time.Time or string / []byte (formatted time-string), otherwise Scan fails.

func (*Time) UnmarshalBinary

func (t *Time) UnmarshalBinary(data []byte) error

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

func (Time) Value

func (t Time) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Transaction

type Transaction struct {
	Hash      string          `db:"trn_hash"`
	Status    bool            `db:"trn_status"`
	Height    uint64          `db:"trn_height"`
	Messages  uint64          `db:"trn_messages"`
	Fee       decimal.Decimal `db:"trn_fee"`
	GasUsed   uint64          `db:"trn_gas_used"`
	GasWanted uint64          `db:"trn_gas_wanted"`
	CreatedAt time.Time       `db:"trn_created_at"`
}

type Transfer

type Transfer struct {
	ID        string          `db:"trf_id"`
	TxHash    string          `db:"trf_tx_hash"`
	From      string          `db:"trf_from"`
	To        string          `db:"trf_to"`
	Amount    decimal.Decimal `db:"trf_amount"`
	CreatedAt time.Time       `db:"trf_created_at"`
}

type Validator

type Validator struct {
	Address         string          `db:"val_address"`
	OperatorAddress string          `db:"val_operator_address"`
	ConsAddress     string          `db:"val_cons_address"`
	ConsPubKey      string          `db:"val_cons_pub_key"`
	Name            string          `db:"val_name"`
	Description     string          `db:"val_description"`
	Commission      decimal.Decimal `db:"val_commission"`
	MinCommission   decimal.Decimal `db:"val_min_commission"`
	MaxCommission   decimal.Decimal `db:"val_max_commission"`
	SelfDelegations decimal.Decimal `db:"val_self_delegations"`
	Delegations     decimal.Decimal `db:"val_delegations"`
	VotingPower     decimal.Decimal `db:"val_voting_power"`
	Website         string          `db:"val_website"`
	Jailed          bool            `db:"val_jailed"`
	CreatedAt       time.Time       `db:"val_created_at"`
}

type ValidatorDelegator

type ValidatorDelegator struct {
	Delegator string          `json:"delegator"`
	Amount    decimal.Decimal `json:"amount"`
	Since     Time            `json:"since"`
	Delta     decimal.Decimal `json:"delta"`
}

type ValidatorReward

type ValidatorReward struct {
	ID        string          `db:"var_id"`
	TxHash    string          `db:"var_tx_hash"`
	Address   string          `db:"var_address"`
	Amount    decimal.Decimal `db:"var_amount"`
	CreatedAt time.Time       `db:"var_created_at"`
}

type ValidatorValue

type ValidatorValue struct {
	Validator string `db:"validator" json:"validator"`
	Value     uint64 `db:"value" json:"value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL