configuration

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Debug     bool                   `yaml:"debug"`
	Server    ServerConfiguration    `yaml:"server"`
	Scrape    ScrapeConfiguration    `yaml:"scrape"`
	Database  DBConfiguration        `yaml:"database"`
	Tado      TadoConfiguration      `yaml:"tado"`
	SolarEdge SolarEdgeConfiguration `yaml:"solarEdge"`
}

func LoadFromFile

func LoadFromFile(filename string) (config *Configuration, err error)

type DBConfiguration

type DBConfiguration struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Database string `yaml:"database"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type ScrapeConfiguration

type ScrapeConfiguration struct {
	Enabled    bool          `yaml:"enabled"`
	Polling    time.Duration `yaml:"polling"`
	Collection time.Duration `yaml:"collection"`
}

type ServerConfiguration

type ServerConfiguration struct {
	Addr string `yaml:"addr,omitempty"`
	// deprecated
	Port           int    `yaml:"port,omitempty"`
	PrometheusAddr string `yaml:"prometheusAddr,omitempty"`
	// deprecated
	PrometheusPort int `yaml:"prometheusPort,omitempty"`
}

type SolarEdgeConfiguration

type SolarEdgeConfiguration struct {
	Token string `yaml:"token"`
}

type TadoConfiguration

type TadoConfiguration struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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