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 EventDBReader ¶
type EventDBReader interface { // RetrieveOriginSent gets the Origin Sent events with a filter. RetrieveOriginSent(ctx context.Context, filter model.OriginSent) ([]model.OriginSent, error) // RetrieveExecuted gets the Executed events with a filter. RetrieveExecuted(ctx context.Context, filter model.Executed) ([]model.Executed, error) // RetrieveMessageStatus gets status of a message. RetrieveMessageStatus(ctx context.Context, messageHash string) (graphqlModel.MessageStatus, error) // RetrieveLastStoredBlock gets the last block stored in sinner. RetrieveLastStoredBlock(ctx context.Context, chainID uint32, address common.Address) (uint64, error) // RetrieveMessagesByStatus gets messages by their status (pending/completed). RetrieveMessagesByStatus(ctx context.Context, messageStatus graphqlModel.MessageState, page int) ([]*graphqlModel.MessageStatus, error) }
EventDBReader is an interface for reading events from a database.
type EventDBWriter ¶
type EventDBWriter interface { // StoreOriginSent stores an OriginSent event. StoreOriginSent(ctx context.Context, originSent *model.OriginSent) error // StoreExecuted stores an Executed event. StoreExecuted(ctx context.Context, executed *model.Executed) error // StoreLastIndexed stores the last indexed for a contract address StoreLastIndexed(ctx context.Context, contractAddress common.Address, chainID uint32, blockNumber uint64) error // StoreOrUpdateMessageStatus stores/updates the status of a message. StoreOrUpdateMessageStatus(ctx context.Context, txHash string, messageID string, messageType types.MessageType) error }
EventDBWriter is an interface for writing events to a database.
type TestEventDB ¶
Directories ¶
Path | Synopsis |
---|---|
Package model holds all the models for the database.
|
Package model holds all the models for the database. |
Package sql provides a datastore implementation for the executor.
|
Package sql provides a datastore implementation for the executor. |
base
Package base contains the base sql implementation
|
Package base contains the base sql implementation |
mysql
Package mysql implements the mysql package
|
Package mysql implements the mysql package |
sqlite
Package sqlite implements the sqlite package
|
Package sqlite implements the sqlite package |
Click to show internal directories.
Click to hide internal directories.