Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { ID int32 `json:"id" sql:",pk"` Height int64 `json:"height" sql:",notnull"` Proposer string `json:"proposer" sql:",notnull"` Moniker string `json:"moniker" sql:",notnull"` BlockHash string `json:"block_hash" sql:",notnull,unique"` ParentHash string `json:"parent_hash" sql:",notnull"` NumPrecommits int64 `json:"num_pre_commits" sql:",notnull"` NumTxs int64 `json:"num_txs" sql:"default:0"` TotalTxs int64 `json:"total_txs" sql:"default:0"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
Block defines the structure for block information.
type PreCommit ¶
type PreCommit struct { ID int32 `json:"id" sql:",pk"` Height int64 `json:"height" sql:",notnull"` Round int `json:"round" sql:",notnull"` ValidatorAddress string `json:"validator_address" sql:",notnull"` VotingPower int64 `json:"voting_power" sql:",notnull"` ProposerPriority int64 `json:"proposer_priority" sql:",notnull"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
PreCommit defines the schema for precommit state information.
type StatAssetInfoList1H ¶
type StatAssetInfoList1H struct { ID int32 `json:"id" sql:",pk"` TotalNum int `json:"total_num"` Name string `json:"name" sql:",notnull"` Asset string `json:"asset" sql:",notnull"` Owner string `json:"owner" sql:",notnull"` Price float64 `json:"price"` Currency string `json:"currency"` ChangeRange float64 `json:"change_range"` Supply float64 `json:"supply" sql:",notnull"` Marketcap float64 `json:"marketcap" sql:",notnull"` AssetImg string `json:"asset_img" sql:",notnull"` AssetCreateTime int64 `json:"asset_create_time"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
StatAssetInfoList1H defines the schema for asset statistics in an hourly basis
type StatAssetInfoList24H ¶
type StatAssetInfoList24H struct { ID int32 `json:"id" sql:",pk"` TotalNum int `json:"total_num"` Name string `json:"name" sql:",notnull"` Asset string `json:"asset" sql:",notnull"` Owner string `json:"owner" sql:",notnull"` Price float64 `json:"price"` Currency string `json:"currency"` ChangeRange float64 `json:"change_range"` Supply float64 `json:"supply" sql:",notnull"` Marketcap float64 `json:"marketcap" sql:",notnull"` AssetImg string `json:"asset_img" sql:",notnull"` AssetCreateTime int64 `json:"asset_create_time"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
StatAssetInfoList24H defines the schema for asset statistics in 24 hourly basis
type Transaction ¶
type Transaction struct { ID int32 `json:"id" sql:",pk"` Height int64 `json:"height" sql:",notnull"` TxHash string `json:"tx_hash" sql:",notnull,unique"` Code uint32 `json:"code" sql:",notnull"` // https://docs.binance.org/exchange-integration.html#important-ensuring-transaction-finality Messages string `json:"messages" sql:"type:jsonb, notnull, default: '[]'::jsonb"` Signatures string `json:"signautures" sql:"type:jsonb, notnull, default: '[]'::jsonb"` Memo string `json:"memo"` GasWanted int64 `json:"gas_wanted" sql:"default:0"` GasUsed int64 `json:"gas_used" sql:"default:0"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
Transaction defines the structure for transaction information.
func NewTransaction ¶
func NewTransaction(t Transaction) *Transaction
NewTransaction returns a new Transaction.
type Validator ¶
type Validator struct { ID int32 `json:"id" sql:",pk"` Moniker string `json:"moniker"` AccountAddress string `json:"account_address" sql:",notnull, unique"` OperatorAddress string `json:"operator_address" sql:",notnull, unique"` ConsensusAddress string `json:"consensus_address" sql:",notnull, unique"` Jailed bool `json:"jailed"` Status string `json:"status"` Tokens string `json:"tokens"` VotingPower int64 `json:"voting_power"` BondHeight int64 `json:"bond_height" sql:"default:0"` BondIntraTxCounter int64 `json:"bond_intra_tx_counter" sql:"default:0"` UnbondingHeight int64 `json:"unbonding_height" sql:"default:0"` UnbondingTime string `json:"unbonding_time"` CommissionRate string `json:"commission_rate"` CommissionMaxRate string `json:"commission_max_rate"` CommissionMaxChangeRate string `json:"commission_max_change_rate"` CommissionUpdateTime string `json:"commission_update_time"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
Validator defines the structure for validator information.
Click to show internal directories.
Click to hide internal directories.