Documentation ¶
Index ¶
- type Config
- type MongoDB
- func (m *MongoDB) AccountsByBalance(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) AccountsByLastSeen(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) AddAccount(a *models.Account) error
- func (m *MongoDB) AddBlock(b *models.Block) error
- func (m *MongoDB) AddContractCall(tx *models.Transaction) error
- func (m *MongoDB) AddDeployedContract(tx *models.Transaction) error
- func (m *MongoDB) AddEnodes(e *models.Enode) error
- func (m *MongoDB) AddForkedBlock(b *models.Block) error
- func (m *MongoDB) AddInternalTransaction(itxn *models.ITransaction) error
- func (m *MongoDB) AddMultiSeriesChart(name string, series map[string]map[string]uint, stamps []string) error
- func (m *MongoDB) AddNumberChart(name string, series []uint64, stamps []string) error
- func (m *MongoDB) AddNumberStringChart(name string, series []string, stamps []string) error
- func (m *MongoDB) AddTokenTransfer(tt *models.TokenTransfer) error
- func (m *MongoDB) AddTransaction(tx *models.Transaction) error
- func (m *MongoDB) AddUncle(u *models.Uncle) error
- func (m *MongoDB) BlockByHash(hash string) (models.Block, error)
- func (m *MongoDB) BlockByNumber(number uint64) (models.Block, error)
- func (m *MongoDB) C(coll string) *mongo.Collection
- func (m *MongoDB) ContractTransferCount(address string) (int64, error)
- func (m *MongoDB) ForkedBlockByNumber(number uint64) (models.Block, error)
- func (m *MongoDB) GetMultiSeriesChart(name string, limit int) (models.MultiSeriesChart, error)
- func (m *MongoDB) GetNumberChart(name string, limit int) (models.NumberChart, error)
- func (m *MongoDB) GetNumberStringChart(name string, limit int) (models.NumberStringChart, error)
- func (m *MongoDB) ITxnCount(address string) (int64, error)
- func (m *MongoDB) Init(rpc *rpc.RPCClient)
- func (m *MongoDB) IsEnodePresent(id string) bool
- func (m *MongoDB) IsFirstRun() bool
- func (m *MongoDB) IterBlocks(from, to int64) (*mongo.Cursor, error)
- func (m *MongoDB) IterForkedBlocks(from, to int64) (*mongo.Cursor, error)
- func (m *MongoDB) IterTokenTransfers(from, to int64) (*mongo.Cursor, error)
- func (m *MongoDB) IterTransactions(from, to int64) (*mongo.Cursor, error)
- func (m *MongoDB) IterUncles(from, to int64) (*mongo.Cursor, error)
- func (m *MongoDB) LatestBlock() (models.Block, error)
- func (m *MongoDB) LatestBlocks(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestContractCalls(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestContractsDeployed(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestFailedTransactions(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestForkedBlocks(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestITransactionsByAccount(hash string) (map[string]interface{}, error)
- func (m *MongoDB) LatestMinedBlocks(account string, limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestTokenTransfers(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestTokenTransfersByAccount(account string) (map[string]interface{}, error)
- func (m *MongoDB) LatestTransactions(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) LatestTransactionsByAccount(hash string) (map[string]interface{}, error)
- func (m *MongoDB) LatestTransfersOfToken(hash string) (map[string]interface{}, error)
- func (m *MongoDB) LatestTxHashes(n int, startBlock uint64) ([]string, []int64, error)
- func (m *MongoDB) LatestTxTrace() (models.ITransaction, error)
- func (m *MongoDB) LatestUncles(limit int64) (map[string]interface{}, error)
- func (m *MongoDB) ListCharts() ([]string, error)
- func (m *MongoDB) Ping() error
- func (m *MongoDB) PurgeBlock(height uint64) error
- func (m *MongoDB) Status() (models.Store, error)
- func (m *MongoDB) TokenTransfersByAccount(account string) ([]models.TokenTransfer, error)
- func (m *MongoDB) TokenTransfersByAccountCount(account string) (int64, error)
- func (m *MongoDB) TotalAccountCount() (int64, error)
- func (m *MongoDB) TotalBlockCount() (int64, error)
- func (m *MongoDB) TotalContractCallsCount() (int64, error)
- func (m *MongoDB) TotalContractsDeployedCount() (int64, error)
- func (m *MongoDB) TotalForkedBlockCount() (int64, error)
- func (m *MongoDB) TotalTransferCount() (int64, error)
- func (m *MongoDB) TotalTxnCount() (int64, error)
- func (m *MongoDB) TotalUncleCount() (int64, error)
- func (m *MongoDB) TransactionByContractAddress(address string) (models.Transaction, error)
- func (m *MongoDB) TransactionByHash(hash string) (models.Transaction, error)
- func (m *MongoDB) TransactionsByBlockNumber(number uint64) ([]models.Transaction, error)
- func (m *MongoDB) TransfersByContract(address string) ([]models.TokenTransfer, error)
- func (m *MongoDB) TransfersOfTokenByAccount(token string, account string) ([]models.TokenTransfer, error)
- func (m *MongoDB) TransfersOfTokenByAccountCount(token string, account string) (int64, error)
- func (m *MongoDB) TxTrace(hash string) (models.ITransaction, error)
- func (m *MongoDB) TxnCount(address string) (int64, error)
- func (m *MongoDB) UncleByHash(hash string) (models.Uncle, error)
- func (m *MongoDB) UpdateStore() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Symbol string `json:"symbol"` User string `json:"user"` Password string `json:"password"` Database string `json:"database"` Address string `json:"address"` }
func (*Config) ConnectionString ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func (*MongoDB) AccountsByBalance ¶
func (*MongoDB) AccountsByLastSeen ¶
func (*MongoDB) AddContractCall ¶
func (m *MongoDB) AddContractCall(tx *models.Transaction) error
func (*MongoDB) AddDeployedContract ¶
func (m *MongoDB) AddDeployedContract(tx *models.Transaction) error
func (*MongoDB) AddInternalTransaction ¶
func (m *MongoDB) AddInternalTransaction(itxn *models.ITransaction) error
func (*MongoDB) AddMultiSeriesChart ¶
func (*MongoDB) AddNumberChart ¶
func (*MongoDB) AddNumberStringChart ¶
func (*MongoDB) AddTokenTransfer ¶
func (m *MongoDB) AddTokenTransfer(tt *models.TokenTransfer) error
func (*MongoDB) AddTransaction ¶
func (m *MongoDB) AddTransaction(tx *models.Transaction) error
func (*MongoDB) BlockByNumber ¶
func (*MongoDB) ContractTransferCount ¶
func (*MongoDB) ForkedBlockByNumber ¶
func (*MongoDB) GetMultiSeriesChart ¶
func (*MongoDB) GetNumberChart ¶
func (*MongoDB) GetNumberStringChart ¶
func (*MongoDB) IsEnodePresent ¶
func (*MongoDB) IsFirstRun ¶
func (*MongoDB) IterForkedBlocks ¶
func (*MongoDB) IterTokenTransfers ¶
func (*MongoDB) IterTransactions ¶
func (*MongoDB) LatestBlocks ¶
func (*MongoDB) LatestContractCalls ¶
func (*MongoDB) LatestContractsDeployed ¶
func (*MongoDB) LatestFailedTransactions ¶
func (*MongoDB) LatestForkedBlocks ¶
func (*MongoDB) LatestITransactionsByAccount ¶
func (*MongoDB) LatestMinedBlocks ¶
func (*MongoDB) LatestTokenTransfers ¶
func (*MongoDB) LatestTokenTransfersByAccount ¶
func (*MongoDB) LatestTransactions ¶
func (*MongoDB) LatestTransactionsByAccount ¶
func (*MongoDB) LatestTransfersOfToken ¶
func (*MongoDB) LatestTxHashes ¶
TODO: refactor this to accept a param which will be the block number from which to start syncing forward; invert the sorting; when one of these is done store the reached block in sysstore
func (*MongoDB) LatestTxTrace ¶
func (m *MongoDB) LatestTxTrace() (models.ITransaction, error)
func (*MongoDB) LatestUncles ¶
func (*MongoDB) ListCharts ¶
func (*MongoDB) PurgeBlock ¶
func (*MongoDB) TokenTransfersByAccount ¶
func (m *MongoDB) TokenTransfersByAccount(account string) ([]models.TokenTransfer, error)
func (*MongoDB) TokenTransfersByAccountCount ¶
func (*MongoDB) TotalAccountCount ¶
func (*MongoDB) TotalBlockCount ¶
func (*MongoDB) TotalContractCallsCount ¶
func (*MongoDB) TotalContractsDeployedCount ¶
func (*MongoDB) TotalForkedBlockCount ¶
func (*MongoDB) TotalTransferCount ¶
func (*MongoDB) TotalTxnCount ¶
func (*MongoDB) TotalUncleCount ¶
func (*MongoDB) TransactionByContractAddress ¶
func (m *MongoDB) TransactionByContractAddress(address string) (models.Transaction, error)
func (*MongoDB) TransactionByHash ¶
func (m *MongoDB) TransactionByHash(hash string) (models.Transaction, error)
Transactions
func (*MongoDB) TransactionsByBlockNumber ¶
func (m *MongoDB) TransactionsByBlockNumber(number uint64) ([]models.Transaction, error)
func (*MongoDB) TransfersByContract ¶
func (m *MongoDB) TransfersByContract(address string) ([]models.TokenTransfer, error)
func (*MongoDB) TransfersOfTokenByAccount ¶
func (*MongoDB) TransfersOfTokenByAccountCount ¶
func (*MongoDB) UpdateStore ¶
Click to show internal directories.
Click to hide internal directories.