Documentation
¶
Index ¶
- Constants
- func InitConfigFactory(f string, cfg *Config) error
- type Config
- func (c *Config) GetCertKeyPath() string
- func (c *Config) GetCertPemPath() string
- func (c *Config) GetLogEnable() bool
- func (c *Config) GetLogLevel() string
- func (c *Config) GetLogReportCaller() bool
- func (c *Config) GetSbiBindingAddr() string
- func (c *Config) GetSbiBindingIP() string
- func (c *Config) GetSbiPort() int
- func (c *Config) GetSbiScheme() string
- func (c *Config) GetVersion() string
- 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 Sbi
- type Tls
Constants ¶
View Source
const ( UdmDefaultTLSKeyLogPath = "./log/udmsslkey.log" UdmDefaultCertPemPath = "./cert/udm.pem" UdmDefaultPrivateKeyPath = "./cert/udm.key" UdmDefaultConfigPath = "./config/udmcfg.yaml" UdmSbiDefaultIPv4 = "127.0.0.3" UdmSbiDefaultPort = 8000 UdmSbiDefaultScheme = "https" UdmDefaultNrfUri = "https://127.0.0.10:8000" UdmSorprotectionResUriPrefix = "/nudm-sorprotection/v1" UdmAuthResUriPrefix = "/nudm-auth/v1" UdmfUpuprotectionResUriPrefix = "/nudm-upuprotection/v1" UdmEcmResUriPrefix = "/nudm-ecm/v1" UdmSdmResUriPrefix = "/nudm-sdm/v1" UdmEeResUriPrefix = "/nudm-ee/v1" UdmDrResUriPrefix = "/nudr-dr/v1" UdmUecmResUriPrefix = "/nudm-uecm/v1" UdmPpResUriPrefix = "/nudm-pp/v1" UdmUeauResUriPrefix = "/nudm-ueau/v1" )
Variables ¶
This section is empty.
Functions ¶
func InitConfigFactory ¶
TODO: Support configuration update from REST api
Types ¶
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 UdmConfig *Config
func ReadConfig ¶
func (*Config) GetCertKeyPath ¶
func (*Config) GetCertPemPath ¶
func (*Config) GetLogEnable ¶
func (*Config) GetLogLevel ¶
func (*Config) GetLogReportCaller ¶
func (*Config) GetSbiBindingAddr ¶
func (*Config) GetSbiBindingIP ¶
func (*Config) GetSbiPort ¶
func (*Config) GetSbiScheme ¶
func (*Config) GetVersion ¶
func (*Config) SetLogEnable ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogReportCaller ¶
type Configuration ¶
type Configuration struct {
Sbi *Sbi `yaml:"sbi,omitempty" valid:"required"`
ServiceNameList []string `yaml:"serviceNameList,omitempty" valid:"required"`
NrfUri string `yaml:"nrfUri,omitempty" valid:"required, url"`
NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"optional"`
SuciProfiles []suci.SuciProfile `yaml:"SuciProfile,omitempty"`
}
type Sbi ¶
type Sbi struct {
Scheme string `yaml:"scheme" valid:"scheme"`
RegisterIPv4 string `yaml:"registerIPv4,omitempty" valid:"host,required"` // IP that is registered at NRF.
// IPv6Addr string `yaml:"ipv6Addr,omitempty"`
BindingIPv4 string `yaml:"bindingIPv4,omitempty" valid:"host,required"` // IP used to run the server in the node.
Port int `yaml:"port,omitempty" valid:"port,required"`
Tls *Tls `yaml:"tls,omitempty" valid:"optional"`
}
Click to show internal directories.
Click to hide internal directories.