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 GenerateJWTSecret ¶
func GenerateJWTSecret()
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"` }
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"`
func MockAppConfig ¶
MockAppConfig mocks out and saves the app config
type LoggingConfig ¶
LoggingConfig specifies all the parameters needed for logging
type NavConfig ¶
type NavConfig struct {}
NavConfig defines a structure to store rpc data
NavConf holds the rpc config RPCUser string `json:"rpcUser"` RPCPassword string `json:"rpcPassword"`
type ServerConfig ¶
type ServerConfig struct { ManagerAPIPort int64 DaemonAPIPort int64 SetupAPIPort int64 LatestReleaseAPI string ReleaseAPI string DaemonHeartbeat int64 LivePort int64 TestPort int64 UseTestnet bool JWTSecret string // this is self generated on each start }
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