graph

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 17 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 {
	DeviceActivity struct {
		LastActive func(childComplexity int) int
	}

	POMVC struct {
		RawVc                  func(childComplexity int) int
		RecordedBy             func(childComplexity int) int
		ValidFrom              func(childComplexity int) int
		VehicleContractAddress func(childComplexity int) int
		VehicleTokenID         func(childComplexity int) int
	}

	Query struct {
		AvailableSignals func(childComplexity int, tokenID int, filter *model.SignalFilter) int
		DeviceActivity   func(childComplexity int, by model.AftermarketDeviceBy) int
		PomVCLatest      func(childComplexity int, tokenID int) int
		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 {
		AngularVelocityYaw                               func(childComplexity int, agg model.FloatAggregation) int
		ChassisAxleRow1WheelLeftSpeed                    func(childComplexity int, agg model.FloatAggregation) int
		ChassisAxleRow1WheelLeftTirePressure             func(childComplexity int, agg model.FloatAggregation) int
		ChassisAxleRow1WheelRightSpeed                   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
		ObdCommandedEgr                                  func(childComplexity int, agg model.FloatAggregation) int
		ObdCommandedEvap                                 func(childComplexity int, agg model.FloatAggregation) int
		ObdDistanceSinceDTCClear                         func(childComplexity int, agg model.FloatAggregation) int
		ObdDistanceWithMil                               func(childComplexity int, agg model.FloatAggregation) int
		ObdEngineLoad                                    func(childComplexity int, agg model.FloatAggregation) int
		ObdFuelPressure                                  func(childComplexity int, agg model.FloatAggregation) int
		ObdIntakeTemp                                    func(childComplexity int, agg model.FloatAggregation) int
		ObdLongTermFuelTrim1                             func(childComplexity int, agg model.FloatAggregation) int
		ObdMap                                           func(childComplexity int, agg model.FloatAggregation) int
		ObdO2WRSensor1Voltage                            func(childComplexity int, agg model.FloatAggregation) int
		ObdO2WRSensor2Voltage                            func(childComplexity int, agg model.FloatAggregation) int
		ObdRunTime                                       func(childComplexity int, agg model.FloatAggregation) int
		ObdShortTermFuelTrim1                            func(childComplexity int, agg model.FloatAggregation) int
		ObdWarmupsSinceDTCClear                          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
		PowertrainCombustionEngineTorque                 func(childComplexity int, agg model.FloatAggregation) int
		PowertrainCombustionEngineTps                    func(childComplexity int, agg model.FloatAggregation) int
		PowertrainFuelSystemAbsoluteLevel                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
		PowertrainTractionBatteryCurrentVoltage          func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryGrossCapacity           func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryStateOfChargeCurrent    func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTractionBatteryTemperatureAverage      func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTransmissionCurrentGear                func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTransmissionTemperature                func(childComplexity int, agg model.FloatAggregation) int
		PowertrainTransmissionTravelledDistance          func(childComplexity int, agg model.FloatAggregation) int
		PowertrainType                                   func(childComplexity int, agg model.StringAggregation) int
		ServiceDistanceToService                         func(childComplexity int, agg model.FloatAggregation) int
		Speed                                            func(childComplexity int, agg model.FloatAggregation) int
		Timestamp                                        func(childComplexity int) int
	}

	SignalCollection struct {
		AngularVelocityYaw                               func(childComplexity int) int
		ChassisAxleRow1WheelLeftSpeed                    func(childComplexity int) int
		ChassisAxleRow1WheelLeftTirePressure             func(childComplexity int) int
		ChassisAxleRow1WheelRightSpeed                   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
		OBDCommandedEGR                                  func(childComplexity int) int
		OBDCommandedEVAP                                 func(childComplexity int) int
		OBDDistanceSinceDTCClear                         func(childComplexity int) int
		OBDDistanceWithMIL                               func(childComplexity int) int
		OBDEngineLoad                                    func(childComplexity int) int
		OBDFuelPressure                                  func(childComplexity int) int
		OBDIntakeTemp                                    func(childComplexity int) int
		OBDLongTermFuelTrim1                             func(childComplexity int) int
		OBDMAP                                           func(childComplexity int) int
		OBDO2WRSensor1Voltage                            func(childComplexity int) int
		OBDO2WRSensor2Voltage                            func(childComplexity int) int
		OBDRunTime                                       func(childComplexity int) int
		OBDShortTermFuelTrim1                            func(childComplexity int) int
		OBDWarmupsSinceDTCClear                          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
		PowertrainCombustionEngineTorque                 func(childComplexity int) int
		PowertrainFuelSystemAbsoluteLevel                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
		PowertrainTractionBatteryCurrentVoltage          func(childComplexity int) int
		PowertrainTractionBatteryGrossCapacity           func(childComplexity int) int
		PowertrainTractionBatteryStateOfChargeCurrent    func(childComplexity int) int
		PowertrainTractionBatteryTemperatureAverage      func(childComplexity int) int
		PowertrainTransmissionCurrentGear                func(childComplexity int) int
		PowertrainTransmissionTemperature                func(childComplexity int) int
		PowertrainTransmissionTravelledDistance          func(childComplexity int) int
		PowertrainType                                   func(childComplexity int) int
		ServiceDistanceToService                         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 {
		CountryCode            func(childComplexity int) int
		RawVc                  func(childComplexity int) int
		RecordedAt             func(childComplexity int) int
		RecordedBy             func(childComplexity int) int
		ValidFrom              func(childComplexity int) int
		ValidTo                func(childComplexity int) int
		VehicleContractAddress func(childComplexity int) int
		VehicleTokenID         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)
	OneOf                     func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	RequiresManufacturerToken func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	RequiresPrivileges        func(ctx context.Context, obj interface{}, next graphql.Resolver, privileges []model.Privilege) (res interface{}, err error)
	RequiresVehicleToken      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)
	AvailableSignals(ctx context.Context, tokenID int, filter *model.SignalFilter) ([]string, error)
	DeviceActivity(ctx context.Context, by model.AftermarketDeviceBy) (*model.DeviceActivity, error)
	VinVCLatest(ctx context.Context, tokenID int) (*model.Vinvc, error)
	PomVCLatest(ctx context.Context, tokenID int) (*model.Pomvc, error)
}

type Resolver

type Resolver struct {
	*repositories.Repository
	IdentityService *identity.APIClient
	VCRepo          *vc.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 {
	AngularVelocityYaw(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ChassisAxleRow1WheelLeftSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ChassisAxleRow1WheelRightSpeed(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)
	ObdCommandedEgr(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdCommandedEvap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdDistanceSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdDistanceWithMil(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdFuelPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdLongTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdMap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdO2WRSensor1Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdO2WRSensor2Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdShortTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	ObdWarmupsSinceDTCClear(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)
	PowertrainCombustionEngineTorque(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainFuelSystemAbsoluteLevel(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)
	PowertrainTractionBatteryCurrentVoltage(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)
	PowertrainTractionBatteryTemperatureAverage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTransmissionCurrentGear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error)
	PowertrainTransmissionTemperature(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)
	ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, 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