util

package
v0.0.0-...-4417166 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DataCollectionAmfRegistration = "datacollection.amf.Registration"

collections names

View Source
const DataCollectionPrometheusData = "datacollection.prometheus.Data"

Variables

View Source
var (
	DefaultNwdafConfigPath = "./config/nwdafcfg.yaml"
)
View Source
var NwdafKeyPath = path_util.Free5gcPath("free5gc/support/TLS/nwdaf.key")
View Source
var NwdafLogPath = path_util.Free5gcPath("wsilvad/nwdafsslkey.log")
View Source
var NwdafPemPath = path_util.Free5gcPath("free5gc/support/TLS/nwdaf.pem")

Functions

func AddPrometheusData

func AddPrometheusData(data *model.PrometheusResponseMain)

func AddRegistrationAccept

func AddRegistrationAccept(data *model.RegistrationAccept)

func CloseConnection

func CloseConnection(cli *mongo.Client, ctx context.Context)

func GetCollectionsName

func GetCollectionsName() []string

func GetConfiguration

func GetConfiguration() model.Config

func GetConnection

func GetConnection() (*mongo.Database, *mongo.Client, context.Context)

func GetDBName

func GetDBName() string

func GetHttpConnection

func GetHttpConnection() http.Client

func GetMongoDBUri

func GetMongoDBUri() string

func GetNumberOfRecordsInCollection

func GetNumberOfRecordsInCollection(name string) (int64, error)

func GetServerPort

func GetServerPort() string

func InitNwdafContext

func InitNwdafContext(context *nwdaf_context.NWDAFContext)

func MapArrayToByte

func MapArrayToByte(data []map[string]interface{}) []byte

func MapToByte

func MapToByte(data map[string]interface{}) []byte

func SearchNFServiceUri

func SearchNFServiceUri(nfProfile models.NfProfile, serviceName models.ServiceName,
	nfServiceStatus models.NfServiceStatus) (nfUri string, endpoint string, apiVersion string)

func SnssaiHexToModels

func SnssaiHexToModels(hexString string) (*models.Snssai, error)

func SnssaiModelsToHex

func SnssaiModelsToHex(snssai models.Snssai) string

func ToBsonM

func ToBsonM(data interface{}) bson.M

Types

This section is empty.

Jump to

Keyboard shortcuts

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