Documentation ¶
Index ¶
- Constants
- func InitConfigFactory(f string, cfg *Config) error
- type BillingServer
- type Config
- func (c *Config) GetLogEnable() bool
- func (c *Config) GetLogLevel() string
- func (c *Config) GetLogReportCaller() bool
- func (c *Config) SetLogEnable(enable bool)
- func (c *Config) SetLogLevel(level string)
- func (c *Config) SetLogReportCaller(reportCaller bool)
- func (c *Config) Validate() (bool, error)
- type Configuration
- type Info
- type Logger
- type Mongodb
- type Tls
- type WebServer
Constants ¶
View Source
const ( WebuiDefaultTLSKeyLogPath = "./log/webuisslkey.log" WebuiDefaultCertPemPath = "./cert/webui.pem" WebuiDefaultPrivateKeyPath = "./cert/webui.key" WebuiDefaultConfigPath = "./config/webuicfg.yaml" )
Variables ¶
This section is empty.
Functions ¶
func InitConfigFactory ¶
TODO: Support configuration update from REST api
Types ¶
type BillingServer ¶ added in v1.3.1
type BillingServer struct { Enable bool `yaml:"enable,omitempty" valid:"required,type(bool)"` HostIPv4 string `yaml:"hostIPv4,omitempty" valid:"required,host"` Port int `yaml:"port,omitempty" valid:"optional,port"` ListenPort int `yaml:"listenPort,omitempty" valid:"required,port"` Tls *Tls `yaml:"tls,omitempty" valid:"optional"` }
type Config ¶
type Config struct { Info *Info `yaml:"info" valid:"required"` Configuration *Configuration `yaml:"configuration" valid:"required"` Logger *Logger `yaml:"logger" valid:"required"` sync.RWMutex }
var WebuiConfig *Config
func ReadConfig ¶ added in v1.3.1
func (*Config) GetLogEnable ¶ added in v1.3.1
func (*Config) GetLogLevel ¶ added in v1.3.1
func (*Config) GetLogReportCaller ¶ added in v1.3.1
func (*Config) SetLogEnable ¶ added in v1.3.1
func (*Config) SetLogLevel ¶ added in v1.3.1
func (*Config) SetLogReportCaller ¶ added in v1.3.1
type Configuration ¶
type Configuration struct { WebServer *WebServer `yaml:"webServer,omitempty" valid:"optional"` Mongodb *Mongodb `yaml:"mongodb" valid:"required"` NrfUri string `yaml:"nrfUri" valid:"required"` BillingServer *BillingServer `yaml:"billingServer,omitempty" valid:"required"` }
Click to show internal directories.
Click to hide internal directories.