Documentation
¶
Index ¶
- Variables
- type Config
- type Manager
- func (m *Manager) BlockEvent(blockNum int64, blockId string)
- func (m *Manager) DumpDb()
- func (m *Manager) GetTransferInfo(txHash string) (tx *types.TransferInfo, err error)
- func (m *Manager) GetTransfersByAddress(address string) (txs []*types.TransferInfo, err error)
- func (m *Manager) TransactionEvent(transactionInfo *types.TransferInfo)
- type ManagerOption
- type TransferInfoCachedRecord
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConfigStorageEmpty = errors.New("config storage is empty") ErrUnknownTransaction = errors.New("unknown transaction") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(options ...ManagerOption) (*Manager, error)
func (*Manager) BlockEvent ¶
func (*Manager) GetTransferInfo ¶
func (m *Manager) GetTransferInfo(txHash string) (tx *types.TransferInfo, err error)
func (*Manager) GetTransfersByAddress ¶
func (m *Manager) GetTransfersByAddress(address string) (txs []*types.TransferInfo, err error)
func (*Manager) TransactionEvent ¶
func (m *Manager) TransactionEvent(transactionInfo *types.TransferInfo)
type ManagerOption ¶
func WithConfigStorage ¶
func WithConfigStorage(storage storage.BinStorage) ManagerOption
func WithTxStorage ¶
func WithTxStorage(storage *storage.BadgerHoldStorage) ManagerOption
type TransferInfoCachedRecord ¶
type TransferInfoCachedRecord struct {
TxID string `json:"txId" badgerhold:"key"`
Timestamp int64 `json:"timestamp"`
BlockNum int `json:"blockNum"`
Success bool `json:"success"`
Transfer bool `json:"transfer"`
NativeCoin bool `json:"nativeCoin,omitempty"`
Symbol string `json:"symbol,omitempty"`
SmartContract bool `json:"smartContract,omitempty"`
From string `json:"from" storm:"index"`
To string `json:"to" storm:"index"`
Fee *big.Int `json:"fee"`
Amount *big.Int `json:"amount"`
Token string `json:"token,omitempty"`
TokenSymbol string `json:"tokenSymbol,omitempty"`
InPool bool `json:"inPool"`
Confirmed bool `json:"confirmed"`
Confirmations int `json:"confirmations"`
Decimals int `json:"decimals"`
ChainSpecificData []byte `json:"chainSpecificData,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.