reward

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RewardToAPI

func RewardToAPI(reward models.Reward) gmodel.Earning

Types

type EarningsSummary

type EarningsSummary struct {
	TokenSum   types.Decimal `boil:"token_sum"`
	TotalCount int           `boil:"total_count"`
}

type Repository

type Repository struct {
	*base.Repository
}

func (*Repository) GetEarningsByAfterMarketDeviceID

func (r *Repository) GetEarningsByAfterMarketDeviceID(ctx context.Context, tokenID int) (*gmodel.AftermarketDeviceEarnings, error)

func (*Repository) GetEarningsByUserAddress

func (r *Repository) GetEarningsByUserAddress(ctx context.Context, user common.Address) (*gmodel.UserRewards, error)

func (*Repository) GetEarningsByVehicleID

func (r *Repository) GetEarningsByVehicleID(ctx context.Context, tokenID int) (*gmodel.VehicleEarnings, error)

func (*Repository) GetEarningsSummary

func (r *Repository) GetEarningsSummary(ctx context.Context, conditions []qm.QueryMod) (*EarningsSummary, error)

func (*Repository) PaginateAftermarketDeviceEarningsByID

func (r *Repository) PaginateAftermarketDeviceEarningsByID(ctx context.Context, afterMarketDeviceEarnings *gmodel.AftermarketDeviceEarnings, first *int, after *string, last *int, before *string) (*gmodel.EarningsConnection, error)

func (*Repository) PaginateGetEarningsByUsersDevices

func (r *Repository) PaginateGetEarningsByUsersDevices(ctx context.Context, userDeviceEarnings *gmodel.UserRewards, first *int, after *string, last *int, before *string) (*gmodel.EarningsConnection, error)

func (*Repository) PaginateVehicleEarningsByID

func (r *Repository) PaginateVehicleEarningsByID(ctx context.Context, vehicleEarnings *gmodel.VehicleEarnings, first *int, after *string, last *int, before *string) (*gmodel.EarningsConnection, error)

type RewardsCursor

type RewardsCursor struct {
	Week      int
	VehicleID int
}

Jump to

Keyboard shortcuts

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