53 lines
1.4 KiB
Go
53 lines
1.4 KiB
Go
package types
|
|
|
|
import "time"
|
|
|
|
type LED struct {
|
|
LEDID string `json:"led_id"`
|
|
LEDName string `json:"led_name"`
|
|
LEDLocation string `json:"led_location"`
|
|
GPIONumber *GPIO `json:"gpio_number"`
|
|
LEDEnabled bool `json:"led_enabled"`
|
|
LEDColor *LEDColor `json:"led_color"`
|
|
DeviceID string `json:"device_id"`
|
|
CreationDate time.Time `json:"creation_date"`
|
|
}
|
|
|
|
type RGBLED struct {
|
|
RGBLEDID string `json:"rgbled_id"`
|
|
RGBLEDName string `json:"rgbled_name"`
|
|
RGBLEDLocation string `json:"rgbled_location"`
|
|
RGBLEDColorToGPIO map[RGBColor]*GPIO `json:"color_to_gpio"`
|
|
RGBLEDEnabled bool `json:"rgbled_enabled"`
|
|
DeviceID string `json:"device_id"`
|
|
CreationDate time.Time `json:"creation_date"`
|
|
}
|
|
|
|
type RGBColor string
|
|
|
|
const (
|
|
RGBLEDBlue RGBColor = "blue"
|
|
RGBLEDRed = "red"
|
|
RGBLEDGreen = "green"
|
|
)
|
|
|
|
type LEDColor string
|
|
|
|
const (
|
|
LEDBlue LEDColor = "blue"
|
|
LEDRed = "red"
|
|
LEDGreen = "green"
|
|
LEDPurple = "purple"
|
|
LEDTurquoiseGravel = "turquoise gravel"
|
|
LEDYellow = "yellow"
|
|
LEDWhite = "white"
|
|
)
|
|
|
|
type LEDOption string
|
|
|
|
const (
|
|
LEDError LEDOption = "error"
|
|
LEDWarn = "warn"
|
|
LEDOk = "ok"
|
|
)
|