Documentation
¶
Overview ¶
Code generated by "model-garage" DO NOT EDIT.
Index ¶
- Constants
- Variables
- func MarshalAddress(addr common.Address) graphql.Marshaler
- func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal)
- func SetCollectionField(collection *SignalCollection, signal *vss.Signal)
- func UnmarshalAddress(v interface{}) (common.Address, error)
- type AftermarketDeviceBy
- type AggSignal
- type AggregatedSignalArgs
- type AliasKey
- type DeviceActivity
- type FloatAggregation
- type FloatSignalArgs
- type LatestSignalsArgs
- type Pomvc
- type Privilege
- type Query
- type SignalAggregations
- type SignalArgs
- type SignalCollection
- type SignalFilter
- type SignalFloat
- type SignalString
- type StringAggregation
- type StringSignalArgs
- type Vinvc
Constants ¶
const (
// LastSeenField is the field name for the last seen timestamp.
LastSeenField = "lastSeen"
)
Variables ¶
var AllFloatAggregation = []FloatAggregation{ FloatAggregationAvg, FloatAggregationMed, FloatAggregationMax, FloatAggregationMin, FloatAggregationRand, FloatAggregationFirst, FloatAggregationLast, }
var AllPrivilege = []Privilege{ PrivilegeVehicleNonLocationData, PrivilegeVehicleCommands, PrivilegeVehicleCurrentLocation, PrivilegeVehicleAllTimeLocation, PrivilegeVehicleVinCredential, PrivilegeManufacturerDeviceLastSeen, }
var AllStringAggregation = []StringAggregation{ StringAggregationRand, StringAggregationTop, StringAggregationUnique, StringAggregationFirst, StringAggregationLast, }
Functions ¶
func SetAggregationField ¶ added in v0.0.8
func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal)
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.
func UnmarshalAddress ¶ added in v0.0.23
Types ¶
type AftermarketDeviceBy ¶ added in v0.0.23
type AftermarketDeviceBy struct { TokenID *int `json:"tokenId,omitempty"` Address *common.Address `json:"address,omitempty"` Serial *string `json:"serial,omitempty"` }
The AftermarketDeviceBy input is used to specify a unique aftermarket device to query for last active status.
type AggSignal ¶ added in v0.0.15
type AggSignal struct { Name string Agg string Timestamp time.Time ValueNumber float64 ValueString string }
AggSignal holds the value of an aggregation for a signal in a certain time bucket. Only one of ValueNumber and ValueString contains a meaningful value, determined by Name.
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 AliasKey ¶ added in v0.0.15
AliasKey identifies the combination of signal name and aggregation for a certain time bucket.
type DeviceActivity ¶ added in v0.0.23
type FloatAggregation ¶
type FloatAggregation string
const ( FloatAggregationAvg FloatAggregation = "AVG" FloatAggregationMed FloatAggregation = "MED" FloatAggregationMax FloatAggregation = "MAX" FloatAggregationMin FloatAggregation = "MIN" FloatAggregationRand FloatAggregation = "RAND" FloatAggregationFirst FloatAggregation = "FIRST" FloatAggregationLast FloatAggregation = "LAST" )
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 Pomvc ¶ added in v0.0.22
type Pomvc struct { // vehicleTokenId is the token ID of the vehicle. VehicleTokenID *int `json:"vehicleTokenId,omitempty"` // recordedBy is the entity that recorded the VIN. RecordedBy *string `json:"recordedBy,omitempty"` // vehicleContractAddress is the address of the vehicle contract. VehicleContractAddress *string `json:"vehicleContractAddress,omitempty"` // validFrom is the time the VC is valid from. ValidFrom *time.Time `json:"validFrom,omitempty"` // rawVC is the raw VC JSON. RawVc string `json:"rawVC"` }
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" PrivilegeManufacturerDeviceLastSeen Privilege = "MANUFACTURER_DEVICE_LAST_SEEN" )
func (Privilege) MarshalGQL ¶
func (*Privilege) UnmarshalGQL ¶
type SignalAggregations ¶ added in v0.0.8
type SignalAggregations struct { Timestamp time.Time `json:"timestamp"` ValueNumbers map[AliasKey]float64 `json:"-"` ValueStrings map[AliasKey]string `json:"-"` }
SignalAggregations is the Go struct corresponding to the GraphQL type SignalAggregations. Most of its subfields are signal aggregation results that are returned by resolvers, so they do not appear on the model.
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"` // Vehicle rotation rate along Z (vertical). // Required Privileges: [VEHICLE_NON_LOCATION_DATA] AngularVelocityYaw *SignalFloat `json:"angularVelocityYaw,omitempty"` // Rotational speed of a vehicle's wheel. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ChassisAxleRow1WheelLeftSpeed *SignalFloat `json:"chassisAxleRow1WheelLeftSpeed,omitempty"` // Tire pressure in kilo-Pascal. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ChassisAxleRow1WheelLeftTirePressure *SignalFloat `json:"chassisAxleRow1WheelLeftTirePressure,omitempty"` // Rotational speed of a vehicle's wheel. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ChassisAxleRow1WheelRightSpeed *SignalFloat `json:"chassisAxleRow1WheelRightSpeed,omitempty"` // Tire pressure in kilo-Pascal. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ChassisAxleRow1WheelRightTirePressure *SignalFloat `json:"chassisAxleRow1WheelRightTirePressure,omitempty"` // Tire pressure in kilo-Pascal. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ChassisAxleRow2WheelLeftTirePressure *SignalFloat `json:"chassisAxleRow2WheelLeftTirePressure,omitempty"` // Tire pressure in kilo-Pascal. // Required Privileges: [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 Privileges: [VEHICLE_ALL_TIME_LOCATION] CurrentLocationAltitude *SignalFloat `json:"currentLocationAltitude,omitempty"` // Indicates if the latitude and longitude signals at the current timestamp have been redacted using a privacy zone. // Required Privileges: [VEHICLE_ALL_TIME_LOCATION] CurrentLocationIsRedacted *SignalFloat `json:"currentLocationIsRedacted,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 *SignalFloat `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 *SignalFloat `json:"currentLocationLongitude,omitempty"` // Horizontal dilution of precision of GPS // Required Privileges: [VEHICLE_NON_LOCATION_DATA] DIMOAftermarketHDOP *SignalFloat `json:"dimoAftermarketHDOP,omitempty"` // Number of sync satellites for GPS // Required Privileges: [VEHICLE_NON_LOCATION_DATA] DIMOAftermarketNSAT *SignalFloat `json:"dimoAftermarketNSAT,omitempty"` // Service Set Identifier for the wifi. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] DIMOAftermarketSSID *SignalString `json:"dimoAftermarketSSID,omitempty"` // Indicate the current WPA state for the device's wifi // Required Privileges: [VEHICLE_NON_LOCATION_DATA] DIMOAftermarketWPAState *SignalString `json:"dimoAftermarketWPAState,omitempty"` // Air temperature outside the vehicle. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ExteriorAirTemperature *SignalFloat `json:"exteriorAirTemperature,omitempty"` // Current Voltage of the low voltage battery. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] LowVoltageBatteryCurrentVoltage *SignalFloat `json:"lowVoltageBatteryCurrentVoltage,omitempty"` // PID 33 - Barometric pressure // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDBarometricPressure *SignalFloat `json:"obdBarometricPressure,omitempty"` // PID 2C - Commanded exhaust gas recirculation (EGR) // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDCommandedEGR *SignalFloat `json:"obdCommandedEGR,omitempty"` // PID 2E - Commanded evaporative purge (EVAP) valve // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDCommandedEVAP *SignalFloat `json:"obdCommandedEVAP,omitempty"` // PID 31 - Distance traveled since codes cleared // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDDistanceSinceDTCClear *SignalFloat `json:"obdDistanceSinceDTCClear,omitempty"` // PID 21 - Distance traveled with MIL on // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDDistanceWithMIL *SignalFloat `json:"obdDistanceWithMIL,omitempty"` // PID 04 - Engine load in percent - 0 = no load, 100 = full load // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDEngineLoad *SignalFloat `json:"obdEngineLoad,omitempty"` // PID 0A - Fuel pressure // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDFuelPressure *SignalFloat `json:"obdFuelPressure,omitempty"` // PID 0F - Intake temperature // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDIntakeTemp *SignalFloat `json:"obdIntakeTemp,omitempty"` // PID 07 - Long Term (learned) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDLongTermFuelTrim1 *SignalFloat `json:"obdLongTermFuelTrim1,omitempty"` // PID 0B - Intake manifold pressure // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDMAP *SignalFloat `json:"obdMAP,omitempty"` // PID 2x (byte CD) - Voltage for wide range/band oxygen sensor // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDO2WRSensor1Voltage *SignalFloat `json:"obdO2WRSensor1Voltage,omitempty"` // PID 2x (byte CD) - Voltage for wide range/band oxygen sensor // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDO2WRSensor2Voltage *SignalFloat `json:"obdO2WRSensor2Voltage,omitempty"` // PID 1F - Engine run time // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDRunTime *SignalFloat `json:"obdRunTime,omitempty"` // PID 06 - Short Term (immediate) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDShortTermFuelTrim1 *SignalFloat `json:"obdShortTermFuelTrim1,omitempty"` // PID 30 - Number of warm-ups since codes cleared // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDWarmupsSinceDTCClear *SignalFloat `json:"obdWarmupsSinceDTCClear,omitempty"` // Engine coolant temperature. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineECT *SignalFloat `json:"powertrainCombustionEngineECT,omitempty"` // Engine oil level. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineEngineOilLevel *SignalString `json:"powertrainCombustionEngineEngineOilLevel,omitempty"` // Engine oil level as a percentage. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineEngineOilRelativeLevel *SignalFloat `json:"powertrainCombustionEngineEngineOilRelativeLevel,omitempty"` // Grams of air drawn into engine per second. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineMAF *SignalFloat `json:"powertrainCombustionEngineMAF,omitempty"` // Engine speed measured as rotations per minute. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineSpeed *SignalFloat `json:"powertrainCombustionEngineSpeed,omitempty"` // Current throttle position. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineTPS *SignalFloat `json:"powertrainCombustionEngineTPS,omitempty"` // Current engine torque. Shall be reported as 0 during engine breaking. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainCombustionEngineTorque *SignalFloat `json:"powertrainCombustionEngineTorque,omitempty"` // Current available fuel in the fuel tank expressed in liters. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainFuelSystemAbsoluteLevel *SignalFloat `json:"powertrainFuelSystemAbsoluteLevel,omitempty"` // Level in fuel tank as percent of capacity. 0 = empty. 100 = full. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainFuelSystemRelativeLevel *SignalFloat `json:"powertrainFuelSystemRelativeLevel,omitempty"` // High level information of fuel types supported // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainFuelSystemSupportedFuelTypes *SignalString `json:"powertrainFuelSystemSupportedFuelTypes,omitempty"` // Remaining range in meters using all energy sources available in the vehicle. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainRange *SignalFloat `json:"powertrainRange,omitempty"` // Target charge limit (state of charge) for battery. // Required Privileges: [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 Privileges: [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 Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTractionBatteryCurrentPower *SignalFloat `json:"powertrainTractionBatteryCurrentPower,omitempty"` // Current Voltage of the battery. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTractionBatteryCurrentVoltage *SignalFloat `json:"powertrainTractionBatteryCurrentVoltage,omitempty"` // Gross capacity of the battery. // Required Privileges: [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 Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTractionBatteryStateOfChargeCurrent *SignalFloat `json:"powertrainTractionBatteryStateOfChargeCurrent,omitempty"` // Current average temperature of the battery cells. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTractionBatteryTemperatureAverage *SignalFloat `json:"powertrainTractionBatteryTemperatureAverage,omitempty"` // The current gear. 0=Neutral, 1/2/..=Forward, -1/-2/..=Reverse. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTransmissionCurrentGear *SignalFloat `json:"powertrainTransmissionCurrentGear,omitempty"` // The current gearbox temperature. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTransmissionTemperature *SignalFloat `json:"powertrainTransmissionTemperature,omitempty"` // Odometer reading, total distance travelled during the lifetime of the transmission. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTransmissionTravelledDistance *SignalFloat `json:"powertrainTransmissionTravelledDistance,omitempty"` // Defines the powertrain type of the vehicle. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainType *SignalString `json:"powertrainType,omitempty"` // Remaining distance to service (of any kind). Negative values indicate service overdue. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ServiceDistanceToService *SignalFloat `json:"serviceDistanceToService,omitempty"` // Vehicle speed. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] Speed *SignalFloat `json:"speed,omitempty"` }
type SignalFilter ¶ added in v0.0.4
type SignalFilter struct { // Filter signals by source type. // available sources are: "autopi", "macaron", "ruptela", "smartcar", "tesla" Source *string `json:"source,omitempty"` }
SignalFilter holds the filter parameters for the signal querys.
type SignalFloat ¶
type SignalString ¶
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" // Return value in group associated with the minimum time value. StringAggregationFirst StringAggregation = "FIRST" // Return value in group associated with the maximum time value. StringAggregationLast StringAggregation = "LAST" )
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.
type Vinvc ¶ added in v0.0.16
type Vinvc struct { // vehicleTokenId is the token ID of the vehicle. VehicleTokenID *int `json:"vehicleTokenId,omitempty"` // vin is the vehicle identification number. Vin *string `json:"vin,omitempty"` // recordedBy is the entity that recorded the VIN. RecordedBy *string `json:"recordedBy,omitempty"` // The time the VIN was recorded. RecordedAt *time.Time `json:"recordedAt,omitempty"` // countryCode is the country code that the VIN belongs to. CountryCode *string `json:"countryCode,omitempty"` // vehicleContractAddress is the address of the vehicle contract. VehicleContractAddress *string `json:"vehicleContractAddress,omitempty"` // validFrom is the time the VC is valid from. ValidFrom *time.Time `json:"validFrom,omitempty"` // validTo is the time the VC is valid to. ValidTo *time.Time `json:"validTo,omitempty"` // rawVC is the raw VC JSON. RawVc string `json:"rawVC"` }