plant

package
v0.0.0-...-40aaa15 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plant

type Plant struct {
	Sid               string   `json:"Sid,omitempty"`
	UserEmail         string   `json:"User_Email,omitempty"`
	SiteName          string   `json:"Site_Name,omitempty"`
	InstallationEmail string   `json:"Install_Email,omitempty"`
	Country           string   `json:"Country,omitempty"`
	State             string   `json:"State,omitempty"`
	City              string   `json:"City,omitempty"`
	Street            string   `json:"Street,omitempty"`
	Latitude          string   `json:"Latitude,omitempty"`
	Longitude         string   `json:"Longitude,omitempty"`
	ImageRef          string   `json:"Logo,omitempty"`
	GroupStrSN        string   `json:"Group_strSN,omitempty"`
	TemperatureUnit   string   `json:"Temperature_Unit,omitempty"`
	Gateways          []string `json:"Gateways,omitempty"`
}

type PlantList

type PlantList []*Plant

func (*PlantList) UnmarshalJSON

func (p *PlantList) UnmarshalJSON(data []byte) error

type Service

type Service interface {
	Status(ctx context.Context, id string) (*Status, error)
	List(ctx context.Context) ([]*Plant, error)
}

func NewService

func NewService(client *resty.Client) Service

type Status

type Status struct {
	CurrentWatts        int
	TodayWattHours      int
	YearWattHours       int
	TotalWattHours      int
	KilogramsOfCO2Saved int
	Gateways            []*gateway.Status
}

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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