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"` 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"` Frequency int `mapstructure:"FREQ"` }
Config stores all configuration of the application. The values are read by viper from a config file or environment variable.
func LoadConfig ¶
LoadConfig reads configuration from file environment variables.
type DeviceConfig ¶
type DeviceConfig []struct { GwID string `json:"gwId"` Key string `json:"key"` Type string `json:"type"` Name string `json:"name"` }
func LoadDevices ¶
func LoadDevices(path string) (devices DeviceConfig, err error)
Click to show internal directories.
Click to hide internal directories.