Documentation
¶
Index ¶
- type AutoIsoVINResponse
- type CarVxResponse
- type CreateDeviceTypeAttribute
- type DATGroupEquipment
- type DATGroupInfoResponse
- type DecodeProviderEnum
- type DeviceDefinitionMetadata
- type DeviceDefinitionTablelandModel
- type DeviceIntegration
- type DeviceIntegrationFeature
- type DeviceMakeMetadata
- type DeviceStyle
- type DeviceType
- type DeviceTypeAttribute
- type DeviceTypeAttributeEditor
- type DrivlyData
- type DrivlyVINResponse
- type ElevaVINResponse
- type ExternalID
- type GetDeviceDefinitionHardwareTemplateQueryResult
- type GetDeviceDefinitionQueryResult
- type GetDeviceDefinitionStyleQueryResult
- type GetDeviceStyleQueryResult
- type GetDeviceTypeAttributeQueryResult
- type GetDeviceTypeQueryResult
- type GetIntegrationQueryResult
- type IntegrationsMetadata
- type Japan17MMY
- type Manufacturer
- type PowerTrainType
- type PowerTrainTypeOptionData
- type PowerTrainTypeRuleData
- type PowertrainType
- type UpdateDeviceTypeAttribute
- type VINDecodingInfoData
- type VINDecodingVendorExtra
- type VehicleInfo
- type VincarioData
- type VincarioInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoIsoVINResponse ¶ added in v1.2.95
type AutoIsoVINResponse struct {
Version string `json:"version"`
Vin string `json:"vin"`
APIStatus string `json:"apiStatus"`
ResponseDate string `json:"responseDate"`
FunctionName string `json:"functionName"`
FunctionResponse struct {
Data struct {
API struct {
CoreVersion string `json:"core_version"`
EndpointVersion int `json:"endpoint_version"`
JSONVersion string `json:"json_version"`
APIType string `json:"api_type"`
APICache string `json:"api_cache"`
DataPrecision int `json:"data_precision"`
DataMatching string `json:"data_matching"`
LexLang string `json:"lex_lang"`
} `json:"api"`
Analyze struct {
VinOrginal struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"vin_orginal"`
VinCorrected struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"vin_corrected"`
VinYear struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"vin_year"`
VinSerial struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"vin_serial"`
Checkdigit struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"checkdigit"`
} `json:"analyze"`
Decoder struct {
Make struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"make"`
Model struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"model"`
ModelYear struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"model_year"`
Body struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"body"`
FuelType struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"fuel_type"`
VehicleType struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"vehicle_type"`
Doors struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"doors"`
EngineDisplCm3 struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_displ_cm3"`
EngineDisplL struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_displ_l"`
EnginePowerHp struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_power_hp"`
EnginePowerKw struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_power_kw"`
EngineConf struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_conf"`
EngineType struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_type"`
EngineVersion struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_version"`
EngineHead struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_head"`
EngineValves struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_valves"`
EngineCylinders struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_cylinders"`
EngineDisplCid struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_displ_cid"`
EngineTurbo struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"engine_turbo"`
DriveType struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"drive_type"`
GearboxType struct {
Desc string `json:"desc"`
Value string `json:"value"`
} `json:"gearbox_type"`
EmissionStd struct {
Desc string `json:"desc"`
Value string `json:"value"`
Co2Gkm string `json:"co2_gkm"`
} `json:"emission_std"`
} `json:"decoder"`
} `json:"data"`
} `json:"functionResponse"`
LicenseInfo struct {
LicenseNumber string `json:"licenseNumber"`
ValidTo string `json:"validTo"`
RemainingCredits int `json:"remainingCredits"`
RemainingMonthlyLimit int `json:"remainingMonthlyLimit"`
RemainingDailyLimit int `json:"remainingDailyLimit"`
} `json:"licenseInfo"`
}
func (*AutoIsoVINResponse) GetStyle ¶ added in v1.2.95
func (v *AutoIsoVINResponse) GetStyle() string
GetStyle returns a standard style string built from the data we have
func (*AutoIsoVINResponse) GetSubModel ¶ added in v1.2.95
func (v *AutoIsoVINResponse) GetSubModel() string
GetSubModel returns the Body type, which we can use as the sub model.
type CarVxResponse ¶ added in v1.4.9
type CarVxResponse struct {
Data []struct {
Make string `json:"make"`
Model string `json:"model"`
Grade string `json:"grade"`
Body string `json:"body"`
Engine string `json:"engine"`
Drive string `json:"drive"`
Transmission string `json:"transmission"`
Fuel string `json:"fuel"`
ManufactureDate struct {
Year string `json:"year"`
Month string `json:"month"`
} `json:"manufacture_date"`
} `json:"data"`
Error string `json:"error"`
}
nolint
type CreateDeviceTypeAttribute ¶ added in v0.2.3
type DATGroupEquipment ¶ added in v1.2.95
type DATGroupEquipment struct {
DatEquipmentId string `json:"datEquipmentId"`
ManufacturerEquipmentId string `json:"manufacturerEquipmentId"`
// if Vin Equipment, this comes from ShortName
ManufacturerDescription string `json:"manufacturerDescription"`
Description string `json:"description"`
}
nolint
type DATGroupInfoResponse ¶ added in v1.2.95
type DATGroupInfoResponse struct {
VIN string `json:"vin"`
DatECode string `json:"datecode"`
SalesDescription string `json:"salesDescription"`
VehicleTypeName string `json:"vehicleTypeName"`
// make
ManufacturerName string `json:"manufacturerName"`
BaseModelName string `json:"baseModelName"`
SubModelName string `json:"subModelName"`
// this is the model name we want to use
MainTypeGroupName string `json:"mainTypeGroupName"`
VinAccuracy int `json:"vinAccuracy"`
// when we're unable to get exact year
YearLow int `json:"yearLow"`
YearHigh int `json:"yearHigh"`
// we don't always get the exact year
Year int `json:"year"`
SeriesEquipment []DATGroupEquipment `json:"seriesEquipment"`
SpecialEquipment []DATGroupEquipment `json:"specialEquipment"`
DATECodeEquipment []DATGroupEquipment `json:"datECodeEquipment"`
VINEquipment []DATGroupEquipment `json:"vinEquipments"`
}
type DecodeProviderEnum ¶ added in v0.8.6
type DecodeProviderEnum string
const ( DrivlyProvider DecodeProviderEnum = "drivly" VincarioProvider DecodeProviderEnum = "vincario" AutoIsoProvider DecodeProviderEnum = "autoiso" DATGroupProvider DecodeProviderEnum = "dat" AllProviders DecodeProviderEnum = "" TeslaProvider DecodeProviderEnum = "tesla" Japan17VIN DecodeProviderEnum = "japan17vin" CarVXVIN DecodeProviderEnum = "carvxvin" ElevaKaufmannProvider DecodeProviderEnum = "eleva" )
type DeviceDefinitionMetadata ¶ added in v1.2.95
type DeviceDefinitionMetadata struct {
DeviceAttributes []DeviceTypeAttribute `json:"device_attributes"`
}
DeviceDefinitionMetadata part of tableland DD: includes a list of device-specific attributes.
type DeviceDefinitionTablelandModel ¶ added in v1.2.95
type DeviceDefinitionTablelandModel struct {
ID string `json:"id"`
KSUID string `json:"ksuid"`
Model string `json:"model"`
Year int `json:"year"`
DeviceType string `json:"devicetype"`
ImageURI string `json:"imageuri"`
Metadata *DeviceDefinitionMetadata `json:"metadata"`
}
DeviceDefinitionTablelandModel model returned by on-chain sql lite from tableland
func (*DeviceDefinitionTablelandModel) UnmarshalJSON ¶ added in v1.2.95
func (d *DeviceDefinitionTablelandModel) UnmarshalJSON(data []byte) error
UnmarshalJSON customizes the unmarshaling of DeviceDefinitionTablelandModel to handle cases where metadata is an empty string.
type DeviceIntegration ¶ added in v0.1.24
type DeviceIntegrationFeature ¶ added in v0.5.6
type DeviceMakeMetadata ¶ added in v0.5.1
type DeviceMakeMetadata struct {
RideGuideLink string `json:"ride_guide_link"`
}
type DeviceStyle ¶ added in v0.1.24
type DeviceStyle struct {
ID string `json:"id"`
DefinitionID string `json:"definitionId"`
Name string `json:"name"`
ExternalStyleID string `json:"externalStyleId"`
Source string `json:"source"`
SubModel string `json:"subModel"`
HardwareTemplateID string `json:"hardware_template_id"`
Metadata []DeviceTypeAttributeEditor `json:"metadata"`
}
type DeviceType ¶
type DeviceType struct {
// Type is eg. Vehicle, E-bike, roomba
Type string `json:"type"`
Make string `json:"make"`
Model string `json:"model"`
Year int `json:"year"`
SubModels []string `json:"subModels"`
MakeSlug string `json:"makeSlug"`
ModelSlug string `json:"modelSlug"`
}
DeviceType whether it is a vehicle or other type and basic information
type DeviceTypeAttribute ¶ added in v0.2.0
DeviceTypeAttribute part of tableland DD: name and value key pair of attributes
type DeviceTypeAttributeEditor ¶ added in v1.2.95
type DrivlyData ¶ added in v1.0.14
type DrivlyVINResponse ¶ added in v1.2.95
type DrivlyVINResponse struct {
Vin string `json:"vin"`
WindowSticker string `json:"windowSticker"`
Year string `json:"year"`
Make string `json:"make"`
Model string `json:"model"`
SubModel string `json:"subModel"`
Trim string `json:"trim"`
Generation int `json:"generation"`
SubGeneration int `json:"subGeneration"`
ManufacturerCode string `json:"manufacturerCode"`
Body string `json:"body"`
Style string `json:"style"`
Type string `json:"type"`
Drive string `json:"drive"`
Transmission string `json:"transmission"`
TransmissionDetails string `json:"transmissionDetails"`
Engine string `json:"engine"`
EngineDetails string `json:"engineDetails"`
Doors int `json:"doors"`
PaintColor string `json:"paintColor"`
PaintName string `json:"paintName"`
PaintCode string `json:"paintCode"`
Interior string `json:"interior"`
Options []string `json:"options"`
OptionCodes string `json:"optionCodes"`
MsrpBase float64 `json:"msrpBase"`
MsrpDiscount float64 `json:"msrpDiscount"`
MsrpOptions float64 `json:"msrpOptions"`
MsrpDelivery float64 `json:"msrpDelivery"`
Msrp float64 `json:"msrp"`
WarrantyBasicMonths int `json:"warrantyBasicMonths"`
WarrantyCorrosionMonths int `json:"warrantyCorrosionMonths"`
WarrantyEmissionsMonths int `json:"warrantyEmissionsMonths"`
WarrantyFullMonths int `json:"warrantyFullMonths"`
WarrantyFullMiles int `json:"warrantyFullMiles"`
WarrantyDrivetrainMonths int `json:"warrantyDrivetrainMonths"`
WarrantyPowertrainMonths int `json:"warrantyPowertrainMonths"`
WarrantyPowertrainMiles int `json:"warrantyPowertrainMiles"`
WarrantyRoadsideMonths int `json:"warrantyRoadsideMonths"`
WarrantyRoadsideMiles int `json:"warrantyRoadsideMiles"`
Wheelbase string `json:"wheelbase"`
Fuel string `json:"fuel"`
FuelTankCapacityGal float64 `json:"fuelTankCapacityGal"`
Mpg int `json:"mpg"`
MpgCity int `json:"mpgCity"`
MpgHighway int `json:"mpgHighway"`
LastOdometer int `json:"lastOdometer"`
LastOdometerDate string `json:"lastOdometerDate"`
EstimatedOdometer int `json:"estimatedOdometer"`
Salvage bool `json:"salvage"`
PreviousOwners int `json:"previousOwners"`
TotalLoss bool `json:"totalLoss"`
Branded bool `json:"branded"`
LastTitleState string `json:"lastTitleState"`
TitleIssueDate string `json:"titleIssueDate"`
TitleNumber string `json:"titleNumber"`
Confidence float64 `json:"confidence"`
VehicleHistory []string `json:"vehicleHistory"`
InstalledEquipment []string `json:"installedEquipment"`
Dimensions []string `json:"dimensions"`
}
func (*DrivlyVINResponse) GetExternalID ¶ added in v1.2.95
func (vir *DrivlyVINResponse) GetExternalID() string
GetExternalID builds something we can use as an external ID that is drivly specific, at the MMY level (not for style)
type ElevaVINResponse ¶ added in v1.5.6
type ElevaVINResponse struct {
Error int `json:"error"`
Message string `json:"message"`
Data struct {
Client struct {
Rut string `json:"rut"`
ClientId int `json:"clientId"`
Name string `json:"name"`
Lastname string `json:"lastname"`
Email string `json:"email"`
Phone string `json:"phone"`
BusinessName string `json:"businessName"`
} `json:"client"`
Vehicle struct {
Plate string `json:"plate"`
Chassis string `json:"chassis"`
Model string `json:"model"`
Kms int `json:"kms"`
Baumuster string `json:"baumuster"`
Brand string `json:"brand"`
} `json:"vehicle"`
} `json:"data"`
}
nolint
type ExternalID ¶ added in v0.3.3
type GetDeviceDefinitionHardwareTemplateQueryResult ¶ added in v0.6.8
type GetDeviceDefinitionHardwareTemplateQueryResult struct {
TemplateID string `json:"template_id"`
}
type GetDeviceDefinitionQueryResult ¶
type GetDeviceDefinitionQueryResult struct {
DeviceDefinitionID string `json:"deviceDefinitionId"`
NameSlug string `json:"nameSlug"`
Name string `json:"name"`
ImageURL string `json:"imageUrl"`
HardwareTemplateID string `json:"hardware_template_id"`
Metadata []byte `json:"metadata"`
Verified bool `json:"verified"`
DeviceStyles []DeviceStyle `json:"deviceStyles"`
DeviceAttributes []DeviceTypeAttributeEditor `json:"deviceAttributes"`
Transactions []string `json:"transactions"`
MakeName string `json:"makeSlug"`
MakeTokenID int `json:"makeTokenId"`
}
type GetDeviceDefinitionStyleQueryResult ¶ added in v1.0.15
type GetDeviceDefinitionStyleQueryResult struct {
DeviceAttributes []DeviceTypeAttributeEditor `json:"deviceAttributes"`
}
type GetDeviceStyleQueryResult ¶ added in v0.1.27
type GetDeviceStyleQueryResult struct {
ID string `json:"id"`
DefinitionID string `json:"definition_id"`
DeviceDefinition GetDeviceDefinitionStyleQueryResult `json:"device_definition"`
Name string `json:"name"`
ExternalStyleID string `json:"external_style_id"`
Source string `json:"source"`
SubModel string `json:"sub_model"`
HardwareTemplateID string `json:"hardware_template_id"`
}
type GetDeviceTypeAttributeQueryResult ¶ added in v0.2.0
type GetDeviceTypeQueryResult ¶ added in v0.2.0
type GetDeviceTypeQueryResult struct {
ID string `json:"id"`
Name string `json:"name"`
Metadatakey string `json:"metadata_key"`
Attributes []GetDeviceTypeAttributeQueryResult `json:"attributes"`
}
type GetIntegrationQueryResult ¶ added in v0.1.26
type GetIntegrationQueryResult struct {
ID string `json:"id"`
Type string `json:"type"`
Style string `json:"style"`
Vendor string `json:"vendor"`
AutoPiDefaultTemplateID int `json:"auto_pi_default_template_id"`
RefreshLimitSecs int `json:"refresh_limit_secs"`
AutoPiPowertrainToTemplateID map[PowertrainType]int `json:"auto_pi_power_train_to_template_id,omitempty"`
TokenID int `json:"token_id"`
Points int `json:"points"`
ManufacturerTokenID int `json:"manufacturer_token_id"`
}
type IntegrationsMetadata ¶ added in v0.1.10
type IntegrationsMetadata struct {
AutoPiDefaultTemplateID int `json:"autoPiDefaultTemplateId"`
AutoPiPowertrainToTemplateID map[PowertrainType]int `json:"autoPiPowertrainToTemplateId,omitempty"`
}
IntegrationsMetadata represents json stored in integrations table metadata jsonb column
type Japan17MMY ¶ added in v1.2.96
type Japan17MMY struct {
VIN string `json:"vin"`
ManufacturerName string `json:"manufacturerName"`
ManufacturerLowerCase string `json:"manufacturerLowerCase"`
ModelName string `json:"modelName"`
Year int `json:"year"`
}
nolint
type Manufacturer ¶ added in v1.4.0
type PowerTrainType ¶ added in v1.0.14
type PowerTrainTypeOptionData ¶ added in v1.0.14
type PowerTrainTypeRuleData ¶ added in v1.0.14
type PowerTrainTypeRuleData struct {
PowerTrainTypeList []PowerTrainType `yaml:"types"`
DrivlyList []PowerTrainTypeOptionData `yaml:"drivly"`
VincarioList []PowerTrainTypeOptionData `yaml:"vincario"`
}
type PowertrainType ¶ added in v0.1.10
type PowertrainType string
const ( ICE PowertrainType = "ICE" HEV PowertrainType = "HEV" PHEV PowertrainType = "PHEV" BEV PowertrainType = "BEV" FCEV PowertrainType = "FCEV" )
func (PowertrainType) String ¶ added in v0.1.10
func (p PowertrainType) String() string
func (*PowertrainType) UnmarshalJSON ¶ added in v0.1.10
func (p *PowertrainType) UnmarshalJSON(b []byte) error
type UpdateDeviceTypeAttribute ¶ added in v0.2.0
type VINDecodingInfoData ¶ added in v0.7.9
type VINDecodingVendorExtra ¶ added in v1.5.5
type VINDecodingVendorExtra struct {
VendorsTried []string
DrivlyRaw []byte
VincarioRaw []byte
AutoIsoRaw []byte
DATGroupRaw []byte
Japan17VINRaw []byte
CarVXVINRaw []byte
}
VINDecodingVendorExtra extra information from decoding process to store for failures
type VehicleInfo ¶ added in v0.1.24
type VehicleInfo struct {
FuelType string `json:"fuel_type,omitempty"`
DrivenWheels string `json:"driven_wheels,omitempty"`
NumberOfDoors string `json:"number_of_doors,omitempty"`
BaseMSRP int `json:"base_msrp,omitempty"`
EPAClass string `json:"epa_class,omitempty"`
VehicleType string `json:"vehicle_type,omitempty"` // VehicleType PASSENGER CAR, from NHTSA
MPGHighway string `json:"mpg_highway,omitempty"`
MPGCity string `json:"mpg_city,omitempty"`
FuelTankCapacityGal string `json:"fuel_tank_capacity_gal,omitempty"`
MPG string `json:"mpg,omitempty"`
}
VehicleInfo represents some standard vehicle specific properties stored in the metadata json field in DB
type VincarioData ¶ added in v1.0.14
type VincarioInfoResponse ¶ added in v1.2.95
type VincarioInfoResponse struct {
VIN string `key:"VIN"`
VehicleID int `key:"Vehicle ID"`
Make string `key:"Make"`
Model string `key:"Model"`
ModelYear int `key:"Model Year"`
ProductType string `key:"Product Type"`
Body string `key:"Body"`
Series string `key:"Series"`
Drive string `key:"Drive"`
EngineDisplacement int `key:"Engine Displacement (ccm)"`
FuelType string `key:"Fuel Type - Primary"`
EngineCode string `key:"Engine Code"`
Transmission string `key:"Transmission"`
NumberOfGears int `key:"Number of Gears"`
EmissionStandard string `key:"Emission Standard"`
PlantCountry string `key:"Plant Country"`
ProductionStopped int `key:"Production Stopped"`
EngineManufacturer string `key:"Engine Manufacturer"`
EngineType string `key:"Engine Type"`
AverageCO2Emission float64 `key:"Average CO2 Emission (g/km)"`
NumberOfWheels int `key:"Number Wheels"`
NumberOfAxles int `key:"Number of Axles"`
NumberOfDoors int `key:"Number of Doors"`
FrontBrakes string `key:"Front Brakes"`
RearBrakes string `key:"Rear Brakes"`
BrakeSystem string `key:"Brake System"`
SteeringType string `key:"Steering Type"`
WheelSize string `key:"Wheel Size"`
WheelSizeArray []string `key:"Wheel Size Array"`
Wheelbase int `key:"Wheelbase (mm)"`
WheelbaseArray []int `key:"Wheelbase Array (mm)"`
Height int `key:"Height (mm)"`
Length int `key:"Length (mm)"`
Width int `key:"Width (mm)"`
RearOverhang int `key:"Rear Overhang (mm)"`
FrontOverhang int `key:"Front Overhang (mm)"`
TrackFront int `key:"Track Front (mm)"`
TrackRear int `key:"Track Rear (mm)"`
MaxSpeed int `key:"Max Speed (km/h)"`
WeightEmpty int `key:"Weight Empty (kg)"`
MaxWeight int `key:"Max Weight (kg)"`
MaxRoofLoad int `key:"Max roof load (kg)"`
TrailerLoadWithoutBrakes int `key:"Permitted trailer load without brakes (kg)"`
CheckDigit string `key:"Check Digit"`
SequentialNumber string `key:"Sequential Number"`
}
func (*VincarioInfoResponse) GetMetadata ¶ added in v1.2.95
func (v *VincarioInfoResponse) GetMetadata() (null.JSON, error)
GetMetadata returns a map of metadata for the vehicle, in standard format.
func (*VincarioInfoResponse) GetStyle ¶ added in v1.2.95
func (v *VincarioInfoResponse) GetStyle() string
GetStyle returns a standard style string built from the data we have
func (*VincarioInfoResponse) GetSubModel ¶ added in v1.2.95
func (v *VincarioInfoResponse) GetSubModel() string
GetSubModel returns the Body type from Vincario, which we can use as the sub model.