api

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Api

func Api(w http.ResponseWriter, r *http.Request)

func Discovery

func Discovery(w http.ResponseWriter, r *http.Request)

func LightInfo

func LightInfo(w http.ResponseWriter, r *http.Request)

func LightState

func LightState(w http.ResponseWriter, r *http.Request)

func Lights

func Lights(w http.ResponseWriter, r *http.Request)

func ToHueLights

func ToHueLights(ls map[int]*items.Light) map[string]*HueLight

Types

type HueLight

type HueLight struct {
	Name             string      `json:"name"`
	ManufacturerName string      `json:"manufacturername"`
	ModelID          string      `json:"modelid"`
	Version          string      `json:"swversion"`
	Type             string      `json:"type"`
	ID               string      `json:"uniqueid"`
	State            HueState    `json:"state"`
	PointSymbol      PointSymbol `json:"pointsymbol"`
}

func GetLight

func GetLight(provider, name string, on bool) HueLight

func ToHueLight

func ToHueLight(l *items.Light) *HueLight

type HueState

type HueState struct {
	On        bool `json:"on"`
	Reachable bool `json:"reachable"`
}

type PointSymbol

type PointSymbol struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL