runtime

package
v0.0.0-...-e87ff79 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package runtime includes all the logic of the tool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertSubscriber

func InsertSubscriber(client *mongo.Client, dbname string, ueId string, servingPlmnId string, subsData SubsData) error

func ParseConf

func ParseConf(file string) error

ParseConf read the yaml file and populate the Config instancce

func RestfulAPIPost

func RestfulAPIPost(client *mongo.Client, dbName string, collName string, filter bson.M, postData map[string]interface{}) (bool, error)

This function come from https://github.com/free5gc/MongoDBLibrary/blob/main/api_mongoDB.go (License Apache 2) with new parameters "client" and "dbName", and a change on the return type

func RestfulAPIPostMany

func RestfulAPIPostMany(client *mongo.Client, dbName string, collName string, filter bson.M, postDataArray []interface{}) (bool, error)

This function come from https://github.com/free5gc/MongoDBLibrary/blob/main/api_mongoDB.go (License Apache 2) with new parameters "client" and "dbName", and a change on the return type

func Run

func Run(config string) error

Types

type Config

type Config struct {
	Mongo  Mongodb  `yaml:"mongo"`
	MCC    string   `yaml:"mcc"`
	MNC    string   `yaml:"mnc"`
	Key    string   `yaml:"key"`
	OP     string   `yaml:"op"`
	SQN    string   `yaml:"sqn"`
	AMF    string   `yaml:"amf"`
	Slices []Slice  `yaml:"slices"`
	IMSI   []string `yaml:"imsi"`
}
var PopulateConfig Config

type FlowRule

type FlowRule struct {
	Filter string `json:"filter,omitempty" yaml:"filter" bson:"filter" mapstructure:"filter"`
	Snssai string `json:"snssai,omitempty" yaml:"snssai" bson:"snssai" mapstructure:"snssai"`
	Dnn    string `json:"dnn,omitempty" yaml:"v" bson:"dnn" mapstructure:"dnn"`
	Var5QI int    `json:"5qi,omitempty" yaml:"5qi" bson:"5qi" mapstructure:"5qi"`
	MBRUL  string `json:"mbrUL,omitempty" yaml:"mbrUL" bson:"mbrUL" mapstructure:"mbrUL"`
	MBRDL  string `json:"mbrDL,omitempty" yaml:"mbrDL" bson:"mbrDL" mapstructure:"mbrDL"`
	GBRUL  string `json:"gbrUL,omitempty" yaml:"gbrUL" bson:"gbrUL" mapstructure:"gbrUL"`
	GBRDL  string `json:"gbrDL,omitempty" yaml:"gbrDL" bson:"gbrDL" mapstructure:"gbrDL"`
}

type Mongodb

type Mongodb struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
}

type Slice

type Slice struct {
	Sst   int32  `yaml:"sst"`
	Sd    string `yaml:"sd"`
	VarQI uint8  `yaml:"varqi"`
	Dnn   string `yaml:"dnn"`
	// IPV4, IPV6, IPV4V6, UNSTRUCTURED, ETHERNET. Default is IPV4
	PduSessionType *models.PduSessionType `yaml:"pdu-session-type,omitempty"`
}

type SubsData

type SubsData struct {
	PlmnID                            string                                     `json:"plmnID"`
	UeId                              string                                     `json:"ueId"`
	AuthenticationSubscription        models.AuthenticationSubscription          `json:"AuthenticationSubscription"`
	AccessAndMobilitySubscriptionData models.AccessAndMobilitySubscriptionData   `json:"AccessAndMobilitySubscriptionData"`
	SessionManagementSubscriptionData []models.SessionManagementSubscriptionData `json:"SessionManagementSubscriptionData"`
	SmfSelectionSubscriptionData      models.SmfSelectionSubscriptionData        `json:"SmfSelectionSubscriptionData"`
	AmPolicyData                      models.AmPolicyData                        `json:"AmPolicyData"`
	SmPolicyData                      models.SmPolicyData                        `json:"SmPolicyData"`
	FlowRules                         []FlowRule                                 `json:"FlowRules"`
}

type SubsListIE

type SubsListIE struct {
	PlmnID string `json:"plmnID"`
	UeId   string `json:"ueId"`
}

Jump to

Keyboard shortcuts

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