config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(cfgFile string)

Load reads in config file and ENV variables if set.

Types

type MqttConfig

type MqttConfig struct {
	Broker    string `viper:"mqtt.broker"`
	Port      int    `viper:"mqtt.port"`
	BaseTopic string `viper:"mqtt.base-topic"`
	User      string `viper:"mqtt.user"`
	Password  string `viper:"mqtt.password" print:"mask"`
	ClientID  string `viper:"mqtt.client-id"`
}

MqttConfig represents mqtt connection options

func NewMqttConfig

func NewMqttConfig() MqttConfig

NewMqttConfig returns new value of mqtt config

func (MqttConfig) Print

func (mc MqttConfig) Print()

Print prints mqtt config to standard output

Jump to

Keyboard shortcuts

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