Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Light ¶
type Light struct { State LightState `json:"state"` Type string `json:"type"` Name string `json:"name"` ModelID string `json:"modelid"` ManufacturerName string `json:"manufacturername"` UniqueID string `json:"uniqueid"` SwVersion string `json:"swversion"` PointSymbol struct { One string `json:"1"` Two string `json:"2"` Three string `json:"3"` Four string `json:"4"` Five string `json:"5"` Six string `json:"6"` Seven string `json:"7"` Eight string `json:"8"` } `json:"pointsymbol"` }
type LightState ¶
type LightStateChange ¶
type LightStateChange struct { On *bool `json:"on,omitempty"` Bri *int `json:"bri,omitempty"` Hue *int `json:"hue,omitempty"` Sat *int `json:"sat,omitempty"` Effect *string `json:"effect,omitempty"` Ct *int `json:"ct,omitempty"` Alert *string `json:"alert,omitempty"` Colormode *string `json:"colormode,omitempty"` TransitionTime int `json:"transitiontime,omitempty"` }
type LightStateChangeResponse ¶
type LightStateChangeResponse []struct { Success map[string]interface{} `json:"success,omitempty"` }
type Server ¶
type Server struct { *echo.Echo UUID string FriendlyName string URLBase string GetLights func() LightList GetLight func(id string) Light SetLightState func(id string, state LightStateChange) LightStateChangeResponse }
func NewServer ¶
func NewServer(uuid, urlBase, friendlyName string, getLights func() LightList, getLight func(id string) Light, setLightState func(id string, state LightStateChange) LightStateChangeResponse) (srv *Server)
Click to show internal directories.
Click to hide internal directories.