rest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 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 Battery added in v0.6.0

type Battery struct{ *SynkObject }

type Grid added in v0.6.0

type Grid struct{ *SynkObject }

type InputState added in v0.6.0

type InputState struct{ *SynkObject }

type Inverter added in v0.6.0

type Inverter struct{ *SynkObject }

func (*Inverter) GetBatteryCapacity added in v0.7.0

func (settings *Inverter) GetBatteryCapacity() (int, error)

func (*Inverter) GetLimitToLoad added in v0.7.0

func (settings *Inverter) GetLimitToLoad() (bool, error)

func (*Inverter) SetBatteryCapacity added in v0.6.0

func (settings *Inverter) SetBatteryCapacity(batteryCap int) error

func (*Inverter) SetLimitToLoad added in v0.6.0

func (settings *Inverter) SetLimitToLoad(limitToLoad bool) error

type Load added in v0.6.0

type Load struct{ *SynkObject }

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) (*Battery, error)

func (*SynkClient) ReadGrid

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

func (*SynkClient) ReadInputState

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

func (*SynkClient) ReadInverterSettings

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

func (*SynkClient) ReadLoad

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

func (*SynkClient) UpdateInverterSettings

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

type SynkObject

type SynkObject map[string]any

func (*SynkObject) Get added in v0.7.0

func (synkObject *SynkObject) Get(key string) (any, bool)

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