Documentation ¶
Index ¶
- Constants
- func BoolProperty(value bool) *devicedef.Property
- func IntArg(min, max float64, required bool) *devicedef.Arg
- func IntProperty(value int, min, max float64, interpolation string) *devicedef.Property
- func LoadProvidedState(ctx context.Context, deviceID string, providers []string) (map[string]interface{}, error)
- func RGBProperty(value color.RGBA) *devicedef.Property
- func StringArgWithOptions(options []*devicedef.Option, required bool) *devicedef.Arg
- func StringProperty(value string) *devicedef.Property
- func Uint8Property(value uint8, min, max float64, interpolation string) *devicedef.Property
- func ValidateCommand(command string, args map[string]interface{}, ...) error
- func ValidateState(state map[string]interface{}, device *devicedef.Device) error
Constants ¶
View Source
const ( InterpolationDiscrete = "discrete" InterpolationContinuous = "continuous" TypeBool = "bool" TypeInt = "int" TypeString = "string" TypeRGB = "rgb" )
Useful constants
Variables ¶
This section is empty.
Functions ¶
func BoolProperty ¶
BoolProperty returns a boolean property
func IntProperty ¶
IntProperty returns an integer property
func LoadProvidedState ¶
func LoadProvidedState(ctx context.Context, deviceID string, providers []string) (map[string]interface{}, error)
LoadProvidedState returns the state from a set of providers
func RGBProperty ¶
RGBProperty returns an RGB property
func StringArgWithOptions ¶
StringArgWithOptions returns a string argument with a pick list of options
func StringProperty ¶
StringProperty returns a string property
func Uint8Property ¶
Uint8Property returns a uint8 property
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.