factory

package
v0.0.0-...-51c1a95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2025 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QOD_DEFAULT_REGISTER_IPV4         = "127.0.0.1"
	QOD_DEFAULT_BINDING_IPV4          = "0.0.0.0"
	QOD_DEFAULT_PORT_INT              = 9000
	QOD_DEFAULT_NOTIFY_PORT_INT       = 9001
	QOD_DEFAULT_SERVICE               = "/qod/v0"
	QOD_DEFAULT_NOTIFICATION_SERVICE  = "/qod/callback/v0"
	QOD_DEFAULT_NEF_IPV4              = "127.0.0.1"
	QOD_DEFAULT_NEF_SERVICE           = "/3gpp-as-session-with-qos/v1" // QoS Service
	QOD_DEFAULT_NEF_SUPP_FEAT         = "0"
	QOD_DEFAULT_NEF_HTTP_TIMEOUT_SECS = 5 // secs

	QOD_DEFAULT_OAUTH_KEY_CACHE_DURATION_MINS = 5
)

Variables

This section is empty.

Functions

func InitConfigFactory

func InitConfigFactory(f string) error

Types

type Config

type Config struct {
	Configuration *Configuration `yaml:"configuration"`
	Logger        *LogComponents `yaml:"logger"`
}
var QodConfig Config

type Configuration

type Configuration struct {
	CompName  string         `yaml:"compName"`
	Service   *Service       `yaml:"service"`
	Nef       *Nef           `yaml:"nef"`
	OAuth2Srv *OAuth2Service `yaml:"oauth2Service"` // QoD's OAuth2 service configuration (incoming requests towards QoD)
	OAuth2Cli *OAuth2Client  `yaml:"oauth2Client"`  // QoD's outgoing request towards NEF
	Db        *Db            `yaml:"db"`
}

type Db

type Db struct {
	Name string `yaml:"name"`
	Url  string `yaml:"url"`
}

type LogComponents

type LogComponents struct {
	QodService *LogSetting `yaml:"qodService"`
}

type LogSetting

type LogSetting struct {
	LogLevel string `yaml:"logLevel"`
}

type Nef

type Nef struct {
	Scheme            string `yaml:"scheme"`
	ServiceDomainName string `yaml:"serviceDomainName"` // Service domain name
	ServiceName       string `yaml:"serviceName"`       // Service base URL
	Port              int    `yaml:"port,omitempty"`
	SuppFeat          string `yaml:"suppFeatures"`
	TimeoutSecs       int    `yaml:"timeoutSecs,omitempty"`
}

type OAuth2Client

type OAuth2Client struct {
	TokenURL     string `yaml:"tokenUrl"`
	ClientId     string `yaml:"clientId"`
	ClientSecret string `yaml:"clientSecret"`
}

type OAuth2Service

type OAuth2Service struct {
	AuthServerUrl   string   `yaml:"authServerUrl"`
	IssuerUrl       string   `yaml:"issuerUrl,omitempty"`
	CacheDuration   int      `yaml:"cacheDuration,omitempty"`
	Audience        []string `yaml:"audience"`
	AuthorizedScope []string `yaml:"authorizedScope"`
}

type Service

type Service struct {
	Scheme             string `yaml:"scheme"`
	RegisterDomainName string `yaml:"registerDomainName"` // IP/DomainName that is registered at NRF.
	BindingDomainName  string `yaml:"bindingDomainName"`  // IP/DomainName used to run the server in the node.
	Port               int    `yaml:"port"`
	NotifyPort         int    `yaml:"notifyPort,omitempty"` // If notifyPort is not provided then QoD will not subscribe to events from NEF
	Env                string `yaml:"env"`                  // The cert & key are in local dir or azure cloud
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL