Documentation
¶
Index ¶
- Constants
- func InitConfigFactory(f string, cfg *Config) error
- type AMFSCTPAddresses
- type BroadcastPLMNItem
- type Config
- func (c *Config) GetLogEnable() bool
- func (c *Config) GetLogLevel() string
- func (c *Config) GetLogReportCaller() bool
- 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 GlobalN3IWFID
- type Info
- type Logger
- type N3IWFNFInfo
- type PLMNID
- type SNSSAIItem
- type SliceSupportItem
- type SupportedTAItem
- type TimerValue
Constants ¶
View Source
const ( N3iwfDefaultTLSKeyLogPath = "./log/n3iwfsslkey.log" N3iwfDefaultCertPemPath = "./cert/n3iwf.pem" N3iwfDefaultPrivateKeyPath = "./cert/n3iwf.key" N3iwfDefaultConfigPath = "./config/n3iwfcfg.yaml" )
Variables ¶
This section is empty.
Functions ¶
func InitConfigFactory ¶
TODO: Support configuration update from REST api
Types ¶
type AMFSCTPAddresses ¶
type AMFSCTPAddresses struct { IPAddresses []string `yaml:"IP" valid:"required"` Port int `yaml:"Port,omitempty" valid:"port,optional"` // Default port is 38412 if not defined. }
func (*AMFSCTPAddresses) Validate ¶
func (a *AMFSCTPAddresses) Validate() (bool, error)
type BroadcastPLMNItem ¶
type BroadcastPLMNItem struct { PLMNID PLMNID `yaml:"PLMNID" valid:"required"` TAISliceSupportList []SliceSupportItem `yaml:"TAISliceSupportList" valid:"required"` }
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 N3iwfConfig *Config
func ReadConfig ¶
func (*Config) GetLogEnable ¶
func (*Config) GetLogLevel ¶
func (*Config) GetLogReportCaller ¶
func (*Config) GetVersion ¶
func (*Config) SetLogEnable ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogReportCaller ¶
type Configuration ¶
type Configuration struct { N3IWFInfo N3IWFNFInfo `yaml:"N3IWFInformation" valid:"required"` AMFSCTPAddresses []AMFSCTPAddresses `yaml:"AMFSCTPAddresses" valid:"required"` TCPPort uint16 `yaml:"NASTCPPort" valid:"port,required"` IKEBindAddr string `yaml:"IKEBindAddress" valid:"host,required"` IPSecGatewayAddr string `yaml:"IPSecTunnelAddress" valid:"host,required"` UEIPAddressRange string `yaml:"UEIPAddressRange" valid:"cidr,required"` // e.g. 10.0.1.0/24 XfrmIfaceName string `yaml:"XFRMInterfaceName" valid:"stringlength(1|10),optional"` // must != 0 XfrmIfaceId uint32 `yaml:"XFRMInterfaceID" valid:"numeric,optional"` // must != 0 GTPBindAddr string `yaml:"GTPBindAddress" valid:"host,required"` FQDN string `yaml:"FQDN" valid:"url,required"` // e.g. n3iwf.free5gc.org PrivateKey string `yaml:"PrivateKey" valid:"type(string),minstringlength(1),optional"` CertificateAuthority string `yaml:"CertificateAuthority" valid:"type(string),minstringlength(1),optional"` Certificate string `yaml:"Certificate" valid:"type(string),minstringlength(1),optional"` LivenessCheck TimerValue `yaml:"LivenessCheck" valid:"required"` }
type GlobalN3IWFID ¶
type N3IWFNFInfo ¶
type N3IWFNFInfo struct { GlobalN3IWFID GlobalN3IWFID `yaml:"GlobalN3IWFID" valid:"required"` RanNodeName string `yaml:"Name,omitempty" valid:"optional"` SupportedTAList []SupportedTAItem `yaml:"SupportedTAList" valid:"required"` }
type SNSSAIItem ¶
type SliceSupportItem ¶
type SliceSupportItem struct {
SNSSAI SNSSAIItem `yaml:"SNSSAI" valid:"required"`
}
type SupportedTAItem ¶
type SupportedTAItem struct { TAC string `yaml:"TAC" valid:"hexadecimal,stringlength(6|6),required"` BroadcastPLMNList []BroadcastPLMNItem `yaml:"BroadcastPLMNList" valid:"required"` }
Click to show internal directories.
Click to hide internal directories.