pkg

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LightByName

func LightByName(ctx context.Context, bridge *huego.Bridge, name LightName) (*huego.Light, error)

Types

type BridgesProvider

type BridgesProvider interface {
	// GetBridges returns a bridge if found
	GetBridges(ctx context.Context) ([]*huego.Bridge, error)
}

func NewBridgeProviderCache

func NewBridgeProviderCache(providesBridge BridgesProvider) BridgesProvider

func NewBridgeProviderFallback

func NewBridgeProviderFallback(
	providesBridge BridgesProvider,
	fallback ...*huego.Bridge,
) BridgesProvider

func NewBridgesProvider

func NewBridgesProvider(id string, token Token) BridgesProvider

type BridgesProviderFunc

type BridgesProviderFunc func(ctx context.Context) ([]*huego.Bridge, error)

func (BridgesProviderFunc) GetBridges

func (p BridgesProviderFunc) GetBridges(ctx context.Context) ([]*huego.Bridge, error)

type LightName

type LightName string

func (LightName) String

func (l LightName) String() string

String of token

type Lights

type Lights []huego.Light

func (Lights) Len

func (l Lights) Len() int

func (Lights) Less

func (l Lights) Less(i, j int) bool

func (Lights) Swap

func (l Lights) Swap(i, j int)

type TimeOfDay

type TimeOfDay struct {
	Hour     int
	Minute   int
	Second   int
	Location *time.Location
}

func (TimeOfDay) Duration

func (t TimeOfDay) Duration(now time.Time) time.Duration

func (TimeOfDay) String

func (t TimeOfDay) String() string

func (TimeOfDay) Validate

func (t TimeOfDay) Validate(ctx context.Context) error

type Token

type Token string

Token to conenct to Hue bridge

func (Token) String

func (t Token) String() string

String of token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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