vehicle

package
v0.0.0-...-e6e1b3f Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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 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 NewKiaFromConfig

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

NewKiaFromConfig 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 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 NewRenaultFromConfig

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

NewRenaultFromConfig creates a new 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 NewTeslaFromConfig

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

NewTeslaFromConfig creates a new Tesla vehicle

func NewVWFromConfig

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

NewVWFromConfig creates a new vehicle

func NewVolvoFromConfig

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

NewVolvoFromConfig creates a new vehicle

Types

type Audi

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

Audi is an api.Vehicle implementation for Audi cars

func (Audi) Capacity

func (m Audi) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (Audi) Title

func (m Audi) Title() string

Title implements the Vehicle.Title interface

type BMW

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

BMW is an api.Vehicle implementation for BMW cars

func (BMW) Capacity

func (m BMW) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*BMW) SoC

func (v *BMW) SoC() (float64, error)

SoC implements the api.Vehicle interface

func (BMW) Title

func (m BMW) Title() string

Title implements the Vehicle.Title interface

type CarWings

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

CarWings is an api.Vehicle implementation for CarWings cars

func (CarWings) Capacity

func (m CarWings) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*CarWings) Climater

func (v *CarWings) Climater() (active bool, outsideTemp float64, targetTemp float64, err error)

Climater implements the api.Vehicle.Climater interface

func (*CarWings) SoC

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

SoC implements the api.Vehicle interface

func (CarWings) Title

func (m CarWings) Title() string

Title implements the Vehicle.Title interface

type Cloud

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

Cloud is an api.Vehicle implementation for Cloud cars

func (Cloud) Capacity

func (m Cloud) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Cloud) SoC

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

SoC implements the api.Vehicle interface

func (Cloud) Title

func (m Cloud) Title() string

Title implements the Vehicle.Title interface

type Ford

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

Ford is an api.Vehicle implementation for Ford cars

func (Ford) Capacity

func (m Ford) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Ford) Range

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

Range implements the api.VehicleRange interface

func (*Ford) Refresh

func (v *Ford) Refresh(token *oauth2.Token) (*oauth2.Token, error)

Refresh implements the oauth.TokenRefresher interface

func (*Ford) SoC

func (v *Ford) SoC() (float64, error)

SoC implements the api.Battery interface

func (*Ford) Status

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

Status implements the api.ChargeState interface

func (Ford) Title

func (m Ford) Title() string

Title implements the Vehicle.Title interface

type Hyundai

type Hyundai struct {
	*bluelink.API
	// contains filtered or unexported fields
}

Hyundai is an api.Vehicle implementation

func (Hyundai) Capacity

func (m Hyundai) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (Hyundai) Title

func (m Hyundai) Title() string

Title implements the Vehicle.Title 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 (m ID) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (ID) Title

func (m ID) Title() string

Title implements the Vehicle.Title interface

type Kia

type Kia struct {
	*bluelink.API
	// contains filtered or unexported fields
}

Kia is an api.Vehicle implementation

func (Kia) Capacity

func (m Kia) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (Kia) Title

func (m Kia) Title() string

Title implements the Vehicle.Title interface

type Nissan

type Nissan struct {
	*request.Helper

	*kamereon.API
	// contains filtered or unexported fields
}

Nissan is an api.Vehicle implementation for Nissan cars

func (Nissan) Capacity

func (m Nissan) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Nissan) Refresh

func (v *Nissan) Refresh(token *oauth2.Token) (*oauth2.Token, error)

func (Nissan) Title

func (m Nissan) Title() string

Title implements the Vehicle.Title 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 (m Niu) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Niu) Range

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

Range implements the api.VehicleRange 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 (m Niu) Title() string

Title implements the Vehicle.Title 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 (m PSA) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (PSA) Title

func (m PSA) Title() string

Title implements the Vehicle.Title interface

type Porsche

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

Porsche is an api.Vehicle implementation for Porsche cars

func (Porsche) Capacity

func (m Porsche) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (Porsche) Title

func (m Porsche) Title() string

Title implements the Vehicle.Title interface

type Renault

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

Renault is an api.Vehicle implementation for Renault cars

func (Renault) Capacity

func (m Renault) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Renault) Climater

func (v *Renault) Climater() (active bool, outsideTemp float64, targetTemp float64, err error)

Climater implements the api.VehicleClimater interface

func (*Renault) FinishTime

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

FinishTime implements the api.VehicleFinishTimer interface

func (*Renault) Range

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

Range implements the api.VehicleRange interface

func (*Renault) SoC

func (v *Renault) SoC() (float64, error)

SoC implements the api.Vehicle interface

func (*Renault) Status

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

Status implements the api.ChargeState interface

func (Renault) Title

func (m Renault) Title() string

Title implements the Vehicle.Title 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 (m Seat) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (Seat) Title

func (m Seat) Title() string

Title implements the Vehicle.Title 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 (m Skoda) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (Skoda) Title

func (m Skoda) Title() string

Title implements the Vehicle.Title interface

type Tesla

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

Tesla is an api.Vehicle implementation for Tesla cars

func (*Tesla) CacheReset

func (v *Tesla) CacheReset() error

func (Tesla) Capacity

func (m Tesla) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Tesla) ChargedEnergy

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

ChargedEnergy implements the api.ChargeRater interface

func (*Tesla) FinishTime

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

FinishTime implements the api.VehicleFinishTimer interface

func (*Tesla) LoadpointMode

func (v *Tesla) LoadpointMode(mode api.ChargeMode, lpCS api.ChargeStatus) error

func (*Tesla) Range

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

Range implements the api.VehicleRange 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.StopCharge interface

func (*Tesla) Status

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

Status implements the api.ChargeState interface

func (*Tesla) StatusExt

func (v *Tesla) StatusExt(lpCS api.ChargeStatus, lpMode api.ChargeMode, lpEnabled bool) (api.ChargeStatus, error)

StatusExt implements the api.ChargeStateExt interface

func (*Tesla) StopCharge

func (v *Tesla) StopCharge() error

StopCharge implements the api.StopCharge interface

func (Tesla) Title

func (m Tesla) Title() string

Title implements the Vehicle.Title 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 (m VW) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (VW) Title

func (m VW) Title() string

Title implements the Vehicle.Title 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 (m Vehicle) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Vehicle) SoC

func (m *Vehicle) SoC() (float64, error)

SoC implements the api.Vehicle interface

func (Vehicle) Title

func (m Vehicle) Title() string

Title implements the Vehicle.Title 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 (m Volvo) Capacity() int64

Capacity implements the Vehicle.Capacity interface

func (*Volvo) FinishTime

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

FinishTime implements the VehicleFinishTimer interface

func (*Volvo) Range

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

VehicleRange implements the api.VehicleRange 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) Title

func (m Volvo) Title() string

Title implements the Vehicle.Title interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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