Documentation ¶
Index ¶
- type EventRepository
- func (r *EventRepository) ChainDataSyncedEventByBlockNumberOrGreater(ctx context.Context, srcChainId uint64, syncedChainId uint64, ...) (*relayer.Event, error)
- func (r *EventRepository) Close() error
- func (r *EventRepository) Delete(ctx context.Context, id int) error
- func (r *EventRepository) DeleteAllAfterBlockID(blockID uint64, srcChainID uint64, destChainID uint64) error
- func (r *EventRepository) FindAllByAddress(ctx context.Context, req *http.Request, opts relayer.FindAllByAddressOpts) (*paginate.Page, error)
- func (r *EventRepository) FindLatestBlockID(ctx context.Context, event string, srcChainID uint64, destChainID uint64) (uint64, error)
- func (r *EventRepository) FirstByEventAndMsgHash(ctx context.Context, event string, msgHash string) (*relayer.Event, error)
- func (r *EventRepository) FirstByMsgHash(ctx context.Context, msgHash string) (*relayer.Event, error)
- func (r *EventRepository) LatestChainDataSyncedEvent(ctx context.Context, srcChainId uint64, syncedChainId uint64) (uint64, error)
- func (r *EventRepository) Save(ctx context.Context, opts *relayer.SaveEventOpts) (*relayer.Event, error)
- func (r *EventRepository) UpdateFeesAndProfitability(ctx context.Context, id int, opts *relayer.UpdateFeesAndProfitabilityOpts) error
- func (r *EventRepository) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventRepository ¶
type EventRepository struct {
// contains filtered or unexported fields
}
func NewEventRepository ¶
func NewEventRepository(dbHandler db.DB) (*EventRepository, error)
func (*EventRepository) ChainDataSyncedEventByBlockNumberOrGreater ¶
func (*EventRepository) Close ¶
func (r *EventRepository) Close() error
Close closes the database connection.
func (*EventRepository) Delete ¶
func (r *EventRepository) Delete( ctx context.Context, id int, ) error
func (*EventRepository) DeleteAllAfterBlockID ¶
func (r *EventRepository) DeleteAllAfterBlockID(blockID uint64, srcChainID uint64, destChainID uint64) error
DeleteAllAfterBlockID is used when a reorg is detected
func (*EventRepository) FindAllByAddress ¶
func (r *EventRepository) FindAllByAddress( ctx context.Context, req *http.Request, opts relayer.FindAllByAddressOpts, ) (*paginate.Page, error)
func (*EventRepository) FindLatestBlockID ¶
func (r *EventRepository) FindLatestBlockID( ctx context.Context, event string, srcChainID uint64, destChainID uint64, ) (uint64, error)
GetLatestBlockID get latest block id
func (*EventRepository) FirstByEventAndMsgHash ¶
func (*EventRepository) FirstByMsgHash ¶
func (*EventRepository) LatestChainDataSyncedEvent ¶
func (*EventRepository) Save ¶
func (r *EventRepository) Save(ctx context.Context, opts *relayer.SaveEventOpts) (*relayer.Event, error)
func (*EventRepository) UpdateFeesAndProfitability ¶
func (r *EventRepository) UpdateFeesAndProfitability( ctx context.Context, id int, opts *relayer.UpdateFeesAndProfitabilityOpts, ) error
func (*EventRepository) UpdateStatus ¶
func (r *EventRepository) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error
Click to show internal directories.
Click to hide internal directories.