Documentation ¶
Overview ¶
Code generated by "model-garage" DO NOT EDIT.
Index ¶
- Constants
- Variables
- func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal)
- func SetCollectionField(collection *SignalCollection, signal *vss.Signal)
- type AggSignal
- type AggregatedSignalArgs
- type AliasKey
- type FloatAggregation
- type FloatSignalArgs
- type LatestSignalsArgs
- 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, }
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.
Types ¶
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 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 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) 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"` // Tire pressure in kilo-Pascal. // Required Privileges: [VEHICLE_NON_LOCATION_DATA] ChassisAxleRow1WheelLeftTirePressure *SignalFloat `json:"chassisAxleRow1WheelLeftTirePressure,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 04 - Engine load in percent - 0 = no load, 100 = full load // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDEngineLoad *SignalFloat `json:"obdEngineLoad,omitempty"` // PID 0F - Intake temperature // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDIntakeTemp *SignalFloat `json:"obdIntakeTemp,omitempty"` // PID 1F - Engine run time // Required Privileges: [VEHICLE_NON_LOCATION_DATA] OBDRunTime *SignalFloat `json:"obdRunTime,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"` // 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"` // 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"` // 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"` // 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. // avalible sources are: "autopi", "macaron", "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.