Documentation ¶
Index ¶
- func RewardToAPI(reward models.Reward) gmodel.Earning
- type EarningsSummary
- type Repository
- func (r *Repository) GetEarningsByAfterMarketDeviceID(ctx context.Context, tokenID int) (*gmodel.AftermarketDeviceEarnings, error)
- func (r *Repository) GetEarningsByUserAddress(ctx context.Context, user common.Address) (*gmodel.UserRewards, error)
- func (r *Repository) GetEarningsByVehicleID(ctx context.Context, tokenID int) (*gmodel.VehicleEarnings, error)
- func (r *Repository) GetEarningsSummary(ctx context.Context, conditions []qm.QueryMod) (*EarningsSummary, error)
- func (r *Repository) PaginateAftermarketDeviceEarningsByID(ctx context.Context, ...) (*gmodel.EarningsConnection, error)
- func (r *Repository) PaginateGetEarningsByUsersDevices(ctx context.Context, userDeviceEarnings *gmodel.UserRewards, first *int, ...) (*gmodel.EarningsConnection, error)
- func (r *Repository) PaginateVehicleEarningsByID(ctx context.Context, vehicleEarnings *gmodel.VehicleEarnings, first *int, ...) (*gmodel.EarningsConnection, error)
- type RewardsCursor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EarningsSummary ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.