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 {
	StoreGatewayRewards(ctx context.Context, gatewayRewardHistories []*types.GatewayRewardHistory) error
	GetGatewayRewardsAt(ctx context.Context, gatewayID types.ID, at time.Time) (*types.GatewayRewardHistory, error)

	StoreMapperRewards(ctx context.Context, mapperRewardHistories []*types.MapperRewardHistory) error
	GetMapperRewardsAt(ctx context.Context, mapperID types.ID, at time.Time) (*types.MapperRewardHistory, error)

	StoreAccountRewards(ctx context.Context, accountRewardHistories []*types.AccountRewardHistory) error
	GetAccountRewardsAt(ctx context.Context, account common.Address, at time.Time) (*types.AccountRewardHistory, error)
	GetLatestSignedAccountReward(ctx context.Context, account common.Address) (*types.AccountRewardHistory, error)
	GetAllAccountRewardsAt(ctx context.Context, at time.Time) ([]*types.AccountRewardHistory, error)

	GetAccountRewards(ctx context.Context, account common.Address, limit int, cursor string) ([]*types.AccountRewardHistory, string, error)
	GetAccountRewardsBetween(ctx context.Context, account common.Address, start, end time.Time) ([]*types.AccountRewardHistory, error)
	GetMapperRewards(ctx context.Context, mapperID types.ID, limit int, cursor string) ([]*types.MapperRewardHistory, string, error)
	GetMapperRewardsBetween(ctx context.Context, mapperID types.ID, start, end time.Time) ([]*types.MapperRewardHistory, error)
	GetGatewayRewards(ctx context.Context, gatewayID types.ID, limit int, cursor string) ([]*types.GatewayRewardHistory, string, error)
	GetGatewayRewardsBetween(ctx context.Context, gatewayID types.ID, start, end time.Time) ([]*types.GatewayRewardHistory, error)

	GetLatestRewardsDate(ctx context.Context) (time.Time, error)
	GetLatestRewardsDateCached(ctx context.Context) (time.Time, error)
	GetMinMaxRewardsDates(ctx context.Context) (time.Time, time.Time, error)
	StoreRewardHistory(ctx context.Context, rewardHistory *types.RewardHistory) 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