rest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SynkClient

type SynkClient struct {
	SerialNumber string
	// contains filtered or unexported fields
}

func Authenticate

func Authenticate(ctx context.Context, config *configuration.Configuration) (*SynkClient, error)

func (*SynkClient) ListInverters

func (synkClient *SynkClient) ListInverters(ctx context.Context) ([]string, error)

func (*SynkClient) ReadBattery

func (synkClient *SynkClient) ReadBattery(ctx context.Context) (*SynkObject, error)

func (*SynkClient) ReadGrid

func (synkClient *SynkClient) ReadGrid(ctx context.Context) (*SynkObject, error)

func (*SynkClient) ReadInputState

func (synkClient *SynkClient) ReadInputState(ctx context.Context) (*SynkObject, error)

func (*SynkClient) ReadInverterSettings

func (synkClient *SynkClient) ReadInverterSettings(ctx context.Context) (*SynkObject, error)

func (*SynkClient) ReadLoad

func (synkClient *SynkClient) ReadLoad(ctx context.Context) (*SynkObject, error)

func (*SynkClient) UpdateInverterSettings

func (synkClient *SynkClient) UpdateInverterSettings(ctx context.Context, settings *SynkObject) error

type SynkObject

type SynkObject map[string]any

func (SynkObject) String added in v0.4.0

func (s SynkObject) String() string

func (*SynkObject) Update added in v0.3.0

func (synkObject *SynkObject) Update(key string, value any) error

type SynkResponse

type SynkResponse struct {
	Code    int            `json:"code"`
	Message string         `json:"msg"`
	Data    map[string]any `json:"data"`
	Success bool           `json:"success"`
}

Jump to

Keyboard shortcuts

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