api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 10 Imported by: 0 modules, 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

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend implements the LIFX HTTP API backend.

func New

func New(apiKey string) *Backend

New creates a new API backend.

func (*Backend) ActivateScene

func (b *Backend) ActivateScene(ctx context.Context, sceneID string) error

func (*Backend) Close

func (b *Backend) Close() error

func (*Backend) Init

func (b *Backend) Init(ctx context.Context) error

func (*Backend) Name

func (b *Backend) Name() string

func (*Backend) Refresh

func (b *Backend) Refresh(ctx context.Context) (*backend.State, error)

func (*Backend) SetAllPower

func (b *Backend) SetAllPower(ctx context.Context, on bool) error

func (*Backend) SetLightColor

func (b *Backend) SetLightColor(ctx context.Context, lightID string, color models.Color) error

func (*Backend) SetLightPower

func (b *Backend) SetLightPower(ctx context.Context, lightID string, on bool) error

func (*Backend) SupportsScenes

func (b *Backend) SupportsScenes() bool

func (*Backend) Type

func (b *Backend) Type() backend.Type

Jump to

Keyboard shortcuts

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