graph

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 ComplexityRoot

type ComplexityRoot struct {
	Query struct {
		Signals       func(childComplexity int, tokenID int, interval string, from time.Time, to time.Time, filter *model.SignalFilter) int
		SignalsLatest func(childComplexity int, tokenID int, filter *model.SignalFilter) int
		VinVCLatest   func(childComplexity int, tokenID int) int
	}

	SignalAggregations struct {
		ChassisAxleRow1WheelLeftTirePressure             func(childComplexity int, agg model.FloatAggregation) int
		ChassisAxleRow1WheelRightTirePressure            func(childComplexity int, agg model.FloatAggregation) int
		ChassisAxleRow2WheelLeftTirePressure             func(childComplexity int, agg model.FloatAggregation) int
		ChassisAxleRow2WheelRightTirePressure            func(childComplexity int, agg model.FloatAggregation) int
		CurrentLocationAltitude                          func(childComplexity int, agg model.FloatAggregation) int
		CurrentLocationIsRedacted                        func(childComplexity int, agg model.FloatAggregation) int
		CurrentLocationLatitude                          func(childComplexity int, agg model.FloatAggregation) int
		CurrentLocationLongitude                         func(childComplexity int, agg model.FloatAggregation) int
		DimoAftermarketHdop                              func(childComplexity int, agg model.FloatAggregation) int
		DimoAftermarketNsat                              func(childComplexity int, agg model.FloatAggregation) int
		DimoAftermarketSsid                              func(childComplexity int, agg model.StringAggregation) int
		DimoAftermarketWPAState                          func(childComplexity int, agg model.StringAggregation) int
		ExteriorAirTemperature                           func(childComplexity int, agg model.FloatAggregation) int
		LowVoltageBatteryCurrentVoltage                  func(childComplexity int, agg model.FloatAggregation) int
		ObdBarometricPressure                            func(childComplexity int, agg model.FloatAggregation) int
		ObdEngineLoad                                    func(childComplexity int, agg model.FloatAggregation) int
		ObdIntakeTemp                                    func(childComplexity int, agg model.FloatAggregation) int
		ObdRunTime                                       func(childComplexity int, agg model.FloatAggregation) int
		PowertrainCombustionEngineEct                    func(childComplexity int, agg model.FloatAggregation) int
		PowertrainCombustionEngineEngineOilLevel         func(childComplexity int, agg model.StringAggregation) int
		PowertrainCombustionEngineEngineOilRelativeLevel func(childComplexity int, agg model.FloatAggregation) int
		PowertrainCombustionEngineMaf                    func(childComplexity int, agg model.FloatAggregation) int
		PowertrainCombustionEngineSpeed                  func(childComplexity int, agg model.FloatAggregation) int
		PowertrainCombustionEngineTps                    func(childComplexity int, agg model.FloatAggregation) int
		PowertrainFuelSystemRelativeLevel                func(childComplexity int, agg model.FloatAggregation) int
		PowertrainFuelSystemSupportedFuelTypes           func(childComplexity int, agg model.StringAggregation) int
		PowertrainRange                                  func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryChargingChargeLimit     func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryChargingIsCharging      func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryCurrentPower            func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryGrossCapacity           func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryStateOfChargeCurrent    func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTransmissionTravelledDistance          func(childComplexity int, agg model.FloatAggregation) int
		PowertrainType                                   func(childComplexity int, agg model.StringAggregation) int
		Speed                                            func(childComplexity int, agg model.FloatAggregation) int
		Timestamp                                        func(childComplexity int) int
	}

	SignalCollection struct {
		ChassisAxleRow1WheelLeftTirePressure             func(childComplexity int) int
		ChassisAxleRow1WheelRightTirePressure            func(childComplexity int) int
		ChassisAxleRow2WheelLeftTirePressure             func(childComplexity int) int
		ChassisAxleRow2WheelRightTirePressure            func(childComplexity int) int
		CurrentLocationAltitude                          func(childComplexity int) int
		CurrentLocationIsRedacted                        func(childComplexity int) int
		CurrentLocationLatitude                          func(childComplexity int) int
		CurrentLocationLongitude                         func(childComplexity int) int
		DIMOAftermarketHDOP                              func(childComplexity int) int
		DIMOAftermarketNSAT                              func(childComplexity int) int
		DIMOAftermarketSSID                              func(childComplexity int) int
		DIMOAftermarketWPAState                          func(childComplexity int) int
		ExteriorAirTemperature                           func(childComplexity int) int
		LastSeen                                         func(childComplexity int) int
		LowVoltageBatteryCurrentVoltage                  func(childComplexity int) int
		OBDBarometricPressure                            func(childComplexity int) int
		OBDEngineLoad                                    func(childComplexity int) int
		OBDIntakeTemp                                    func(childComplexity int) int
		OBDRunTime                                       func(childComplexity int) int
		PowertrainCombustionEngineECT                    func(childComplexity int) int
		PowertrainCombustionEngineEngineOilLevel         func(childComplexity int) int
		PowertrainCombustionEngineEngineOilRelativeLevel func(childComplexity int) int
		PowertrainCombustionEngineMAF                    func(childComplexity int) int
		PowertrainCombustionEngineSpeed                  func(childComplexity int) int
		PowertrainCombustionEngineTPS                    func(childComplexity int) int
		PowertrainFuelSystemRelativeLevel                func(childComplexity int) int
		PowertrainFuelSystemSupportedFuelTypes           func(childComplexity int) int
		PowertrainRange                                  func(childComplexity int) int
		PowertrainTractionBatteryChargingChargeLimit     func(childComplexity int) int
		PowertrainTractionBatteryChargingIsCharging      func(childComplexity int) int
		PowertrainTractionBatteryCurrentPower            func(childComplexity int) int
		PowertrainTractionBatteryGrossCapacity           func(childComplexity int) int
		PowertrainTractionBatteryStateOfChargeCurrent    func(childComplexity int) int
		PowertrainTransmissionTravelledDistance          func(childComplexity int) int
		PowertrainType                                   func(childComplexity int) int
		Speed                                            func(childComplexity int) int
	}

	SignalFloat struct {
		Timestamp func(childComplexity int) int
		Value     func(childComplexity int) int
	}

	SignalString struct {
		Timestamp func(childComplexity int) int
		Value     func(childComplexity int) int
	}

	VINVC struct {
		ExpirationDate func(childComplexity int) int
		IssuanceDate   func(childComplexity int) int
		RawVc          func(childComplexity int) int
		Vin            func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	HasAggregation    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	IsSignal          func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	RequiresPrivilege func(ctx context.Context, obj interface{}, next graphql.Resolver, privileges []model.Privilege) (res interface{}, err error)
	RequiresToken     func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type QueryResolver

type QueryResolver interface {
	Signals(ctx context.Context, tokenID int, interval string, from time.Time, to time.Time, filter *model.SignalFilter) ([]*model.SignalAggregations, error)
	SignalsLatest(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.SignalCollection, error)
	VinVCLatest(ctx context.Context, tokenID int) (*model.Vinvc, error)
}

type Resolver

type Resolver struct {
	*repositories.Repository
	VINVCRepo *vinvc.Repository
}

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

func (*Resolver) SignalAggregations

func (r *Resolver) SignalAggregations() SignalAggregationsResolver

SignalAggregations returns SignalAggregationsResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	SignalAggregations() SignalAggregationsResolver
}

type SignalAggregationsResolver

type SignalAggregationsResolver interface {
	ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ChassisAxleRow1WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ChassisAxleRow2WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ChassisAxleRow2WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	CurrentLocationAltitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	CurrentLocationIsRedacted(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	CurrentLocationLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	CurrentLocationLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	DimoAftermarketHdop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	DimoAftermarketNsat(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	DimoAftermarketSsid(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error)
	DimoAftermarketWPAState(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error)
	ExteriorAirTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	LowVoltageBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdBarometricPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainCombustionEngineEct(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainCombustionEngineEngineOilLevel(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error)
	PowertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainCombustionEngineMaf(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainCombustionEngineSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainCombustionEngineTps(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainFuelSystemRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainFuelSystemSupportedFuelTypes(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error)
	PowertrainRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTractionBatteryChargingChargeLimit(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTractionBatteryChargingIsCharging(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTractionBatteryCurrentPower(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTractionBatteryGrossCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTransmissionTravelledDistance(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainType(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error)
	Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
}

Directories

Path Synopsis
Code generated by "model-garage" DO NOT EDIT.
Code generated by "model-garage" DO NOT EDIT.

Jump to

Keyboard shortcuts

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