pkg

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: BSD-2-Clause Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 LightList added in v0.6.0

type LightList []huego.Light

func (LightList) Len added in v0.6.0

func (l LightList) Len() int

func (LightList) Less added in v0.6.0

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

func (LightList) Swap added in v0.6.0

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

type LightName

type LightName string

func (LightName) String

func (l LightName) String() string

String of token

type SunriseSunsetProvider added in v0.4.0

type SunriseSunsetProvider interface {
	GetSunriseSunset(ctx context.Context, now time.Time) (time.Time, time.Time, error)
}

SunriseSunsetProvider computes the apparent sunrise and sunset times for the given instant at the controller's fixed location coordinates.

func NewSunriseSunsetProvider added in v0.4.0

func NewSunriseSunsetProvider() SunriseSunsetProvider

NewSunriseSunsetProvider returns the real sunrise/sunset capability for the controller's fixed location coordinates.

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