backend

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Type() Type
	Name() string
	SupportsScenes() bool
	Init(ctx context.Context) error
	Close() error
	Refresh(ctx context.Context) (*State, error)
	SetLightPower(ctx context.Context, lightID string, on bool) error
	SetLightColor(ctx context.Context, lightID string, color models.Color) error
	ActivateScene(ctx context.Context, sceneID string) error
}

Backend defines the operations required by the TUI.

type State

type State struct {
	Locations []*models.Location
	Groups    []*models.Group
	Scenes    []*models.Scene
}

State is a snapshot of the backend state.

type Type

type Type string

Type identifies a backend implementation.

const (
	BackendAuto Type = "auto"
	BackendLAN  Type = "lan"
	BackendAPI  Type = "api"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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