store

package
v0.0.0-...-1196ed7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	StoreCurrentBlock(ctx context.Context, process string, height uint64) error
	CurrentBlock(ctx context.Context, process string) (uint64, error)

	StorePendingEvent(ctx context.Context, pendingEvent *types.RouterEvent) error
	DeletePendingEvent(ctx context.Context, pendingEvent *types.RouterEvent) error
	CleanOldPendingEvents(ctx context.Context, height uint64) error
	PendingEventsForOwner(ctx context.Context, owner common.Address) ([]*types.RouterEvent, error)

	StoreEvent(ctx context.Context, event *types.RouterEvent) error
	EventsFromTo(ctx context.Context, from, to uint64) ([]*types.RouterEvent, error)
	FirstEvent(ctx context.Context) (*types.RouterEvent, error)
	GetEvents(ctx context.Context, routerID types.ID, limit int, cursor string) ([]*types.RouterEvent, string, error)

	StoreHistory(ctx context.Context, history *types.RouterHistory) error
	GetHistoryAt(ctx context.Context, id types.ID, at time.Time) (*types.RouterHistory, error)

	Store(ctx context.Context, router *types.Router) error
	Delete(ctx context.Context, id types.ID) error
	Get(ctx context.Context, id types.ID) (*types.Router, error)
	GetByOwner(ctx context.Context, owner common.Address, limit int, cursor string) ([]*types.Router, string, error)
	GetAll(ctx context.Context) ([]*types.Router, error)
}

func NewStore

func NewStore() (Store, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL