Add identifier api (#947)

This commit is contained in:
andig 2021-05-09 11:06:39 +02:00 • committed by GitHub
parent 9e1e681b63
commit 0934a22563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 144 additions and 82 deletions

View file

@ -92,9 +92,15 @@ type ChargeRater interface {
ChargedEnergy() (float64, error)
}
// Identifier identifies a vehicle and is implemented by the charger
type Identifier interface {
Identify() (string, error)
}
// Vehicle represents the EV and it's battery
type Vehicle interface {
Battery
Identifier
Title() string
Capacity() int64
}