Documentation ¶
Index ¶
- type Actors
- type Color
- type ColorSettings
- type CombinedActor
- type CommandActor
- type CommandSensor
- type Condition
- type ConditionExpression
- type ConditionalActor
- type Config
- type Connections
- type Coordinate
- type Coordinates
- type DataPoints
- type Datapoint
- type General
- type GfxBlinkActor
- type GfxWaveActor
- type Layout
- type LockSwitchActor
- type MQTTActor
- type MQTTConnection
- type MQTTSensor
- type NavigationModeSwitchActor
- type Page
- type PageNumber
- type PageSwitchActor
- type Plotters
- type Progressbar
- type RestActor
- type RestSensor
- type Sensors
- type SplitDataPoint
- type Static
- type StaticExpression
- type StaticExpressions
- type StaticMatchExpression
- type StaticNumericExpression
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actors ¶
type Actors struct { Rest map[string]RestActor `yaml:"rest,omitempty" validate:"dive,keys,component_name,endkeys,required"` Mqtt map[string]MQTTActor `yaml:"mqtt,omitempty" validate:"dive,keys,component_name,endkeys,required"` Conditional map[string]ConditionalActor `yaml:"conditional,omitempty" validate:"dive,keys,component_name,endkeys,required"` Command map[string]CommandActor `yaml:"command,omitempty" validate:"dive,keys,component_name,endkeys,required"` Combined map[string]CombinedActor `yaml:"combined,omitempty" validate:"dive,keys,component_name,endkeys,required"` MetaPageSwitcher map[string]PageSwitchActor `yaml:"metaSwitchPage,omitempty" validate:"dive,keys,component_name,endkeys,required"` MetaLockerSwitcher map[string]LockSwitchActor `yaml:"metaSwitchLock,omitempty" validate:"dive,keys,component_name,endkeys,required"` GfxBlink map[string]GfxBlinkActor `yaml:"gfxBlink,omitempty" validate:"dive,keys,component_name,endkeys,required"` GfxWave map[string]GfxWaveActor `yaml:"gfxWave,omitempty" validate:"dive,keys,component_name,endkeys,required"` }
type ColorSettings ¶
type CombinedActor ¶
type CommandActor ¶
type CommandSensor ¶
type CommandSensor struct { Name string `yaml:"name" validate:"required"` Arguments []string `yaml:"args"` Interval time.Duration `yaml:"interval" validate:"required"` DataPoints DataPoints `yaml:"data" validate:"required"` }
type Condition ¶
type Condition struct { Actor string `yaml:"actor" validate:"required,actor"` DataPoint Datapoint `yaml:"datapoint" validate:"required,datapoint"` Expression ConditionExpression `yaml:"expression" validate:"required"` }
type ConditionExpression ¶
type ConditionExpression struct { Eq *string `yaml:"eq"` Ne *string `yaml:"ne"` Lt *float64 `yaml:"lt"` Lte *float64 `yaml:"lte"` Gt *float64 `yaml:"gt"` Gte *float64 `yaml:"gte"` Match *string `yaml:"match" validate:"omitempty,regexPattern"` NotMatch *string `yaml:"nmatch" validate:"omitempty,regexPattern"` Contains *string `yaml:"contains"` NotContains *string `yaml:"ncontains"` }
type ConditionalActor ¶
type ConditionalActor struct {
Conditions []Condition `yaml:"conditions" validate:"dive,required"`
}
type Config ¶
type Config struct { General General `yaml:"general"` Connections Connections `yaml:"connections"` Actors Actors `yaml:"actors"` Sensors Sensors `yaml:"sensors"` Layout Layout `yaml:"layout"` }
type Connections ¶
type Connections struct {
MQTT map[string]MQTTConnection `yaml:"mqtt" validate:"dive,keys,component_name,endkeys,required"`
}
type Coordinate ¶
type Coordinate string
func (Coordinate) Coordinate ¶
func (c Coordinate) Coordinate() (int, int, error)
type Coordinates ¶
type Coordinates string
func (Coordinates) Coordinates ¶
func (c Coordinates) Coordinates() ([][]int, error)
type DataPoints ¶
type DataPoints struct { Complete string `yaml:"complete"` Gjson map[string]string `yaml:"gjson" validate:"dive,keys,component_name,endkeys,required"` Gojq map[string]string `yaml:"gojq" validate:"dive,keys,component_name,endkeys,required"` Split map[string]SplitDataPoint `yaml:"split" validate:"dive,keys,component_name,endkeys,required"` }
type General ¶
type General struct { StartPage PageNumber `yaml:"startPage" validate:"omitempty,pagenumber"` StartBrightness pad.BrightnessLevel `yaml:"startBrightness" validate:"gte=0,lte=100"` SensorStore string `yaml:"sensorStore"` CompressSensorData bool `yaml:"compressSensorData"` }
type GfxBlinkActor ¶
type GfxWaveActor ¶
type Layout ¶
type Layout struct {
Pages map[PageNumber]Page `yaml:"pages" validate:"dive,keys,pagenumber,endkeys,required"`
}
type LockSwitchActor ¶
type LockSwitchActor struct {
Lock bool `yaml:"lock"`
}
type MQTTActor ¶
type MQTTActor struct { Connection string `yaml:"connection" validate:"required,connection_mqtt"` Topic string `yaml:"topic" validate:"required"` QOS byte `yaml:"qos" validate:"gte=0,lte=2"` Retained bool `yaml:"retained"` BodyB64 string `yaml:"bodyBase64" validate:"omitempty,base64"` BodyPath string `yaml:"bodyPath" validate:"omitempty,file"` BodyRaw string `yaml:"body"` BodyTemplate string `yaml:"bodyTemplate"` }
type MQTTConnection ¶
type MQTTSensor ¶
type MQTTSensor struct { Connection string `yaml:"connection" validate:"required,connection_mqtt"` Topic string `yaml:"topic" validate:"required"` QOS byte `yaml:"qos" validate:"gte=0,lte=2"` DataPoints DataPoints `yaml:"data" validate:"required"` }
type NavigationModeSwitchActor ¶
type NavigationModeSwitchActor struct {
}type Page ¶
type Page struct { Trigger map[Coordinates]Trigger `yaml:"trigger" validate:"dive,keys,coords,endkeys,required"` Plotter Plotters `yaml:"plotter" validate:"dive"` }
type PageSwitchActor ¶
type PageSwitchActor struct {
Target PageNumber `yaml:"target" validate:"pagenumber,required"`
}
type Plotters ¶
type Plotters struct { Progressbar []Progressbar `yaml:"progressbar" validate:"dive"` Static []Static `yaml:"static" validate:"dive"` }
type Progressbar ¶
type Progressbar struct { DataPoint Datapoint `yaml:"datapoint" validate:"required,datapoint"` X int `yaml:"x"` Y int `yaml:"y"` Min float64 `yaml:"min"` Max *float64 `yaml:"max"` Vertical bool `yaml:"vertical"` Quadrant gfx.Quadrant `yaml:"quadrant"` RightToLeft bool `yaml:"rtl"` Fill Color `yaml:"fill" validate:"color"` Empty Color `yaml:"empty" validate:"color"` }
type RestActor ¶
type RestActor struct { Method string `yaml:"method"` URL string `yaml:"url" validate:"required,url"` Header map[string][]string `yaml:"header"` BodyB64 string `yaml:"bodyBase64" validate:"omitempty,base64"` BodyPath string `yaml:"bodyPath" validate:"omitempty,file"` BodyRaw string `yaml:"body"` BodyTemplate string `yaml:"bodyTemplate"` }
type RestSensor ¶
type RestSensor struct { Method string `yaml:"method"` URL string `yaml:"url" validate:"required,url"` Header map[string][]string `yaml:"header"` BodyB64 string `yaml:"bodyBase64" validate:"omitempty,base64"` BodyPath string `yaml:"bodyPath" validate:"omitempty,file"` BodyRaw string `yaml:"body"` Interval time.Duration `yaml:"interval" validate:"required"` DataPoints DataPoints `yaml:"data" validate:"required"` }
type Sensors ¶
type Sensors struct { Mqtt map[string]MQTTSensor `yaml:"mqtt,omitempty" validate:"dive,keys,component_name,endkeys,required"` Rest map[string]RestSensor `yaml:"rest,omitempty" validate:"dive,keys,component_name,endkeys,required"` Command map[string]CommandSensor `yaml:"command,omitempty" validate:"dive,keys,component_name,endkeys,required"` }
type SplitDataPoint ¶
type Static ¶
type Static struct { DataPoint Datapoint `yaml:"datapoint" validate:"required,datapoint"` Position Coordinate `yaml:"pos" validate:"coord,required"` Expressions StaticExpressions `yaml:"expressions" validate:"required"` DefaultColor *Color `yaml:"defaultColor" validate:"omitempty,color"` }
type StaticExpression ¶
type StaticExpressions ¶
type StaticExpressions struct { Eq []StaticExpression `yaml:"eq" validate:"dive"` Ne []StaticExpression `yaml:"ne" validate:"dive"` Lt []StaticNumericExpression `yaml:"lt" validate:"dive"` Lte []StaticNumericExpression `yaml:"lte" validate:"dive"` Gt []StaticNumericExpression `yaml:"gt" validate:"dive"` Gte []StaticNumericExpression `yaml:"gte" validate:"dive"` Match []StaticMatchExpression `yaml:"match" validate:"dive"` NotMatch []StaticMatchExpression `yaml:"nmatch" validate:"dive"` Contains []StaticExpression `yaml:"contains" validate:"dive"` NotContains []StaticExpression `yaml:"ncontains" validate:"dive"` }
type StaticMatchExpression ¶
type StaticNumericExpression ¶
type Trigger ¶
type Trigger struct { Actor string `yaml:"actor" validate:"required,actor"` ColorSettings *ColorSettings `yaml:"color" validate:"omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.