util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INVALID_REQUEST       = "Invalid request message framing"
	MALFORMED_REQUEST     = "Malformed request syntax"
	UNAUTHORIZED_CONSUMER = "Unauthorized NF service consumer"
	UNSUPPORTED_RESOURCE  = "Unsupported request resources"
)

Title in ProblemDetails for UDR HTTP APIs

Variables

View Source
var (
	UdrDefaultKeyLogPath = "./log/udrsslkey.log"
	UdrDefaultPemPath    = "./config/TLS/udr.pem"
	UdrDefaultKeyPath    = "./config/TLS/udr.key"
	UdrDefaultConfigPath = "./config/udrcfg.yaml"
)

Functions

func Contain

func Contain(target interface{}, slice interface{}) bool

Contain checks whether a slice contains an element

func EmptyUeIdProblemJson

func EmptyUeIdProblemJson(c *gin.Context)

func EscapeDnn

func EscapeDnn(dnn string) string

func GinProblemJson

func GinProblemJson(c *gin.Context, pd *models.ProblemDetails)

func InitUdrContext

func InitUdrContext(context *udr_context.UDRContext)

func MapArrayToByte

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

func MapToByte

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

func PrimitiveAToByte

func PrimitiveAToByte(data []interface{}) []byte

func ProblemDetailsMalformedReqSyntax

func ProblemDetailsMalformedReqSyntax(detail string) *models.ProblemDetails

func ProblemDetailsModifyNotAllowed

func ProblemDetailsModifyNotAllowed(detail string) *models.ProblemDetails

func ProblemDetailsNotFound

func ProblemDetailsNotFound(cause string) *models.ProblemDetails

func ProblemDetailsSystemFailure

func ProblemDetailsSystemFailure(detail string) *models.ProblemDetails

func ProblemDetailsUpspecified

func ProblemDetailsUpspecified(detail string) *models.ProblemDetails

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

func UnescapeDnn

func UnescapeDnn(dnnKey string) string

Types

type RouterAuthorizationCheck

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

func NewRouterAuthorizationCheck

func NewRouterAuthorizationCheck(serviceName models.ServiceName) *RouterAuthorizationCheck

func (*RouterAuthorizationCheck) Check

func (rac *RouterAuthorizationCheck) Check(c *gin.Context, udrContext udr_context.NFContext)

Jump to

Keyboard shortcuts

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