vehicle

package
v0.0.0-...-f385b4b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 69 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAiwaysFromConfig

func NewAiwaysFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewAiwaysFromConfig creates a new vehicle

func NewAudiFromConfig

func NewAudiFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewAudiFromConfig creates a new vehicle

func NewBMWFromConfig

func NewBMWFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewBMWFromConfig creates a new vehicle

func NewBMWMiniFromConfig

func NewBMWMiniFromConfig(brand string, other map[string]interface{}) (api.Vehicle, error)

NewBMWMiniFromConfig creates a new vehicle

func NewCarWingsFromConfig

func NewCarWingsFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewCarWingsFromConfig creates a new vehicle

func NewCloudFromConfig

func NewCloudFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewCloudFromConfig creates a new vehicle

func NewConfigurableFromConfig

func NewConfigurableFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewConfigurableFromConfig creates a new Vehicle

func NewCupraFromConfig

func NewCupraFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewCupraFromConfig creates a new vehicle

func NewEnyaqFromConfig

func NewEnyaqFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewEnyaqFromConfig creates a new vehicle

func NewFiatFromConfig

func NewFiatFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewFiatFromConfig creates a new vehicle

func NewFordConnectFromConfig

func NewFordConnectFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewFordConnectFromConfig creates a new vehicle

func NewFordFromConfig

func NewFordFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewFordFromConfig creates a new vehicle

func NewFromConfig

func NewFromConfig(typ string, other map[string]interface{}) (api.Vehicle, error)

NewFromConfig creates vehicle from configuration

func NewHyundaiFromConfig

func NewHyundaiFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewHyundaiFromConfig creates a new vehicle

func NewIDFromConfig

func NewIDFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewIDFromConfig creates a new vehicle

func NewJLRFromConfig

func NewJLRFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewJLRFromConfig creates a new vehicle

func NewKiaFromConfig

func NewKiaFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewKiaFromConfig creates a new vehicle

func NewMGFromConfig

func NewMGFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewBMWFromConfig creates a new vehicle

func NewMercedesFromConfig

func NewMercedesFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewMercedesFromConfig creates a new vehicle

func NewMiniFromConfig

func NewMiniFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewMiniFromConfig creates a new vehicle

func NewNissanFromConfig

func NewNissanFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewNissanFromConfig creates a new vehicle

func NewNiuFromConfig

func NewNiuFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewFordFromConfig creates a new vehicle

func NewOvmsFromConfig

func NewOvmsFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewOVMSFromConfig creates a new vehicle

func NewPolestarFromConfig

func NewPolestarFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewPolestarFromConfig creates a new vehicle

func NewPorscheFromConfig

func NewPorscheFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewPorscheFromConfig creates a new vehicle

func NewRenaultDaciaFromConfig

func NewRenaultDaciaFromConfig(brand string, other map[string]interface{}) (api.Vehicle, error)

NewRenaultDaciaFromConfig creates a new Renault/Dacia vehicle

func NewSeatFromConfig

func NewSeatFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewSeatFromConfig creates a new vehicle

func NewSkodaFromConfig

func NewSkodaFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewSkodaFromConfig creates a new vehicle

func NewSmartFromConfig

func NewSmartFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewSmartFromConfig creates a new vehicle

func NewSmartHelloFromConfig

func NewSmartHelloFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewSmartHelloFromConfig creates a new vehicle

func NewTeslaFromConfig

func NewTeslaFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewTeslaFromConfig creates a new vehicle

func NewTronityFromConfig

func NewTronityFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewTronityFromConfig creates a new vehicle

func NewVehicleFromTemplateConfig

func NewVehicleFromTemplateConfig(other map[string]interface{}) (api.Vehicle, error)

func NewVolvoConnectedFromConfig

func NewVolvoConnectedFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewVolvoConnectedFromConfig creates a new VolvoConnected vehicle

func NewVolvoFromConfig

func NewVolvoFromConfig(other map[string]interface{}) (api.Vehicle, error)

NewVolvoFromConfig creates a new vehicle

func NewWrapper

func NewWrapper(name string, typ string, other map[string]interface{}, err error) api.Vehicle

NewWrapper creates an offline Vehicle wrapper

func Types

func Types() []string

Types returns the list of vehicle types

Types

type Aiways

type Aiways struct {
	*aiways.Provider // provides the api implementations
	// contains filtered or unexported fields
}

Aiways is an api.Vehicle implementation for Aiways cars

func (Aiways) Capacity

func (v Aiways) Capacity() float64

Capacity implements the api.Vehicle interface

func (Aiways) Features

func (v Aiways) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Aiways) Icon

func (v Aiways) Icon() string

Icon implements the api.IconDescriber interface

func (Aiways) Identifiers

func (v Aiways) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Aiways) OnIdentified

func (v Aiways) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Aiways) Phases

func (v Aiways) Phases() int

Phases returns the phases used by the vehicle

func (Aiways) SetTitle

func (v Aiways) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Aiways) Title

func (v Aiways) Title() string

Title implements the api.Vehicle interface

type Audi

type Audi struct {
	*id.Provider // provides the api implementations
	// contains filtered or unexported fields
}

Audi is an api.Vehicle implementation for Audi cars

func (Audi) Capacity

func (v Audi) Capacity() float64

Capacity implements the api.Vehicle interface

func (Audi) Features

func (v Audi) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Audi) Icon

func (v Audi) Icon() string

Icon implements the api.IconDescriber interface

func (Audi) Identifiers

func (v Audi) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Audi) OnIdentified

func (v Audi) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Audi) Phases

func (v Audi) Phases() int

Phases returns the phases used by the vehicle

func (Audi) SetTitle

func (v Audi) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Audi) Title

func (v Audi) Title() string

Title implements the api.Vehicle interface

type BMW

type BMW struct {
	*bmw.Provider // provides the api implementations
	// contains filtered or unexported fields
}

BMW is an api.Vehicle implementation for BMW and Mini cars

func (BMW) Capacity

func (v BMW) Capacity() float64

Capacity implements the api.Vehicle interface

func (BMW) Features

func (v BMW) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (BMW) Icon

func (v BMW) Icon() string

Icon implements the api.IconDescriber interface

func (BMW) Identifiers

func (v BMW) Identifiers() []string

Identifiers implements the api.Identifier interface

func (BMW) OnIdentified

func (v BMW) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (BMW) Phases

func (v BMW) Phases() int

Phases returns the phases used by the vehicle

func (BMW) SetTitle

func (v BMW) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (BMW) Title

func (v BMW) Title() string

Title implements the api.Vehicle interface

type Bluelink struct {
	*bluelink.Provider
	// contains filtered or unexported fields
}

Bluelink is an api.Vehicle implementation

func (Bluelink) Capacity

func (v Bluelink) Capacity() float64

Capacity implements the api.Vehicle interface

func (Bluelink) Features

func (v Bluelink) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Bluelink) Icon

func (v Bluelink) Icon() string

Icon implements the api.IconDescriber interface

func (Bluelink) Identifiers

func (v Bluelink) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Bluelink) OnIdentified

func (v Bluelink) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Bluelink) Phases

func (v Bluelink) Phases() int

Phases returns the phases used by the vehicle

func (Bluelink) SetTitle

func (v Bluelink) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Bluelink) Title

func (v Bluelink) Title() string

Title implements the api.Vehicle interface

type CarWings

type CarWings struct {
	// contains filtered or unexported fields
}

CarWings is an api.Vehicle implementation for CarWings cars

func (CarWings) Capacity

func (v CarWings) Capacity() float64

Capacity implements the api.Vehicle interface

func (*CarWings) Climater

func (v *CarWings) Climater() (bool, error)

Climater implements the api.VehicleClimater interface

func (CarWings) Features

func (v CarWings) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (CarWings) Icon

func (v CarWings) Icon() string

Icon implements the api.IconDescriber interface

func (CarWings) Identifiers

func (v CarWings) Identifiers() []string

Identifiers implements the api.Identifier interface

func (CarWings) OnIdentified

func (v CarWings) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (CarWings) Phases

func (v CarWings) Phases() int

Phases returns the phases used by the vehicle

func (*CarWings) Range

func (v *CarWings) Range() (int64, error)

Range implements the api.VehicleRange interface

func (CarWings) SetTitle

func (v CarWings) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*CarWings) Soc

func (v *CarWings) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (*CarWings) Status

func (v *CarWings) Status() (api.ChargeStatus, error)

Status implements the api.ChargeState interface

func (CarWings) Title

func (v CarWings) Title() string

Title implements the api.Vehicle interface

type ClientCredentials

type ClientCredentials struct {
	ID, Secret string
}

ClientCredentials contains OAuth2 client id and secret

func (*ClientCredentials) Error

func (c *ClientCredentials) Error() error

Error validates the credentials and returns an error if they are incomplete

type Cloud

type Cloud struct {
	// contains filtered or unexported fields
}

Cloud is an api.Vehicle implementation

func (Cloud) Capacity

func (v Cloud) Capacity() float64

Capacity implements the api.Vehicle interface

func (Cloud) Features

func (v Cloud) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Cloud) Icon

func (v Cloud) Icon() string

Icon implements the api.IconDescriber interface

func (Cloud) Identifiers

func (v Cloud) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Cloud) OnIdentified

func (v Cloud) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Cloud) Phases

func (v Cloud) Phases() int

Phases returns the phases used by the vehicle

func (Cloud) SetTitle

func (v Cloud) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Cloud) Soc

func (v *Cloud) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (Cloud) Title

func (v Cloud) Title() string

Title implements the api.Vehicle interface

type Cupra

type Cupra struct {
	*cupra.Provider // provides the api implementations
	// contains filtered or unexported fields
}

Cupra is an api.Vehicle implementation for Seat Cupra cars

func (Cupra) Capacity

func (v Cupra) Capacity() float64

Capacity implements the api.Vehicle interface

func (Cupra) Features

func (v Cupra) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Cupra) Icon

func (v Cupra) Icon() string

Icon implements the api.IconDescriber interface

func (Cupra) Identifiers

func (v Cupra) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Cupra) OnIdentified

func (v Cupra) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Cupra) Phases

func (v Cupra) Phases() int

Phases returns the phases used by the vehicle

func (Cupra) SetTitle

func (v Cupra) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Cupra) Title

func (v Cupra) Title() string

Title implements the api.Vehicle interface

type Enyaq

type Enyaq struct {
	*myskoda.Provider // provides the api implementations
	// contains filtered or unexported fields
}

Enyaq is an api.Vehicle implementation for Skoda Enyaq cars

func (Enyaq) Capacity

func (v Enyaq) Capacity() float64

Capacity implements the api.Vehicle interface

func (Enyaq) Features

func (v Enyaq) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Enyaq) Icon

func (v Enyaq) Icon() string

Icon implements the api.IconDescriber interface

func (Enyaq) Identifiers

func (v Enyaq) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Enyaq) OnIdentified

func (v Enyaq) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Enyaq) Phases

func (v Enyaq) Phases() int

Phases returns the phases used by the vehicle

func (Enyaq) SetTitle

func (v Enyaq) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Enyaq) Title

func (v Enyaq) Title() string

Title implements the api.Vehicle interface

type Fiat

type Fiat struct {
	*fiat.Provider
	// contains filtered or unexported fields
}

Fiat is an api.Vehicle implementation for Fiat cars

func (Fiat) Capacity

func (v Fiat) Capacity() float64

Capacity implements the api.Vehicle interface

func (Fiat) Features

func (v Fiat) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Fiat) Icon

func (v Fiat) Icon() string

Icon implements the api.IconDescriber interface

func (Fiat) Identifiers

func (v Fiat) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Fiat) OnIdentified

func (v Fiat) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Fiat) Phases

func (v Fiat) Phases() int

Phases returns the phases used by the vehicle

func (Fiat) SetTitle

func (v Fiat) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Fiat) Title

func (v Fiat) Title() string

Title implements the api.Vehicle interface

type Ford

type Ford struct {
	*ford.Provider
	// contains filtered or unexported fields
}

Ford is an api.Vehicle implementation for Ford cars

func (Ford) Capacity

func (v Ford) Capacity() float64

Capacity implements the api.Vehicle interface

func (Ford) Features

func (v Ford) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Ford) Icon

func (v Ford) Icon() string

Icon implements the api.IconDescriber interface

func (Ford) Identifiers

func (v Ford) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Ford) OnIdentified

func (v Ford) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Ford) Phases

func (v Ford) Phases() int

Phases returns the phases used by the vehicle

func (Ford) SetTitle

func (v Ford) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Ford) Title

func (v Ford) Title() string

Title implements the api.Vehicle interface

type FordConnect

type FordConnect struct {
	*connect.Provider
	// contains filtered or unexported fields
}

FordConnect is an api.Vehicle implementation for Ford cars

func (FordConnect) Capacity

func (v FordConnect) Capacity() float64

Capacity implements the api.Vehicle interface

func (FordConnect) Features

func (v FordConnect) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (FordConnect) Icon

func (v FordConnect) Icon() string

Icon implements the api.IconDescriber interface

func (FordConnect) Identifiers

func (v FordConnect) Identifiers() []string

Identifiers implements the api.Identifier interface

func (FordConnect) OnIdentified

func (v FordConnect) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (FordConnect) Phases

func (v FordConnect) Phases() int

Phases returns the phases used by the vehicle

func (FordConnect) SetTitle

func (v FordConnect) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (FordConnect) Title

func (v FordConnect) Title() string

Title implements the api.Vehicle interface

type ID

type ID struct {
	*id.Provider // provides the api implementations
	// contains filtered or unexported fields
}

ID is an api.Vehicle implementation for ID cars

func (ID) Capacity

func (v ID) Capacity() float64

Capacity implements the api.Vehicle interface

func (ID) Features

func (v ID) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (ID) Icon

func (v ID) Icon() string

Icon implements the api.IconDescriber interface

func (ID) Identifiers

func (v ID) Identifiers() []string

Identifiers implements the api.Identifier interface

func (ID) OnIdentified

func (v ID) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (ID) Phases

func (v ID) Phases() int

Phases returns the phases used by the vehicle

func (ID) SetTitle

func (v ID) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (ID) Title

func (v ID) Title() string

Title implements the api.Vehicle interface

type JLR

type JLR struct {
	*jlr.Provider
	// contains filtered or unexported fields
}

JLR is an api.Vehicle implementation for Jaguar LandRover cars

func (JLR) Capacity

func (v JLR) Capacity() float64

Capacity implements the api.Vehicle interface

func (JLR) Features

func (v JLR) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (JLR) Icon

func (v JLR) Icon() string

Icon implements the api.IconDescriber interface

func (JLR) Identifiers

func (v JLR) Identifiers() []string

Identifiers implements the api.Identifier interface

func (JLR) OnIdentified

func (v JLR) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (JLR) Phases

func (v JLR) Phases() int

Phases returns the phases used by the vehicle

func (*JLR) RegisterDevice

func (v *JLR) RegisterDevice(log *util.Logger, user, device string, t jlr.Token) error

func (JLR) SetTitle

func (v JLR) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (JLR) Title

func (v JLR) Title() string

Title implements the api.Vehicle interface

type MG

type MG struct {
	*saic.Provider // provides the api implementations
	// contains filtered or unexported fields
}

MG is an api.Vehicle implementation for probably all SAIC cars

func (MG) Capacity

func (v MG) Capacity() float64

Capacity implements the api.Vehicle interface

func (MG) Features

func (v MG) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (MG) Icon

func (v MG) Icon() string

Icon implements the api.IconDescriber interface

func (MG) Identifiers

func (v MG) Identifiers() []string

Identifiers implements the api.Identifier interface

func (MG) OnIdentified

func (v MG) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (MG) Phases

func (v MG) Phases() int

Phases returns the phases used by the vehicle

func (MG) SetTitle

func (v MG) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (MG) Title

func (v MG) Title() string

Title implements the api.Vehicle interface

type Mercedes

type Mercedes struct {
	*mercedes.Provider
	// contains filtered or unexported fields
}

Mercedes is an api.Vehicle implementation for Mercedes-Benz cars

func (Mercedes) Capacity

func (v Mercedes) Capacity() float64

Capacity implements the api.Vehicle interface

func (Mercedes) Features

func (v Mercedes) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Mercedes) Icon

func (v Mercedes) Icon() string

Icon implements the api.IconDescriber interface

func (Mercedes) Identifiers

func (v Mercedes) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Mercedes) OnIdentified

func (v Mercedes) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Mercedes) Phases

func (v Mercedes) Phases() int

Phases returns the phases used by the vehicle

func (Mercedes) SetTitle

func (v Mercedes) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Mercedes) Title

func (v Mercedes) Title() string

Title implements the api.Vehicle interface

type Nissan

type Nissan struct {
	*nissan.Provider
	// contains filtered or unexported fields
}

Nissan is an api.Vehicle implementation for Nissan cars

func (Nissan) Capacity

func (v Nissan) Capacity() float64

Capacity implements the api.Vehicle interface

func (Nissan) Features

func (v Nissan) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Nissan) Icon

func (v Nissan) Icon() string

Icon implements the api.IconDescriber interface

func (Nissan) Identifiers

func (v Nissan) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Nissan) OnIdentified

func (v Nissan) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Nissan) Phases

func (v Nissan) Phases() int

Phases returns the phases used by the vehicle

func (Nissan) SetTitle

func (v Nissan) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Nissan) Title

func (v Nissan) Title() string

Title implements the api.Vehicle interface

type Niu

type Niu struct {
	*request.Helper
	// contains filtered or unexported fields
}

Niu is an api.Vehicle implementation for Niu vehicles

func (Niu) Capacity

func (v Niu) Capacity() float64

Capacity implements the api.Vehicle interface

func (Niu) Features

func (v Niu) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Niu) Icon

func (v Niu) Icon() string

Icon implements the api.IconDescriber interface

func (Niu) Identifiers

func (v Niu) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Niu) OnIdentified

func (v Niu) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Niu) Phases

func (v Niu) Phases() int

Phases returns the phases used by the vehicle

func (*Niu) Range

func (v *Niu) Range() (int64, error)

Range implements the api.VehicleRange interface

func (Niu) SetTitle

func (v Niu) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Niu) Soc

func (v *Niu) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (*Niu) Status

func (v *Niu) Status() (api.ChargeStatus, error)

Status implements the api.ChargeState interface

func (Niu) Title

func (v Niu) Title() string

Title implements the api.Vehicle interface

type Ovms

type Ovms struct {
	*request.Helper
	// contains filtered or unexported fields
}

OVMS is an api.Vehicle implementation for dexters-web server requests

func (Ovms) Capacity

func (v Ovms) Capacity() float64

Capacity implements the api.Vehicle interface

func (Ovms) Features

func (v Ovms) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (*Ovms) FinishTime

func (v *Ovms) FinishTime() (time.Time, error)

FinishTime implements the api.VehicleFinishTimer interface

func (Ovms) Icon

func (v Ovms) Icon() string

Icon implements the api.IconDescriber interface

func (Ovms) Identifiers

func (v Ovms) Identifiers() []string

Identifiers implements the api.Identifier interface

func (*Ovms) Odometer

func (v *Ovms) Odometer() (float64, error)

Odometer implements the api.VehicleOdometer interface

func (Ovms) OnIdentified

func (v Ovms) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Ovms) Phases

func (v Ovms) Phases() int

Phases returns the phases used by the vehicle

func (*Ovms) Position

func (v *Ovms) Position() (float64, float64, error)

VehiclePosition returns the vehicles position in latitude and longitude

func (*Ovms) Range

func (v *Ovms) Range() (int64, error)

Range implements the api.VehicleRange interface

func (Ovms) SetTitle

func (v Ovms) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Ovms) Soc

func (v *Ovms) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (*Ovms) Status

func (v *Ovms) Status() (api.ChargeStatus, error)

Status implements the api.ChargeState interface

func (Ovms) Title

func (v Ovms) Title() string

Title implements the api.Vehicle interface

type PSA

type PSA struct {
	*psa.Provider // provides the api implementations
	// contains filtered or unexported fields
}

PSA is an api.Vehicle implementation for PSA cars

func (PSA) Capacity

func (v PSA) Capacity() float64

Capacity implements the api.Vehicle interface

func (PSA) Features

func (v PSA) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (PSA) Icon

func (v PSA) Icon() string

Icon implements the api.IconDescriber interface

func (PSA) Identifiers

func (v PSA) Identifiers() []string

Identifiers implements the api.Identifier interface

func (PSA) OnIdentified

func (v PSA) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (PSA) Phases

func (v PSA) Phases() int

Phases returns the phases used by the vehicle

func (PSA) SetTitle

func (v PSA) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (PSA) Title

func (v PSA) Title() string

Title implements the api.Vehicle interface

type Polestar

type Polestar struct {
	*polestar.Provider
	// contains filtered or unexported fields
}

Polestar is an api.Vehicle implementation for Polestar cars

func (Polestar) Capacity

func (v Polestar) Capacity() float64

Capacity implements the api.Vehicle interface

func (Polestar) Features

func (v Polestar) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Polestar) Icon

func (v Polestar) Icon() string

Icon implements the api.IconDescriber interface

func (Polestar) Identifiers

func (v Polestar) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Polestar) OnIdentified

func (v Polestar) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Polestar) Phases

func (v Polestar) Phases() int

Phases returns the phases used by the vehicle

func (Polestar) SetTitle

func (v Polestar) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Polestar) Title

func (v Polestar) Title() string

Title implements the api.Vehicle interface

type Porsche

type Porsche struct {
	*porsche.Provider
	// contains filtered or unexported fields
}

Porsche is an api.Vehicle implementation for Porsche cars

func (Porsche) Capacity

func (v Porsche) Capacity() float64

Capacity implements the api.Vehicle interface

func (Porsche) Features

func (v Porsche) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Porsche) Icon

func (v Porsche) Icon() string

Icon implements the api.IconDescriber interface

func (Porsche) Identifiers

func (v Porsche) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Porsche) OnIdentified

func (v Porsche) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Porsche) Phases

func (v Porsche) Phases() int

Phases returns the phases used by the vehicle

func (Porsche) SetTitle

func (v Porsche) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Porsche) Title

func (v Porsche) Title() string

Title implements the api.Vehicle interface

type Renault

type Renault struct {
	*renault.Provider
	// contains filtered or unexported fields
}

Renault is an api.Vehicle implementation for Renault cars

func (Renault) Capacity

func (v Renault) Capacity() float64

Capacity implements the api.Vehicle interface

func (Renault) Features

func (v Renault) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Renault) Icon

func (v Renault) Icon() string

Icon implements the api.IconDescriber interface

func (Renault) Identifiers

func (v Renault) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Renault) OnIdentified

func (v Renault) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Renault) Phases

func (v Renault) Phases() int

Phases returns the phases used by the vehicle

func (Renault) SetTitle

func (v Renault) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Renault) Title

func (v Renault) Title() string

Title implements the api.Vehicle interface

type Seat

type Seat struct {
	*vw.Provider // provides the api implementations
	// contains filtered or unexported fields
}

Seat is an api.Vehicle implementation for Seat cars

func (Seat) Capacity

func (v Seat) Capacity() float64

Capacity implements the api.Vehicle interface

func (Seat) Features

func (v Seat) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Seat) Icon

func (v Seat) Icon() string

Icon implements the api.IconDescriber interface

func (Seat) Identifiers

func (v Seat) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Seat) OnIdentified

func (v Seat) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Seat) Phases

func (v Seat) Phases() int

Phases returns the phases used by the vehicle

func (Seat) SetTitle

func (v Seat) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Seat) Title

func (v Seat) Title() string

Title implements the api.Vehicle interface

type Skoda

type Skoda struct {
	*vw.Provider // provides the api implementations
	// contains filtered or unexported fields
}

Skoda is an api.Vehicle implementation for Skoda cars

func (Skoda) Capacity

func (v Skoda) Capacity() float64

Capacity implements the api.Vehicle interface

func (Skoda) Features

func (v Skoda) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Skoda) Icon

func (v Skoda) Icon() string

Icon implements the api.IconDescriber interface

func (Skoda) Identifiers

func (v Skoda) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Skoda) OnIdentified

func (v Skoda) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Skoda) Phases

func (v Skoda) Phases() int

Phases returns the phases used by the vehicle

func (Skoda) SetTitle

func (v Skoda) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Skoda) Title

func (v Skoda) Title() string

Title implements the api.Vehicle interface

type Smart

type Smart struct {
	*smart.Provider
	// contains filtered or unexported fields
}

Smart is an api.Vehicle implementation for Smart cars

func (Smart) Capacity

func (v Smart) Capacity() float64

Capacity implements the api.Vehicle interface

func (Smart) Features

func (v Smart) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Smart) Icon

func (v Smart) Icon() string

Icon implements the api.IconDescriber interface

func (Smart) Identifiers

func (v Smart) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Smart) OnIdentified

func (v Smart) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Smart) Phases

func (v Smart) Phases() int

Phases returns the phases used by the vehicle

func (Smart) SetTitle

func (v Smart) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Smart) Title

func (v Smart) Title() string

Title implements the api.Vehicle interface

type SmartHello

type SmartHello struct {
	*hello.Provider
	// contains filtered or unexported fields
}

SmartHello is an api.Vehicle implementation for Smart Hello cars

func (SmartHello) Capacity

func (v SmartHello) Capacity() float64

Capacity implements the api.Vehicle interface

func (SmartHello) Features

func (v SmartHello) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (SmartHello) Icon

func (v SmartHello) Icon() string

Icon implements the api.IconDescriber interface

func (SmartHello) Identifiers

func (v SmartHello) Identifiers() []string

Identifiers implements the api.Identifier interface

func (SmartHello) OnIdentified

func (v SmartHello) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (SmartHello) Phases

func (v SmartHello) Phases() int

Phases returns the phases used by the vehicle

func (SmartHello) SetTitle

func (v SmartHello) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (SmartHello) Title

func (v SmartHello) Title() string

Title implements the api.Vehicle interface

type Tesla

type Tesla struct {
	*tesla.Provider
	*tesla.Controller
	// contains filtered or unexported fields
}

Tesla is an api.Vehicle implementation for Tesla cars using the official Tesla vehicle-command api.

func (Tesla) Capacity

func (v Tesla) Capacity() float64

Capacity implements the api.Vehicle interface

func (Tesla) Features

func (v Tesla) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Tesla) Icon

func (v Tesla) Icon() string

Icon implements the api.IconDescriber interface

func (Tesla) Identifiers

func (v Tesla) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Tesla) OnIdentified

func (v Tesla) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Tesla) Phases

func (v Tesla) Phases() int

Phases returns the phases used by the vehicle

func (Tesla) SetTitle

func (v Tesla) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (Tesla) Title

func (v Tesla) Title() string

Title implements the api.Vehicle interface

type Tokens

type Tokens struct {
	Access, Refresh string
}

Tokens contains access and refresh tokens

func (*Tokens) Token

func (t *Tokens) Token() (*oauth2.Token, error)

Token builds token from credentials and returns an error if they are incomplete

type Tronity

type Tronity struct {
	*request.Helper
	// contains filtered or unexported fields
}

Tronity is an api.Vehicle implementation for the Tronity api

func (Tronity) Capacity

func (v Tronity) Capacity() float64

Capacity implements the api.Vehicle interface

func (Tronity) Features

func (v Tronity) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Tronity) Icon

func (v Tronity) Icon() string

Icon implements the api.IconDescriber interface

func (Tronity) Identifiers

func (v Tronity) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Tronity) OnIdentified

func (v Tronity) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Tronity) Phases

func (v Tronity) Phases() int

Phases returns the phases used by the vehicle

func (*Tronity) Range

func (v *Tronity) Range() (int64, error)

Range implements the api.VehicleRange interface

func (*Tronity) RefreshToken

func (v *Tronity) RefreshToken(_ *oauth2.Token) (*oauth2.Token, error)

RefreshToken performs token refresh by logging in with app context

func (Tronity) SetTitle

func (v Tronity) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Tronity) Soc

func (v *Tronity) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (Tronity) Title

func (v Tronity) Title() string

Title implements the api.Vehicle interface

type Vehicle

type Vehicle struct {
	// contains filtered or unexported fields
}

Vehicle is an api.Vehicle implementation with configurable getters and setters.

func (Vehicle) Capacity

func (v Vehicle) Capacity() float64

Capacity implements the api.Vehicle interface

func (Vehicle) Features

func (v Vehicle) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (Vehicle) Icon

func (v Vehicle) Icon() string

Icon implements the api.IconDescriber interface

func (Vehicle) Identifiers

func (v Vehicle) Identifiers() []string

Identifiers implements the api.Identifier interface

func (Vehicle) OnIdentified

func (v Vehicle) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Vehicle) Phases

func (v Vehicle) Phases() int

Phases returns the phases used by the vehicle

func (Vehicle) SetTitle

func (v Vehicle) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Vehicle) Soc

func (v *Vehicle) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (Vehicle) Title

func (v Vehicle) Title() string

Title implements the api.Vehicle interface

type Volvo

type Volvo struct {
	*request.Helper
	// contains filtered or unexported fields
}

Volvo is an api.Vehicle implementation for Volvo. cars

func (Volvo) Capacity

func (v Volvo) Capacity() float64

Capacity implements the api.Vehicle interface

func (Volvo) Features

func (v Volvo) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (*Volvo) FinishTime

func (v *Volvo) FinishTime() (time.Time, error)

FinishTime implements the VehicleFinishTimer interface

func (Volvo) Icon

func (v Volvo) Icon() string

Icon implements the api.IconDescriber interface

func (Volvo) Identifiers

func (v Volvo) Identifiers() []string

Identifiers implements the api.Identifier interface

func (*Volvo) Odometer

func (v *Volvo) Odometer() (float64, error)

VehicleOdometer implements the api.VehicleOdometer interface

func (Volvo) OnIdentified

func (v Volvo) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (Volvo) Phases

func (v Volvo) Phases() int

Phases returns the phases used by the vehicle

func (*Volvo) Range

func (v *Volvo) Range() (int64, error)

VehicleRange implements the api.VehicleRange interface

func (Volvo) SetTitle

func (v Volvo) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Volvo) Soc

func (v *Volvo) Soc() (float64, error)

Soc implements the api.Vehicle interface

func (*Volvo) Status

func (v *Volvo) Status() (api.ChargeStatus, error)

Status implements the api.ChargeState interface

func (*Volvo) StatusRequest

func (v *Volvo) StatusRequest() (volvo.Status, error)

func (Volvo) Title

func (v Volvo) Title() string

Title implements the api.Vehicle interface

func (*Volvo) Vehicles

func (v *Volvo) Vehicles() ([]string, error)

vehicles implements returns the list of user vehicles

type VolvoConnected

type VolvoConnected struct {
	*connected.Provider
	// contains filtered or unexported fields
}

VolvoConnected is an api.Vehicle implementation for Volvo Connected Car vehicles

func (VolvoConnected) Capacity

func (v VolvoConnected) Capacity() float64

Capacity implements the api.Vehicle interface

func (VolvoConnected) Features

func (v VolvoConnected) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (VolvoConnected) Icon

func (v VolvoConnected) Icon() string

Icon implements the api.IconDescriber interface

func (VolvoConnected) Identifiers

func (v VolvoConnected) Identifiers() []string

Identifiers implements the api.Identifier interface

func (VolvoConnected) OnIdentified

func (v VolvoConnected) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (VolvoConnected) Phases

func (v VolvoConnected) Phases() int

Phases returns the phases used by the vehicle

func (VolvoConnected) SetTitle

func (v VolvoConnected) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (VolvoConnected) Title

func (v VolvoConnected) Title() string

Title implements the api.Vehicle interface

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

Wrapper wraps an api.Vehicle to capture initialization errors

func (*Wrapper) Capacity

func (v *Wrapper) Capacity() float64

Capacity implements the api.Vehicle interface

func (*Wrapper) Config

func (v *Wrapper) Config() (string, map[string]interface{})

Error returns the initialization error

func (*Wrapper) Error

func (v *Wrapper) Error() string

Error returns the initialization error

func (*Wrapper) Features

func (v *Wrapper) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (*Wrapper) Icon

func (v *Wrapper) Icon() string

Icon implements the api.IconDescriber interface

func (*Wrapper) Identifiers

func (v *Wrapper) Identifiers() []string

Identifiers implements the api.Identifier interface

func (*Wrapper) OnIdentified

func (v *Wrapper) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (*Wrapper) Phases

func (v *Wrapper) Phases() int

Phases returns the phases used by the vehicle

func (*Wrapper) SetTitle

func (v *Wrapper) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Wrapper) Soc

func (v *Wrapper) Soc() (float64, error)

Soc implements the api.Battery interface

func (*Wrapper) Title

func (v *Wrapper) Title() string

Title implements the api.Vehicle interface

Jump to

Keyboard shortcuts

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