Documentation ¶
Index ¶
- func DiscoverBridgeAddress() (address string, err error)
- func PutLamp(config Config, lamp *Lamp) (err error)
- func RegisterUser(config Config) (username string, err error)
- func SetConfig(config *Config) (err error)
- func UnregisterUser(config Config) (err error)
- type Config
- type Lamp
- type LampState
- type NUPnP
- type RegisterError
- type RegisterResponse
- type RegisterSuccess
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverBridgeAddress ¶ added in v0.7.0
func RegisterUser ¶ added in v0.7.0
func UnregisterUser ¶ added in v0.7.0
Types ¶
type Config ¶
type Config struct { Id int `yaml:"id"` Address string `yaml:"address"` Username string `yaml:"username"` Steps int `yaml:"steps"` }
Config contain the necessary data to interact with the API
type Lamp ¶
type Lamp struct {
State LampState `json:"state"`
}
Lamp hold informations of a Hue Lamp from the API
type LampState ¶
type LampState struct { On bool `json:"on"` Brightness int `json:"bri"` Reachable bool `json:"reachable"` }
LampState represents the State of a Hue Lamp from the API
type NUPnP ¶ added in v0.7.0
type NUPnP struct {
Address string `json:"internalipaddress"`
}
NUPnP represents the response from the search of a Hue Bridge
type RegisterError ¶ added in v0.7.0
type RegisterResponse ¶ added in v0.7.0
type RegisterResponse struct { ErrorData RegisterError `json:"error"` SuccessData RegisterSuccess `json:"success"` }
type RegisterSuccess ¶ added in v0.7.0
type RegisterSuccess struct {
Username string `json:"username"`
}
Click to show internal directories.
Click to hide internal directories.