config

package
v0.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const AppName = "mqtt2cmd"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	AppId        string            `mapstructure:"app-id"`
	Mqtt         MqttConfig        `mapstructure:"mqtt"`
	Switches     []controls.Switch `mapstructure:"switches"`
	LoggerConfig LoggerConfig      `mapstructure:"log"`
}

func Load

func Load(version string, exit func(int), args []string) (*ApplicationConfig, error)

Load configuration from command-line options, config file, and environment variables

type LoggerConfig

type LoggerConfig struct {
	Path string `mapstructure:"path"`
}

type MqttConfig

type MqttConfig struct {
	Broker   string  `mapstructure:"broker"`
	User     *string `mapstructure:"username"`
	Password *string `mapstructure:"password"`
}

Jump to

Keyboard shortcuts

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