Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface {
GetURL() string
}
Config GetURL return the URL from the config file
type ConfigStructure ¶
type ConfigStructure struct { ConsoleActivated string `json:"console_activated"` InfluxDBActivated string `json:"influxDB_activated"` InfluxDBDatabase string `json:"influxDB_database"` InfluxDBPassword string `json:"influxDB_password"` InfluxDBServer string `json:"influxDB_server"` InfluxDBServerPort string `json:"influxDB_server_port"` InfluxDBUsername string `json:"influxDB_username"` LogLevel string `json:"log_level"` NestAccessToken string `json:"nest_access_token"` NestURL string `json:"nest_url"` RefreshTimer string `json:"refresh_timer"` }
ConfigStructure is the structure of the config YAML file use http://mervine.net/json2struct
func (ConfigStructure) GetURL ¶
func (configInfo ConfigStructure) GetURL() string
GetURL return nestURL
func (ConfigStructure) ReadConfig ¶
func (configInfo ConfigStructure) ReadConfig(configName string) ConfigStructure
ReadConfig read config from config.json with the package viper
Click to show internal directories.
Click to hide internal directories.