Some checks failed
Build / Build (push) Failing after 6m48s
Build / Build UI (push) Failing after 1m29s
Validate Schema / build (push) Failing after 3s
Build / Publish :latest (push) Has been skipped
Build / Publish :release (push) Has been skipped
Build / Release (push) Has been skipped
26 lines
382 B
Go
26 lines
382 B
Go
package tariff
|
|
|
|
import (
|
|
"github.com/andig/evcc/api"
|
|
"github.com/andig/evcc/util"
|
|
)
|
|
|
|
type Fixed struct {
|
|
Price float64
|
|
}
|
|
|
|
var _ api.Tariff = (*Fixed)(nil)
|
|
|
|
func NewFixed(other map[string]interface{}) (*Fixed, error) {
|
|
cc := Fixed{}
|
|
|
|
if err := util.DecodeOther(other, &cc); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &cc, nil
|
|
}
|
|
|
|
func (t *Fixed) IsCheap() bool {
|
|
return false
|
|
}
|