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.MapperEvent) error
	DeletePendingEvent(ctx context.Context, pendingEvent *types.MapperEvent) error
	CleanOldPendingEvents(ctx context.Context, height uint64) error
	PendingEventsForOwner(ctx context.Context, owner common.Address) ([]*types.MapperEvent, error)

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

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

	Store(ctx context.Context, mapper *types.Mapper) error
	Delete(ctx context.Context, id types.ID) error
	Get(ctx context.Context, id types.ID) (*types.Mapper, error)
	GetByOwner(ctx context.Context, owner common.Address, limit int, cursor string) ([]*types.Mapper, string, error)
	GetAll(ctx context.Context) ([]*types.Mapper, 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