huescene

package
v0.0.0-...-df9bae5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintConfig

func PrintConfig(cfg Config)

func SetScene

func SetScene(cfg Config, bridge huego.Bridge, scene string) error

Types

type Config

type Config struct {
	Username string
	Key      string
	Scenes   []SceneConfig
}

Config models the configuration information.

func ReadConfig

func ReadConfig(path string) (*Config, error)

ReadConfig reads a file and returns a

func ReadConfigFromStdin

func ReadConfigFromStdin() (*Config, error)

func UnmarshalConfig

func UnmarshalConfig(data []byte) (*Config, error)

UnmarshalConfig unmarshals raw config and returns a Config.

type SceneConfig

type SceneConfig struct {
	Name       string
	Color      string
	Brightness uint8
	Power      YAMLPower
	Lights     []SceneLightConfig
}

SceneConfig models the scene-specific configuration information.

type SceneLightConfig

type SceneLightConfig struct {
	Name       string
	Color      string
	Power      YAMLPower
	Brightness uint8
}

SceneLightConfig models the light-specific configuration information for a scene.

type YAMLPower

type YAMLPower struct {
	Value   bool
	IsValid bool
	IsSet   bool
}

func (*YAMLPower) UnmarshalYAML

func (i *YAMLPower) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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