config

package
v0.0.0-...-e3b2f93 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APISettings

type APISettings struct {
	Port uint16
}

type CfgAdmin

type CfgAdmin struct {
	UserId   string
	Password string
}

type CfgHistory

type CfgHistory struct {
	Service string
	Dir     string
}

type CfgProxySettings

type CfgProxySettings struct {
	Server   string
	User     string
	Password string
}

type CfgSlackSettings

type CfgSlackSettings struct {
	Token string
}

type CfgTelegramSettings

type CfgTelegramSettings struct {
	Token         string
	ProxySettings CfgProxySettings
}

type Config

type Config struct {
	Telegram       CfgTelegramSettings
	Slack          CfgSlackSettings
	Commands       []string
	CommandAliases map[string]string
	Admins         []CfgAdmin
	Debug          bool
	History        []CfgHistory
	API            APISettings
	HomeMon        HomeMonitorSettings
	CalendUrl      string
}

func Read

func Read(cfgPath string) (*Config, error)

func (*Config) Write

func (this *Config) Write(cfgPath string) error

type HomeMonitorSettings

type HomeMonitorSettings struct {
	HistorySize           int
	TemperatureThresholds common.Span
	HumidityThresholds    common.Span
	PressureThresholds    common.Span
	Subscribers           []string
}

Jump to

Keyboard shortcuts

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