Compare commits
4 Commits
dd2fd1532b
...
a803671a3c
Author | SHA1 | Date | |
---|---|---|---|
a803671a3c | |||
b851468de2 | |||
988c7a1d20 | |||
a8e9fd3a3c |
10
consts.go
10
consts.go
@ -167,6 +167,14 @@ var modelCodes = map[string]string{
|
|||||||
"PCL": "Ascent Limited 7-Passenger",
|
"PCL": "Ascent Limited 7-Passenger",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var badValues = map[string]any{
|
||||||
|
"remainingFuelPercent": 101,
|
||||||
|
"tyreStatusFrontLeft": "UNKNOWN",
|
||||||
|
"tyreStatusFrontRight": "UNKNOWN",
|
||||||
|
"tyreStatusRearLeft": "UNKNOWN",
|
||||||
|
"tyreStatusRearRight": "UNKNOWN",
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
GET = "GET"
|
GET = "GET"
|
||||||
POST = "POST"
|
POST = "POST"
|
||||||
@ -301,7 +309,7 @@ const (
|
|||||||
ERROR_G1_INVALID_PIN = "SXM40006"
|
ERROR_G1_INVALID_PIN = "SXM40006"
|
||||||
ERROR_G1_SERVICE_ALREADY_STARTED = "SXM40009"
|
ERROR_G1_SERVICE_ALREADY_STARTED = "SXM40009"
|
||||||
ERROR_G1_PIN_LOCKED = "SXM40017"
|
ERROR_G1_PIN_LOCKED = "SXM40017"
|
||||||
VEHICLE_ATTRIBUTES = "attributes" //Controller Vehicle Data Dict Keys
|
VEHICLE_ATTRIBUTES = "attributes" // Controller Vehicle Data Dict Keys
|
||||||
VEHICLE_STATUS = "status"
|
VEHICLE_STATUS = "status"
|
||||||
VEHICLE_ID = "id"
|
VEHICLE_ID = "id"
|
||||||
VEHICLE_NAME = "nickname"
|
VEHICLE_NAME = "nickname"
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
mysubaru "git.savin.nyc/alex/mysubaru"
|
"git.savin.nyc/alex/mysubaru"
|
||||||
"git.savin.nyc/alex/mysubaru/config"
|
"git.savin.nyc/alex/mysubaru/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ module example
|
|||||||
|
|
||||||
go 1.24
|
go 1.24
|
||||||
|
|
||||||
require git.savin.nyc/alex/mysubaru v0.0.0-20250520201343-455e885a2cf3
|
require git.savin.nyc/alex/mysubaru v0.0.0-20250521042901-f241375645e3
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Jeffail/gabs/v2 v2.7.0 // indirect
|
github.com/Jeffail/gabs/v2 v2.7.0 // indirect
|
||||||
|
@ -11,7 +11,7 @@ type Response struct {
|
|||||||
Success bool `json:"success"` // true | false
|
Success bool `json:"success"` // true | false
|
||||||
ErrorCode string `json:"errorCode,omitempty"` // string | Error message if Success is false
|
ErrorCode string `json:"errorCode,omitempty"` // string | Error message if Success is false
|
||||||
DataName string `json:"dataName"` // string | Describes the structure which is incleded in Data field
|
DataName string `json:"dataName"` // string | Describes the structure which is incleded in Data field
|
||||||
Data interface{} `json:"data"` // Data struct
|
Data any `json:"data"` // Data struct
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account .
|
// Account .
|
||||||
@ -270,7 +270,7 @@ type ServiceRequest struct {
|
|||||||
// "dataName":"errorResponse"
|
// "dataName":"errorResponse"
|
||||||
type ErrorResponse struct {
|
type ErrorResponse struct {
|
||||||
ErrorLabel string `json:"errorLabel"` // "404-soa-unableToParseResponseBody"
|
ErrorLabel string `json:"errorLabel"` // "404-soa-unableToParseResponseBody"
|
||||||
ErrorDescription *string `json:"errorDescription,omitempty"` //null
|
ErrorDescription *string `json:"errorDescription,omitempty"` // null
|
||||||
}
|
}
|
||||||
|
|
||||||
// climateSettings: [ climateSettings ]
|
// climateSettings: [ climateSettings ]
|
||||||
@ -283,8 +283,8 @@ type ErrorResponse struct {
|
|||||||
// outerAirCirculation: [ outsideAir, recirculation ]
|
// outerAirCirculation: [ outsideAir, recirculation ]
|
||||||
// airConditionOn: [ false | true ]
|
// airConditionOn: [ false | true ]
|
||||||
// heatedRearWindowActive: [ false | true ]
|
// heatedRearWindowActive: [ false | true ]
|
||||||
// startConfiguration: [ start_Climate_Control_only_allow_key_in_ignition | START_ENGINE_ALLOW_KEY_IN_IGNITION ]
|
// startConfiguration: [ START_CLIMATE_CONTROL_ONLY_ALLOW_KEY_IN_IGNITION | START_ENGINE_ALLOW_KEY_IN_IGNITION ]
|
||||||
// runTimeMinutes: [ 10 ],
|
// runTimeMinutes: [ 10 ]
|
||||||
|
|
||||||
type VehicleHealthItem struct {
|
type VehicleHealthItem struct {
|
||||||
B2cCode string `json:"b2cCode"`
|
B2cCode string `json:"b2cCode"`
|
||||||
|
Reference in New Issue
Block a user