config

package
v1.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mqtt *MQTTConfig `yaml:"mqtt"`
	HTTP *HTTPConfig `yaml:"http"`
	Map  *MapConfig  `yaml:"map"`
}

func NewConfig

func NewConfig(configFile string) (*Config, error)

type ConnectionConfig

type ConnectionConfig struct {
	Host           string `yaml:"host"`
	Port           string `yaml:"port"`
	Username       string `yaml:"username"`
	Password       string `yaml:"password"`
	ClientIDPrefix string `yaml:"client_id_prefix"`
	TLSEnabled     bool   `yaml:"tls_enabled"`
	TLSMinVersion  string `yaml:"tls_min_version"`
	TLSCaPath      string `yaml:"tls_ca_path"`
	TLSInsecure    bool   `yaml:"tls_insecure"`
}

type HTTPConfig

type HTTPConfig struct {
	Enabled bool   `yaml:"enabled"`
	Bind    string `yaml:"bind"`
}

type MQTTConfig

type MQTTConfig struct {
	Connection    *ConnectionConfig `yaml:"connection"`
	Topics        *TopicsConfig     `yaml:"topics"`
	ImageAsBase64 bool              `yaml:"image_as_base64"`
}

type MapConfig

type MapConfig struct {
	MinRefreshInt  time.Duration `yaml:"min_refresh_int"`
	PNGCompression int           `yaml:"png_compression"`
	Scale          float64       `yaml:"scale"`
	RotationTimes  int           `yaml:"rotate"`
	CustomLimits   struct {
		StartX int `yaml:"start_x"`
		StartY int `yaml:"start_y"`
		EndX   int `yaml:"end_x"`
		EndY   int `yaml:"end_y"`
	} `yaml:"custom_limits"`
	Colors struct {
		Floor       string   `yaml:"floor"`
		Obstacle    string   `yaml:"obstacle"`
		Path        string   `yaml:"path"`
		NoGoArea    string   `yaml:"no_go_area"`
		VirtualWall string   `yaml:"virtual_wall"`
		Segments    []string `yaml:"segments"`
	} `yaml:"colors"`
}

type TopicsConfig

type TopicsConfig struct {
	ValetudoPrefix     string `yaml:"valetudo_prefix"`
	ValetudoIdentifier string `yaml:"valetudo_identifier"`
	HaAutoconfPrefix   string `yaml:"ha_autoconf_prefix"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL