Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExampleYAML string
Functions ¶
func SaveExample ¶
func ValidateConfig ¶
Types ¶
type AgentConfig ¶
type ButtonConfig ¶ added in v1.4.0
type ButtonConfig struct {
Name string `yaml:"name"`
Command []string `yaml:"command"`
Timeout time.Duration `yaml:"timeout"`
HA *HAButtonConfig `yaml:"ha,omitempty"`
}
type Config ¶
type Config struct {
Log LogConfig `yaml:"log"`
MQTT MQTTConfig `yaml:"mqtt"`
Agent AgentConfig `yaml:"agent"`
Sensors map[string]SensorConfig `yaml:"sensors"`
Buttons map[string]ButtonConfig `yaml:"buttons"`
}
func LoadAndValidate ¶
func LoadConfig ¶
type HAButtonConfig ¶ added in v1.4.0
type HAButtonConfig struct {
Icon string `yaml:"icon,omitempty"`
}
type HASensorConfig ¶
type LogBatchConfig ¶ added in v1.3.0
type LogSink ¶ added in v1.3.0
type LogSink struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Level string `yaml:"level"`
Addr string `yaml:"addr"`
URL string `yaml:"url"`
Method string `yaml:"method"`
Timeout time.Duration `yaml:"timeout"`
Headers map[string]string `yaml:"headers"`
Codec string `yaml:"codec"`
QueueSize int `yaml:"queue_size"`
Batch *LogBatchConfig `yaml:"batch,omitempty"`
}
type MQTTConfig ¶
type MQTTConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
ClientID string `yaml:"client_id"`
DiscoveryPrefix string `yaml:"discovery_prefix"`
StatePrefix string `yaml:"state_prefix"`
DefaultInterval time.Duration `yaml:"default_interval"`
}
type SensorConfig ¶
type SensorConfig struct {
Name string `yaml:"name"`
Interval time.Duration `yaml:"interval"`
IncludeMounts []string `yaml:"include_mounts,omitempty"`
HA *HASensorConfig `yaml:"ha,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.