35 lines
654 B
Go
35 lines
654 B
Go
package charger
|
|
|
|
// Code generated by github.com/evcc-io/evcc/cmd/tools/decorate.go. DO NOT EDIT.
|
|
|
|
import (
|
|
"github.com/evcc-io/evcc/api"
|
|
)
|
|
|
|
func decorateGoE(base *GoE, phaseSwitcher func(int) error) api.Charger {
|
|
switch {
|
|
case phaseSwitcher == nil:
|
|
return base
|
|
|
|
case phaseSwitcher != nil:
|
|
return &struct {
|
|
*GoE
|
|
api.PhaseSwitcher
|
|
}{
|
|
GoE: base,
|
|
PhaseSwitcher: &decorateGoEPhaseSwitcherImpl{
|
|
phaseSwitcher: phaseSwitcher,
|
|
},
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
type decorateGoEPhaseSwitcherImpl struct {
|
|
phaseSwitcher func(int) error
|
|
}
|
|
|
|
func (impl *decorateGoEPhaseSwitcherImpl) Phases1p3p(p0 int) error {
|
|
return impl.phaseSwitcher(p0)
|
|
}
|