torontowater

package
v0.0.0-...-8dd3ec1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetData

func GetData(meter Meter, date time.Time, token string, config helpers.Config) (*list.List, error)

func Login

func Login(config helpers.Config) (string, error)

func Mock

func Mock()

Types

type Accountdetails

type Accountdetails struct {
	ResultCode  int       `json:"resultCode"`
	PremiseList []Premise `json:"premiseList"`
}

type Consumption

type Consumption struct {
	ResultCode int     `json:"resultCode"`
	MeterList  []Meter `json:"meterList"`
}

type Interval

type Interval struct {
	LastReadDateTime    string  `json:"lastReadDateTime"`
	LastReadValue       string  `json:"lastReadValue"`
	IntConsumptionTotal float64 `json:"intConsumptionTotal"`
}

type Meter

type Meter struct {
	MeterNumber   string     `json:"meterNumber"`
	Miu           string     `json:"miu"`
	FirstReadDate string     `json:"firstReadDate"`
	LastReadDate  string     `json:"lastReadDate"`
	IntervalList  []Interval `json:"intervalList"`
}

func GetAccountDetails

func GetAccountDetails(token string, config helpers.Config) ([]Meter, error)

type Premise

type Premise struct {
	MeterList []Meter `json:"meterList"`
}

type Validate

type Validate struct {
	ValidateResponse ValidateResponse `json:"validateResponse"`
}

type ValidateResponse

type ValidateResponse struct {
	Status        string `json:"status"`
	AccountNumber string `json:"accountNumber"`
	RefToken      string `json:"refToken"`
}

type WaterConsumption

type WaterConsumption struct {
	Time  time.Time
	Value float64
}

Jump to

Keyboard shortcuts

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