Documentation
¶
Index ¶
- Constants
- func ChallengeVerifier() (string, string, error)
- func RandomString(n int) string
- type API
- func (v *API) Action(vin, action, value string) error
- func (v *API) Any(base, vin string) (interface{}, error)
- func (v *API) Charger(vin string) (ChargerResponse, error)
- func (v *API) Climater(vin string) (ClimaterResponse, error)
- func (v *API) HomeRegion(vin string) error
- func (v *API) RolesRights(vin string) (string, error)
- func (v *API) Vehicles() ([]string, error)
- type ChargerResponse
- type ClimaterResponse
- type FormVars
- type HomeRegion
- type Identity
- type Provider
- type TimedInt
- type TimedString
- type TimedTemperature
- type VehiclesResponse
Constants ¶
const ( ActionCharge = "batterycharge" ActionChargeStart = "start" ActionChargeStop = "stop" )
const ( // IdentityURI is the VW OIDC identidy provider uri IdentityURI = "https://identity.vwgroup.io" // OauthTokenURI is used for refreshing tokens OauthTokenURI = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token" // OauthRevokeURI is used for revoking tokens OauthRevokeURI = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/revoke" )
const DefaultBaseURI = "https://msg.volkswagen.de/fs-car"
DefaultBaseURI is the VW api base URI
const RegionAPI = "https://mal-1a.prd.ece.vwg-connect.com/api"
RegionAPI is the VW api used for determining the home region
Variables ¶
This section is empty.
Functions ¶
func ChallengeVerifier ¶
ChallengeVerifier returns a challenge/verifier base64-encoded code combination
func RandomString ¶
RandomString creates random string of N integers
Types ¶
type API ¶
API is the VW api client
func (*API) Charger ¶
func (v *API) Charger(vin string) (ChargerResponse, error)
Charger implements the /charger response
func (*API) Climater ¶
func (v *API) Climater(vin string) (ClimaterResponse, error)
Climater implements the /climater response
func (*API) HomeRegion ¶
HomeRegion updates the home region for the given vehicle
func (*API) RolesRights ¶
RolesRights updates the home region for the given vehicle
type ChargerResponse ¶
type ChargerResponse struct { Charger struct { Status struct { BatteryStatusData struct { StateOfCharge TimedInt RemainingChargingTime TimedInt } ChargingStatusData struct { ChargingState TimedString // off, charging ChargingMode TimedString // invalid, AC ChargingReason TimedString // invalid, immediate ExternalPowerSupplyState TimedString // unavailable, available EnergyFlow TimedString // on, off } PlugStatusData struct { PlugState TimedString // connected } CruisingRangeStatusData struct { EngineTypeFirstEngine TimedString // typeIsElectric, petrolGasoline EngineTypeSecondEngine TimedString // typeIsElectric, petrolGasoline PrimaryEngineRange TimedInt SecondaryEngineRange TimedInt HybridRange TimedInt } } } }
ChargerResponse is the /bs/batterycharge/v1/%s/%s/vehicles/%s/charger api
type ClimaterResponse ¶
type ClimaterResponse struct { Climater struct { Settings struct { TargetTemperature TimedTemperature HeaterSource TimedString } Status struct { ClimatisationStatusData struct { ClimatisationState TimedString ClimatisationReason TimedString RemainingClimatisationTime TimedInt } TemperatureStatusData struct { OutdoorTemperature TimedTemperature } VehicleParkingClockStatusData struct { VehicleParkingClock TimedString } } } }
ClimaterResponse is the /bs/climatisation/v1/%s/%s/vehicles/%s/climater api
type HomeRegion ¶
type HomeRegion struct { HomeRegion struct { BaseURI struct { SystemID string Content string // api url } } }
HomeRegion is the home region API response
type Identity ¶
type Identity struct { *request.Helper oauth2.TokenSource // contains filtered or unexported fields }
Identity provides the identity.vwgroup.io login token source
func NewIdentity ¶
NewIdentity creates VW identity
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the evcc vehicle api
func NewProvider ¶
NewProvider provides the evcc vehicle api provider
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
type TimedString ¶
TimedString is a string value with timestamp
type TimedTemperature ¶
TimedTemperature is the api temperature with timestamp
func (*TimedTemperature) UnmarshalJSON ¶
func (t *TimedTemperature) UnmarshalJSON(data []byte) error
type VehiclesResponse ¶
type VehiclesResponse struct { UserVehicles struct { Vehicle []string } }
VehiclesResponse is the /usermanagement/users/v1/%s/%s/vehicles api