Documentation ¶
Overview ¶
Package db implements the data store
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventDB ¶
type EventDB interface { // StoreLog stores a log StoreLog(ctx context.Context, log types.Log, chainID uint32) error // RetrieveLogs retrieves logs that match a tx hash and chain id RetrieveLogs(ctx context.Context, txHash common.Hash, chainID uint32) (logs []*types.Log, err error) // RetrieveAllLogs_Test retrieves all logs in the database. This is only used for testing. RetrieveAllLogs_Test(ctx context.Context) (logs []*types.Log, err error) // StoreReceipt stores a receipt StoreReceipt(ctx context.Context, receipt types.Receipt, chainID uint32) error // RetrieveReceipt retrieves a receipt by tx hash and chain id RetrieveReceipt(ctx context.Context, txHash common.Hash, chainID uint32) (receipt types.Receipt, err error) // RetrieveAllReceipts_Test retrieves all receipts in the database. This is only used for testing. RetrieveAllReceipts_Test(ctx context.Context) (receipts []types.Receipt, err error) // StoreEthTx stores a processed transaction StoreEthTx(ctx context.Context, tx *types.Transaction, chainID uint32) error // StoreLastIndexed stores the last indexed for a contract address StoreLastIndexed(ctx context.Context, contractAddress common.Address, chainID uint32, blockNumber uint64) error // RetrieveLastIndexed retrieves the last indexed for a contract address RetrieveLastIndexed(ctx context.Context, contractAddress common.Address, chainID uint32) (uint64, error) }
EventDB stores events.
Directories ¶
Path | Synopsis |
---|---|
datastore
|
|
sql
Package sql accesses a db
|
Package sql accesses a db |
sql/base
Package base contains the base sql implementation
|
Package base contains the base sql implementation |
sql/mysql
Package mysql implements the mysql package
|
Package mysql implements the mysql package |
sql/sqlite
Package sqlite implements the sqlite package
|
Package sqlite implements the sqlite package |
Click to show internal directories.
Click to hide internal directories.