gateway

package
v0.0.0-...-7210735 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIPath        = "/api"
	AggregatesPath = "meters/aggregates"
	StatusPath     = "system_status/soe"
	LoginPath      = "login/Basic"

	UserName   = "customer"
	ForceSMOff = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregates

type Aggregates struct {
	Values map[string]interface{}
}

func (Aggregates) Path

func (a Aggregates) Path() string

func (*Aggregates) UnmarshalJSON

func (a *Aggregates) UnmarshalJSON(b []byte) error

type Client

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

func NewClient

func NewClient(u *url.URL, email, password string) (*Client, error)

func (*Client) Aggregates

func (c *Client) Aggregates() (*Aggregates, error)

func (*Client) SOE

func (c *Client) SOE() (*SOE, error)

type Login

type Login struct {
	Username   string
	Password   string
	Email      string
	ForceSmOff bool `json: force_sm_off`
}

func NewLogin

func NewLogin(email, password string) *Login

func (Login) Path

func (l Login) Path() string

func (*Login) Request

func (l *Login) Request(u *url.URL) (*http.Request, error)

type Reflector

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

Reflector reflects local objects and provides an http server handler

func NewReflector

func NewReflector() *Reflector

func (*Reflector) Reflect

func (r *Reflector) Reflect(inverter, battery interface{})

func (*Reflector) ServeHTTP

func (r *Reflector) ServeHTTP(w http.ResponseWriter, req *http.Request)

type SOE

type SOE struct {
	Percentage float64
}

func (SOE) Path

func (s SOE) Path() string

Jump to

Keyboard shortcuts

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