Revert "Add fox-ess-h3-smart inverters (#21176)"

This reverts commit 8252d37bd5.
This commit is contained in:
andig 2025-05-14 13:10:08 +02:00
parent 2c140343c9
commit f56df9ea6c
69 changed files with 211 additions and 24572 deletions

View file

@ -1,7 +0,0 @@
package auth
import "net/http"
type Authorizer interface {
Transport(base http.RoundTripper) (http.RoundTripper, error)
}

View file

@ -1,26 +0,0 @@
package auth
import (
"context"
"fmt"
"strings"
reg "github.com/evcc-io/evcc/util/registry"
)
var registry = reg.New[Authorizer]("auth")
// NewFromConfig creates auth from configuration
func NewFromConfig(ctx context.Context, typ string, other map[string]any) (Authorizer, error) {
factory, err := registry.Get(strings.ToLower(typ))
if err != nil {
return nil, err
}
v, err := factory(ctx, other)
if err != nil {
err = fmt.Errorf("cannot create auth type '%s': %w", typ, err)
}
return v, err
}

View file

@ -1,27 +0,0 @@
package auth
import (
"context"
"net/http"
"github.com/evcc-io/evcc/util"
)
type nop struct{}
func init() {
registry.AddCtx("nop", NewNopFromConfig)
}
func NewNopFromConfig(ctx context.Context, other map[string]any) (Authorizer, error) {
var cc struct{}
if err := util.DecodeOther(other, &cc); err != nil {
return nil, err
}
return new(nop), nil
}
func (p *nop) Transport(base http.RoundTripper) (http.RoundTripper, error) {
return base, nil
}