models

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 CreateDeviceTypeAttribute struct {
	Name         string   `json:"name"`
	Label        string   `json:"label"`
	Description  string   `json:"description"`
	Type         string   `json:"type"`
	Required     bool     `json:"required"`
	DefaultValue string   `json:"default_value"` //nolint
	Options      []string `json:"options"`
}

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 DeviceDefinition added in v1.6.2

type DeviceDefinition struct {
	DeviceDefinitionID string       `json:"deviceDefinitionId"`
	Manufacturer       Manufacturer `json:"manufacturer"`
	Model              string       `json:"model"`
	Year               int          `json:"year"`
}

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 DeviceIntegration struct {
	ID       string                     `json:"id"`
	Type     string                     `json:"type"`
	Style    string                     `json:"style"`
	Vendor   string                     `json:"vendor"`
	Region   string                     `json:"region"`
	Features []DeviceIntegrationFeature `json:"features"`
}

type DeviceIntegrationFeature added in v0.5.6

type DeviceIntegrationFeature struct {
	FeatureKey   string `json:"featureKey"`
	SupportLevel int    `json:"supportLevel"`
}

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

type DeviceTypeAttribute struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

DeviceTypeAttribute part of tableland DD: name and value key pair of attributes

type DeviceTypeAttributeEditor added in v1.2.95

type DeviceTypeAttributeEditor struct {
	Name        string   `json:"name"`
	Label       string   `json:"label"`
	Description string   `json:"description"`
	Type        string   `json:"type"`
	Required    bool     `json:"required"`
	Value       string   `json:"value"`
	Option      []string `json:"options"`
}

type DrivlyData added in v1.0.14

type DrivlyData struct {
	VIN   string `json:"vin"`
	Make  string `json:"make"`
	Model string `json:"model"`
	Fuel  string `json:"fuel"`
}

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"`
	BatteryCapacityKwh       float64  `json:"batteryCapacityKwh"`
	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 ExternalID struct {
	Vendor string `json:"vendor"`
	ID     string `json:"id"`
}

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 GetDeviceTypeAttributeQueryResult struct {
	Name         string   `json:"name"`
	Label        string   `json:"label"`
	Description  string   `json:"description"`
	Type         string   `json:"type"`
	Required     bool     `json:"required"`
	DefaultValue string   `json:"default_value"` //nolint
	Options      []string `json:"options"`
}

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 Manufacturer struct {
	TokenID int    `json:"tokenId"`
	Name    string `json:"name"`
	TableID int    `json:"tableId"`
	Owner   string `json:"owner"`
}

type PowerTrainType added in v1.0.14

type PowerTrainType struct {
	Name    string   `yaml:"name"`
	Type    string   `yaml:"type"`
	Default bool     `yaml:"default"`
	Makes   []string `yaml:"makes"`
	Models  []string `yaml:"models"`
}

type PowerTrainTypeOptionData added in v1.0.14

type PowerTrainTypeOptionData struct {
	Type   string   `yaml:"type"`
	Values []string `yaml:"values"`
}

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 Template added in v1.6.5

type Template struct {
	ID           string               `json:"id"`
	DeviceType   string               `json:"deviceType"`
	Manufacturer TemplateManufacturer `json:"manufacturer"`
	Model        string               `json:"model"`
	Year         int                  `json:"year"`
	ImageURI     string               `json:"imageURI,omitempty"`
	// HardwareTemplateID is DIMO hardware configuration, not a vehicle
	// attribute, which is why it sits outside Attributes and is never
	// validated against the vehicle vocabulary.
	HardwareTemplateID string         `json:"hardwareTemplateId,omitempty"`
	Attributes         map[string]any `json:"attributes"`
	Trims              []Trim         `json:"trims"`
	Version            int            `json:"version"`
	Author             string         `json:"author,omitempty"`
	CreatedAt          string         `json:"createdAt,omitempty"`
	UpdatedAt          string         `json:"updatedAt,omitempty"`
}

Template mirrors definitions-worker/schema/template.schema.json: a vehicle trim-configuration template covering one model-year plus the trims it shipped in. Attributes true of every trim live on Attributes; anything that differs between trims lives on the trim itself.

Attribute values are typed in the contract -- a number arrives as a number -- so they are decoded as any rather than string.

type TemplateManufacturer added in v1.6.5

type TemplateManufacturer struct {
	Slug    string `json:"slug"`
	Name    string `json:"name"`
	TokenID int    `json:"tokenId,omitempty"`
}

type Trim added in v1.6.5

type Trim struct {
	Name      string        `json:"name"`
	Selectors TrimSelectors `json:"selectors"`
	// HardwareTemplateID overrides the template's value for this trim only;
	// same "not a vehicle attribute" rule as Template.HardwareTemplateID.
	HardwareTemplateID string         `json:"hardwareTemplateId,omitempty"`
	Attributes         map[string]any `json:"attributes"`
}

Trim is one configuration a Template's model-year shipped in. Every template carries at least one, even a model-year sold in a single configuration.

type TrimSelectors added in v1.6.5

type TrimSelectors struct {
	ManufacturerCode []string `json:"manufacturerCode,omitempty"`
	StyleName        []string `json:"styleName,omitempty"`
	VINPattern       string   `json:"vinPattern,omitempty"`
}

TrimSelectors are the signals a decoded VIN is matched against to narrow a Template to exactly one Trim. A trim matches when every selector present matches.

type UpdateDeviceTypeAttribute added in v0.2.0

type UpdateDeviceTypeAttribute struct {
	// Name should match one of the name keys in the allowed device_types.properties
	Name  string `json:"name"`
	Value string `json:"value"`
}

type VINDecodingInfoData added in v0.7.9

type VINDecodingInfoData struct {
	VIN        string
	Make       string
	Model      string
	SubModel   string
	Year       int32
	StyleName  string
	Source     DecodeProviderEnum
	ExternalID string
	MetaData   null.JSON
	Raw        []byte
	FuelType   string
	// ManufacturerCode is the OEM-issued trim/style code, when the decode
	// provider supplies one. Only drivly does today (DrivlyVINResponse.ManufacturerCode);
	// every other provider leaves this empty, the same way they already
	// leave StyleName/FuelType empty when they have nothing to report --
	// an empty code just means manufacturerCode-keyed trim selectors can't
	// match for that decode, not an error.
	ManufacturerCode string
}

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"`
	BatteryCapacityKwh  string `json:"battery_capacity_kwh,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 VincarioData struct {
	VIN      string `json:"VIN"`
	Make     string `json:"Make"`
	Model    string `json:"Model"`
	FuelType string `json:"FuelType"`
}

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.

Jump to

Keyboard shortcuts

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