Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogging ¶
func ConfigureLogging(config *LoggingConfig) (*logrus.Entry, error)
ConfigureLogging will take the logging configuration and also adds a few default parameters
func LoadAppConfig ¶
func LoadAppConfig() error
LoadAppConfig sets up viper, reads and parses app config
func LoadDevConfig ¶
func LoadDevConfig() error
LoadDevConfig sets up viper, loads, parses dev config
func SaveAppConfig ¶
func SaveAppConfig() error
SaveAppConfig formats/indents json and saves to app-config.json
func StartConfigManager ¶
func StartConfigManager()
StartConfigManager sets up the ticker loop to load app config
Types ¶
type AppConfig ¶
type AppConfig struct { AllowedIps []string `json:"allowedIps"` UIPassword string `json:"uiPassword"` Coins []Coins `json:"coins"` }
AppConfig defines a structure to store app config data
var AppConf AppConfig
AppConf holds the app config NavConf string `json:"navconf"` RunningNavVersion string `json:"runningNavVersion"` AllowedIps []string `json:"allowedIps"` UIPassword string `json:"uiPassword"`
type Coins ¶
type Coins struct { DaemonVersion string `json:"daemonVersion"` CurrencyCode string `json:"currencyCode"` LatestReleaseAPI string `json:"latestReleaseApi"` ReleaseAPI string `json:"ReleaseApi"` }
Coins defines structure of supported coin data
type DaemonConfig ¶
type DaemonConfig struct { RPCUser string `json:"rpcUser"` RPCPassword string `json:"rpcPassword"` }
DaemonConfig defines a structure to store rpc data
NavConf holds the rpc config RPCUser string `json:"rpcUser"` RPCPassword string `json:"rpcPassword"`
type LoggingConfig ¶
LoggingConfig specifies all the parameters needed for logging
type ServerConfig ¶
type ServerConfig struct { ManagerAPIPort int64 DaemonAPIPort int64 SetupAPIPort int64 LatestReleaseAPI string ReleaseAPI string DaemonHeartbeat int64 LivePort int64 TestPort int64 UseTestnet bool }
ServerConfig defines a structure to store server config data
var ServerConf ServerConfig
ServerConf holds the server config ManagerAPIPort int64 DaemonAPIPort int64 SetupAPIPort int64 LatestReleaseAPI string ReleaseAPI string DaemonHeartbeat int64
func LoadServerConfig ¶
func LoadServerConfig() (ServerConfig, error)
LoadServerConfig sets up viper, reads and parses server config