Documentation ¶
Overview ¶
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Package model contains the types for schema 'public'.
Index ¶
- Variables
- type Account
- type App
- type Block
- func BlockByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) (*Block, error)
- func BlockByID(db XODB, id int64) (*Block, error)
- func BlockFilter(db XODB, filter, sort string, offset, limit int64) ([]*Block, error)
- func BlocksByChainID(db XODB, chainID sql.NullString) ([]*Block, error)
- type BlockValidator
- func BlockValidatorByID(db XODB, id int64) (*BlockValidator, error)
- func BlockValidatorFilter(db XODB, filter, sort string, offset, limit int64) ([]*BlockValidator, error)
- func BlockValidatorsByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) ([]*BlockValidator, error)
- func BlockValidatorsByValidatorAddress(db XODB, validatorAddress sql.NullString) ([]*BlockValidator, error)
- func (bv *BlockValidator) Delete(db XODB) error
- func (bv *BlockValidator) Deleted() bool
- func (bv *BlockValidator) Exists() bool
- func (bv *BlockValidator) Insert(db XODB) error
- func (bv *BlockValidator) Save(db XODB) error
- func (bv *BlockValidator) Update(db XODB) error
- func (bv *BlockValidator) Upsert(db XODB) error
- type ConsensusState
- func (cs *ConsensusState) Delete(db XODB) error
- func (cs *ConsensusState) Deleted() bool
- func (cs *ConsensusState) Exists() bool
- func (cs *ConsensusState) Insert(db XODB) error
- func (cs *ConsensusState) Save(db XODB) error
- func (cs *ConsensusState) Update(db XODB) error
- func (cs *ConsensusState) Upsert(db XODB) error
- type Genesi
- type LoginStatus
- func LoginStatusByAccountID(db XODB, accountID sql.NullInt64) (*LoginStatus, error)
- func LoginStatusByID(db XODB, id int64) (*LoginStatus, error)
- func LoginStatusByToken(db XODB, token sql.NullString) (*LoginStatus, error)
- func LoginStatusFilter(db XODB, filter, sort string, offset, limit int64) ([]*LoginStatus, error)
- func (ls *LoginStatus) Account(db XODB) (*Account, error)
- func (ls *LoginStatus) Delete(db XODB) error
- func (ls *LoginStatus) Deleted() bool
- func (ls *LoginStatus) Exists() bool
- func (ls *LoginStatus) Insert(db XODB) error
- func (ls *LoginStatus) Save(db XODB) error
- func (ls *LoginStatus) Update(db XODB) error
- func (ls *LoginStatus) Upsert(db XODB) error
- type Node
- type NodeRoute
- func (nr *NodeRoute) Delete(db XODB) error
- func (nr *NodeRoute) Deleted() bool
- func (nr *NodeRoute) Exists() bool
- func (nr *NodeRoute) Insert(db XODB) error
- func (nr *NodeRoute) Node(db XODB) (*Node, error)
- func (nr *NodeRoute) Save(db XODB) error
- func (nr *NodeRoute) Update(db XODB) error
- func (nr *NodeRoute) Upsert(db XODB) error
- type Peer
- type QmoonStatus
- type ScannerValuer
- type Slice
- type StringSlice
- type TmBlock
- func TmBlockByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) (*TmBlock, error)
- func TmBlockByID(db XODB, id int64) (*TmBlock, error)
- func TmBlockFilter(db XODB, filter, sort string, offset, limit int64) ([]*TmBlock, error)
- func TmBlocksByChainID(db XODB, chainID sql.NullString) ([]*TmBlock, error)
- type TmBlockChain
- func TmBlockChainByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) (*TmBlockChain, error)
- func TmBlockChainByID(db XODB, id int64) (*TmBlockChain, error)
- func TmBlockChainFilter(db XODB, filter, sort string, offset, limit int64) ([]*TmBlockChain, error)
- func TmBlockChainsByChainID(db XODB, chainID sql.NullString) ([]*TmBlockChain, error)
- func (tbc *TmBlockChain) Delete(db XODB) error
- func (tbc *TmBlockChain) Deleted() bool
- func (tbc *TmBlockChain) Exists() bool
- func (tbc *TmBlockChain) Insert(db XODB) error
- func (tbc *TmBlockChain) Save(db XODB) error
- func (tbc *TmBlockChain) Update(db XODB) error
- func (tbc *TmBlockChain) Upsert(db XODB) error
- type Tx
- func TxByChainIDHeightIndex(db XODB, chainID sql.NullString, height sql.NullInt64, index sql.NullInt64) (*Tx, error)
- func TxByID(db XODB, id int64) (*Tx, error)
- func TxFilter(db XODB, filter, sort string, offset, limit int64) ([]*Tx, error)
- func TxesByChainID(db XODB, chainID sql.NullString) ([]*Tx, error)
- func TxesByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) ([]*Tx, error)
- type Validator
- func ValidatorByAddress(db XODB, address sql.NullString) (*Validator, error)
- func ValidatorByID(db XODB, id int64) (*Validator, error)
- func ValidatorFilter(db XODB, filter, sort string, offset, limit int64) ([]*Validator, error)
- func ValidatorsByChainID(db XODB, chainID sql.NullString) ([]*Validator, error)
- type VerifyCode
- type XODB
Constants ¶
This section is empty.
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID int64 `json:"id"` // id Mail sql.NullString `json:"mail"` // mail Name sql.NullString `json:"name"` // name Avatar sql.NullString `json:"avatar"` // avatar Description sql.NullString `json:"description"` // description Status sql.NullInt64 `json:"status"` // status Password sql.NullString `json:"password"` // password CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
Account represents a row from 'public.accounts'.
func AccountByID ¶
AccountByID retrieves a row from 'public.accounts' as a Account.
Generated from index 'accounts_pkey'.
func AccountByMail ¶
func AccountByMail(db XODB, mail sql.NullString) (*Account, error)
AccountByMail retrieves a row from 'public.accounts' as a Account.
Generated from index 'accounts_mail_idx'.
func AccountFilter ¶
AccountsQuery returns offset-limit rows from 'public.accounts' filte by filter, ordered by "id" in descending order.
func (*Account) Deleted ¶
Deleted provides information if the Account has been deleted from the database.
type App ¶
type App struct { ID int64 `json:"id"` // id Name sql.NullString `json:"name"` // name SecretKey sql.NullString `json:"secret_key"` // secret_key Status sql.NullInt64 `json:"status"` // status AccountID sql.NullInt64 `json:"account_id"` // account_id CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
App represents a row from 'public.apps'.
func AppByID ¶
AppByID retrieves a row from 'public.apps' as a App.
Generated from index 'apps_pkey'.
func AppBySecretKey ¶
func AppBySecretKey(db XODB, secretKey sql.NullString) (*App, error)
AppBySecretKey retrieves a row from 'public.apps' as a App.
Generated from index 'apps_secret_key_idx'.
func AppFilter ¶
AppsQuery returns offset-limit rows from 'public.apps' filte by filter, ordered by "id" in descending order.
func AppsByAccountID ¶
AppsByAccountID retrieves a row from 'public.apps' as a App.
Generated from index 'apps_account_id_idx'.
func (*App) Account ¶
Account returns the Account associated with the App's AccountID (account_id).
Generated from foreign key 'apps_account_id_fkey'.
type Block ¶
type Block struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Height sql.NullInt64 `json:"height"` // height NumTxs sql.NullInt64 `json:"num_txs"` // num_txs TotalTxs sql.NullInt64 `json:"total_txs"` // total_txs DataHash sql.NullString `json:"data_hash"` // data_hash ValidatorsHash sql.NullString `json:"validators_hash"` // validators_hash Time pq.NullTime `json:"time"` // time CreatedAt pq.NullTime `json:"created_at"` // created_at ValidatorsNum sql.NullInt64 `json:"validators_num"` // validators_num ValidatorsTotal sql.NullInt64 `json:"validators_total"` // validators_total // contains filtered or unexported fields }
Block represents a row from 'public.blocks'.
func BlockByChainIDHeight ¶
BlockByChainIDHeight retrieves a row from 'public.blocks' as a Block.
Generated from index 'blocks_chain_id_height_idx'.
func BlockByID ¶
BlockByID retrieves a row from 'public.blocks' as a Block.
Generated from index 'blocks_pkey'.
func BlockFilter ¶
BlocksQuery returns offset-limit rows from 'public.blocks' filte by filter, ordered by "id" in descending order.
func BlocksByChainID ¶
func BlocksByChainID(db XODB, chainID sql.NullString) ([]*Block, error)
BlocksByChainID retrieves a row from 'public.blocks' as a Block.
Generated from index 'blocks_chain_id_idx'.
func (*Block) Deleted ¶
Deleted provides information if the Block has been deleted from the database.
type BlockValidator ¶
type BlockValidator struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Height sql.NullInt64 `json:"height"` // height ValidatorAddress sql.NullString `json:"validator_address"` // validator_address ValidatorIndex sql.NullInt64 `json:"validator_index"` // validator_index Type sql.NullInt64 `json:"type"` // type Round sql.NullInt64 `json:"round"` // round Signature sql.NullString `json:"signature"` // signature VotingPower sql.NullInt64 `json:"voting_power"` // voting_power Accum sql.NullInt64 `json:"accum"` // accum Time pq.NullTime `json:"time"` // time CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
BlockValidator represents a row from 'public.block_validators'.
func BlockValidatorByID ¶
func BlockValidatorByID(db XODB, id int64) (*BlockValidator, error)
BlockValidatorByID retrieves a row from 'public.block_validators' as a BlockValidator.
Generated from index 'block_validators_pkey'.
func BlockValidatorFilter ¶
func BlockValidatorFilter(db XODB, filter, sort string, offset, limit int64) ([]*BlockValidator, error)
BlockValidatorsQuery returns offset-limit rows from 'public.block_validators' filte by filter, ordered by "id" in descending order.
func BlockValidatorsByChainIDHeight ¶
func BlockValidatorsByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) ([]*BlockValidator, error)
BlockValidatorsByChainIDHeight retrieves a row from 'public.block_validators' as a BlockValidator.
Generated from index 'block_validators_chain_id_height_idx'.
func BlockValidatorsByValidatorAddress ¶
func BlockValidatorsByValidatorAddress(db XODB, validatorAddress sql.NullString) ([]*BlockValidator, error)
BlockValidatorsByValidatorAddress retrieves a row from 'public.block_validators' as a BlockValidator.
Generated from index 'block_validators_address_idx'.
func (*BlockValidator) Delete ¶
func (bv *BlockValidator) Delete(db XODB) error
Delete deletes the BlockValidator from the database.
func (*BlockValidator) Deleted ¶
func (bv *BlockValidator) Deleted() bool
Deleted provides information if the BlockValidator has been deleted from the database.
func (*BlockValidator) Exists ¶
func (bv *BlockValidator) Exists() bool
Exists determines if the BlockValidator exists in the database.
func (*BlockValidator) Insert ¶
func (bv *BlockValidator) Insert(db XODB) error
Insert inserts the BlockValidator to the database.
func (*BlockValidator) Save ¶
func (bv *BlockValidator) Save(db XODB) error
Save saves the BlockValidator to the database.
func (*BlockValidator) Update ¶
func (bv *BlockValidator) Update(db XODB) error
Update updates the BlockValidator in the database.
func (*BlockValidator) Upsert ¶
func (bv *BlockValidator) Upsert(db XODB) error
Upsert performs an upsert for BlockValidator.
NOTE: PostgreSQL 9.5+ only
type ConsensusState ¶
type ConsensusState struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Height sql.NullString `json:"height"` // height Round sql.NullString `json:"round"` // round Step sql.NullString `json:"step"` // step PrevotesNum sql.NullInt64 `json:"prevotes_num"` // prevotes_num PrevotesValue sql.NullString `json:"prevotes_value"` // prevotes_value PrecommitsNum sql.NullInt64 `json:"precommits_num"` // precommits_num PrecommitsValue sql.NullString `json:"precommits_value"` // precommits_value StartTime sql.NullString `json:"start_time"` // start_time // contains filtered or unexported fields }
ConsensusState represents a row from 'public.consensus_state'.
func ConsensusStateByChainID ¶
func ConsensusStateByChainID(db XODB, chainID sql.NullString) (*ConsensusState, error)
ConsensusStateByChainID retrieves a row from 'public.consensus_state' as a ConsensusState.
Generated from index 'consensus_state_chain_id_idx'.
func ConsensusStateByID ¶
func ConsensusStateByID(db XODB, id int64) (*ConsensusState, error)
ConsensusStateByID retrieves a row from 'public.consensus_state' as a ConsensusState.
Generated from index 'consensus_state_pkey'.
func ConsensusStateFilter ¶
func ConsensusStateFilter(db XODB, filter, sort string, offset, limit int64) ([]*ConsensusState, error)
ConsensusStatesQuery returns offset-limit rows from 'public.consensus_state' filte by filter, ordered by "id" in descending order.
func (*ConsensusState) Delete ¶
func (cs *ConsensusState) Delete(db XODB) error
Delete deletes the ConsensusState from the database.
func (*ConsensusState) Deleted ¶
func (cs *ConsensusState) Deleted() bool
Deleted provides information if the ConsensusState has been deleted from the database.
func (*ConsensusState) Exists ¶
func (cs *ConsensusState) Exists() bool
Exists determines if the ConsensusState exists in the database.
func (*ConsensusState) Insert ¶
func (cs *ConsensusState) Insert(db XODB) error
Insert inserts the ConsensusState to the database.
func (*ConsensusState) Save ¶
func (cs *ConsensusState) Save(db XODB) error
Save saves the ConsensusState to the database.
func (*ConsensusState) Update ¶
func (cs *ConsensusState) Update(db XODB) error
Update updates the ConsensusState in the database.
func (*ConsensusState) Upsert ¶
func (cs *ConsensusState) Upsert(db XODB) error
Upsert performs an upsert for ConsensusState.
NOTE: PostgreSQL 9.5+ only
type Genesi ¶
type Genesi struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id GenesisTime pq.NullTime `json:"genesis_time"` // genesis_time Data sql.NullString `json:"data"` // data CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
Genesi represents a row from 'public.genesis'.
func GenesiByChainID ¶
func GenesiByChainID(db XODB, chainID sql.NullString) (*Genesi, error)
GenesiByChainID retrieves a row from 'public.genesis' as a Genesi.
Generated from index 'genesis_chain_id_idx'.
func GenesiByID ¶
GenesiByID retrieves a row from 'public.genesis' as a Genesi.
Generated from index 'genesis_pkey'.
func GenesiFilter ¶
GenesisQuery returns offset-limit rows from 'public.genesis' filte by filter, ordered by "id" in descending order.
func (*Genesi) Deleted ¶
Deleted provides information if the Genesi has been deleted from the database.
type LoginStatus ¶
type LoginStatus struct { ID int64 `json:"id"` // id AccountID sql.NullInt64 `json:"account_id"` // account_id LoginType sql.NullInt64 `json:"login_type"` // login_type Token sql.NullString `json:"token"` // token ExpiredAt pq.NullTime `json:"expired_at"` // expired_at // contains filtered or unexported fields }
LoginStatus represents a row from 'public.login_status'.
func LoginStatusByAccountID ¶
func LoginStatusByAccountID(db XODB, accountID sql.NullInt64) (*LoginStatus, error)
LoginStatusByAccountID retrieves a row from 'public.login_status' as a LoginStatus.
Generated from index 'login_status_account_id_idx'.
func LoginStatusByID ¶
func LoginStatusByID(db XODB, id int64) (*LoginStatus, error)
LoginStatusByID retrieves a row from 'public.login_status' as a LoginStatus.
Generated from index 'login_status_pkey'.
func LoginStatusByToken ¶
func LoginStatusByToken(db XODB, token sql.NullString) (*LoginStatus, error)
LoginStatusByToken retrieves a row from 'public.login_status' as a LoginStatus.
Generated from index 'login_status_token_idx'.
func LoginStatusFilter ¶
func LoginStatusFilter(db XODB, filter, sort string, offset, limit int64) ([]*LoginStatus, error)
LoginStatussQuery returns offset-limit rows from 'public.login_status' filte by filter, ordered by "id" in descending order.
func (*LoginStatus) Account ¶
func (ls *LoginStatus) Account(db XODB) (*Account, error)
Account returns the Account associated with the LoginStatus's AccountID (account_id).
Generated from foreign key 'login_status_account_id_fkey'.
func (*LoginStatus) Delete ¶
func (ls *LoginStatus) Delete(db XODB) error
Delete deletes the LoginStatus from the database.
func (*LoginStatus) Deleted ¶
func (ls *LoginStatus) Deleted() bool
Deleted provides information if the LoginStatus has been deleted from the database.
func (*LoginStatus) Exists ¶
func (ls *LoginStatus) Exists() bool
Exists determines if the LoginStatus exists in the database.
func (*LoginStatus) Insert ¶
func (ls *LoginStatus) Insert(db XODB) error
Insert inserts the LoginStatus to the database.
func (*LoginStatus) Save ¶
func (ls *LoginStatus) Save(db XODB) error
Save saves the LoginStatus to the database.
func (*LoginStatus) Update ¶
func (ls *LoginStatus) Update(db XODB) error
Update updates the LoginStatus in the database.
func (*LoginStatus) Upsert ¶
func (ls *LoginStatus) Upsert(db XODB) error
Upsert performs an upsert for LoginStatus.
NOTE: PostgreSQL 9.5+ only
type Node ¶
type Node struct { ID int64 `json:"id"` // id Name sql.NullString `json:"name"` // name BaseURL sql.NullString `json:"base_url"` // base_url SecretKey sql.NullString `json:"secret_key"` // secret_key ChainID sql.NullString `json:"chain_id"` // chain_id GenesisID sql.NullInt64 `json:"genesis_id"` // genesis_id CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
Node represents a row from 'public.nodes'.
func NodeByID ¶
NodeByID retrieves a row from 'public.nodes' as a Node.
Generated from index 'nodes_pkey'.
func NodeByName ¶
func NodeByName(db XODB, name sql.NullString) (*Node, error)
NodeByName retrieves a row from 'public.nodes' as a Node.
Generated from index 'nodes_name_idx'.
func NodeFilter ¶
NodesQuery returns offset-limit rows from 'public.nodes' filte by filter, ordered by "id" in descending order.
func NodesByGenesisID ¶
NodesByGenesisID retrieves a row from 'public.nodes' as a Node.
Generated from index 'nodes_genesis_id_idx'.
type NodeRoute ¶
type NodeRoute struct { ID int64 `json:"id"` // id NodeID sql.NullInt64 `json:"node_id"` // node_id Route sql.NullString `json:"route"` // route Hidden sql.NullBool `json:"hidden"` // hidden // contains filtered or unexported fields }
NodeRoute represents a row from 'public.node_route'.
func NodeRouteByID ¶
NodeRouteByID retrieves a row from 'public.node_route' as a NodeRoute.
Generated from index 'node_route_pkey'.
func NodeRouteFilter ¶
NodeRoutesQuery returns offset-limit rows from 'public.node_route' filte by filter, ordered by "id" in descending order.
func NodeRoutesByNodeID ¶
NodeRoutesByNodeID retrieves a row from 'public.node_route' as a NodeRoute.
Generated from index 'node_route_node_id_idx'.
func (*NodeRoute) Deleted ¶
Deleted provides information if the NodeRoute has been deleted from the database.
func (*NodeRoute) Node ¶
Node returns the Node associated with the NodeRoute's NodeID (node_id).
Generated from foreign key 'node_route_node_id_fkey'.
type Peer ¶
type Peer struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Moniker sql.NullString `json:"moniker"` // moniker PeerID sql.NullString `json:"peer_id"` // peer_id ListenAddr sql.NullString `json:"listen_addr"` // listen_addr Network sql.NullString `json:"network"` // network Version sql.NullString `json:"version"` // version Channels sql.NullString `json:"channels"` // channels SendStart pq.NullTime `json:"send_start"` // send_start RecvStart pq.NullTime `json:"recv_start"` // recv_start CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
Peer represents a row from 'public.peers'.
func PeerByID ¶
PeerByID retrieves a row from 'public.peers' as a Peer.
Generated from index 'peers_pkey'.
func PeerByPeerID ¶
func PeerByPeerID(db XODB, peerID sql.NullString) (*Peer, error)
PeerByPeerID retrieves a row from 'public.peers' as a Peer.
Generated from index 'peers_peer_id_idx'.
func PeerFilter ¶
PeersQuery returns offset-limit rows from 'public.peers' filte by filter, ordered by "id" in descending order.
func PeersByChainID ¶
func PeersByChainID(db XODB, chainID sql.NullString) ([]*Peer, error)
PeersByChainID retrieves a row from 'public.peers' as a Peer.
Generated from index 'peers_chain_id_idx'.
type QmoonStatus ¶
type QmoonStatus struct { ID int64 `json:"id"` // id Key sql.NullString `json:"key"` // key Value sql.NullString `json:"value"` // value // contains filtered or unexported fields }
QmoonStatus represents a row from 'public.qmoon_status'.
func QmoonStatusByID ¶
func QmoonStatusByID(db XODB, id int64) (*QmoonStatus, error)
QmoonStatusByID retrieves a row from 'public.qmoon_status' as a QmoonStatus.
Generated from index 'qmoon_status_pkey'.
func QmoonStatusByKey ¶
func QmoonStatusByKey(db XODB, key sql.NullString) (*QmoonStatus, error)
QmoonStatusByKey retrieves a row from 'public.qmoon_status' as a QmoonStatus.
Generated from index 'qmoon_status_key_idx'.
func QmoonStatusFilter ¶
func QmoonStatusFilter(db XODB, filter, sort string, offset, limit int64) ([]*QmoonStatus, error)
QmoonStatussQuery returns offset-limit rows from 'public.qmoon_status' filte by filter, ordered by "id" in descending order.
func (*QmoonStatus) Delete ¶
func (qs *QmoonStatus) Delete(db XODB) error
Delete deletes the QmoonStatus from the database.
func (*QmoonStatus) Deleted ¶
func (qs *QmoonStatus) Deleted() bool
Deleted provides information if the QmoonStatus has been deleted from the database.
func (*QmoonStatus) Exists ¶
func (qs *QmoonStatus) Exists() bool
Exists determines if the QmoonStatus exists in the database.
func (*QmoonStatus) Insert ¶
func (qs *QmoonStatus) Insert(db XODB) error
Insert inserts the QmoonStatus to the database.
func (*QmoonStatus) Save ¶
func (qs *QmoonStatus) Save(db XODB) error
Save saves the QmoonStatus to the database.
func (*QmoonStatus) Update ¶
func (qs *QmoonStatus) Update(db XODB) error
Update updates the QmoonStatus in the database.
func (*QmoonStatus) Upsert ¶
func (qs *QmoonStatus) Upsert(db XODB) error
Upsert performs an upsert for QmoonStatus.
NOTE: PostgreSQL 9.5+ only
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type TmBlock ¶
type TmBlock struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Height sql.NullInt64 `json:"height"` // height Data sql.NullString `json:"data"` // data CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
TmBlock represents a row from 'public.tm_blocks'.
func TmBlockByChainIDHeight ¶
func TmBlockByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) (*TmBlock, error)
TmBlockByChainIDHeight retrieves a row from 'public.tm_blocks' as a TmBlock.
Generated from index 'tm_blocks_chain_id_height_idx'.
func TmBlockByID ¶
TmBlockByID retrieves a row from 'public.tm_blocks' as a TmBlock.
Generated from index 'tm_blocks_pkey'.
func TmBlockFilter ¶
TmBlocksQuery returns offset-limit rows from 'public.tm_blocks' filte by filter, ordered by "id" in descending order.
func TmBlocksByChainID ¶
func TmBlocksByChainID(db XODB, chainID sql.NullString) ([]*TmBlock, error)
TmBlocksByChainID retrieves a row from 'public.tm_blocks' as a TmBlock.
Generated from index 'tm_blocks_chain_id_idx'.
func (*TmBlock) Deleted ¶
Deleted provides information if the TmBlock has been deleted from the database.
type TmBlockChain ¶
type TmBlockChain struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Height sql.NullInt64 `json:"height"` // height NumTxs sql.NullInt64 `json:"num_txs"` // num_txs Data sql.NullString `json:"data"` // data Time pq.NullTime `json:"time"` // time CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
TmBlockChain represents a row from 'public.tm_block_chain'.
func TmBlockChainByChainIDHeight ¶
func TmBlockChainByChainIDHeight(db XODB, chainID sql.NullString, height sql.NullInt64) (*TmBlockChain, error)
TmBlockChainByChainIDHeight retrieves a row from 'public.tm_block_chain' as a TmBlockChain.
Generated from index 'tm_block_chain_chain_id_height_idx'.
func TmBlockChainByID ¶
func TmBlockChainByID(db XODB, id int64) (*TmBlockChain, error)
TmBlockChainByID retrieves a row from 'public.tm_block_chain' as a TmBlockChain.
Generated from index 'tm_block_chain_pkey'.
func TmBlockChainFilter ¶
func TmBlockChainFilter(db XODB, filter, sort string, offset, limit int64) ([]*TmBlockChain, error)
TmBlockChainsQuery returns offset-limit rows from 'public.tm_block_chain' filte by filter, ordered by "id" in descending order.
func TmBlockChainsByChainID ¶
func TmBlockChainsByChainID(db XODB, chainID sql.NullString) ([]*TmBlockChain, error)
TmBlockChainsByChainID retrieves a row from 'public.tm_block_chain' as a TmBlockChain.
Generated from index 'tm_block_chain_chain_id_idx'.
func (*TmBlockChain) Delete ¶
func (tbc *TmBlockChain) Delete(db XODB) error
Delete deletes the TmBlockChain from the database.
func (*TmBlockChain) Deleted ¶
func (tbc *TmBlockChain) Deleted() bool
Deleted provides information if the TmBlockChain has been deleted from the database.
func (*TmBlockChain) Exists ¶
func (tbc *TmBlockChain) Exists() bool
Exists determines if the TmBlockChain exists in the database.
func (*TmBlockChain) Insert ¶
func (tbc *TmBlockChain) Insert(db XODB) error
Insert inserts the TmBlockChain to the database.
func (*TmBlockChain) Save ¶
func (tbc *TmBlockChain) Save(db XODB) error
Save saves the TmBlockChain to the database.
func (*TmBlockChain) Update ¶
func (tbc *TmBlockChain) Update(db XODB) error
Update updates the TmBlockChain in the database.
func (*TmBlockChain) Upsert ¶
func (tbc *TmBlockChain) Upsert(db XODB) error
Upsert performs an upsert for TmBlockChain.
NOTE: PostgreSQL 9.5+ only
type Tx ¶
type Tx struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Height sql.NullInt64 `json:"height"` // height TxType sql.NullString `json:"tx_type"` // tx_type Index sql.NullInt64 `json:"index"` // index Maxgas sql.NullInt64 `json:"maxgas"` // maxgas QcpFrom sql.NullString `json:"qcp_from"` // qcp_from QcpTo sql.NullString `json:"qcp_to"` // qcp_to QcpSequence sql.NullInt64 `json:"qcp_sequence"` // qcp_sequence QcpTxindex sql.NullInt64 `json:"qcp_txindex"` // qcp_txindex QcpIsresult sql.NullBool `json:"qcp_isresult"` // qcp_isresult OriginTx sql.NullString `json:"origin_tx"` // origin_tx JSONTx sql.NullString `json:"json_tx"` // json_tx Time pq.NullTime `json:"time"` // time CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
Tx represents a row from 'public.txs'.
func TxByChainIDHeightIndex ¶
func TxByChainIDHeightIndex(db XODB, chainID sql.NullString, height sql.NullInt64, index sql.NullInt64) (*Tx, error)
TxByChainIDHeightIndex retrieves a row from 'public.txs' as a Tx.
Generated from index 'txs_chain_id_height_index_idx'.
func TxFilter ¶
TxsQuery returns offset-limit rows from 'public.txs' filte by filter, ordered by "id" in descending order.
func TxesByChainID ¶
func TxesByChainID(db XODB, chainID sql.NullString) ([]*Tx, error)
TxesByChainID retrieves a row from 'public.txs' as a Tx.
Generated from index 'txs_chain_id_idx'.
func TxesByChainIDHeight ¶
TxesByChainIDHeight retrieves a row from 'public.txs' as a Tx.
Generated from index 'txs_chain_id_height_idx'.
type Validator ¶
type Validator struct { ID int64 `json:"id"` // id ChainID sql.NullString `json:"chain_id"` // chain_id Address sql.NullString `json:"address"` // address PubKeyType sql.NullString `json:"pub_key_type"` // pub_key_type PubKeyValue sql.NullString `json:"pub_key_value"` // pub_key_value VotingPower sql.NullInt64 `json:"voting_power"` // voting_power Accum sql.NullInt64 `json:"accum"` // accum FirstBlockHeight sql.NullInt64 `json:"first_block_height"` // first_block_height FirstBlockTime pq.NullTime `json:"first_block_time"` // first_block_time CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
Validator represents a row from 'public.validators'.
func ValidatorByAddress ¶
func ValidatorByAddress(db XODB, address sql.NullString) (*Validator, error)
ValidatorByAddress retrieves a row from 'public.validators' as a Validator.
Generated from index 'validators_address_idx'.
func ValidatorByID ¶
ValidatorByID retrieves a row from 'public.validators' as a Validator.
Generated from index 'validators_pkey'.
func ValidatorFilter ¶
ValidatorsQuery returns offset-limit rows from 'public.validators' filte by filter, ordered by "id" in descending order.
func ValidatorsByChainID ¶
func ValidatorsByChainID(db XODB, chainID sql.NullString) ([]*Validator, error)
ValidatorsByChainID retrieves a row from 'public.validators' as a Validator.
Generated from index 'validators_chain_id_idx'.
func (*Validator) Deleted ¶
Deleted provides information if the Validator has been deleted from the database.
type VerifyCode ¶
type VerifyCode struct { ID int64 `json:"id"` // id Email sql.NullString `json:"email"` // email Code sql.NullString `json:"code"` // code CreatedAt pq.NullTime `json:"created_at"` // created_at // contains filtered or unexported fields }
VerifyCode represents a row from 'public.verify_code'.
func VerifyCodeByEmail ¶
func VerifyCodeByEmail(db XODB, email sql.NullString) (*VerifyCode, error)
VerifyCodeByEmail retrieves a row from 'public.verify_code' as a VerifyCode.
Generated from index 'verify_email_idx'.
func VerifyCodeByID ¶
func VerifyCodeByID(db XODB, id int64) (*VerifyCode, error)
VerifyCodeByID retrieves a row from 'public.verify_code' as a VerifyCode.
Generated from index 'verify_code_pkey'.
func VerifyCodeFilter ¶
func VerifyCodeFilter(db XODB, filter, sort string, offset, limit int64) ([]*VerifyCode, error)
VerifyCodesQuery returns offset-limit rows from 'public.verify_code' filte by filter, ordered by "id" in descending order.
func (*VerifyCode) Delete ¶
func (vc *VerifyCode) Delete(db XODB) error
Delete deletes the VerifyCode from the database.
func (*VerifyCode) Deleted ¶
func (vc *VerifyCode) Deleted() bool
Deleted provides information if the VerifyCode has been deleted from the database.
func (*VerifyCode) Exists ¶
func (vc *VerifyCode) Exists() bool
Exists determines if the VerifyCode exists in the database.
func (*VerifyCode) Insert ¶
func (vc *VerifyCode) Insert(db XODB) error
Insert inserts the VerifyCode to the database.
func (*VerifyCode) Save ¶
func (vc *VerifyCode) Save(db XODB) error
Save saves the VerifyCode to the database.
func (*VerifyCode) Update ¶
func (vc *VerifyCode) Update(db XODB) error
Update updates the VerifyCode in the database.
func (*VerifyCode) Upsert ¶
func (vc *VerifyCode) Upsert(db XODB) error
Upsert performs an upsert for VerifyCode.
NOTE: PostgreSQL 9.5+ only
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.