Documentation ¶
Index ¶
- type AuthToken
- type Client
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) GetSystemDeviceFirmware(ctx context.Context, deviceId string) (*SystemDeviceFirmwareInfo, error)
- func (c *Client) GetSystemDevicePoints(ctx context.Context, deviceId string) (*SystemDevicePoints, error)
- func (c *Client) GetSystems(ctx context.Context) (*ResultSystems, error)
- func (c *Client) SetApiUrl(val string)
- func (c *Client) SetAuth(clientId, clientSecret string)
- func (c *Client) SetDebugMode(val bool)
- func (c *Client) SetUserAgent(val string)
- type ResultSystems
- type SystemDevice
- type SystemDeviceFirmwareInfo
- type SystemDevicePoint
- type SystemDevicePoints
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthToken ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(logger *zap.SugaredLogger) *Client
func (*Client) GetSystemDeviceFirmware ¶
func (*Client) GetSystemDevicePoints ¶
func (*Client) GetSystems ¶
func (c *Client) GetSystems(ctx context.Context) (*ResultSystems, error)
func (*Client) SetDebugMode ¶
func (*Client) SetUserAgent ¶
type ResultSystems ¶
type ResultSystems struct { Page int `json:"page"` ItemsPerPage int `json:"itemsPerPage"` NumItems int `json:"numItems"` Systems []struct { SystemID string `json:"systemId"` Name string `json:"name"` SecurityLevel string `json:"securityLevel"` HasAlarm bool `json:"hasAlarm"` Country string `json:"country"` Devices []SystemDevice `json:"devices"` } `json:"systems"` }
type SystemDevice ¶
type SystemDevice struct { ID string `json:"id"` ConnectionState string `json:"connectionState"` CurrentFwVersion string `json:"currentFwVersion"` Product struct { SerialNumber string `json:"serialNumber"` Name string `json:"name"` } `json:"product"` }
func (*SystemDevice) IsConnectionStateAllowed ¶
func (d *SystemDevice) IsConnectionStateAllowed(allowedValues []string) bool
type SystemDevicePoint ¶
type SystemDevicePoint struct { Category string `json:"category"` ParameterID string `json:"parameterId"` ParameterName string `json:"parameterName"` ParameterUnit string `json:"parameterUnit"` Writable bool `json:"writable"` Timestamp time.Time `json:"timestamp"` Value *float64 `json:"value"` StrVal string `json:"strVal"` SmartHomeCategories []string `json:"smartHomeCategories"` MinValue float64 `json:"minValue"` MaxValue float64 `json:"maxValue"` StepValue float64 `json:"stepValue"` EnumValues []struct { Value string `json:"value"` Text string `json:"text"` Icon string `json:"icon"` } `json:"enumValues"` ScaleValue string `json:"scaleValue"` ZoneID string `json:"zoneId"` }
type SystemDevicePoints ¶
type SystemDevicePoints []SystemDevicePoint
Click to show internal directories.
Click to hide internal directories.