Documentation ¶
Index ¶
- Variables
- func Auth() *cli.Command
- func ListGroups() *cli.Command
- func ListLights() *cli.Command
- func ListScenes() *cli.Command
- func Pause() *cli.Command
- func Script() *cli.Command
- func SetGroupBrightness() *cli.Command
- func SetGroupColor() *cli.Command
- func SetGroupOff() *cli.Command
- func SetGroupOn() *cli.Command
- func SetGroupScene() *cli.Command
- func SetLightBrightness() *cli.Command
- func SetLightColor() *cli.Command
- func SetLightOff() *cli.Command
- func SetLightOn() *cli.Command
- type ScriptAction
- type ScriptContents
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFlags = []cli.Flag{ &cli.StringFlag{ Name: flagConfig, Usage: "The json config file path", Value: os.ExpandEnv("${HOME}/.config/huectl/config.json"), EnvVars: []string{"HUE_CONFIG"}, }, &cli.StringFlag{ Name: flagUsername, Usage: "The hue username to authenticate with", EnvVars: []string{"HUE_USERNAME"}, }, &cli.StringFlag{ Name: flagAddr, Usage: "The hue bridge local address", EnvVars: []string{"HUE_ADDR"}, }, &cli.BoolFlag{ Name: flagQuiet, Aliases: []string{"q"}, Usage: "If command output should be suppressed", }, &cli.BoolFlag{ Name: flagVerbose, Aliases: []string{"v"}, Usage: "If verbose command should be shown", }, }
DefaultFlags are the default (or persistent) flags.
View Source
var GroupFlags = []cli.Flag{ &cli.IntFlag{ Name: flagGroupID, Aliases: []string{"id"}, Usage: "The group `ID` field of the group in question, exclusive with --group-name", }, &cli.StringFlag{ Name: flagGroupName, Aliases: []string{"n", "name"}, Usage: "The group `Name` field of the group in question, exclusive with --group-id", }, }
GroupFlags are group related flags.
View Source
var Huectl = &cli.App{ Name: "huectl", Usage: "Control hue lights and scenes using a local bridge.", Flags: DefaultFlags, Action: func(c *cli.Context) error { cli.ShowAppHelp(c) return nil }, Commands: []*cli.Command{ Auth(), Script(), Pause(), ListLights(), ListGroups(), ListScenes(), SetGroupOn(), SetGroupOff(), SetGroupColor(), SetGroupScene(), SetGroupBrightness(), SetLightOn(), SetLightOff(), SetLightColor(), SetLightBrightness(), }, }
Huectl is the cli app.
View Source
var LightFlags = []cli.Flag{ &cli.IntFlag{ Name: flagLightID, Aliases: []string{"id"}, Usage: "The `ID` field of the light in question", }, &cli.StringFlag{ Name: flagLightName, Aliases: []string{"name", "n"}, Usage: "The `Name` field of the light in question", }, }
LightFlags are light related flags.
View Source
var OutputFlags = []cli.Flag{ &cli.StringFlag{ Name: flagOutput, Aliases: []string{"o"}, Usage: "The output format (json|table|template)", EnvVars: []string{"HUE_OUTPUT"}, }, &cli.StringFlag{ Name: flagTemplate, Aliases: []string{"t"}, Usage: "The output template", EnvVars: []string{"HUE_OUTPUT_TEMPLATE"}, }, }
OutputFlags are common output related flags.
Functions ¶
func SetGroupBrightness ¶
func SetGroupBrightness() *cli.Command
SetGroupBrightness returns a command.
func SetLightBrightness ¶
func SetLightBrightness() *cli.Command
SetLightBrightness returns a command.
Types ¶
type ScriptAction ¶
ScriptAction is a specific action in a script.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.