handler

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewListLightsHandler

func NewListLightsHandler(bridgesProvider pkg.BridgesProvider) libhttp.WithError

NewListLightsHandler returns a JSON handler that lists all lights on the first bridge known to the BridgesProvider.

func NewStatusHandler

func NewStatusHandler(bridgesProvider pkg.BridgesProvider) libhttp.WithError

NewStatusHandler returns a JSON handler that splits the lights on the first bridge into on/off name lists, sorted for stable output.

Types

type StatusResponse

type StatusResponse struct {
	On  []string `json:"on"`
	Off []string `json:"off"`
}

StatusResponse is a scannable summary of which lights are currently on and off across the first bridge known to the BridgesProvider.

Jump to

Keyboard shortcuts

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