config

package
v0.0.0-...-3329fa7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListeningAddress string `mapstructure:"LISTENING_ADDRESS"`
	DeviceID         int    `mapstructure:"DEVICE_ID"`
	BrokerAddress    string `mapstructure:"BROKER_ADDRESS"`
	BrokerPort       int    `mapstructure:"BROKER_PORT"`
	BrokerUser       string `mapstructure:"BROKER_USER"`
	BrokerPassword   string `mapstructure:"BROKER_PASSWORD"`
	BrokerTopic      string `mapstructure:"BROKER_TOPIC"`
	ClientID         string `mapstructure:"CLIENT_ID"`
}

Config stores all configuration of the application. The values are read by viper from a config file or environment variable.

func LoadConfig

func LoadConfig(path string) (config Config, err error)

LoadConfig reads configuration from file environment variables.

Jump to

Keyboard shortcuts

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