Documentation ¶
Index ¶
- func Write(cfg *Configuration, configFile string) error
- type Configuration
- func (c *Configuration) AddRGBLED(rgbLED *types.RGBLED) error
- func (c *Configuration) AddSensor(sensor *types.Sensor) error
- func (c *Configuration) DisableRGBLED(name string) error
- func (c *Configuration) DisableSensor(name string) error
- func (c *Configuration) EnableRGBLED(name string) error
- func (c *Configuration) EnableSensor(name string) error
- func (c *Configuration) GetHumiditySensors(option Option) []sensor.Sensor
- func (c *Configuration) GetHumiditySensorsByName(names []string) []sensor.Sensor
- func (c *Configuration) GetPressureSensors(option Option) []sensor.Sensor
- func (c *Configuration) GetPressureSensorsByName(names []string) []sensor.Sensor
- func (c *Configuration) GetRGBLEDs(option Option) []rgbled.RGBLED
- func (c *Configuration) GetRGBLEDsByName(names []string) []rgbled.RGBLED
- func (c *Configuration) GetSensors(option Option) []sensor.Sensor
- func (c *Configuration) GetTemperatureSensors(option Option) []sensor.Sensor
- func (c *Configuration) GetTemperatureSensorsByName(names []string) []sensor.Sensor
- func (c *Configuration) RemoveRGBLED(name string) error
- func (c *Configuration) RemoveSensor(name string) error
- func (c *Configuration) RenameRGBLED(oldName, newName string) error
- func (c *Configuration) RenameSensor(oldName, newName string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(cfg *Configuration, configFile string) error
Write the configuration into a file, specified by the configuration filepath
Types ¶
type Configuration ¶
type Configuration struct { Device *types.Device `json:"device"` RGBLEDs []*types.RGBLED `json:"rgb_leds"` Sensors []*types.Sensor `json:"sensors"` }
Configuration of flucky
func (*Configuration) AddRGBLED ¶
func (c *Configuration) AddRGBLED(rgbLED *types.RGBLED) error
AddRGBLED add a new RGBLED
func (*Configuration) AddSensor ¶
func (c *Configuration) AddSensor(sensor *types.Sensor) error
AddSensor add a new sensor
func (*Configuration) DisableRGBLED ¶
func (c *Configuration) DisableRGBLED(name string) error
DisableRGBLED enables a rgb led by its name or its unique UUID
func (*Configuration) DisableSensor ¶
func (c *Configuration) DisableSensor(name string) error
DisableSensor disables a sensor by its name or its unique UUID
func (*Configuration) EnableRGBLED ¶
func (c *Configuration) EnableRGBLED(name string) error
EnableRGBLED enables a rgb led by its name or its unique UUID
func (*Configuration) EnableSensor ¶
func (c *Configuration) EnableSensor(name string) error
EnableSensor enables a sensor by its name or its unique UUID
func (*Configuration) GetHumiditySensors ¶
func (c *Configuration) GetHumiditySensors(option Option) []sensor.Sensor
GetHumiditySensors returns a list of humidity sensors
func (*Configuration) GetHumiditySensorsByName ¶
func (c *Configuration) GetHumiditySensorsByName(names []string) []sensor.Sensor
GetHumiditySensorsByName returns a list of humidity sensors by name, uuid or wire-id
func (*Configuration) GetPressureSensors ¶
func (c *Configuration) GetPressureSensors(option Option) []sensor.Sensor
GetPressureSensors returns a list of pressure sensors
func (*Configuration) GetPressureSensorsByName ¶
func (c *Configuration) GetPressureSensorsByName(names []string) []sensor.Sensor
GetPressureSensorsByName returns a list of pressure sensors by name, uuid or wire-id
func (*Configuration) GetRGBLEDs ¶
func (c *Configuration) GetRGBLEDs(option Option) []rgbled.RGBLED
func (*Configuration) GetRGBLEDsByName ¶
func (c *Configuration) GetRGBLEDsByName(names []string) []rgbled.RGBLED
func (*Configuration) GetSensors ¶
func (c *Configuration) GetSensors(option Option) []sensor.Sensor
GetSensors returns a list of humidity sensors
func (*Configuration) GetTemperatureSensors ¶
func (c *Configuration) GetTemperatureSensors(option Option) []sensor.Sensor
GetTemperatureSensors returns a list of temperature sensors
func (*Configuration) GetTemperatureSensorsByName ¶
func (c *Configuration) GetTemperatureSensorsByName(names []string) []sensor.Sensor
GetTemperatureSensorsByName returns a list of temperature sensors by name, uuid or wire-id
func (*Configuration) RemoveRGBLED ¶
func (c *Configuration) RemoveRGBLED(name string) error
RemoveRGBLED deletes a LED by its name or its unique UUID
func (*Configuration) RemoveSensor ¶
func (c *Configuration) RemoveSensor(name string) error
RemoveSensor deletes a sensor by its name or its unique UUID
func (*Configuration) RenameRGBLED ¶
func (c *Configuration) RenameRGBLED(oldName, newName string) error
RenameRGBLED renames a sensor identified by the name or the UUID
func (*Configuration) RenameSensor ¶
func (c *Configuration) RenameSensor(oldName, newName string) error
RenameSensor renames a sensor identified by the name or the UUID