vehicle

package
v0.0.0-...-175a4df Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 60 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 NewCitroenFromConfig

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

NewCitroenFromConfig 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 NewDSFromConfig

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

NewDSFromConfig 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 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{}) (v api.Vehicle, err 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 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 NewOpelFromConfig

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

NewOpelFromConfig creates a new vehicle

func NewOvmsFromConfig

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

NewOVMSFromConfig creates a new vehicle

func NewPeugeotFromConfig

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

NewPeugeotFromConfig 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 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 NewVWFromConfig

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

NewVWFromConfig 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 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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 {
	*skoda.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.Vehicle 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.Vehicle 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.Vehicle 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 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.Vehicle 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.Vehicle 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 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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.Vehicle 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 Tesla

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

Tesla is an api.Vehicle implementation for Tesla cars

func (Tesla) Capacity

func (v Tesla) Capacity() float64

Capacity implements the api.Vehicle interface

func (*Tesla) ChargedEnergy

func (v *Tesla) ChargedEnergy() (float64, error)

ChargedEnergy implements the api.ChargeRater interface

func (Tesla) Features

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

Features implements the api.FeatureDescriber interface

func (*Tesla) FinishTime

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

FinishTime implements the api.VehicleFinishTimer interface

func (Tesla) Icon

func (v Tesla) Icon() string

Icon implements the api.Vehicle interface

func (Tesla) Identifiers

func (v Tesla) Identifiers() []string

Identifiers implements the api.Identifier interface

func (*Tesla) MaxCurrent

func (v *Tesla) MaxCurrent(current int64) error

StartCharge implements the api.VehicleChargeController interface

func (*Tesla) Odometer

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

Odometer implements the api.VehicleOdometer 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) Position

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

Position implements the api.VehiclePosition interface

func (*Tesla) Range

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

Range implements the api.VehicleRange interface

func (Tesla) SetTitle

func (v Tesla) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Tesla) Soc

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

Soc implements the api.Vehicle interface

func (*Tesla) StartCharge

func (v *Tesla) StartCharge() error

StartCharge implements the api.VehicleChargeController interface

func (*Tesla) Status

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

Status implements the api.ChargeState interface

func (*Tesla) StopCharge

func (v *Tesla) StopCharge() error

StopCharge implements the api.VehicleChargeController interface

func (*Tesla) TargetSoc

func (v *Tesla) TargetSoc() (float64, error)

TargetSoc implements the api.SocLimiter interface

func (Tesla) Title

func (v Tesla) Title() string

Title implements the api.Vehicle interface

func (*Tesla) WakeUp

func (v *Tesla) WakeUp() error

type Tokens

type Tokens struct {
	Access, Refresh string
}

Tokens contains access and refresh tokens

func (*Tokens) Error

func (t *Tokens) Error() error

Error validates the token 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.Vehicle 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 VW

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

VW is an api.Vehicle implementation for VW cars

func (VW) Capacity

func (v VW) Capacity() float64

Capacity implements the api.Vehicle interface

func (VW) Features

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

Features implements the api.FeatureDescriber interface

func (VW) Icon

func (v VW) Icon() string

Icon implements the api.Vehicle interface

func (VW) Identifiers

func (v VW) Identifiers() []string

Identifiers implements the api.Identifier interface

func (VW) OnIdentified

func (v VW) OnIdentified() api.ActionConfig

OnIdentified returns the identify action

func (VW) Phases

func (v VW) Phases() int

Phases returns the phases used by the vehicle

func (VW) SetTitle

func (v VW) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (VW) Title

func (v VW) 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.Vehicle 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.Vehicle 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.Vehicle 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

Jump to

Keyboard shortcuts

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