model

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// LastSeenField is the field name for the last seen timestamp.
	LastSeenField = "lastSeen"
)

Variables

Functions

func SetAggregationField added in v0.0.8

func SetAggregationField(aggregations *SignalAggregations, signal *vss.Signal)

SetAggregationField find the matching field based on the signal name and set the value based on the signal value.

func SetCollectionField added in v0.0.8

func SetCollectionField(collection *SignalCollection, signal *vss.Signal)

SetCollectionField find the matching field based on the signal name and set the value based on the signal value.

Types

type AggregatedSignalArgs added in v0.0.8

type AggregatedSignalArgs struct {
	SignalArgs
	// FromTS is the start timestamp for the data range.
	FromTS time.Time
	// ToTS is the end timestamp for the data range.
	ToTS time.Time
	// Interval in which the data is aggregated in milliseconds.
	Interval int64
	// FloatArgs represents arguments for each float signal.
	FloatArgs []FloatSignalArgs
	// StringArgs represents arguments for each string signal.
	StringArgs []StringSignalArgs
}

AggregatedSignalArgs is the arguments for querying aggregated signals.

type FloatAggregation

type FloatAggregation string
const (
	FloatAggregationAvg  FloatAggregation = "AVG"
	FloatAggregationMed  FloatAggregation = "MED"
	FloatAggregationMax  FloatAggregation = "MAX"
	FloatAggregationMin  FloatAggregation = "MIN"
	FloatAggregationRand FloatAggregation = "RAND"
)

func (FloatAggregation) IsValid added in v0.0.8

func (e FloatAggregation) IsValid() bool

func (FloatAggregation) MarshalGQL added in v0.0.8

func (e FloatAggregation) MarshalGQL(w io.Writer)

func (FloatAggregation) String added in v0.0.8

func (e FloatAggregation) String() string

func (*FloatAggregation) UnmarshalGQL added in v0.0.8

func (e *FloatAggregation) UnmarshalGQL(v interface{}) error

type FloatSignalArgs added in v0.0.4

type FloatSignalArgs struct {
	// Name is the signal name.
	Name string
	// Agg is the aggregation type.
	Agg FloatAggregation
}

FloatSignalArgs is the arguments for querying a float signals.

type LatestSignalsArgs added in v0.0.8

type LatestSignalsArgs struct {
	SignalArgs
	// SignalNames is the list of signal names to query.
	SignalNames []string
	// IncludeLastSeen is a flag to include a new signal for the last seen signal.
	IncludeLastSeen bool
}

LatestSignalsArgs is the arguments for querying the latest signals.

type Privilege

type Privilege string
const (
	PrivilegeVehicleNonLocationData Privilege = "VEHICLE_NON_LOCATION_DATA"
	PrivilegeVehicleCommands        Privilege = "VEHICLE_COMMANDS"
	PrivilegeVehicleCurrentLocation Privilege = "VEHICLE_CURRENT_LOCATION"
	PrivilegeVehicleAllTimeLocation Privilege = "VEHICLE_ALL_TIME_LOCATION"
	PrivilegeVehicleVinCredential   Privilege = "VEHICLE_VIN_CREDENTIAL"
)

func (Privilege) IsValid

func (e Privilege) IsValid() bool

func (Privilege) MarshalGQL

func (e Privilege) MarshalGQL(w io.Writer)

func (Privilege) String

func (e Privilege) String() string

func (*Privilege) UnmarshalGQL

func (e *Privilege) UnmarshalGQL(v interface{}) error

type Query

type Query struct {
}

The root query type for the GraphQL schema.

type SignalAggregations added in v0.0.8

type SignalAggregations struct {
	// Timestamp of the aggregated data.
	Timestamp time.Time `json:"timestamp"`
	// Tire pressure in kilo-Pascal.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow1WheelLeftTirePressure *float64 `json:"chassisAxleRow1WheelLeftTirePressure,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow1WheelRightTirePressure *float64 `json:"chassisAxleRow1WheelRightTirePressure,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow2WheelLeftTirePressure *float64 `json:"chassisAxleRow2WheelLeftTirePressure,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow2WheelRightTirePressure *float64 `json:"chassisAxleRow2WheelRightTirePressure,omitempty"`
	// Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna.
	// Required Privileges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationAltitude *float64 `json:"currentLocationAltitude,omitempty"`
	// Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.
	// Required Privileges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationLatitude *float64 `json:"currentLocationLatitude,omitempty"`
	// Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.
	// Required Privileges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationLongitude *float64 `json:"currentLocationLongitude,omitempty"`
	// Timestamp from GNSS system for current location, formatted according to ISO 8601 with UTC time zone.
	// Required Privileges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationTimestamp *string `json:"currentLocationTimestamp,omitempty"`
	// Horizontal dilution of precision of GPS
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketHDOP *float64 `json:"dimoAftermarketHDOP,omitempty"`
	// Number of sync satellites for GPS
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketNSAT *float64 `json:"dimoAftermarketNSAT,omitempty"`
	// Service Set Ientifier for the wifi.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketSSID *string `json:"dimoAftermarketSSID,omitempty"`
	// Indicate the current wpa state for the devices wifi
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketWPAState *string `json:"dimoAftermarketWPAState,omitempty"`
	// Air temperature outside the vehicle.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	ExteriorAirTemperature *float64 `json:"exteriorAirTemperature,omitempty"`
	// Current Voltage of the low voltage battery.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	LowVoltageBatteryCurrentVoltage *float64 `json:"lowVoltageBatteryCurrentVoltage,omitempty"`
	// PID 33 - Barometric pressure
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	OBDBarometricPressure *float64 `json:"obdBarometricPressure,omitempty"`
	// PID 04 - Engine load in percent - 0 = no load, 100 = full load
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	OBDEngineLoad *float64 `json:"obdEngineLoad,omitempty"`
	// PID 0F - Intake temperature
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	OBDIntakeTemp *float64 `json:"obdIntakeTemp,omitempty"`
	// PID 1F - Engine run time
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	OBDRunTime *float64 `json:"obdRunTime,omitempty"`
	// Engine coolant temperature.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineECT *float64 `json:"powertrainCombustionEngineECT,omitempty"`
	// Engine oil level.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineEngineOilLevel *string `json:"powertrainCombustionEngineEngineOilLevel,omitempty"`
	// Grams of air drawn into engine per second.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineMAF *float64 `json:"powertrainCombustionEngineMAF,omitempty"`
	// Engine speed measured as rotations per minute.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineSpeed *float64 `json:"powertrainCombustionEngineSpeed,omitempty"`
	// Current throttle position.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineTPS *float64 `json:"powertrainCombustionEngineTPS,omitempty"`
	// Current available fuel in the fuel tank expressed in liters.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainFuelSystemAbsoluteLevel *float64 `json:"powertrainFuelSystemAbsoluteLevel,omitempty"`
	// High level information of fuel types supported
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainFuelSystemSupportedFuelTypes *string `json:"powertrainFuelSystemSupportedFuelTypes,omitempty"`
	// Remaining range in meters using all energy sources available in the vehicle.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainRange *float64 `json:"powertrainRange,omitempty"`
	// Target charge limit (state of charge) for battery.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryChargingChargeLimit *float64 `json:"powertrainTractionBatteryChargingChargeLimit,omitempty"`
	// True if charging is ongoing. Charging is considered to be ongoing if energy is flowing from charger to vehicle.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryChargingIsCharging *float64 `json:"powertrainTractionBatteryChargingIsCharging,omitempty"`
	// Current electrical energy flowing in/out of battery. Positive = Energy flowing in to battery, e.g. during charging. Negative = Energy flowing out of battery, e.g. during driving.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryCurrentPower *float64 `json:"powertrainTractionBatteryCurrentPower,omitempty"`
	// Gross capacity of the battery.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryGrossCapacity *float64 `json:"powertrainTractionBatteryGrossCapacity,omitempty"`
	// Physical state of charge of the high voltage battery, relative to net capacity. This is not necessarily the state of charge being displayed to the customer.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryStateOfChargeCurrent *float64 `json:"powertrainTractionBatteryStateOfChargeCurrent,omitempty"`
	// Odometer reading, total distance travelled during the lifetime of the transmission.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTransmissionTravelledDistance *float64 `json:"powertrainTransmissionTravelledDistance,omitempty"`
	// Defines the powertrain type of the vehicle.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainType *string `json:"powertrainType,omitempty"`
	// Vehicle speed.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	Speed *float64 `json:"speed,omitempty"`
	// Vehicle brand or manufacturer.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	VehicleIdentificationBrand *string `json:"vehicleIdentificationBrand,omitempty"`
	// Vehicle model.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	VehicleIdentificationModel *string `json:"vehicleIdentificationModel,omitempty"`
	// Model year of the vehicle.
	// Required Privileges: [VEHICLE_NON_LOCATION_DATA]
	VehicleIdentificationYear *float64 `json:"vehicleIdentificationYear,omitempty"`
}

type SignalArgs added in v0.0.4

type SignalArgs struct {
	// Filter  optional filter for the signals.
	Filter *SignalFilter
	// TokenID is the vehicles's NFT token ID.
	TokenID uint32
}

SignalArgs is the base arguments for querying signals.

type SignalCollection added in v0.0.8

type SignalCollection struct {
	// The last time any signal was seen matching the filter.
	LastSeen *time.Time `json:"lastSeen,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow1WheelLeftTirePressure *SignalFloat `json:"chassisAxleRow1WheelLeftTirePressure,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow1WheelRightTirePressure *SignalFloat `json:"chassisAxleRow1WheelRightTirePressure,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow2WheelLeftTirePressure *SignalFloat `json:"chassisAxleRow2WheelLeftTirePressure,omitempty"`
	// Tire pressure in kilo-Pascal.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	ChassisAxleRow2WheelRightTirePressure *SignalFloat `json:"chassisAxleRow2WheelRightTirePressure,omitempty"`
	// Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna.
	// Required Privlieges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationAltitude *SignalFloat `json:"currentLocationAltitude,omitempty"`
	// Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.
	// Required Privlieges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationLatitude *SignalFloat `json:"currentLocationLatitude,omitempty"`
	// Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.
	// Required Privlieges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationLongitude *SignalFloat `json:"currentLocationLongitude,omitempty"`
	// Timestamp from GNSS system for current location, formatted according to ISO 8601 with UTC time zone.
	// Required Privlieges: [VEHICLE_ALL_TIME_LOCATION]
	CurrentLocationTimestamp *SignalString `json:"currentLocationTimestamp,omitempty"`
	// Horizontal dilution of precision of GPS
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketHDOP *SignalFloat `json:"dimoAftermarketHDOP,omitempty"`
	// Number of sync satellites for GPS
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketNSAT *SignalFloat `json:"dimoAftermarketNSAT,omitempty"`
	// Service Set Ientifier for the wifi.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketSSID *SignalString `json:"dimoAftermarketSSID,omitempty"`
	// Indicate the current wpa state for the devices wifi
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	DIMOAftermarketWPAState *SignalString `json:"dimoAftermarketWPAState,omitempty"`
	// Air temperature outside the vehicle.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	ExteriorAirTemperature *SignalFloat `json:"exteriorAirTemperature,omitempty"`
	// Current Voltage of the low voltage battery.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	LowVoltageBatteryCurrentVoltage *SignalFloat `json:"lowVoltageBatteryCurrentVoltage,omitempty"`
	// PID 33 - Barometric pressure
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	OBDBarometricPressure *SignalFloat `json:"obdBarometricPressure,omitempty"`
	// PID 04 - Engine load in percent - 0 = no load, 100 = full load
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	OBDEngineLoad *SignalFloat `json:"obdEngineLoad,omitempty"`
	// PID 0F - Intake temperature
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	OBDIntakeTemp *SignalFloat `json:"obdIntakeTemp,omitempty"`
	// PID 1F - Engine run time
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	OBDRunTime *SignalFloat `json:"obdRunTime,omitempty"`
	// Engine coolant temperature.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineECT *SignalFloat `json:"powertrainCombustionEngineECT,omitempty"`
	// Engine oil level.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineEngineOilLevel *SignalString `json:"powertrainCombustionEngineEngineOilLevel,omitempty"`
	// Grams of air drawn into engine per second.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineMAF *SignalFloat `json:"powertrainCombustionEngineMAF,omitempty"`
	// Engine speed measured as rotations per minute.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineSpeed *SignalFloat `json:"powertrainCombustionEngineSpeed,omitempty"`
	// Current throttle position.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainCombustionEngineTPS *SignalFloat `json:"powertrainCombustionEngineTPS,omitempty"`
	// Current available fuel in the fuel tank expressed in liters.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainFuelSystemAbsoluteLevel *SignalFloat `json:"powertrainFuelSystemAbsoluteLevel,omitempty"`
	// High level information of fuel types supported
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainFuelSystemSupportedFuelTypes *SignalString `json:"powertrainFuelSystemSupportedFuelTypes,omitempty"`
	// Remaining range in meters using all energy sources available in the vehicle.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainRange *SignalFloat `json:"powertrainRange,omitempty"`
	// Target charge limit (state of charge) for battery.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryChargingChargeLimit *SignalFloat `json:"powertrainTractionBatteryChargingChargeLimit,omitempty"`
	// True if charging is ongoing. Charging is considered to be ongoing if energy is flowing from charger to vehicle.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryChargingIsCharging *SignalFloat `json:"powertrainTractionBatteryChargingIsCharging,omitempty"`
	// Current electrical energy flowing in/out of battery. Positive = Energy flowing in to battery, e.g. during charging. Negative = Energy flowing out of battery, e.g. during driving.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryCurrentPower *SignalFloat `json:"powertrainTractionBatteryCurrentPower,omitempty"`
	// Gross capacity of the battery.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryGrossCapacity *SignalFloat `json:"powertrainTractionBatteryGrossCapacity,omitempty"`
	// Physical state of charge of the high voltage battery, relative to net capacity. This is not necessarily the state of charge being displayed to the customer.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTractionBatteryStateOfChargeCurrent *SignalFloat `json:"powertrainTractionBatteryStateOfChargeCurrent,omitempty"`
	// Odometer reading, total distance travelled during the lifetime of the transmission.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainTransmissionTravelledDistance *SignalFloat `json:"powertrainTransmissionTravelledDistance,omitempty"`
	// Defines the powertrain type of the vehicle.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	PowertrainType *SignalString `json:"powertrainType,omitempty"`
	// Vehicle speed.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	Speed *SignalFloat `json:"speed,omitempty"`
	// Vehicle brand or manufacturer.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	VehicleIdentificationBrand *SignalString `json:"vehicleIdentificationBrand,omitempty"`
	// Vehicle model.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	VehicleIdentificationModel *SignalString `json:"vehicleIdentificationModel,omitempty"`
	// Model year of the vehicle.
	// Required Privlieges: [VEHICLE_NON_LOCATION_DATA]
	VehicleIdentificationYear *SignalFloat `json:"vehicleIdentificationYear,omitempty"`
}

type SignalFilter added in v0.0.4

type SignalFilter struct {
	// Filter signals by source type.
	// avalible sources are: "autopi", "macaron", "smartcar", "tesla"
	Source *string `json:"source,omitempty"`
}

SignalFilter holds the filter parameters for the signal querys.

type SignalFloat

type SignalFloat struct {
	// timestamp of when this data was colllected
	Timestamp time.Time `json:"timestamp"`
	// value of the signal
	Value float64 `json:"value"`
}

type SignalString

type SignalString struct {
	// timestamp of when this data was colllected
	Timestamp time.Time `json:"timestamp"`
	// value of the signal
	Value string `json:"value"`
}

type StringAggregation

type StringAggregation string
const (
	// Randomly select a value from the group.
	StringAggregationRand StringAggregation = "RAND"
	// Select the most frequently occurring value in the group.
	StringAggregationTop StringAggregation = "TOP"
	// Return a list of unique values in the group.
	StringAggregationUnique StringAggregation = "UNIQUE"
)

func (StringAggregation) IsValid added in v0.0.8

func (e StringAggregation) IsValid() bool

func (StringAggregation) MarshalGQL added in v0.0.8

func (e StringAggregation) MarshalGQL(w io.Writer)

func (StringAggregation) String added in v0.0.8

func (e StringAggregation) String() string

func (*StringAggregation) UnmarshalGQL added in v0.0.8

func (e *StringAggregation) UnmarshalGQL(v interface{}) error

type StringSignalArgs added in v0.0.4

type StringSignalArgs struct {
	// Name is the signal name.
	Name string
	// Agg is the aggregation type.
	Agg StringAggregation
}

StringSignalArgs is the arguments for querying a string signals.

Jump to

Keyboard shortcuts

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