clouddatastore

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: 14 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 struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(ctx context.Context) (*Store, error)

func (*Store) CleanOldPendingEvents

func (s *Store) CleanOldPendingEvents(ctx context.Context, height uint64) error

func (*Store) CurrentBlock

func (s *Store) CurrentBlock(ctx context.Context, process string) (uint64, error)

CurrentBlock implements store.Store

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id types.ID) error

func (*Store) DeletePendingEvent

func (s *Store) DeletePendingEvent(ctx context.Context, pendingEvent *types.GatewayEvent) error

func (*Store) EventsFromTo

func (s *Store) EventsFromTo(ctx context.Context, from, to uint64) ([]*types.GatewayEvent, error)

func (*Store) FirstEvent

func (s *Store) FirstEvent(ctx context.Context) (*types.GatewayEvent, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, id types.ID) (*types.Gateway, error)

func (*Store) GetAll

func (s *Store) GetAll(ctx context.Context) ([]*types.Gateway, error)

func (*Store) GetByOwner

func (s *Store) GetByOwner(ctx context.Context, owner common.Address, limit int, cursor string) ([]*types.Gateway, string, error)

func (*Store) GetCountInCellAtRes

func (s *Store) GetCountInCellAtRes(ctx context.Context, cell h3light.Cell, res int) (map[h3light.Cell]uint64, error)

func (*Store) GetEvents

func (s *Store) GetEvents(ctx context.Context, gatewayID types.ID, limit int, cursor string) ([]*types.GatewayEvent, string, error)

func (*Store) GetEventsBetween

func (s *Store) GetEventsBetween(ctx context.Context, start, end time.Time) ([]*types.GatewayEvent, error)

func (*Store) GetGatewayOnboardByGatewayID

func (s *Store) GetGatewayOnboardByGatewayID(ctx context.Context, gatewayID string) (*models.GatewayOnboard, error)

func (*Store) GetGatewayOnboardsByOwner

func (s *Store) GetGatewayOnboardsByOwner(ctx context.Context, onboarder common.Address, owner common.Address, limit int, cursor string) ([]*models.GatewayOnboard, string, error)

func (*Store) GetHistoryAt

func (s *Store) GetHistoryAt(ctx context.Context, id types.ID, at time.Time) (*types.GatewayHistory, error)

func (*Store) GetInCell

func (s *Store) GetInCell(ctx context.Context, cell h3light.Cell) ([]*types.Gateway, error)

func (*Store) GetRes3CountPerRes0

func (s *Store) GetRes3CountPerRes0(ctx context.Context) (map[h3light.Cell]map[h3light.Cell]uint64, error)

func (*Store) PendingEventsForOwner

func (s *Store) PendingEventsForOwner(ctx context.Context, owner common.Address) ([]*types.GatewayEvent, error)

func (*Store) PurgeExpiredOnboards

func (s *Store) PurgeExpiredOnboards(ctx context.Context, expiry time.Duration) error

func (*Store) Store

func (s *Store) Store(ctx context.Context, gateway *types.Gateway) error

func (*Store) StoreCurrentBlock

func (s *Store) StoreCurrentBlock(ctx context.Context, process string, height uint64) error

StoreCurrentBlock implements store.Store

func (*Store) StoreEvent

func (s *Store) StoreEvent(ctx context.Context, event *types.GatewayEvent) error

func (*Store) StoreGatewayOnboard

func (s *Store) StoreGatewayOnboard(ctx context.Context, onboarder common.Address, gatewayID types.ID, owner common.Address, signature string, version uint8, localId string) error

func (*Store) StoreHistory

func (s *Store) StoreHistory(ctx context.Context, history *types.GatewayHistory) error

func (*Store) StorePendingEvent

func (s *Store) StorePendingEvent(ctx context.Context, pendingEvent *types.GatewayEvent) error

StorePendingEvent implements store.Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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