Documentation ¶
Index ¶
- Variables
- type DB
- type EventRepository
- func (r *EventRepository) ChainDataSyncedEventByBlockNumberOrGreater(ctx context.Context, srcChainId uint64, syncedChainId uint64, ...) (*relayer.Event, 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(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) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error
- type SuspendedTransactionRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoDB = errors.Validation.NewWithKeyAndDetail("ERR_NO_DB", "no db")
)
Functions ¶
This section is empty.
Types ¶
type EventRepository ¶
type EventRepository struct {
// contains filtered or unexported fields
}
func NewEventRepository ¶
func NewEventRepository(db DB) (*EventRepository, error)
func (*EventRepository) ChainDataSyncedEventByBlockNumberOrGreater ¶
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( 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) UpdateStatus ¶
func (r *EventRepository) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error
type SuspendedTransactionRepository ¶
type SuspendedTransactionRepository struct {
// contains filtered or unexported fields
}
func NewSuspendedTransactionRepository ¶
func NewSuspendedTransactionRepository(db DB) (*SuspendedTransactionRepository, error)
func (*SuspendedTransactionRepository) Save ¶
func (r *SuspendedTransactionRepository) Save( ctx context.Context, opts relayer.SuspendTransactionOpts, ) (*relayer.SuspendedTransaction, error)
Click to show internal directories.
Click to hide internal directories.