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 LoadServerConfig ¶
func LoadServerConfig() error
LoadServerConfig sets up viper, reads and parses server config
Types ¶
type AppConfig ¶
type AppConfig struct {
Coins []CoinData `json:"coins"`
}
AppConfig defines a structure to store app config data at present all config is mapped to Coins array
var AppConf AppConfig
AppConf defines data for each active coin
type CoinData ¶ added in v0.0.2
type CoinData struct { Name string `json:"name"` CurrencyCode string `json:"currencyCode"` LibPath string `json:"libPath"` DataDir string `json:"dataDir"` DaemonHeartbeat int `json:"daemonHeartbeat"` DaemonVersion string `json:"daemonVersion"` WindowsDaemonName string `json:"windowsDaemonName"` DarwinDaemonName string `json:"darwinDaemonName"` LatestReleaseAPI string `json:"latestReleaseApi"` ReleaseAPI string `json:"ReleaseApi"` LivePort int `json:"livePort"` TestNetPort int `json:"testnetPort"` UseTestNet bool `json:"useTestNet"` IndexTransactions bool `json:"indexTransactions"` }
Coins defines properties of active coin
type DaemonConfig ¶
type DaemonConfig struct { RPCUser string `json:"rpcUser"` RPCPassword string `json:"rpcPassword"` }
DaemonConfig defines a structure to store rpc data
var DaemonConf DaemonConfig
DaemonConf defines daemon-specific data
type LoggingConfig ¶
LoggingConfig specifies all the parameters needed for logging
type ServerConfig ¶
type ServerConfig struct {
ManagerAPIPort int64 `json:"managerApiPort"`
}
ServerConfig defines a structure to store server config data
var ServerConf ServerConfig
ServerConf defines server-specific