Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type AftermarketDeviceEarningsResolver
- type AftermarketDeviceRepository
- type AftermarketDeviceResolver
- type ComplexityRoot
- type Config
- type DCNRepository
- type DCNResolver
- type DirectiveRoot
- type EarningResolver
- type ManufacturerRepository
- type ManufacturerResolver
- 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) Manufacturer() ManufacturerResolver
- func (r *Resolver) Query() QueryResolver
- func (r *Resolver) UserRewards() UserRewardsResolver
- func (r *Resolver) Vehicle() VehicleResolver
- func (r *Resolver) VehicleEarnings() VehicleEarningsResolver
- type ResolverRoot
- type SyntheticRepository
- type UserRewardsResolver
- type VehicleEarningsResolver
- type VehicleRepository
- 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 AftermarketDeviceRepository ¶ added in v0.1.20
type AftermarketDeviceRepository interface { GetAftermarketDevices(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *model.AftermarketDevicesFilter) (*model.AftermarketDeviceConnection, error) GetAftermarketDevice(ctx context.Context, by model.AftermarketDeviceBy) (*model.AftermarketDevice, error) GetAftermarketDevicesForManufacturer(ctx context.Context, obj *model.Manufacturer, first *int, after *string, last *int, before *string, filterBy *model.AftermarketDevicesFilter) (*model.AftermarketDeviceConnection, error) }
AftermarketDeviceRepository interface for mocking aftermarket.Repository.
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 ID func(childComplexity int) int MintedAt func(childComplexity int) int Name func(childComplexity int) int Node func(childComplexity int) int Owner func(childComplexity int) int TokenID 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 } 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 { AftermarketDevices func(childComplexity int, first *int, after *string, last *int, before *string, filterBy *model.AftermarketDevicesFilter) int 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 Manufacturer func(childComplexity int, by model.ManufacturerBy) int Node func(childComplexity int, id string) int Rewards func(childComplexity int, user common.Address) int SyntheticDevice func(childComplexity int, by model.SyntheticDeviceBy) int SyntheticDevices func(childComplexity int, first *int, last *int, after *string, before *string, filterBy *model.SyntheticDevicesFilter) 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 ID func(childComplexity int) int IntegrationID func(childComplexity int) int MintedAt func(childComplexity int) int Name func(childComplexity int) int TokenID func(childComplexity int) int } SyntheticDeviceConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } SyntheticDeviceEdge struct { Cursor func(childComplexity int) int Node 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 DataURI 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 DCNRepository ¶ added in v0.1.20
type DCNRepository interface { GetDCN(ctx context.Context, by model.DCNBy) (*model.Dcn, error) GetDCNByNode(ctx context.Context, node []byte) (*model.Dcn, error) GetDCNByName(ctx context.Context, name string) (*model.Dcn, error) GetDCNs(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *model.DCNFilter) (*model.DCNConnection, error) }
DCNRepository interface for mocking dcn.Repository.
type DCNResolver ¶
type DirectiveRoot ¶
type EarningResolver ¶ added in v0.1.7
type ManufacturerRepository ¶ added in v0.1.20
type ManufacturerRepository interface {
GetManufacturer(ctx context.Context, by model.ManufacturerBy) (*model.Manufacturer, error)
}
ManufacturerRepository interface for mocking manufacturer.Repository.
type ManufacturerResolver ¶ added in v0.1.14
type ManufacturerResolver interface {
AftermarketDevices(ctx context.Context, obj *model.Manufacturer, first *int, after *string, last *int, before *string, filterBy *model.AftermarketDevicesFilter) (*model.AftermarketDeviceConnection, error)
}
type QueryResolver ¶
type QueryResolver interface { Node(ctx context.Context, id string) (model.Node, 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) Manufacturer(ctx context.Context, by model.ManufacturerBy) (*model.Manufacturer, error) Rewards(ctx context.Context, user common.Address) (*model.UserRewards, error) SyntheticDevice(ctx context.Context, by model.SyntheticDeviceBy) (*model.SyntheticDevice, error) SyntheticDevices(ctx context.Context, first *int, last *int, after *string, before *string, filterBy *model.SyntheticDevicesFilter) (*model.SyntheticDeviceConnection, 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) }
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver holds the repositories for the graph resolvers.
func NewResolver ¶
func NewResolver(baseRepo *base.Repository) *Resolver
NewResolver creates a new Resolver with allocated repositories.
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) Manufacturer ¶ added in v0.1.14
func (r *Resolver) Manufacturer() ManufacturerResolver
Manufacturer returns ManufacturerResolver 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 Manufacturer() ManufacturerResolver Query() QueryResolver UserRewards() UserRewardsResolver Vehicle() VehicleResolver VehicleEarnings() VehicleEarningsResolver }
type SyntheticRepository ¶ added in v0.1.20
type SyntheticRepository interface { GetSyntheticDevice(ctx context.Context, by model.SyntheticDeviceBy) (*model.SyntheticDevice, error) GetSyntheticDevices(ctx context.Context, first *int, last *int, after *string, before *string, filterBy *model.SyntheticDevicesFilter) (*model.SyntheticDeviceConnection, error) }
SyntheticRepository interface for mocking synthetic.Repository.
type UserRewardsResolver ¶ added in v0.1.10
type VehicleEarningsResolver ¶ added in v0.1.7
type VehicleRepository ¶ added in v0.1.20
type VehicleRepository interface { GetVehicles(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *model.VehiclesFilter) (*model.VehicleConnection, error) GetVehicle(ctx context.Context, id int) (*model.Vehicle, error) }
VehicleRepository interface for mocking vehicle.Repository.
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) }