config

package
v0.0.0-...-04b60ce Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	BuildDate string
)

Functions

func BindEnvVars

func BindEnvVars()

func InitConfig

func InitConfig(cfgFile string)

func SetDefaults

func SetDefaults()

func WriteConfig

func WriteConfig(cfg SpeedtestWrapperConfig) string

WriteConfig writes config to file

Types

type MQTTConfig

type MQTTConfig struct {
	Host       string
	Port       string
	User       string
	Pass       string
	ClientName string
	Topic      string
	Qos        byte
}

MQTTConfig is a config abstraction for the MQTT client

type SpeedtestWrapperConfig

type SpeedtestWrapperConfig struct {
	MQTT MQTTConfig
}

SpeedtestWrapperConfig is an abstraction for the app config

func AppConfig

func AppConfig() SpeedtestWrapperConfig

AppConfig loads the config from file

Jump to

Keyboard shortcuts

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