ngcnef

package
v0.0.0-...-462693d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// This value indicates that something functions wrongly in PFD
	// provisioning or the PFD provisioning does not function at all.
	Malfunction FailureCode = "MALFUNCTION"
	// This value indicates there is resource limitation for PFD storage.
	ResourceLimitation = "RESOURCE_LIMITATION"
	// This value indicates that the allowed delay is too short and PFD(s) are
	// not stored
	ShortDelay = "SHORT_DELAY"
	// The received external application identifier(s) are already provisioned
	AppIDDuplicated = "APP_ID_DUPLICATED"
	// Other reason specified
	OtherReason = "OTHER_REASON"
)

Possible values of FailureCode

Variables

View Source
var NEFRoutes = []Route{

	{
		"ReadAllTrafficInfluenceSubscription",
		strings.ToUpper("Get"),
		"/3gpp-traffic-influence/v1/{afId}/subscriptions",
		ReadAllTrafficInfluenceSubscription,
	},
	{
		"CreateTrafficInfluenceSubscription",
		strings.ToUpper("Post"),
		"/3gpp-traffic-influence/v1/{afId}/subscriptions",
		CreateTrafficInfluenceSubscription,
	},
	{
		"ReadTrafficInfluenceSubscription",
		strings.ToUpper("Get"),
		"/3gpp-traffic-influence/v1/{afId}/subscriptions/{subscriptionId}",
		ReadTrafficInfluenceSubscription,
	},
	{
		"UpdatePutTrafficInfluenceSubscription",
		strings.ToUpper("Put"),
		"/3gpp-traffic-influence/v1/{afId}/subscriptions/{subscriptionId}",
		UpdatePutTrafficInfluenceSubscription,
	},
	{
		"UpdatePatchTrafficInfluenceSubscription",
		strings.ToUpper("Patch"),
		"/3gpp-traffic-influence/v1/{afId}/subscriptions/{subscriptionId}",
		UpdatePatchTrafficInfluenceSubscription,
	},
	{
		"DeleteTrafficInfluenceSubscription",
		strings.ToUpper("Delete"),
		"/3gpp-traffic-influence/v1/{afId}/subscriptions/{subscriptionId}",
		DeleteTrafficInfluenceSubscription,
	},

	{
		"ReadAllPFDManagementTransaction",
		strings.ToUpper("Get"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions",
		ReadAllPFDManagementTransaction,
	},

	{
		"CreatePFDManagementTransaction",
		strings.ToUpper("Post"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions",
		CreatePFDManagementTransaction,
	},

	{
		"ReadPFDManagementTransaction",
		strings.ToUpper("Get"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}",
		ReadPFDManagementTransaction,
	},

	{
		"UpdatePutPFDManagementTransaction",
		strings.ToUpper("Put"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}",
		UpdatePutPFDManagementTransaction,
	},

	{
		"DeletePFDManagementTransaction",
		strings.ToUpper("Delete"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}",
		DeletePFDManagementTransaction,
	},

	{
		"ReadPFDManagementApplication",
		strings.ToUpper("Get"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}/" +
			"applications/{appId}",
		ReadPFDManagementApplication,
	},

	{
		"DeletePFDManagementApplication",
		strings.ToUpper("Delete"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}/" +
			"applications/{appId}",
		DeletePFDManagementApplication,
	},

	{
		"UpdatePutPFDManagementApplication",
		strings.ToUpper("Put"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}/" +
			"applications/{appId}",
		UpdatePutPFDManagementApplication,
	},

	{
		"PatchPFDManagementApplication",
		strings.ToUpper("Patch"),
		"/3gpp-pfd-management/v1/{scsAsId}/transactions/{transactionId}/" +
			"applications/{appId}",
		PatchPFDManagementApplication,
	},
}

NEFRoutes : NEF Routes lists which contains Routes with different HTTP

Request handlers for NEF
View Source
var TestClient = false

TestClient variable is only for UnitTesting purpose to inject errors in stub

View Source
var TestNEFSB = false

TestNEFSB is the Test variable for injecting errors in NEF SB APIs

Functions

func CreatePFDManagementTransaction

func CreatePFDManagementTransaction(w http.ResponseWriter,
	r *http.Request)

CreatePFDManagementTransaction Handles the PFD Management requested by AF

func CreateTrafficInfluenceSubscription

func CreateTrafficInfluenceSubscription(w http.ResponseWriter,
	r *http.Request)

CreateTrafficInfluenceSubscription : Handles the traffic influence requested by AF

func DeletePFDManagementApplication

func DeletePFDManagementApplication(w http.ResponseWriter,
	r *http.Request)

DeletePFDManagementApplication deletes the existing PFD transaction of an application identifier

func DeletePFDManagementTransaction

func DeletePFDManagementTransaction(w http.ResponseWriter,
	r *http.Request)

DeletePFDManagementTransaction deletes the existing PFD transaction

func DeleteTrafficInfluenceSubscription

func DeleteTrafficInfluenceSubscription(w http.ResponseWriter,
	r *http.Request)

DeleteTrafficInfluenceSubscription : Deletes a traffic influence created by

AF

func NewNEFRouter

func NewNEFRouter(nefCtx *nefContext) *mux.Router

NewNEFRouter : This function creates and initializes a NEF Router with all

              the available routes for NEF Module. This router object is
              defined in "github.com/gorilla/mux" package.
Input Args:
   - nefCtx: This is NEF Module Context. This contains the NEF Module Data.
Output Args:
   - error: retruns pointer to created mux.Router object

func NotifySmfUPFEvent

func NotifySmfUPFEvent(w http.ResponseWriter,
	r *http.Request)

NotifySmfUPFEvent : Handles the SMF notification for UPF event

func PatchPFDManagementApplication

func PatchPFDManagementApplication(w http.ResponseWriter,
	r *http.Request)

PatchPFDManagementApplication patches the PFD application PFDs

func ReadAllPFDManagementTransaction

func ReadAllPFDManagementTransaction(w http.ResponseWriter,
	r *http.Request)

ReadAllPFDManagementTransaction : API to read all the PFD Transactions

func ReadAllTrafficInfluenceSubscription

func ReadAllTrafficInfluenceSubscription(w http.ResponseWriter,
	r *http.Request)

ReadAllTrafficInfluenceSubscription : API to read all the subscritions

func ReadPFDManagementApplication

func ReadPFDManagementApplication(w http.ResponseWriter, r *http.Request)

ReadPFDManagementApplication : Read a particular PFD transaction details of and external application identifier

func ReadPFDManagementTransaction

func ReadPFDManagementTransaction(w http.ResponseWriter, r *http.Request)

ReadPFDManagementTransaction : Read a particular PFD transaction details

func ReadTrafficInfluenceSubscription

func ReadTrafficInfluenceSubscription(w http.ResponseWriter, r *http.Request)

ReadTrafficInfluenceSubscription : Read a particular subscription details

func Run

func Run(ctx context.Context, cfgPath string) error

Run : This function reads the NEF Module configuration file and stores in

NEF Module Context. This also calls the Initialization/Creation of
NEF Data. Also it  calls runServer function for starting HTTP Server.

Input Args:

  • ctx: NEF Module Running context
  • cfgPath: This is NEF Module Configuration file path

Output Args:

  • error: returns error in case any error occurred in reading NEF configuration file, NEF create error or any error occurred in starting server

func UpdatePatchTrafficInfluenceSubscription

func UpdatePatchTrafficInfluenceSubscription(w http.ResponseWriter,
	r *http.Request)

UpdatePatchTrafficInfluenceSubscription : Updates a traffic influence created

earlier (PATCH Req)

func UpdatePutPFDManagementApplication

func UpdatePutPFDManagementApplication(w http.ResponseWriter,
	r *http.Request)

UpdatePutPFDManagementApplication updates an existing PFD transaction

func UpdatePutPFDManagementTransaction

func UpdatePutPFDManagementTransaction(w http.ResponseWriter,
	r *http.Request)

UpdatePutPFDManagementTransaction updates an existing PFD transaction

func UpdatePutTrafficInfluenceSubscription

func UpdatePutTrafficInfluenceSubscription(w http.ResponseWriter,
	r *http.Request)

UpdatePutTrafficInfluenceSubscription : Updates a traffic influence created earlier (PUT Req)

Types

type AccessType

type AccessType string

AccessType defines the access type supported values are - 3GPP_ACCESS - NON_3GPP_ACCESS

type AfAppID

type AfAppID string

AfAppID Contains an AF application identifier.

type AfClient

type AfClient struct {
	// contains filtered or unexported fields
}

AfClient is an implementation of the Af Notification

func NewAfClient

func NewAfClient(cfg *Config) *AfClient

NewAfClient creates a new Udr Client

func (*AfClient) AfNotificationUpfEvent

func (af *AfClient) AfNotificationUpfEvent(ctx context.Context,
	afURI URI, body EventNotification) error

AfNotificationUpfEvent is an implementation for sending upf event

type AfNotification

type AfNotification interface {

	// AAfNotificationUpfEvent sends the UPF event through POST method
	// towards the AF
	AfNotificationUpfEvent(ctx context.Context,
		afURI URI,
		body EventNotification) error
}

AfNotification definesthe interfaces that are exposed for sending nofitifications towards the AF

type AfRoutingRequirement

type AfRoutingRequirement struct {
	// A list of traffic routes to applications locations
	// Min Items: 1
	RouteToLocs []RouteToLocation `json:"routeToLocs"`
	// sp val
	SpVal SpatialValidity `json:"spVal,omitempty"`
	// temp vals
	// Min Items: 1
	TempVals []TemporalValidity `json:"tempVals"`
	// up path chg sub
	UpPathChgSub UpPathChgEvent `json:"upPathChgSub,omitempty"`
	// Indication of application relocation possibility
	AppReloc bool `json:"appReloc,omitempty"`
	// addr preser ind
	AddrPreserInd bool `json:"addrPreserInd,omitempty"`
}

AfRoutingRequirement describes the event information delivered in the subscription

type AppSessionContext

type AppSessionContext struct {
	// Identifies the service requirements of an Individual Application Session
	// Context.
	// It shall be present in HTTP POST request messages and may be included
	// in the HTTP response messages
	AscReqData AppSessionContextReqData `json:"ascReqData,omitempty"`
}

AppSessionContext Represents an Individual Application Session Context resource.

type AppSessionContextReqData

type AppSessionContextReqData struct {
	// AF application identifier
	AfAppID AfAppID `json:"afAppId,omitempty"`
	// Indicates the AF traffic routing requirements. It shall be included if
	//  Influence on Traffic Routing feature is supported
	AfRoutReq AfRoutingRequirement `json:"afRoutReq,omitempty"`
	// dnn Data Network Name. It shall be present when the "afRoutReq"
	// attribute is  present
	Dnn Dnn `json:"dnn,omitempty"`
	// slice info
	SliceInfo Snssai `json:"sliceInfo,omitempty"`
	// Subscription Permanent Identifier
	Supi Supi `json:"supi,omitempty"`
	// Subscription Permanent Identifier
	Gpsi Gpsi `json:"gpsi,omitempty"`
	// supp feat
	// Required: true
	SuppFeat SupportedFeatures `json:"suppFeat"`
	// ue Ipv4
	UeIpv4 Ipv4Addr `json:"ueIpv4,omitempty"`
	// ue Ipv6
	UeIpv6 Ipv6Addr `json:"ueIpv6,omitempty"`
	// ue mac
	UeMac MacAddr48 `json:"ueMac,omitempty"`
}

AppSessionContextReqData Identifies the service requirements of an Individual Application Session Context.

type AppSessionContextUpdateData

type AppSessionContextUpdateData struct {
	// AF application identifier
	AfAppID AfAppID `json:"afAppId,omitempty"`
	// Indicates the AF traffic routing requirements. It shall be included if
	//  Influence on Traffic Routing feature is supported
	AfRoutReq AfRoutingRequirement `json:"afRoutReq,omitempty"`
}

AppSessionContextUpdateData Contains the modification(s) to apply to the Individual Application Session Context resource

type AppSessionID

type AppSessionID string

AppSessionID contains the application session id returned by the PCF Its present in the location header as below: "{apiRoot}/npcf-policyauthorization/v1/app-sessions/{appSessionId}"

type ApplicationID

type ApplicationID string

ApplicationID is string providing an application identifier.

type Config

type Config struct {
	// API Root for the NEF
	NefAPIRoot                string `json:"nefAPIRoot"`
	LocationPrefix            string `json:"locationPrefix"`
	LocationPrefixPfd         string `json:"locationPrefixPfd"`
	MaxSubSupport             int    `json:"maxSubSupport"`
	MaxPfdTransSupport        int    `json:"maxPfdTransSupport"`
	MaxAFSupport              int    `json:"maxAFSupport"`
	SubStartID                int    `json:"subStartID"`
	PfdTransStartID           int    `json:"pfdTransStartID"`
	UpfNotificationResURIPath string `json:"UpfNotificationResUriPath"`
	UserAgent                 string `json:"UserAgent"`
	HTTPConfig                HTTPConfig
	HTTP2Config               HTTP2Config
	AfServiceIDs              []interface{} `json:"afServiceIDs"`
	OAuth2Support             bool          `json:"OAuth2Support"`
}

Config contains NEF Module Configuration Data Structure

type DateTime

type DateTime string

DateTime is in the date-time format

type Dnai

type Dnai string

Dnai : string identifying the Data Network Area Identifier

type DnaiChangeType

type DnaiChangeType string

DnaiChangeType : string identifying the DNAI change type Possible values are - EARLY: Early notification of UP path reconfiguration. - EARLY_LATE: Early and late notification of UP path reconfiguration. This value shall only be present in the subscription to the DNAI change event. - LATE: Late notification of UP path reconfiguration.

type Dnn

type Dnn string

Dnn : string identify the Data network name

type DurationSec

type DurationSec uint64

DurationSec is unsigned integer identifying a period of time in units of seconds.

type DurationSecRm

type DurationSecRm DurationSec

DurationSecRm is unsigned integer identifying a period of time in units of seconds with "nullable=true" property.

type DurationSecRo

type DurationSecRo DurationSec

DurationSecRo is unsigned integer identifying a period of time in units of seconds with "readOnly=true" property.

type Ecgi

type Ecgi struct {
	// eutra cell Id
	// Required: true
	EutraCellID EutraCellID `json:"eutraCellId"`
	// plmn Id
	// Required: true
	PlmnID PlmnID `json:"plmnId"`
}

Ecgi ecgi

type EthFlowDescription

type EthFlowDescription struct {
	// destination Mac address
	DestMacAddr MacAddr48 `json:"destMacAddr,omitempty"`
	// A two-octet string that represents the Ethertype, as described in
	// IEEE 802.3 [16] and IETF RFC 7042 [18]
	// in hexadecimal representation.  Each character in the string shall take a
	// value of "0" to "9" or "A" to "F" and shall represent 4 bits. The most
	// significant
	// character representing the 4 most  significant bits of the ethType shall
	// appear first in the string, and the character representing the 4 least
	// significant bits of the ethType shall appear last in the string
	EthType string `json:"ethType,omitempty"`
	// Contains the flow description for the Uplink or Downlink IP flow. It
	// shall be present when the Ethertype is IP.
	FDesc FlowDescription `json:"fDesc,omitempty"`
	// Contains the packet filter direction.
	FDir FlowDirection `json:"fDir,omitempty"`
	// Source MAC address
	SourceMacAddr MacAddr48 `json:"sourceMacAddr,omitempty"`
	//  minItems: 1, maxItems: 2
	// Customer-VLAN and/or Service-VLAN tags containing the VID, PCP/DEI fields
	// as defined in IEEE 802.1Q [17] and IETF RFC 7042 [18].
	// Each field is encoded as a two-octet string in hexadecimal
	// representation.
	// Each character in the string shall take a value of "0" to "9" or "A"
	// to "F" and shall
	// represent 4 bits. The most significant character representing the 4 most
	// significant bits of the VID or PCF/DEI field shall appear first in the
	// string, and the character representing the 4 least significant bits of
	// the VID or PCF/DEI field shall appear last in the string
	VlanTags []string `json:"vlanTags,omitempty"`
}

EthFlowDescription : Identifies an Ethernet flow

type EutraCellID

type EutraCellID string

EutraCellID eutra cell Id

type EventNotification

type EventNotification struct {
	// Identifies an NEF Northbound interface transaction, generated by the AF
	AfTransID string `json:"afTransId,omitempty"`
	// Identifies the type of notification regarding UP path management event.
	DnaiChgType DnaiChangeType `json:"dnaiChgType"`
	// Identifies the N6 traffic routing information associated to the source
	// DNAI. Shall be present if the "subscribedEvent" sets to "UP_PATH_CHANGE".
	SourceTrafficRoute RouteToLocation `json:"sourceTrafficRoute,omitempty"`
	// Identifies a UP path management event the AF requested to be notified of
	SubscribedEvent SubscribedEvent `json:"subscribedEvent,omitempty"`
	// Identifies the N6 traffic routing information associated to the target
	// DNAI. Shall be present if the "subscribedEvent" sets to "UP_PATH_CHANGE".
	TargetTrafficRoute RouteToLocation `json:"targetTrafficRoute,omitempty"`
	// Identifies a user
	Gpsi Gpsi `json:"gpsi,omitempty"`
	// The IPv4 Address of the served UE for the source DNAI.
	SrcUeIpv4Addr Ipv4Addr `json:"srcUeIpv4Addr,omitempty"`
	// The Ipv6 Address Prefix of the served UE for the source DNAI.
	SrcUeIpv6Prefix Ipv6Prefix `json:"srcUeIpv6Prefix,omitempty"`
	// The IPv4 Address of the served UE for the target DNAI.
	TgtUeIpv4Addr Ipv4Addr `json:"tgtUeIpv4Addr,omitempty"`
	// The Ipv6 Address Prefix of the served UE for the target DNAI.
	TgtUeIpv6Prefix Ipv6Prefix `json:"tgtUeIpv6Prefix,omitempty"`
	// UE MAC address of the served UE
	UeMac MacAddr48 `json:"ueMac,omitempty"`
}

EventNotification The UP management event notification is provided by the NEF to the AF through the POST method

type ExternalGroupID

type ExternalGroupID string

ExternalGroupID : string containing a local identifier followed by "@" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any "@" characters. See Clauses 4.6.2 and 4.6.3 of 3GPP TS 23.682 for more information

type FailureCode

type FailureCode string

FailureCode represents the failure reason of the PFD management

type FlowDescription

type FlowDescription string

FlowDescription : Defines a packet filter of an IP flow.

type FlowDirection

type FlowDirection string

FlowDirection : Possible values are

  • DOWNLINK: The corresponding filter applies for traffic to the UE.
  • UPLINK: The corresponding filter applies for traffic from the UE.
  • BIDIRECTIONAL: The corresponding filter applies for traffic both to and

from the UE.

  • UNSPECIFIED: The corresponding filter applies for traffic to the UE

(downlink), but has no specific direction declared.

The service data flow detection shall apply the filter for

uplink traffic as if the filter was bidirectional.

The PCF shall not use the value UNSPECIFIED in filters

created by the network in NW-initiated procedures.

The PCF shall only include the value UNSPECIFIED in filters

in UE-initiated procedures if the same value is received from the SMF. TBD: To be moved to the SMF policy related file later on

type FlowInfo

type FlowInfo struct {
	// Indicates the IP flow.
	FlowID int32 `json:"flowId"`
	// Indicates the packet filters of the IP flow. Refer to subclause 5.3.8 of
	//  3GPP TS 29.214 for encoding.
	// It shall contain UL and/or DL IP flow description.
	// minItems : 1 maxItems : 2
	FlowDescriptions []string `json:"flowDescriptions,omitempty"`
}

FlowInfo Flow information struct

type GNbID

type GNbID struct {
	// bit length
	// Required: true
	// Maximum: 32
	// Minimum: 22
	BitLength uint8 `json:"bitLength"`
	// g n b value
	// Required: true
	// Pattern: ^[A-Fa-f0-9]{6,8}$
	GNBValue string `json:"gNBValue"`
}

GNbID g nb Id

type GlobalRanNodeID

type GlobalRanNodeID struct {
	// plmn Id
	// Required: true
	PlmnID PlmnID `json:"plmnId"`
	// n3 iwf Id
	N3IwfID N3IwfID `json:"n3IwfId,omitempty"`
	// g nb Id
	GNbID GNbID `json:"gNbId,omitempty"`
	// nge nb Id
	NgeNbID NgeNbID `json:"ngeNbId,omitempty"`
}

GlobalRanNodeID global ran node Id

type Gpsi

type Gpsi string

Gpsi : Generic Public Servie Identifiers asssociated wit the UE pattern '^(msisdn-[0-9]{5,15}|extid-[^@]+@[^@]+|.+)$'

type HTTP2Config

type HTTP2Config struct {
	Endpoint      string `json:"endpoint"`
	NefServerCert string `json:"NefServerCert"`
	NefServerKey  string `json:"NefServerKey"`
	AfClientCert  string `json:"AfClientCert"`
}

HTTP2Config Contains the configuration for the HTTP2

type HTTPConfig

type HTTPConfig struct {
	Endpoint string `json:"endpoint"`
}

HTTPConfig contains the configuration for the HTTP 1.1

type InfluenceID

type InfluenceID string

InfluenceID contains the application session id returned by the UDR Its present in the location header as below: "{apiRoot}/nudr-dr/v1/aapplication-data/influenceData/{influenceId}"

type InvalidParam

type InvalidParam struct {
	// Attribute”s name encoded as a JSON Pointer, or header”s name.
	Param string `json:"param"`
	// A human-readable reason, e.g. \"must be a positive integer\".
	Reason string `json:"reason,omitempty"`
}

InvalidParam Invalid Parameters struct

type Ipv4Addr

type Ipv4Addr string

Ipv4Addr : string representing the IPv4 address pattern: '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9] |[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$' example: '198.51.100.1'

type Ipv6Addr

type Ipv6Addr string

Ipv6Addr : string representing the IPv6 address pattern: '^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})) :){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$' pattern: '^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$' example: '2001:db8:85a3::8a2e:370:7334'

type Ipv6Prefix

type Ipv6Prefix string

Ipv6Prefix : string representing the Ipv6 Prefix pattern: '^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})) :){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))(\/(([0-9])|([0-9]{2})|(1[0-1][0-9]) |(12[0-8])))$' pattern: '^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)) (\/.+)$' example: '2001:db8:abcd:12::0/64'

type Link URI

Link : string Identifies a referenced resource

type MacAddr48

type MacAddr48 string

MacAddr48 : Identifies a MAC address pattern: '^([0-9a-fA-F]{2})((-[0-9a-fA-F]{2}){5})$'

type Mcc

type Mcc string

Mcc mcc

type Mnc

type Mnc string

Mnc mnc

type N3IwfID

type N3IwfID string

N3IwfID n3 iwf Id

type NEFSBAppPutPfdFn

type NEFSBAppPutPfdFn func(transData *afPfdTransaction, nefCtx *nefContext,
	app PfdData) (rsp nefPFDSBRspData, err error)

NEFSBAppPutPfdFn is the callback for SB API to put PFD transaction

type NEFSBDeleteFn

type NEFSBDeleteFn func(subData *afSubscription, nefCtx *nefContext) (
	rsp nefSBRspData, err error)

NEFSBDeleteFn is the callback for SB API

type NEFSBDeletePfdFn

type NEFSBDeletePfdFn func(transData *afPfdTransaction, nefCtx *nefContext) (
	rsp nefPFDSBRspData, err error)

NEFSBDeletePfdFn is the callback for SB API to delete PFD transaction

type NEFSBGetFn

type NEFSBGetFn func(subData *afSubscription, nefCtx *nefContext) (
	sub TrafficInfluSub, rsp nefSBRspData, err error)

NEFSBGetFn is the callback for SB API

type NEFSBGetPfdFn

type NEFSBGetPfdFn func(transData *afPfdTransaction, nefCtx *nefContext) (
	trans PfdManagement, rsp nefPFDSBRspData, err error)

NEFSBGetPfdFn is the callback for SB API to get PFD transaction

type NEFSBPatchFn

type NEFSBPatchFn func(subData *afSubscription, nefCtx *nefContext,
	tisp TrafficInfluSubPatch) (rsp nefSBRspData, err error)

NEFSBPatchFn is the callback for SB API

type NEFSBPutFn

type NEFSBPutFn func(subData *afSubscription, nefCtx *nefContext,
	ti TrafficInfluSub) (rsp nefSBRspData, err error)

NEFSBPutFn is the callback for SB API

type NEFSBPutPfdFn

type NEFSBPutPfdFn func(transData *afPfdTransaction, nefCtx *nefContext,
	trans PfdManagement) (rsp map[string]nefPFDSBRspData, err error)

NEFSBPutPfdFn is the callback for SB API to put PFD transaction

type Ncgi

type Ncgi struct {
	// nr cell Id
	// Required: true
	NrCellID NrCellID `json:"nrCellId"`
	// plmn Id
	// Required: true
	PlmnID PlmnID `json:"plmnId"`
}

Ncgi ncgi

type NefApp

type NefApp struct {
	NefRouter *mux.Router
	NefCtx    *nefContext
}

NefApp structure to store the variables/contexts for access in UT

var NefAppG NefApp

NefAppG is the NEF App variable which can be used for accessing the global contexts

type NetworkAreaInfo

type NetworkAreaInfo struct {
	// Contains a list of E-UTRA cell identities.
	// Min Items: 1
	Ecgis []Ecgi `json:"ecgis"`
	// Contains a list of NR cell identities.
	// Min Items: 1
	Ncgis []Ncgi `json:"ncgis"`
	// Contains a list of NG RAN nodes.
	// Min Items: 1
	GRanNodeIds []GlobalRanNodeID `json:"gRanNodeIds"`
	// Contains a list of tracking area identities.
	// Min Items: 1
	Tais []Tai `json:"tais"`
}

NetworkAreaInfo Describes a network area information in which the NF service consumer requests the number of UEs. To be moved to the BDT policy mdoel in future

type NgeNbID

type NgeNbID string

NgeNbID nge nb Id

type NrCellID

type NrCellID string

NrCellID nr cell Id

type NsmEventNotification

type NsmEventNotification struct {
	// Event that is notified.
	Event SmfEvent `json:"event"`
	// Time at which the event is observed.
	TimeStamp DateTime `json:"timeStamp"`
	// Subscription Permanent Identifier. It is included when the subscription
	// applies to a group of UE(s) or any UE.
	Supi Supi `json:"supi,omitempty"`
	// Identifies a GPSI. It shall contain an MSISDN. It is included when it is
	// available and the subscription applies to a group of UE(s) or any UE.
	Gpsi Gpsi `json:"gpsi,omitempty"`
	// Source DN Access Identifier. Shall be included for event "UP_PATH_CH"
	// if the DNAI changed (NOTE).
	SourceDnai Dnai `json:"sourceDnai,omitempty"`
	// Target DN Access Identifier. Shall be included for event "UP_PATH_CH"
	// if the DNAI changed (NOTE).
	TargetDnai Dnai `json:"targetDnai,omitempty"`
	// DNAI Change Type. Shall be included for event "UP_PATH_CH".
	DnaiChgType DnaiChangeType `json:"dnaiChgType,omitempty"`
	// The IPv4 Address of the served UE for the source DNAI. May be included
	// for event "UP_PATH_CH".
	SourceUeIpv4Addr Ipv4Addr `json:"sourceUeIpv4Addr,omitempty"`
	// The Ipv6 Address Prefix of the served UE for the source DNAI. May
	// be included for event "UP_PATH_CH".
	SourceUeIpv6Prefix Ipv6Prefix `json:"sourceUeIpv6Prefix,omitempty"`
	// The IPv4 Address of the served UE for the target DNAI. May be included
	// for event "UP_PATH_CH".
	TargetUeIpv4Addr Ipv4Addr `json:"targetUeIpv4Addr,omitempty"`
	// The Ipv6 Address Prefix of the served UE for the target DNAI. May
	// be included for event "UP_PATH_CH".
	TargetUeIpv6Prefix Ipv6Prefix `json:"targetUeIpv6Prefix,omitempty"`
	// N6 traffic routing information for the source DNAI. Shall be included
	// for event "UP_PATH_CH".
	SourceTraRouting RouteToLocation `json:"sourceTraRouting,omitempty"`
	// N6 traffic routing information for the target DNAI. Shall be included
	// for event "UP_PATH_CH".
	TargetTraRouting RouteToLocation `json:"targetTraRouting,omitempty"`
	// UE MAC address. May be included for event "UP_PATH_CH".
	UeMac MacAddr48 `json:"ueMac,omitempty"`
	// Added IPv4 Address(es). May be included for event "UE_IP_CH".
	AdIpv4Addr Ipv4Addr `json:"adIpv4Addr,omitempty"`
	// Added Ipv6 Address Prefix(es). May be included for event "UE_IP_CH".
	AdIpv6Prefix Ipv6Prefix `json:"adIpv6Prefix,omitempty"`
	// Removed IPv4 Address(es). May be included for event "UE_IP_CH".
	ReIpv4Addr Ipv4Addr `json:"reIpv4Addr,omitempty"`
	// Removed Ipv6 Address Prefix(es). May be included for event "UE_IP_CH".
	ReIpv6Prefix Ipv6Prefix `json:"reIpv6Prefix,omitempty"`
	// New PLMN ID. Shall be included for event "PLMN_CH".
	PlmnID PlmnID `json:"plmnId,omitempty"`
	// New Access Type. Shall be included for event "AC_TY_CH".
	AccType AccessType `json:"accType,omitempty"`
	// PDU session ID. Shall be included for event "PDU_SES_REL".
	PduSeID PduSessionID `json:"pduSeId,omitempty"`
}

NsmEventNotification describes about the Notifications about Individual Events from SMF

type NsmfEventExposureNotification

type NsmfEventExposureNotification struct {
	// Notification correlation ID used to identify the subscription which the
	// notification is corresponding to. It shall be set to the same value as
	// the notifId attribute of NsmfEventExposure data type or the value of
	// "notifiCorreId" within the UpPathChgEvent data type defined in
	// 3GPP TS 29.512 [14].
	NotifID string `json:"notifId"`
	// Notifications about Individual Events
	// Note 3GPP 29508 defines this as EventNotification but this conflicts with
	//  3GPP 29522 EventNotification so rename it
	EventNotifs []NsmEventNotification `json:"eventNotifs"`
}

NsmfEventExposureNotification Provides Information about observed events

type PcfClientStub

type PcfClientStub struct {
	// contains filtered or unexported fields
}

PcfClientStub is an implementation of the Pcf Authorization

func NewPCFClient

func NewPCFClient(cfg *Config) *PcfClientStub

NewPCFClient creates a new PCF Client

func (*PcfClientStub) PolicyAuthorizationCreate

func (pcf *PcfClientStub) PolicyAuthorizationCreate(ctx context.Context,
	body AppSessionContext) (AppSessionID, PcfPolicyResponse, error)

PolicyAuthorizationCreate is a stub implementation Successful response : 201 and body contains AppSessionContext

func (*PcfClientStub) PolicyAuthorizationDelete

func (pcf *PcfClientStub) PolicyAuthorizationDelete(ctx context.Context,
	appSessionID AppSessionID) (PcfPolicyResponse, error)

PolicyAuthorizationDelete is a stub implementation Successful response : 204 and empty body

func (*PcfClientStub) PolicyAuthorizationGet

func (pcf *PcfClientStub) PolicyAuthorizationGet(ctx context.Context,
	appSessionID AppSessionID) (PcfPolicyResponse, error)

PolicyAuthorizationGet is a stub implementation Successful response : 204 and empty body

func (*PcfClientStub) PolicyAuthorizationUpdate

func (pcf *PcfClientStub) PolicyAuthorizationUpdate(ctx context.Context,
	body AppSessionContextUpdateData,
	appSessionID AppSessionID) (PcfPolicyResponse, error)

PolicyAuthorizationUpdate is a stub implementation Successful response : 200 and body contains AppSessionContext

type PcfPolicyAuthorization

type PcfPolicyAuthorization interface {
	// PolicyAuthorizationCreate sends POST request to the PCF using the
	// configuration mentioned in the context. Context would have all the
	// informration related to the PCF like the URI, authentication, logging,
	// cancellation It returns the response received from the PCF, the app and
	// any error encountered when sending the request. The contents of the
	// actual response received are part of the PcfPolicyResponse
	PolicyAuthorizationCreate(ctx context.Context,
		body AppSessionContext) (AppSessionID, PcfPolicyResponse, error)

	// PolicyAuthorizationUpdate sends PATCH request to the PCF to the
	// appSessionId using the configuration mentioned in the context. Context
	// would have all the infomration related to the PCF like the URI,
	// authentication, logging, cancellation
	// It returns the response received from the PCF and any error encountered
	// when sending the request. The contents of the actual response received
	// are part of the PcfPolicyResponse
	PolicyAuthorizationUpdate(ctx context.Context,
		body AppSessionContextUpdateData,
		appSessionID AppSessionID) (PcfPolicyResponse, error)

	// PolicyAuthorizationDelete sends, DELETE request to the PCF to the
	// appSessionId using the configuration mentioned in the context. Context
	// would have all the infomration related to the PCF like the URI,
	// authentication, logging, cancellationIt returns the response received
	// from the PCF and any error encountered when sending the
	// request. The contents of the actual response received are part of the
	// PcfPolicyResponse
	PolicyAuthorizationDelete(ctx context.Context, appSessionID AppSessionID) (
		PcfPolicyResponse, error)

	// PolicyAuthorizationGet sends GET request to the PCF to the appSessionId
	// using the configuration mentioned in the context. Context would have all
	// the infomration related to the PCF like the URI, authentication, logging,
	// cancellation It returns the response received from the PCF and any error
	// encountered when sending therequest. The contents of the actual response
	//received are part of the PcfPolicyResponse
	PolicyAuthorizationGet(ctx context.Context, appSessionID AppSessionID) (
		PcfPolicyResponse, error)
}

PcfPolicyAuthorization defines the interfaces that are exposed for TrafficInfluence

type PcfPolicyResponse

type PcfPolicyResponse struct {
	// responseCode contains the http response code provided by the PCF
	ResponseCode uint16
	// asc if not nil contains the AppSessionContext data provided by PCF
	Asc *AppSessionContext
	// pd if not not contains the problem information from PCF.
	// Valid for 3xx, 4xx, 5xx or 6xx responses
	Pd *ProblemDetails
}

PcfPolicyResponse contains the response from PCF

type PduSessionID

type PduSessionID uint8

PduSessionID Valid values are 0 to 255

type Pfd

type Pfd struct {
	// Identifies a PDF of an application identifier.
	PfdID string `json:"pfdID"`
	// Represents a 3-tuple with protocol, server ip and server port for UL/DL
	// application traffic. The content of the string has the same encoding as
	// the IPFilterRule AVP value as defined in IETFÂ RFCÂ 6733.
	FlowDescriptions []string `json:"flowDescriptions,omitempty"`
	// Indicates a URL or a regular expression which is used to match the
	// significant parts of the URL.
	Urls []string `json:"urls,omitempty"`
	// Indicates an FQDN or a regular expression as a domain name matching
	// criteria.
	DomainNames []string `json:"domainNames,omitempty"`
}

Pfd is the structure of Packet Flow Description for an external Application Identifier

type PfdContent

type PfdContent struct {
	// Identifies a PDF of an application identifier.
	PfdID string `json:"pfdID,omitempty"`
	// Represents a 3-tuple with protocol, server ip and server port for
	// UL/DL application traffic.
	FlowDescriptions []string `json:"flowDescriptions,omitempty"`
	// Indicates a URL or a regular expression which is used to match the
	// significant parts of the URL.
	Urls []string `json:"urls,omitempty"`
	// Indicates an FQDN or a regular expression as a domain name matching
	// criteria.
	DomainNames []string `json:"domainNames,omitempty"`
}

PfdContent represents the content of a PFD for an application identifier.

type PfdData

type PfdData struct {
	// Each element uniquely identifies external application identifier
	ExternalAppID string `json:"externalAppID"`
	// Link to the resource. This parameter shall be supplied by the NEF in
	// HTTP responses that include an object of PfdData type
	Self Link `json:"self,omitempty"`
	// Contains the PFDs of the external application identifier. Each PFD is
	// identified in the map via a key containing the PFD identifier.
	Pfds map[string]Pfd `json:"pfds"`
	// Indicates that the list of PFDs in this request should be deployed
	// within the time interval indicated by the Allowed Delay
	AllowedDelay *DurationSecRm `json:"allowedDelay,omitempty"`
	// SCEF supplied property, inclusion of this property means the allowed
	// delayed cannot be satisfied, i.e. it is smaller than the caching time,
	// but the PFD data is still stored.
	CachingTime *DurationSecRo `json:"cachingTime,omitempty"`
}

PfdData is the type that represents a PFD request to add, update or remove PFD(s) for one external application identifier provided by AF

type PfdDataForApp

type PfdDataForApp struct {
	// Identifier of an application.
	AppID ApplicationID `json:"appID"`
	// PFDs for the application identifier.
	Pfds []PfdContent `json:"pfds"`
	// Caching time for an application identifier.
	CachingTime *DateTime `json:"cachingTime,omitempty"`
}

PfdDataForApp represents the PFDs for an application identifier

type PfdManagement

type PfdManagement struct {
	// Link to the resource "Individual PFD Management Transaction".
	// This parameter shall be supplied by the NEF in HTTP responses.
	Self Link `json:"self,omitempty"`
	// String identifying supported optional features of PFD Management
	// This attribute shall be provided in the POST request and in the
	// response of successful resource creation.
	SuppFeat *SupportedFeatures `json:"suppFeat,omitempty"`
	// Each element uniquely identifies the PFDs for an external application
	// identifier. Each element is identified in the map via an external
	// application identifier as key. The response shall include successfully
	// provisioned PFD data of application(s).
	PfdDatas map[string]PfdData `json:"pfdDatas"`
	// Supplied by the NEF and contains the external application identifiers
	// for which PFD(s) are not added or modified successfully. The failure
	// reason is also included. Each element provides the related information
	// for one or more external application identifier(s) and is identified in
	// the map via the failure identifier as key.
	PfdReports map[string]PfdReport `json:"pfdReports,omitempty"`
}

PfdManagement resource for a PFD management request

type PfdReport

type PfdReport struct {
	// Identifies the external application identifier(s) which PFD(s) are not
	// added or modified successfully
	ExternalAppIds []string `json:"externalAppIds"`
	// Identifies the failure reason
	FailureCode FailureCode `json:"failureCode"`
	// It shall be included when the allowed delayed cannot be satisfied, i.e.
	// it is smaller than the caching time configured in fetching PFD.
	CachingTime *DurationSec `json:"cachingTime,omitempty"`
}

PfdReport is the type that represents a PFD report to indicate the external application identifier(s) which PFD(s) are not added or modified successfully and corresponding failure reason.

type PlmnID

type PlmnID struct {

	// mcc
	// Required: true
	Mcc Mcc `json:"mcc"`

	// mnc
	// Required: true
	Mnc Mnc `json:"mnc"`
}

PlmnID plmn Id

type PresenceInfo

type PresenceInfo struct {
	// pra Id
	PraID string `json:"praId,omitempty"`
	// presence state
	PresenceState PresenceState `json:"presenceState,omitempty"`
	// ecgi list
	// Min Items: 1
	EcgiList []Ecgi `json:"ecgiList"`
	// ncgi list
	// Min Items: 1
	NcgiList []Ncgi `json:"ncgiList"`
	// global ran node Id list
	// Min Items: 1
	GlobalRanNodeIDList []GlobalRanNodeID `json:"globalRanNodeIdList"`
}

PresenceInfo presence info

type PresenceState

type PresenceState string

PresenceState presence state

type ProblemDetails

type ProblemDetails struct {
	// problem type
	Type Link `json:"type,omitempty"`
	// A short, human-readable summary of the problem type.
	// It should not change from occurrence to occurrence of the problem.
	Title string `json:"title,omitempty"`
	// A human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail,omitempty"`
	// URL to problem instance
	Instance Link `json:"instance,omitempty"`
	// A machine-readable application error cause specific to this occurrence
	// of the problem.
	// This IE should be present and provide application-related error
	// information, if available.
	Cause string `json:"cause,omitempty"`
	// Description of invalid parameters, for a request rejected due to
	// invalid parameters.
	InvalidParams []InvalidParam `json:"invalidParams,omitempty"`
	// The HTTP status code for this occurrence of the problem.
	Status int32 `json:"status,omitempty"`
}

ProblemDetails Problem details struct

type Route

type Route struct {
	Name    string
	Method  string
	Pattern string
	Handler http.HandlerFunc /*    */
}

Route : Structure which describes HTTP Request Handler type and other

details like name, method, path, etc

type RouteInformation

type RouteInformation struct {
	// string identifying a Ipv4 address formatted in the \"dotted decimal\"
	// notation as defined in IETF RFC 1166.
	Ipv4Addr Ipv4Addr `json:"ipv4Addr,omitempty"`
	// string identifying a Ipv6 address formatted according to clause 4 in
	// IETF RFC 5952.
	// The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952
	// shall
	// not be used.
	Ipv6Addr Ipv6Addr `json:"ipv6Addr,omitempty"`
	// Port number
	PortNumber uint32 `json:"portNumber"`
}

RouteInformation Route information struct

type RouteToLocation

type RouteToLocation struct {
	// Data network access identifier
	Dnai Dnai `json:"dnai"`
	// Additional route information about the route to Dnai
	RouteInfo RouteInformation `json:"routeInfo,omitempty"`
	// Dnai route profile identifier
	RouteProfID string `json:"routeProfId,omitempty"`
}

RouteToLocation : Describes the traffic routes to the locations of the application

type SmfEvent

type SmfEvent string

SmfEvent This string provides forward-compatibility with future

extensions to the enumeration but is not used to encode
content defined in the present version of this API

Values currently defined are: - AC_TY_CH - UP_PATH_CH - PDU_SES_REL - PLMN_CH - UE_IP_CH

type Snssai

type Snssai struct {
	// minimum: 0, 	maximum: 255
	Sst uint8 `json:"sst"`
	// pattern: '^[A-Fa-f0-9]{6}$'
	Sd string `json:"sd,omitempty"`
}

Snssai Network slice identifier

type SpatialValidity

type SpatialValidity struct {
	PresenceInfoList PresenceInfo `json:"presenceInfoList"`
}

SpatialValidity Describes the spatial validity of an AF request for influencing traffic routing

type SubscribedEvent

type SubscribedEvent string

SubscribedEvent :Identifies a UP path management event the AF requested to be notified of

type Supi

type Supi string

Supi : Subscription Permanent Identifier pattern: '^(imsi-[0-9]{5,15}|nai-.+|.+)$'

type SupportedFeatures

type SupportedFeatures string

SupportedFeatures : A string used to indicate the features supported by an API that is used (subclause 6.6 in 3GPP TS 29.500). The string shall contain a bitmask indicating supported features in hexadecimal representation. Each character in the string shall take a value of "0" to "9" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. Possible features for traffic influencing are Notification_websocket( takes vlue of 1) and Notification_test_event(takes value of 2) pattern: '^[A-Fa-f0-9]*$'

type Tac

type Tac string

Tac tac

type Tai

type Tai struct {

	// plmn Id
	// Required: true
	PlmnID PlmnID `json:"plmnId"`

	// tac
	// Required: true
	Tac Tac `json:"tac"`
}

Tai tai

type TemporalValidity

type TemporalValidity struct {
	// string with format \"date-time\" as defined in OpenAPI.
	StartTime string `json:"startTime,omitempty"`
	// string with format \"date-time\" as defined in OpenAPI.
	StopTime string `json:"stopTime,omitempty"`
}

TemporalValidity Indicates the time interval(s) during which the AF request is to be applied

type TrafficInfluData

type TrafficInfluData struct {
	// Contains the Notification Correlation Id allocated by the NEF for the
	// UP path  change notification. It shall be included when the NEF
	// requests the UP path change notification
	UpPathChgNotifURI URI `json:"upPathChgNotifUri,omitempty"`
	// Identifies whether an application can be relocated once a location of
	// the application has been selected.
	AppReloInd bool `json:"appReloInd,omitempty"`
	// Identifies an application.
	// Required: true
	AfAppID string `json:"afAppId,omitempty"`
	// Identifies a dnn
	Dnn Dnn `json:"dnn,omitempty"`
	// Identifies Ethernet packet filters. Either "trafficFilters" or
	// "ethTrafficFilters" shall be included if applicable.
	EthTrafficFilters []EthFlowDescription `json:"ethTrafficFilters,omitempty"`
	// The identification of slice
	Snssai Snssai `json:"snssai,omitempty"`
	// Identifies a group of users.
	InterGroupID string `json:"interGroupId"`
	// supi Identifies a suer
	Supi Supi `json:"supi"`
	// Identifies IP packet filters. Either "trafficFilters" or
	// "ethTrafficFilters" shall be included if applicable.
	// Required: true
	// Min Items: 1
	TrafficFilters []FlowInfo `json:"trafficFilters"`
	// Identifies the N6 traffic routing requirement.
	// Required: true
	// Min Items: 1
	TrafficRoutes []RouteToLocation `json:"trafficRoutes"`
	// valid end time
	// Format: date-time
	ValidEndTime DateTime `json:"validEndTime,omitempty"`
	// valid start time
	// Format: date-time
	ValidStartTime DateTime `json:"validStartTime,omitempty"`
	// Identifies a network area information that the request applies only to
	// the traffic of UE(s) located in this specific zone
	NwAreaInfo NetworkAreaInfo `json:"nwAreaInfo,omitempty"`
	// Contains the Notification Correlation Id allocated by the NEF for the
	// UP path change notification.
	UpPathChgNotifCorreID string `json:"upPathChgNotifCorreId,omitempty"`
}

TrafficInfluData traffic influ data

type TrafficInfluDataPatch

type TrafficInfluDataPatch struct {
	// Contains the Notification Correlation Id allocated by the NEF for the
	// UP path change notification.
	UpPathChgNotifCorreID string `json:"upPathChgNotifCorreId,omitempty"`
	// Identifies whether an application can be relocated once a location of
	// the application has been selected.
	AppReloInd bool `json:"appReloInd,omitempty"`
	// dnn
	Dnn Dnn `json:"dnn,omitempty"`
	// snssai
	Snssai Snssai `json:"snssai,omitempty"`
	// Identifies a group of users.
	InternalGroupID string `json:"internalGroupId,omitempty"`
	// Identifies Ethernet packet filters. Either "trafficFilters" or
	// "ethTrafficFilters" shall be included if applicable.
	// Min Items: 1
	EthTrafficFilters []EthFlowDescription `json:"ethTrafficFilters"`
	// supi
	Supi Supi `json:"supi,omitempty"`
	// Identifies IP packet filters. Either "trafficFilters" or
	// "ethTrafficFilters" shall be included if applicable.
	// Min Items: 1
	TrafficFilters []FlowInfo `json:"trafficFilters"`
	// Identifies the N6 traffic routing requirement.
	// Min Items: 1
	TrafficRoutes []RouteToLocation `json:"trafficRoutes"`
	// valid end time
	// Format: date-time
	ValidEndTime DateTime `json:"validEndTime,omitempty"`
	// valid start time
	// Format: date-time
	ValidStartTime DateTime `json:"validStartTime,omitempty"`
	// nw area info
	NwAreaInfo NetworkAreaInfo `json:"nwAreaInfo,omitempty"`
	// up path chg notif Uri
	UpPathChgNotifURI URI `json:"upPathChgNotifUri,omitempty"`
}

TrafficInfluDataPatch traffic influ data patch

type TrafficInfluSub

type TrafficInfluSub struct {
	// Identifies a service on behalf of which the AF is issuing the request.
	AfServiceID string `json:"afServiceId,omitempty"`
	// Identifies an application.
	AfAppID string `json:"afAppId,omitempty"`
	// Identifies an NEF Northbound interface transaction, generated by the AF.
	AfTransID string `json:"afTransId,omitempty"`
	// Identifies data network name
	Dnn Dnn `json:"dnn,omitempty"`
	// Network slice identifier
	Snssai Snssai `json:"snssai,omitempty"` //p
	// string containing a local identifier followed by \"@\" and
	// a domain identifier.
	// Both the local identifier and the domain identifier shall be encoded as
	// strings that do not contain any \"@\" characters.
	// See Clauses 4.6.2 and 4.6.3 of 3GPP TS 23.682 for more information.
	ExternalGroupID ExternalGroupID `json:"externalGroupId,omitempty"`
	// Identifies the requirement to be notified of the event(s).
	SubscribedEvents []SubscribedEvent `json:"subscribedEvents,omitempty"`
	//Generic Public Servie Identifiers asssociated wit the UE
	Gpsi Gpsi `json:"gpsi,omitempty"`
	// string identifying a Ipv4 address formatted in the \"dotted decimal\"
	//notation as defined in IETF RFC 1166.
	Ipv4Addr Ipv4Addr `json:"ipv4Addr,omitempty"`
	// string identifying a Ipv6 address formatted according to clause 4
	// in IETF RFC 5952.
	Ipv6Addr Ipv6Addr `json:"ipv6Addr,omitempty"`
	// string identifying mac address of UE
	MacAddr MacAddr48 `json:"macAddr,omitempty"`
	// Identifies the type of notification regarding UP path management event.
	// Possible values are:
	// EARLY - early notification of UP path reconfiguration.
	// EARLY_LATE - early and late notification of UP path reconfiguration.
	// This value shall only be present in the subscription to the
	// DNAI change event.
	// LATE - late notification of UP path reconfiguration.
	DnaiChgType DnaiChangeType `json:"dnaiChgType,omitempty"`
	// URL where notifications shall be sent
	NotificationDestination Link `json:"notificationDestination,omitempty"`
	// Configuration used for sending notifications though web sockets
	WebsockNotifConfig WebsockNotifConfig `json:"websockNotifConfig,omitempty"`
	// URL of created subscription resource
	Self Link `json:"self,omitempty"`
	// Identifies IP packet filters.
	TrafficFilters []FlowInfo `json:"trafficFilters,omitempty"`
	// Identifies Ethernet packet filters.
	EthTrafficFilters []EthFlowDescription `json:"ethTrafficFilters,omitempty"`
	// Identifies the N6 traffic routing requirement.
	TrafficRoutes []RouteToLocation `json:"trafficRoutes,omitempty"`
	// Settings for temporary validity of the subscription
	TempValidities []TemporalValidity `json:"tempValidities,omitempty"`
	// Identifies a geographic zone that the AF request applies only to the
	// traffic of UE(s) located in this specific zone.
	ValidGeoZoneIDs []string `json:"validGeoZoneIds,omitempty"`
	// String identifying supported features per Traffic Influence service
	SuppFeat SupportedFeatures `json:"suppFeat,omitempty"`
	// Identifies whether an pplication can be relocated once a location of the
	// application has been selected.Set to "true" if it can be relocated;
	// otherwise set to
	// "false". Default value is "false" if omitted.
	AppReloInd bool `json:"appReloInd,omitempty"`
	//Identifies whether the AF request applies to any UE. This attribute shall
	// set to "true" if
	// applicable for any UE, otherwise, set to "false"
	AnyUeInd bool `json:"anyUeInd,omitempty"`
	// Set to true by the AF to request the NEF to send a test notification.
	//Set to false or omitted otherwise.
	RequestTestNotification bool `json:"requestTestNotification,omitempty"`
}

TrafficInfluSub is Traffic Influence Subscription structure

type TrafficInfluSubPatch

type TrafficInfluSubPatch struct {
	// Identifies whether an application can be relocated once a location of
	// the application has been selected.
	AppReloInd bool `json:"appReloInd,omitempty"`
	// Identifies IP packet filters.
	TrafficFilters []FlowInfo `json:"trafficFilters,omitempty"`
	// Identifies Ethernet packet filters.
	EthTrafficFilters []EthFlowDescription `json:"ethTrafficFilters,omitempty"`
	// Identifies the N6 traffic routing requirement.
	TrafficRoutes []RouteToLocation `json:"trafficRoutes,omitempty"`
	// Settings for temporary validity of the subscription
	TempValidities []TemporalValidity `json:"tempValidities,omitempty"`
	// Identifies a geographic zone that the AF request applies only to the
	// traffic of UE(s) located in this specific zone.
	ValidGeoZoneIDs []string `json:"validGeoZoneIds,omitempty"`
}

TrafficInfluSubPatch Traffic Influence Subscription Patch structure

type URI

type URI string

URI : string formatted accordingding to IETF RFC 3986

type UdrAppID

type UdrAppID string

UdrAppID is the application identifier of the request PFD(s) "{apiRoot}/nudr-dr/v1/application-data/pfds/{appId}"

type UdrClientStub

type UdrClientStub struct {
	// contains filtered or unexported fields
}

UdrClientStub is an implementation of the Udr Influence data

func NewUDRClient

func NewUDRClient(cfg *Config) *UdrClientStub

NewUDRClient creates a new Udr Client

func (*UdrClientStub) UdrInfluenceDataCreate

func (udr *UdrClientStub) UdrInfluenceDataCreate(ctx context.Context,
	body TrafficInfluData, iid InfluenceID) (UdrInfluenceResponse, error)

UdrInfluenceDataCreate is a stub implementation

func (*UdrClientStub) UdrInfluenceDataDelete

func (udr *UdrClientStub) UdrInfluenceDataDelete(ctx context.Context,
	iid InfluenceID) (UdrInfluenceResponse, error)

UdrInfluenceDataDelete is a stub implementation

func (*UdrClientStub) UdrInfluenceDataGet

func (udr *UdrClientStub) UdrInfluenceDataGet(ctx context.Context) (
	UdrInfluenceResponse, error)

UdrInfluenceDataGet is a stub implementation

func (*UdrClientStub) UdrInfluenceDataUpdate

func (udr *UdrClientStub) UdrInfluenceDataUpdate(ctx context.Context,
	body TrafficInfluDataPatch, iid InfluenceID) (UdrInfluenceResponse,
	error)

UdrInfluenceDataUpdate is a stub implementation

type UdrInfluenceData

type UdrInfluenceData interface {
	// UdrInfluenceDataCreate sends PUT request to the UDR using the
	// configuration mentioned in the context. Context would have all the
	// inforrmation related to the UDR like the URI, authentication, logging,
	// cancellation It returns the response received from the UDR, the app and
	// any error encountered when sending the request. The contents of the
	// actual response received are part of the UDRPolicyResponse
	UdrInfluenceDataCreate(ctx context.Context,
		body TrafficInfluData,
		iid InfluenceID) (UdrInfluenceResponse, error)

	// UdrInfluenceDataUpdate sends PATCH request to the UDR to the
	// appSessionId using the configuration mentioned in the context. Context
	// would have all the infomration related to the UDR like the URI,
	// authentication, logging, cancellation
	// It returns the response received from the UDR and any error encountered
	// when sending the request. The contents of the actual response received
	// are part of the UdrPolicyResponse
	UdrInfluenceDataUpdate(ctx context.Context,
		body TrafficInfluDataPatch,
		iid InfluenceID) (UdrInfluenceResponse, error)

	// UdrInfluenceDataDelete sends, DELETE request to the UDR to the
	// appSessionId using the configuration mentioned in the context. Context
	// would have all the infomration related to the UDR like the URI,
	// authentication, logging, cancellationIt returns the response received
	// from the UDR and any error encountered when sending the
	// request. The contents of the actual response received are part of the
	// UdrPolicyResponse
	UdrInfluenceDataDelete(ctx context.Context, iid InfluenceID) (
		UdrInfluenceResponse, error)

	// UdrInfluenceDataGet sends GET request to the UDR
	// using the configuration mentioned in the context. Context would have all
	// the infomration related to the UDR like the URI, authentication, logging,
	// cancellation. It returns the response received from the UDR and any error
	// encountered when sending therequest. The contents of the actual response
	// received are part of the UdrPolicyResponse
	UdrInfluenceDataGet(ctx context.Context) (
		UdrInfluenceResponse, error)
}

UdrInfluenceData defines the interfaces that are exposed for TrafficInfluence

type UdrInfluenceResponse

type UdrInfluenceResponse struct {
	// responseCode contains the http response code provided by the UDR
	ResponseCode uint16
	// tid if not nil contains the TrafficInfluData data provided by UDR
	Tid *TrafficInfluData
	// pd if not not contains the problem infomration from UDR.
	// Valid for 3xx, 4xx, 5xx or 6xx responses
	Pd *ProblemDetails
}

UdrInfluenceResponse contains the response information from UDR

type UdrPfdClientStub

type UdrPfdClientStub struct {
	// contains filtered or unexported fields
}

UdrPfdClientStub is an implementation of the Udr Influence data

func NewUDRPfdClient

func NewUDRPfdClient(cfg *Config) *UdrPfdClientStub

NewUDRPfdClient creates a new Udr Client

func (*UdrPfdClientStub) UdrPfdDataCreate

func (udr *UdrPfdClientStub) UdrPfdDataCreate(ctx context.Context,
	body PfdDataForApp) (rsp UdrPfdResponse, err error)

UdrPfdDataCreate is a stub implementation

func (*UdrPfdClientStub) UdrPfdDataDelete

func (udr *UdrPfdClientStub) UdrPfdDataDelete(ctx context.Context,
	appID UdrAppID) (rsp UdrPfdResponse, err error)

UdrPfdDataDelete is a stub implementation

func (*UdrPfdClientStub) UdrPfdDataGet

func (udr *UdrPfdClientStub) UdrPfdDataGet(ctx context.Context,
	appID UdrAppID) (rsp UdrPfdResponse, err error)

UdrPfdDataGet is a stub implementation

type UdrPfdData

type UdrPfdData interface {

	// UdrPfdDataCreate sends PUT request to the UDR using the
	// configuration mentioned in the context. Context would have all the
	// inforrmation related to the UDR like the URI, authentication, logging,
	// cancellation It returns the response received from the UDR, the app and
	// any error encountered when sending the request. The contents of the
	// actual response received are part of the UDRPfdResponse
	UdrPfdDataCreate(ctx context.Context, body PfdDataForApp) (
		UdrPfdResponse, error)

	// UdrPfdDataGet sends GET request to the UDR
	// using the configuration mentioned in the context. Context would have all
	// the infomration related to the UDR like the URI, authentication, logging,
	// cancellation. It returns the response received from the UDR and any error
	// encountered when sending therequest. The contents of the actual response
	// received are part of the UDRPfdResponse
	UdrPfdDataGet(ctx context.Context, appID UdrAppID) (
		UdrPfdResponse, error)

	// UdrPfdDataDelete sends, DELETE request to the UDR to the
	// appId using the configuration mentioned in the context. Context
	// would have all the infomration related to the UDR like the URI,
	// authentication, logging, cancellationIt returns the response received
	// from the UDR and any error encountered when sending the
	// request. The contents of the actual response received are part of the
	// UDRPfdResponse
	UdrPfdDataDelete(ctx context.Context, appID UdrAppID) (
		UdrPfdResponse, error)
}

UdrPfdData defines the interfaces that are exposed for TrafficInfluence,

type UdrPfdResponse

type UdrPfdResponse struct {
	// responseCode contains the http response code provided by the UDR
	ResponseCode uint16
	// AppPfd if not nil contains the PfdDataForApp data provided by UDR
	AppPfd *PfdDataForApp
	// pd if not not contains the problem infomration from UDR.
	// Valid for 3xx, 4xx, 5xx or 6xx responses
	Pd *ProblemDetails
}

UdrPfdResponse contains the response information from UDR

type UpPathChgEvent

type UpPathChgEvent struct {
	// notification URI
	NotificationURI URI `json:"notificationUri"`
	// It is used to set the value of Notification Correlation ID in the n
	// otification sent by the SMF.
	NotifCorreID string `json:"notifCorreId"`
	// DNAI change type to be notified
	DnaiChgType DnaiChangeType `json:"dnaiChgType"`
}

UpPathChgEvent : UP path management events To be moved to SMPolicy file when available

type WebsockNotifConfig

type WebsockNotifConfig struct {
	// string formatted according to IETF RFC 3986 identifying a
	// referenced resource.
	WebsocketURI Link `json:"websocketUri,omitempty"`
	// Set by the AF to indicate that the Websocket delivery is requested.
	RequestWebsocketURI bool `json:"requestWebsocketUri,omitempty"`
}

WebsockNotifConfig Websocket noticcation configuration

Jump to

Keyboard shortcuts

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