gateway

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailMetric

type DetailMetric interface {
	Time() *time.Time
	Watts() int
}

type Metric

type Metric interface {
	Time() *time.Time
	KilowattHours() float64
}

type Service

type Service interface {
	Today(ctx context.Context, id string) ([]DetailMetric, error)
	Week(ctx context.Context, id string) ([]Metric, error)
	Month(ctx context.Context, id string) ([]Metric, error)
	Year(ctx context.Context, id string) ([]Metric, error)
}

func NewService

func NewService(client *resty.Client) Service

type Status

type Status struct {
	Id                  string
	CurrentWatts        int
	TodayWattHours      int
	TotalWattHours      int
	KilogramsOfCO2Saved int
	Status              string
}

Jump to

Keyboard shortcuts

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