Documentation
¶
Index ¶
- Constants
- func BuildDeviceDefinitionName(year int16, mk string, model string) string
- func BuildDeviceTypeAttributes(attributes []*coremodels.UpdateDeviceTypeAttribute, dt *repoModel.DeviceType) (null.JSON, error)
- func BuildExternalIDs(externalIDsJSON null.JSON) []*coremodels.ExternalID
- func BuildFromDeviceDefinitionToQueryResult(dd *coremodels.DeviceDefinitionTablelandModel, dm *coremodels.Manufacturer, ...) (*coremodels.GetDeviceDefinitionQueryResult, error)
- func CheckTransactionStatus(txHash, apiKey string, useAmoy bool) (bool, error)
- func Contains(s []string, str string) bool
- func ConvertDeviceTypeAttrsToDefinitionMetadata(attributes []*coremodels.UpdateDeviceTypeAttribute) *coremodels.DeviceDefinitionMetadata
- func ConvertMetadataToDeviceAttributes(metadata *coremodels.DeviceDefinitionMetadata) []coremodels.DeviceTypeAttributeEditor
- func DeviceDefinitionSlug(makeSlug, modelSlug string, year int16) string
- func ExternalIDsToGRPC(externalIDs []*coremodels.ExternalID) []*grpc.ExternalID
- func GetDefaultImageURL(images []*repoModel.Image) string
- func GetDeviceAttributesTyped(metadata null.JSON, key string) []coremodels.DeviceTypeAttributeEditor
- func JSONOrDefault(j null.JSON) json.RawMessage
- type ErrorResponse
- type RegionEnum
- type TxStatusResponse
Constants ¶
View Source
const ( PowerTrainType = "powertrain_type" // VehicleMetadataKey is the default json key where we store vehicle metadata in device_definitions.metadata VehicleMetadataKey = "vehicle_info" AftermarketMetadataKey = "aftermarket-device" )
View Source
const ( SmartCarVendor = "SmartCar" AutoPiVendor = "AutoPi" )
View Source
const ( DefaultDeviceType = "vehicle" DefautlAutoPiTemplate = "130" // dimo device client template )
Variables ¶
This section is empty.
Functions ¶
func BuildDeviceDefinitionName ¶ added in v0.4.3
func BuildDeviceTypeAttributes ¶ added in v0.2.0
func BuildDeviceTypeAttributes(attributes []*coremodels.UpdateDeviceTypeAttribute, dt *repoModel.DeviceType) (null.JSON, error)
func BuildExternalIDs ¶ added in v1.0.38
func BuildExternalIDs(externalIDsJSON null.JSON) []*coremodels.ExternalID
func BuildFromDeviceDefinitionToQueryResult ¶ added in v0.1.30
func BuildFromDeviceDefinitionToQueryResult(dd *coremodels.DeviceDefinitionTablelandModel, dm *coremodels.Manufacturer, dss []*repoModel.DeviceStyle, trx []*repoModel.DefinitionTransaction) (*coremodels.GetDeviceDefinitionQueryResult, error)
func CheckTransactionStatus ¶ added in v1.2.95
func ConvertDeviceTypeAttrsToDefinitionMetadata ¶ added in v1.2.95
func ConvertDeviceTypeAttrsToDefinitionMetadata(attributes []*coremodels.UpdateDeviceTypeAttribute) *coremodels.DeviceDefinitionMetadata
func ConvertMetadataToDeviceAttributes ¶ added in v1.2.95
func ConvertMetadataToDeviceAttributes(metadata *coremodels.DeviceDefinitionMetadata) []coremodels.DeviceTypeAttributeEditor
func DeviceDefinitionSlug ¶ added in v1.1.9
func ExternalIDsToGRPC ¶ added in v1.0.38
func ExternalIDsToGRPC(externalIDs []*coremodels.ExternalID) []*grpc.ExternalID
func GetDefaultImageURL ¶ added in v0.7.4
GetDefaultImageURL if the images relation is not empty, looks for the best image to use based on some logic
func GetDeviceAttributesTyped ¶ added in v0.8.8
func GetDeviceAttributesTyped(metadata null.JSON, key string) []coremodels.DeviceTypeAttributeEditor
func JSONOrDefault ¶ added in v0.1.2
func JSONOrDefault(j null.JSON) json.RawMessage
Types ¶
type ErrorResponse ¶
type RegionEnum ¶ added in v0.1.6
type RegionEnum string
const ( AmericasRegion RegionEnum = "Americas" EuropeRegion RegionEnum = "Europe" )
func (RegionEnum) String ¶ added in v0.1.6
func (r RegionEnum) String() string
type TxStatusResponse ¶ added in v1.2.95
Click to show internal directories.
Click to hide internal directories.