cmd

package
v0.0.0-...-0896cb3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 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 Builder

type Builder interface {
	Build(Command) (*Func, error)
}

Builder is an interface indicating a type supports taking an abstract Command like ZoneSetLevel and returning a Func that knows how to execute that command on a specific type of hardware

type Command

type Command interface {
	GetID() string
	FriendlyString() string
	fmt.Stringer
}

type FeatureSetAttrs

type FeatureSetAttrs struct {
	ID          string
	FeatureID   string
	FeatureType string
	FeatureName string
	Attrs       map[string]*attr.Attribute
}

FeatureSetAttrs indicates there are attributes we need to update on the hardware

func (*FeatureSetAttrs) FriendlyString

func (c *FeatureSetAttrs) FriendlyString() string

func (*FeatureSetAttrs) GetID

func (c *FeatureSetAttrs) GetID() string

func (*FeatureSetAttrs) String

func (c *FeatureSetAttrs) String() string

type Func

type Func struct {
	Func     func() error
	Friendly string
}

Func represents a function along with a friendly name for that function

func (*Func) Execute

func (c *Func) Execute() error

Execute calls the func associated with this Func instance

func (*Func) FriendlyString

func (c *Func) FriendlyString() string

FriendlyString returns a human readable friendly name for this function e.g. "Zone Set to 10%"

func (*Func) String

func (c *Func) String() string

String returns a human readable friendly name for this function e.g. "Zone Set to 10%"

type SceneSet

type SceneSet struct {
	ID        string
	SceneID   string
	SceneName string
}

func (*SceneSet) FriendlyString

func (c *SceneSet) FriendlyString() string

func (*SceneSet) GetID

func (c *SceneSet) GetID() string

func (*SceneSet) String

func (c *SceneSet) String() string

Jump to

Keyboard shortcuts

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