Documentation ¶
Index ¶
- Constants
- Variables
- type CoinTx
- type MgoBackend
- func (m *MgoBackend) Init(url string)
- func (m *MgoBackend) QueryCoinTxs() []CoinTx
- func (m *MgoBackend) QueryCoinTxsByAccount(account string) []CoinTx
- func (m *MgoBackend) QueryCoinTxsByFrom(from string) []CoinTx
- func (m *MgoBackend) QueryLastedBlock() (SyncBlock, error)
- func (m *MgoBackend) QueryPageCoinTxsByFrom(from string, page int) []CoinTx
- func (m *MgoBackend) QueryStakeTxs() []StakeTx
- func (m *MgoBackend) QueryStakeTxsByAccount(account string) []StakeTx
- func (m *MgoBackend) Save(tx TxHander) error
- func (m *MgoBackend) UpdateBlock(b SyncBlock) error
- type StakeTx
- type SyncBlock
- type TxHander
Constants ¶
View Source
const ( DbCosmosTxn = "cosmos_txn" TbNmCoinTx = "coin_tx" TbNmStakeTx = "stake_tx" TbNmSyncBlock = "sync_block" PageSize = 10 )
Variables ¶
View Source
var Mgo = MgoBackend{}
Functions ¶
This section is empty.
Types ¶
type CoinTx ¶
type MgoBackend ¶
type MgoBackend struct {
Session *mgo.Session
}
func (*MgoBackend) Init ¶
func (m *MgoBackend) Init(url string)
func (*MgoBackend) QueryCoinTxs ¶
func (m *MgoBackend) QueryCoinTxs() []CoinTx
func (*MgoBackend) QueryCoinTxsByAccount ¶
func (m *MgoBackend) QueryCoinTxsByAccount(account string) []CoinTx
func (*MgoBackend) QueryCoinTxsByFrom ¶
func (m *MgoBackend) QueryCoinTxsByFrom(from string) []CoinTx
func (*MgoBackend) QueryLastedBlock ¶
func (m *MgoBackend) QueryLastedBlock() (SyncBlock, error)
func (*MgoBackend) QueryPageCoinTxsByFrom ¶
func (m *MgoBackend) QueryPageCoinTxsByFrom(from string, page int) []CoinTx
func (*MgoBackend) QueryStakeTxs ¶
func (m *MgoBackend) QueryStakeTxs() []StakeTx
func (*MgoBackend) QueryStakeTxsByAccount ¶
func (m *MgoBackend) QueryStakeTxsByAccount(account string) []StakeTx
func (*MgoBackend) Save ¶
func (m *MgoBackend) Save(tx TxHander) error
func (*MgoBackend) UpdateBlock ¶
func (m *MgoBackend) UpdateBlock(b SyncBlock) error
type StakeTx ¶
Click to show internal directories.
Click to hide internal directories.