Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type AftermarketDeviceEarningsResolver
- type AftermarketDeviceResolver
- type ComplexityRoot
- type Config
- type DCNResolver
- type DirectiveRoot
- type EarningResolver
- type QueryResolver
- type Resolver
- func (r *Resolver) AftermarketDevice() AftermarketDeviceResolver
- func (r *Resolver) AftermarketDeviceEarnings() AftermarketDeviceEarningsResolver
- func (r *Resolver) DCN() DCNResolver
- func (r *Resolver) Earning() EarningResolver
- func (r *Resolver) Query() QueryResolver
- func (r *Resolver) UserRewards() UserRewardsResolver
- func (r *Resolver) Vehicle() VehicleResolver
- func (r *Resolver) VehicleEarnings() VehicleEarningsResolver
- type ResolverRoot
- type UserRewardsResolver
- type VehicleEarningsResolver
- type VehicleResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type AftermarketDeviceEarningsResolver ¶ added in v0.1.9
type AftermarketDeviceResolver ¶
type AftermarketDeviceResolver interface { Manufacturer(ctx context.Context, obj *model.AftermarketDevice) (*model.Manufacturer, error) Vehicle(ctx context.Context, obj *model.AftermarketDevice) (*model.Vehicle, error) Earnings(ctx context.Context, obj *model.AftermarketDevice) (*model.AftermarketDeviceEarnings, error) }
type ComplexityRoot ¶
type ComplexityRoot struct { AftermarketDevice struct { Address func(childComplexity int) int Beneficiary func(childComplexity int) int ClaimedAt func(childComplexity int) int DevEui func(childComplexity int) int Earnings func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int Imei func(childComplexity int) int Manufacturer func(childComplexity int) int MintedAt func(childComplexity int) int Name func(childComplexity int) int Owner func(childComplexity int) int Serial func(childComplexity int) int TokenID func(childComplexity int) int Vehicle func(childComplexity int) int } AftermarketDeviceConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AftermarketDeviceEarnings struct { History func(childComplexity int, first *int, after *string, last *int, before *string) int TotalTokens func(childComplexity int) int } AftermarketDeviceEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } DCN struct { ExpiresAt func(childComplexity int) int MintedAt func(childComplexity int) int Name func(childComplexity int) int Node func(childComplexity int) int Owner func(childComplexity int) int Vehicle func(childComplexity int) int } DCNConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } DCNEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Definition struct { Make func(childComplexity int) int Model func(childComplexity int) int URI func(childComplexity int) int Year func(childComplexity int) int } Earning struct { AftermarketDevice func(childComplexity int) int AftermarketDeviceTokens func(childComplexity int) int Beneficiary func(childComplexity int) int ConnectionStreak func(childComplexity int) int SentAt func(childComplexity int) int StreakTokens func(childComplexity int) int SyntheticDevice func(childComplexity int) int SyntheticDeviceTokens func(childComplexity int) int Vehicle func(childComplexity int) int Week func(childComplexity int) int } Earnings struct { EarnedTokens func(childComplexity int) int EarningsTransfers func(childComplexity int, first *int) int } EarningsConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } EarningsEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Manufacturer struct { ID func(childComplexity int) int MintedAt func(childComplexity int) int Name func(childComplexity int) int Owner func(childComplexity int) int TokenID func(childComplexity int) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Privilege struct { ExpiresAt func(childComplexity int) int ID func(childComplexity int) int SetAt func(childComplexity int) int User func(childComplexity int) int } PrivilegeEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } PrivilegesConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } Query struct { AftermarketDevice func(childComplexity int, by model.AftermarketDeviceBy) int AftermarketDevices func(childComplexity int, first *int, after *string, last *int, before *string, filterBy *model.AftermarketDevicesFilter) int Dcn func(childComplexity int, by model.DCNBy) int Dcns func(childComplexity int, first *int, after *string, last *int, before *string, filterBy *model.DCNFilter) int Node func(childComplexity int, id string) int Rewards func(childComplexity int, user common.Address) int Vehicle func(childComplexity int, tokenID int) int Vehicles func(childComplexity int, first *int, after *string, last *int, before *string, filterBy *model.VehiclesFilter) int } SyntheticDevice struct { Address func(childComplexity int) int IntegrationID func(childComplexity int) int MintedAt func(childComplexity int) int TokenID func(childComplexity int) int } UserRewards struct { History func(childComplexity int, first *int, after *string, last *int, before *string) int TotalTokens func(childComplexity int) int } Vehicle struct { AftermarketDevice func(childComplexity int) int Dcn func(childComplexity int) int Definition func(childComplexity int) int Earnings func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int Manufacturer func(childComplexity int) int MintedAt func(childComplexity int) int Name func(childComplexity int) int Owner func(childComplexity int) int Privileges func(childComplexity int, first *int, after *string, last *int, before *string, filterBy *model.PrivilegeFilterBy) int SyntheticDevice func(childComplexity int) int TokenID func(childComplexity int) int } VehicleConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } VehicleEarnings struct { History func(childComplexity int, first *int, after *string, last *int, before *string) int TotalTokens func(childComplexity int) int } VehicleEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DCNResolver ¶
type DirectiveRoot ¶
type EarningResolver ¶ added in v0.1.7
type QueryResolver ¶
type QueryResolver interface { Node(ctx context.Context, id string) (model.Node, error) Vehicle(ctx context.Context, tokenID int) (*model.Vehicle, error) Vehicles(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *model.VehiclesFilter) (*model.VehicleConnection, error) AftermarketDevice(ctx context.Context, by model.AftermarketDeviceBy) (*model.AftermarketDevice, error) AftermarketDevices(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *model.AftermarketDevicesFilter) (*model.AftermarketDeviceConnection, error) Dcn(ctx context.Context, by model.DCNBy) (*model.Dcn, error) Dcns(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *model.DCNFilter) (*model.DCNConnection, error) Rewards(ctx context.Context, user common.Address) (*model.UserRewards, error) }
type Resolver ¶
type Resolver struct {
Repo *repositories.Repository
}
func NewResolver ¶
func NewResolver(repo *repositories.Repository) *Resolver
func (*Resolver) AftermarketDevice ¶
func (r *Resolver) AftermarketDevice() AftermarketDeviceResolver
AftermarketDevice returns AftermarketDeviceResolver implementation.
func (*Resolver) AftermarketDeviceEarnings ¶ added in v0.1.9
func (r *Resolver) AftermarketDeviceEarnings() AftermarketDeviceEarningsResolver
AftermarketDeviceEarnings returns AftermarketDeviceEarningsResolver implementation.
func (*Resolver) Earning ¶ added in v0.1.7
func (r *Resolver) Earning() EarningResolver
Earning returns EarningResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) UserRewards ¶ added in v0.1.10
func (r *Resolver) UserRewards() UserRewardsResolver
UserRewards returns UserRewardsResolver implementation.
func (*Resolver) Vehicle ¶
func (r *Resolver) Vehicle() VehicleResolver
Vehicle returns VehicleResolver implementation.
func (*Resolver) VehicleEarnings ¶ added in v0.1.7
func (r *Resolver) VehicleEarnings() VehicleEarningsResolver
VehicleEarnings returns VehicleEarningsResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { AftermarketDevice() AftermarketDeviceResolver AftermarketDeviceEarnings() AftermarketDeviceEarningsResolver DCN() DCNResolver Earning() EarningResolver Query() QueryResolver UserRewards() UserRewardsResolver Vehicle() VehicleResolver VehicleEarnings() VehicleEarningsResolver }
type UserRewardsResolver ¶ added in v0.1.10
type VehicleEarningsResolver ¶ added in v0.1.7
type VehicleResolver ¶
type VehicleResolver interface { Manufacturer(ctx context.Context, obj *model.Vehicle) (*model.Manufacturer, error) AftermarketDevice(ctx context.Context, obj *model.Vehicle) (*model.AftermarketDevice, error) Privileges(ctx context.Context, obj *model.Vehicle, first *int, after *string, last *int, before *string, filterBy *model.PrivilegeFilterBy) (*model.PrivilegesConnection, error) SyntheticDevice(ctx context.Context, obj *model.Vehicle) (*model.SyntheticDevice, error) Dcn(ctx context.Context, obj *model.Vehicle) (*model.Dcn, error) Earnings(ctx context.Context, obj *model.Vehicle) (*model.VehicleEarnings, error) }
Click to show internal directories.
Click to hide internal directories.