Documentation
¶
Index ¶
- Constants
- func InitConfigFactory(f string, cfg *Config) error
- type Config
- func (c *Config) GetLogEnable() bool
- func (c *Config) GetLogLevel() string
- func (c *Config) GetLogReportCaller() bool
- func (c *Config) GetNasIENetworkFeatureSupport5GS() *NetworkFeatureSupport5GS
- func (c *Config) GetNgapIEMaskedIMEISV() *MaskedIMEISV
- func (c *Config) GetNgapIEMobilityRestrictionList() *MobilityRestrictionList
- func (c *Config) GetNgapIERedirectionVoiceFallback() *RedirectionVoiceFallback
- func (c *Config) GetNgapPort() int
- func (c *Config) GetNrfUri() string
- func (c *Config) GetSbiBindingAddr() string
- func (c *Config) GetSbiBindingIP() string
- func (c *Config) GetSbiPort() int
- func (c *Config) GetSbiRegisterAddr() string
- func (c *Config) GetSbiRegisterIP() string
- func (c *Config) GetSbiScheme() string
- func (c *Config) GetSbiUri() string
- func (c *Config) GetSctpConfig() *Sctp
- func (c *Config) GetServiceNameList() []string
- func (c *Config) GetVersion() string
- func (c *Config) Print()
- 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 Ladn
- type Logger
- type MaskedIMEISV
- type MobilityRestrictionList
- type NasIE
- type NetworkFeatureSupport5GS
- type NetworkName
- type NgapIE
- type PlmnSupportItem
- type RedirectionVoiceFallback
- type Sbi
- type Sctp
- type Security
- type TimerValue
- type Tls
Constants ¶
View Source
const ( AmfDefaultTLSKeyLogPath = "./log/amfsslkey.log" AmfDefaultCertPemPath = "./cert/amf.pem" AmfDefaultPrivateKeyPath = "./cert/amf.key" AmfDefaultConfigPath = "./config/amfcfg.yaml" AmfSbiDefaultIPv4 = "127.0.0.18" AmfSbiDefaultPort = 8000 AmfSbiDefaultScheme = "https" AmfDefaultNrfUri = "https://127.0.0.10:8000" AmfCallbackResUriPrefix = "/namf-callback/v1" AmfCommResUriPrefix = "/namf-comm/v1" AmfEvtsResUriPrefix = "/namf-evts/v1" AmfLocResUriPrefix = "/namf-loc/v1" AmfMtResUriPrefix = "/namf-mt/v1" AmfOamResUriPrefix = "/namf-oam/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 AmfConfig *Config
func ReadConfig ¶ added in v1.2.1
func (*Config) GetLogEnable ¶ added in v1.2.1
func (*Config) GetLogLevel ¶ added in v1.2.1
func (*Config) GetLogReportCaller ¶ added in v1.2.1
func (*Config) GetNasIENetworkFeatureSupport5GS ¶ added in v1.2.1
func (c *Config) GetNasIENetworkFeatureSupport5GS() *NetworkFeatureSupport5GS
func (*Config) GetNgapIEMaskedIMEISV ¶ added in v1.2.1
func (c *Config) GetNgapIEMaskedIMEISV() *MaskedIMEISV
func (*Config) GetNgapIEMobilityRestrictionList ¶ added in v1.2.1
func (c *Config) GetNgapIEMobilityRestrictionList() *MobilityRestrictionList
func (*Config) GetNgapIERedirectionVoiceFallback ¶ added in v1.2.1
func (c *Config) GetNgapIERedirectionVoiceFallback() *RedirectionVoiceFallback
func (*Config) GetNgapPort ¶ added in v1.2.1
func (*Config) GetSbiBindingAddr ¶ added in v1.2.1
func (*Config) GetSbiBindingIP ¶ added in v1.2.1
func (*Config) GetSbiPort ¶ added in v1.2.1
func (*Config) GetSbiRegisterAddr ¶ added in v1.2.1
func (*Config) GetSbiRegisterIP ¶ added in v1.2.1
func (*Config) GetSbiScheme ¶ added in v1.2.1
func (*Config) GetSctpConfig ¶ added in v1.2.1
func (*Config) GetServiceNameList ¶ added in v1.2.1
func (*Config) GetVersion ¶
func (*Config) SetLogEnable ¶ added in v1.2.1
func (*Config) SetLogLevel ¶ added in v1.2.1
func (*Config) SetLogReportCaller ¶ added in v1.2.1
type Configuration ¶
type Configuration struct { AmfName string `yaml:"amfName,omitempty" valid:"required, type(string)"` NgapIpList []string `yaml:"ngapIpList,omitempty" valid:"required"` NgapPort int `yaml:"ngapPort,omitempty" valid:"optional,port"` Sbi *Sbi `yaml:"sbi,omitempty" valid:"required"` ServiceNameList []string `yaml:"serviceNameList,omitempty" valid:"required"` ServedGumaiList []models.Guami `yaml:"servedGuamiList,omitempty" valid:"required"` SupportTAIList []models.Tai `yaml:"supportTaiList,omitempty" valid:"required"` PlmnSupportList []PlmnSupportItem `yaml:"plmnSupportList,omitempty" valid:"required"` SupportDnnList []string `yaml:"supportDnnList,omitempty" valid:"required"` SupportLadnList []Ladn `yaml:"supportLadnList,omitempty" valid:"optional"` NrfUri string `yaml:"nrfUri,omitempty" valid:"required, url"` NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"optional"` Security *Security `yaml:"security,omitempty" valid:"required"` NetworkName NetworkName `yaml:"networkName,omitempty" valid:"required"` NgapIE *NgapIE `yaml:"ngapIE,omitempty" valid:"optional"` NasIE *NasIE `yaml:"nasIE,omitempty" valid:"optional"` T3502Value int `yaml:"t3502Value,omitempty" valid:"required, type(int)"` T3512Value int `yaml:"t3512Value,omitempty" valid:"required, type(int)"` Non3gppDeregTimerValue int `yaml:"non3gppDeregTimerValue,omitempty" valid:"-"` T3513 TimerValue `yaml:"t3513" valid:"required"` T3522 TimerValue `yaml:"t3522" valid:"required"` T3550 TimerValue `yaml:"t3550" valid:"required"` T3560 TimerValue `yaml:"t3560" valid:"required"` T3565 TimerValue `yaml:"t3565" valid:"required"` T3570 TimerValue `yaml:"t3570" valid:"required"` T3555 TimerValue `yaml:"t3555" valid:"required"` Locality string `yaml:"locality,omitempty" valid:"type(string),optional"` SCTP *Sctp `yaml:"sctp,omitempty" valid:"optional"` DefaultUECtxReq bool `yaml:"defaultUECtxReq,omitempty" valid:"type(bool),optional"` }
type MaskedIMEISV ¶ added in v1.2.1
type MaskedIMEISV struct {
Enable bool `yaml:"enable" valid:"type(bool)"`
}
type MobilityRestrictionList ¶ added in v1.2.1
type MobilityRestrictionList struct {
Enable bool `yaml:"enable" valid:"type(bool)"`
}
type NasIE ¶ added in v1.2.1
type NasIE struct {
NetworkFeatureSupport5GS *NetworkFeatureSupport5GS `yaml:"networkFeatureSupport5GS,omitempty" valid:"optional"`
}
type NetworkFeatureSupport5GS ¶
type NetworkFeatureSupport5GS struct { Enable bool `yaml:"enable" valid:"type(bool)"` Length uint8 `yaml:"length" valid:"type(uint8)"` ImsVoPS uint8 `yaml:"imsVoPS" valid:"type(uint8)"` Emc uint8 `yaml:"emc" valid:"type(uint8)"` Emf uint8 `yaml:"emf" valid:"type(uint8)"` IwkN26 uint8 `yaml:"iwkN26" valid:"type(uint8)"` Mpsi uint8 `yaml:"mpsi" valid:"type(uint8)"` EmcN3 uint8 `yaml:"emcN3" valid:"type(uint8)"` Mcsi uint8 `yaml:"mcsi" valid:"type(uint8)"` }
type NetworkName ¶
type NgapIE ¶ added in v1.2.1
type NgapIE struct { MobilityRestrictionList *MobilityRestrictionList `yaml:"mobilityRestrictionList,omitempty" valid:"optional"` MaskedIMEISV *MaskedIMEISV `yaml:"maskedIMEISV,omitempty" valid:"optional"` RedirectionVoiceFallback *RedirectionVoiceFallback `yaml:"redirectionVoiceFallback,omitempty" valid:"optional"` }
type PlmnSupportItem ¶
type RedirectionVoiceFallback ¶ added in v1.2.1
type RedirectionVoiceFallback struct {
Enable bool `yaml:"enable" valid:"type(bool)"`
}
type Sbi ¶
type Sbi struct { Scheme string `yaml:"scheme" valid:"required,scheme"` RegisterIPv4 string `yaml:"registerIPv4,omitempty" valid:"required,host"` // IP that is registered at NRF. BindingIPv4 string `yaml:"bindingIPv4,omitempty" valid:"required,host"` // IP used to run the server in the node. Port int `yaml:"port,omitempty" valid:"required,port"` Tls *Tls `yaml:"tls,omitempty" valid:"optional"` }
type TimerValue ¶
Click to show internal directories.
Click to hide internal directories.