Documentation
¶
Index ¶
- type Device
- type OwletAPI
- func (api *OwletAPI) Activate(deviceSerial string) error
- func (api *OwletAPI) Authenticate() error
- func (api *OwletAPI) CheckTokens(tempTokens TokenInfo) *TokenInfo
- func (api *OwletAPI) GetDevices() (map[string]interface{}, error)
- func (api *OwletAPI) GetProperties(deviceSerial string) (map[string]interface{}, error)
- func (api *OwletAPI) Tokens() TokenInfo
- type OwletAuthenticationError
- type OwletConnectionError
- type OwletCredentialsError
- type OwletDevicesError
- type OwletEmailError
- type OwletError
- type OwletPasswordError
- type Property
- type PropertyMap
- type RegionInfo
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Device struct { ProductName string `json:"product_name"` Model string `json:"model"` DSN string `json:"dsn"` OEMModel string `json:"oem_model"` SWVersion string `json:"sw_version"` TemplateID int `json:"template_id"` MAC string `json:"mac"` UniqueHardwareID *string `json:"unique_hardware_id"` // Could be nil HWSig string `json:"hwsig"` LanIP string `json:"lan_ip"` ConnectedAt string `json:"connected_at"` Key int `json:"key"` LanEnabled bool `json:"lan_enabled"` ConnectionPriority []string `json:"connection_priority"` HasProperties bool `json:"has_properties"` ProductClass *string `json:"product_class"` // Could be nil ConnectionStatus string `json:"connection_status"` Lat string `json:"lat"` Lng string `json:"lng"` Locality string `json:"locality"` DeviceType string `json:"device_type"` Dealer *string `json:"dealer"` // Could be nil ManufModel string `json:"manuf_model"` } `json:"device"` }
type OwletAPI ¶
type OwletAPI struct {
// contains filtered or unexported fields
}
func NewOwletAPI ¶
func (*OwletAPI) Authenticate ¶
func (*OwletAPI) CheckTokens ¶
func (*OwletAPI) GetDevices ¶
func (*OwletAPI) GetProperties ¶
type OwletAuthenticationError ¶
type OwletAuthenticationError struct{ OwletError }
func NewOwletAuthenticationError ¶
func NewOwletAuthenticationError(message string) OwletAuthenticationError
type OwletConnectionError ¶
type OwletConnectionError struct{ OwletError }
func NewOwletConnectionError ¶
func NewOwletConnectionError(message string) OwletConnectionError
type OwletCredentialsError ¶
type OwletCredentialsError struct{ OwletError }
func NewOwletCredentialsError ¶
func NewOwletCredentialsError(message string) OwletCredentialsError
type OwletDevicesError ¶
type OwletDevicesError struct{ OwletError }
type OwletEmailError ¶
type OwletEmailError struct{ OwletError }
func NewOwletEmailError ¶
func NewOwletEmailError(message string) OwletEmailError
type OwletError ¶
type OwletError struct {
// contains filtered or unexported fields
}
func NewOwletError ¶
func NewOwletError(message string) OwletError
func (OwletError) Error ¶
func (e OwletError) Error() string
type OwletPasswordError ¶
type OwletPasswordError struct{ OwletError }
func NewOwletPasswordError ¶
func NewOwletPasswordError(message string) OwletPasswordError
type Property ¶
type Property struct { Type string `json:"type"` Name string `json:"name"` BaseType string `json:"base_type"` ReadOnly bool `json:"read_only"` Direction string `json:"direction"` Scope string `json:"scope"` DataUpdatedAt string `json:"data_updated_at"` Key int `json:"key"` DeviceKey int `json:"device_key"` ProductName string `json:"product_name"` TrackOnlyChanges bool `json:"track_only_changes"` DisplayName string `json:"display_name"` HostSwVersion bool `json:"host_sw_version"` TimeSeries bool `json:"time_series"` Derived bool `json:"derived"` AppType *string `json:"app_type"` Recipe *string `json:"recipe"` Value interface{} `json:"value"` GeneratedFrom *string `json:"generated_from"` GeneratedAt *string `json:"generated_at"` DeniedRoles []string `json:"denied_roles"` AckEnabled bool `json:"ack_enabled"` RetentionDays int `json:"retention_days"` AckStatus *string `json:"ack_status"` AckMessage *string `json:"ack_message"` AckedAt *string `json:"acked_at"` }
type PropertyMap ¶
type PropertyMap struct {
Property Property `json:"property"`
}
type RegionInfo ¶
Click to show internal directories.
Click to hide internal directories.