Documentation
¶
Index ¶
- Constants
- func CheckConfigVersion() error
- 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) 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
Constants ¶
View Source
const ( TngfExpectedConfigVersion = "1.0.3" TngfDefaultConfigPath = "./config/tngfcfg.yaml" )
Variables ¶
This section is empty.
Functions ¶
func CheckConfigVersion ¶
func CheckConfigVersion() error
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:"optional"` sync.RWMutex }
var TngfConfig *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 { TNGFInfo context.TNGFNFInfo `yaml:"TNGFInformation" valid:"required"` AMFSCTPAddresses []context.AMFSCTPAddresses `yaml:"AMFSCTPAddresses" valid:"required"` TCPPort uint16 `yaml:"NASTCPPort" valid:"port,required"` IKEBindAddr string `yaml:"IKEBindAddress" valid:"host,required"` RadiusBindAddr string `yaml:"RadiusBindAddress" 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. tngf.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"` RadiusSecret string `yaml:"RadiusSecret" valid:"type(string),minstringlength(1),optional"` }
Click to show internal directories.
Click to hide internal directories.