amrreader

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Header       callx.Header
	MeterNo      string
	MeterPoint   string
	CustomerId   string
	CustomerCode string
}

type AmrX

type AmrX interface {
	Auth(config Credential) (Account, error)
	GetProfileDaily(acc Account, date string) (ProfileMeter, error)
}

func New

func New(config Config, callX callx.CallX) AmrX

type Config

type Config struct {
	BaseURL string
	Host    string
}

type Credential

type Credential struct {
	Username string
	Password string
}

func (*Credential) Checksum

func (c *Credential) Checksum() string

type Profile

type Profile struct {
	Time              *time.Time `json:"time"`
	EnergyConsumption *float64   `json:"energyConsumption"`
}

type ProfileMeter

type ProfileMeter struct {
	CustomerId   string    `json:"customerId"`
	CustomerCode string    `json:"customerCode"`
	MeterNo      string    `json:"meterNo"`
	MeterPoint   string    `json:"meterPoint"`
	Profile      []Profile `json:"profile"`
}

Jump to

Keyboard shortcuts

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