Documentation ¶
Index ¶
- type DeviceType
- type GetAllDeviceDefinitionQuery
- type GetAllDeviceDefinitionQueryHandler
- type GetAllDeviceDefinitionQueryResult
- type GetAllIntegrationQuery
- type GetAllIntegrationQueryHandler
- type GetAllIntegrationQueryResult
- type GetDeviceCompatibility
- type GetDeviceDefinitionByIdQuery
- type GetDeviceDefinitionByIdQueryHandler
- type GetDeviceDefinitionByIdQueryResult
- type GetDeviceDefinitionByMakeModelYearQuery
- type GetDeviceDefinitionByMakeModelYearQueryHandler
- type GetDeviceDefinitionByMakeModelYearQueryResult
- type GetDeviceDefinitionWithRelsQuery
- type GetDeviceDefinitionWithRelsQueryHandler
- type GetDeviceDefinitionWithRelsQueryResult
- type GetDeviceModelYear
- type GetDeviceModels
- type GetDeviceVehicleInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"` }
DeviceType whether it is a vehicle or other type and basic information
type GetAllDeviceDefinitionQuery ¶
type GetAllDeviceDefinitionQuery struct { }
func (*GetAllDeviceDefinitionQuery) Key ¶
func (*GetAllDeviceDefinitionQuery) Key() string
type GetAllDeviceDefinitionQueryHandler ¶
type GetAllDeviceDefinitionQueryHandler struct { Repository repositories.DeviceDefinitionRepository MakeRepository repositories.DeviceMakeRepository }
func NewGetAllDeviceDefinitionQueryHandler ¶
func NewGetAllDeviceDefinitionQueryHandler(repository repositories.DeviceDefinitionRepository, makeRepository repositories.DeviceMakeRepository) GetAllDeviceDefinitionQueryHandler
type GetAllDeviceDefinitionQueryResult ¶
type GetAllDeviceDefinitionQueryResult struct { Make string `json:"make"` Models []GetDeviceModels `json:"models"` }
type GetAllIntegrationQuery ¶
type GetAllIntegrationQuery struct { }
func (*GetAllIntegrationQuery) Key ¶
func (*GetAllIntegrationQuery) Key() string
type GetAllIntegrationQueryHandler ¶
type GetAllIntegrationQueryHandler struct {
DBS func() *db.DBReaderWriter
}
func NewGetAllIntegrationQueryHandler ¶
func NewGetAllIntegrationQueryHandler(dbs func() *db.DBReaderWriter) GetAllIntegrationQueryHandler
type GetDeviceCompatibility ¶
type GetDeviceCompatibility struct { ID string `json:"id"` Type string `json:"type"` Style string `json:"style"` Vendor string `json:"vendor"` Region string `json:"region"` Country string `json:"country,omitempty"` Capabilities json.RawMessage `json:"capabilities"` }
DeviceCompatibility represents what systems we know this is compatible with
type GetDeviceDefinitionByIdQuery ¶
type GetDeviceDefinitionByIdQuery struct {
DeviceDefinitionID string `json:"deviceDefinitionId" validate:"required"`
}
func (*GetDeviceDefinitionByIdQuery) Key ¶
func (*GetDeviceDefinitionByIdQuery) Key() string
type GetDeviceDefinitionByIdQueryHandler ¶
type GetDeviceDefinitionByIdQueryHandler struct {
Repository repositories.DeviceDefinitionRepository
}
func NewGetDeviceDefinitionByIdQueryHandler ¶
func NewGetDeviceDefinitionByIdQueryHandler(repository repositories.DeviceDefinitionRepository) GetDeviceDefinitionByIdQueryHandler
type GetDeviceDefinitionByMakeModelYearQuery ¶
type GetDeviceDefinitionByMakeModelYearQuery struct { Make string `json:"make" validate:"required"` Model string `json:"model" validate:"required"` Year int `json:"year" validate:"required"` }
func (*GetDeviceDefinitionByMakeModelYearQuery) Key ¶
func (*GetDeviceDefinitionByMakeModelYearQuery) Key() string
type GetDeviceDefinitionByMakeModelYearQueryHandler ¶
type GetDeviceDefinitionByMakeModelYearQueryHandler struct {
Repository repositories.DeviceDefinitionRepository
}
func NewGetDeviceDefinitionByMakeModelYearQueryHandler ¶
func NewGetDeviceDefinitionByMakeModelYearQueryHandler(repository repositories.DeviceDefinitionRepository) GetDeviceDefinitionByMakeModelYearQueryHandler
type GetDeviceDefinitionByMakeModelYearQueryResult ¶
type GetDeviceDefinitionByMakeModelYearQueryResult struct { DeviceDefinitionID string `json:"deviceDefinitionId"` Name string `json:"name"` ImageURL *string `json:"imageUrl"` // CompatibleIntegrations has systems this vehicle can integrate with CompatibleIntegrations []GetDeviceCompatibility `json:"compatibleIntegrations"` Type DeviceType `json:"type"` // VehicleInfo will be empty if not a vehicle type VehicleInfo GetDeviceVehicleInfo `json:"vehicleData,omitempty"` Metadata interface{} `json:"metadata"` Verified bool `json:"verified"` }
type GetDeviceDefinitionWithRelsQuery ¶
type GetDeviceDefinitionWithRelsQuery struct {
DeviceDefinitionID string `json:"deviceDefinitionId" validate:"required"`
}
func (*GetDeviceDefinitionWithRelsQuery) Key ¶
func (*GetDeviceDefinitionWithRelsQuery) Key() string
type GetDeviceDefinitionWithRelsQueryHandler ¶
type GetDeviceDefinitionWithRelsQueryHandler struct {
Repository repositories.DeviceDefinitionRepository
}
func NewGetDeviceDefinitionWithRelsQueryHandler ¶
func NewGetDeviceDefinitionWithRelsQueryHandler(repository repositories.DeviceDefinitionRepository) GetDeviceDefinitionWithRelsQueryHandler
type GetDeviceModelYear ¶
type GetDeviceModels ¶
type GetDeviceModels struct { Model string `json:"model"` Years []GetDeviceModelYear `json:"years"` }
type GetDeviceVehicleInfo ¶
type GetDeviceVehicleInfo 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"` }
DeviceVehicleInfo represents some standard vehicle specific properties stored in the metadata json field in DB
Click to show internal directories.
Click to hide internal directories.