WebUI

package
v1.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddService

func AddService(engine *gin.Engine) *gin.RouterGroup

func ChangePasswordInfo added in v1.3.1

func ChangePasswordInfo(c *gin.Context)

func CheckAuth added in v1.0.3

func CheckAuth(c *gin.Context) bool

Check of admin user. This should be done with proper JWT token.

func DeleteSubscriberByID

func DeleteSubscriberByID(c *gin.Context)

Delete subscriber by IMSI(ueId) and PlmnID(servingPlmnId)

func DeleteTenantByID added in v1.0.3

func DeleteTenantByID(c *gin.Context)

func DeleteUserByID added in v1.0.3

func DeleteUserByID(c *gin.Context)

func EscapeDnn added in v1.0.3

func EscapeDnn(dnn string) string

func GetChargingData added in v1.3.1

func GetChargingData(c *gin.Context)

func GetChargingRecord added in v1.3.1

func GetChargingRecord(c *gin.Context)

func GetRegisteredUEContext

func GetRegisteredUEContext(c *gin.Context)

func GetSampleJSON

func GetSampleJSON(c *gin.Context)

func GetSubscriberByID

func GetSubscriberByID(c *gin.Context)

Get subscriber by IMSI(ueId) and PlmnID(servingPlmnId)

func GetSubscribers

func GetSubscribers(c *gin.Context)

Get all subscribers list

func GetTenantByID added in v1.0.3

func GetTenantByID(c *gin.Context)

func GetTenantById added in v1.0.3

func GetTenantById(tenantId string) map[string]interface{}

Utility function.

func GetTenantId added in v1.0.3

func GetTenantId(c *gin.Context) (string, error)

Tenant ID

func GetTenants added in v1.0.3

func GetTenants(c *gin.Context)

Tenant

func GetUEPDUSessionInfo

func GetUEPDUSessionInfo(c *gin.Context)

func GetUserByID added in v1.0.3

func GetUserByID(c *gin.Context)

func GetUsers added in v1.0.3

func GetUsers(c *gin.Context)

Users

func InitJwtKey added in v1.3.1

func InitJwtKey() error

func JWT added in v1.0.3

func JWT(email, userId, tenantId string) string

func Login added in v1.0.3

func Login(c *gin.Context)

func Logout added in v1.0.3

func Logout(c *gin.Context)

Placeholder to handle logout.

func NewRouter

func NewRouter() *gin.Engine

NewRouter returns a new router.

func OptionsSubscribers added in v1.3.1

func OptionsSubscribers(c *gin.Context)

func ParseJWT added in v1.0.3

func ParseJWT(tokenStr string) (jwt.MapClaims, error)

Parse JWT

func PatchSubscriberByID

func PatchSubscriberByID(c *gin.Context)

Patch subscriber by IMSI(ueId) and PlmnID(servingPlmnId)

func PostSubscriberByID

func PostSubscriberByID(c *gin.Context)

Post subscriber by IMSI(ueId) and PlmnID(servingPlmnId) PostSubscriberByID godoc @Summary CreateSubscriberByID @Description Create subscriber by IMSI(ueId) and PlmnID(servingPlmnId) @Accept json @Produce json @Param ueId path string true "imsi" @Param servingPlmnId path string true "servingPlmnId" @Param subdata body SubsData true "sub data" @Success 201 "Create subscription success" @Failure 400 {object} HTTPError "JSON format incorrect" @Router /subscriber/{ueId}/{servingPlmnId}/{userNumber} [post]

func PostTenant added in v1.0.3

func PostTenant(c *gin.Context)

func PostUserByID added in v1.0.3

func PostUserByID(c *gin.Context)

func PutSubscriberByID

func PutSubscriberByID(c *gin.Context)

Put subscriber by IMSI(ueId) and PlmnID(servingPlmnId)

func PutTenantByID added in v1.0.3

func PutTenantByID(c *gin.Context)

func PutUserByID added in v1.0.3

func PutUserByID(c *gin.Context)

func SetAdmin added in v1.3.1

func SetAdmin()

Create Admin's Tenant & Account

func UnescapeDnn added in v1.0.3

func UnescapeDnn(dnnKey string) string

Types

type AuthSub added in v1.0.3

type AuthSub struct {
	models.AuthenticationSubscription
	TenantId string `json:"tenantId" bson:"tenantId"`
}

type ChargingData added in v1.3.1

type ChargingData struct {
	Snssai string `json:"snssai,omitempty" yaml:"snssai" bson:"snssai" mapstructure:"snssai"`
	Dnn    string `json:"dnn" yaml:"dnn" bson:"dnn" mapstructure:"dnn"`
	QosRef int    `json:"qosRef,omitempty" yaml:"qosRef" bson:"qosRef" mapstructure:"qosRef"`
	Filter string `json:"filter" yaml:"filter" bson:"filter" mapstructure:"filter"`
	// nolint
	ChargingMethod string `json:"chargingMethod,omitempty" yaml:"chargingMethod" bson:"chargingMethod" mapstructure:"chargingMethod"`
	Quota          string `json:"quota,omitempty" yaml:"quota" bson:"quota" mapstructure:"quota"`
	UnitCost       string `json:"unitCost,omitempty" yaml:"unitCost" bson:"unitCost" mapstructure:"unitCost"`
	UeId           string `json:"ueId,omitempty" yaml:"ueId" bson:"ueId" mapstructure:"ueId"`
}

type ChargingRecord added in v1.3.1

type ChargingRecord struct {
	Snssai string `json:"snssai,omitempty" yaml:"snssai" bson:"snssai" mapstructure:"snssai"`
	Dnn    string `json:"dnn" yaml:"dnn" bson:"dnn" mapstructure:"dnn"`
	Filter string `json:"filter" yaml:"filter" bson:"filter" mapstructure:"filter"`
	QosRef int    `json:"qosRef,omitempty" yaml:"qosRef" bson:"qosRef" mapstructure:"qosRef"`
	// nolint
	ChargingMethod string `json:"chargingMethod,omitempty" yaml:"chargingMethod" bson:"chargingMethod" mapstructure:"chargingMethod"`
	Quota          string `json:"quota,omitempty" yaml:"quota" bson:"quota" mapstructure:"quota"`
	UnitCost       string `json:"unitCost,omitempty" yaml:"unitCost" bson:"unitCost" mapstructure:"unitCost"`
	RatingGroup    int64  `json:"ratingGroup,omitempty" yaml:"ratingGroup" bson:"ratingGroup" mapstructure:"ratingGroup"`
}

type FlowRule

type FlowRule struct {
	Filter     string `json:"filter,omitempty" yaml:"filter" bson:"filter" mapstructure:"filter"`
	Precedence int    `json:"precedence,omitempty" yaml:"precedence" bson:"precedence" mapstructure:"precedence"`
	Snssai     string `json:"snssai,omitempty" yaml:"snssai" bson:"snssai" mapstructure:"snssai"`
	Dnn        string `json:"dnn,omitempty" yaml:"dnn" bson:"dnn" mapstructure:"dnn"`
	QosRef     int    `json:"qosRef,omitempty" yaml:"qosRef" bson:"qosRef" mapstructure:"qosRef"`
}

type LoginRequest added in v1.0.3

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type OAuth added in v1.0.3

type OAuth struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

type QosFlow added in v1.3.1

type QosFlow struct {
	Snssai string `json:"snssai" yaml:"snssai" bson:"snssai" mapstructure:"snssai"`
	Dnn    string `json:"dnn" yaml:"dnn" bson:"dnn" mapstructure:"dnn"`
	QosRef uint8  `json:"qosRef" yaml:"qosRef" bson:"qosRef" mapstructure:"qosRef"`
	Var5QI int    `json:"5qi" 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 RatingGroupDataUsage added in v1.3.1

type RatingGroupDataUsage struct {
	Supi      string `bson:"Supi"`
	Filter    string `bson:"Filter"`
	Snssai    string `bson:"Snssai"`
	Dnn       string `bson:"Dnn"`
	TotalVol  int64  `bson:"TotalVol"`
	UlVol     int64  `bson:"UlVol"`
	DlVol     int64  `bson:"DlVol"`
	QuotaLeft int64  `bson:"QuotaLeft"`
	Usage     int64  `bson:"Usage"`
}

frontend's FlowChargingRecord

type Route

type Route struct {
	// Name is the name of this Route.
	Name string
	// Method is the string for the HTTP method. ex) GET, POST etc..
	Method string
	// Pattern is the pattern of the URI.
	Pattern string
	// HandlerFunc is the handler function of this route.
	HandlerFunc gin.HandlerFunc
}

Route is the information for every URI.

type Routes

type Routes []Route

Routes is the list of the generated Route.

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"`
	QosFlows                          []QosFlow                                  `json:"QosFlows"`
	ChargingDatas                     []ChargingData                             `json:"ChargingDatas"`
}

type SubsListIE

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

type Tenant added in v1.0.3

type Tenant struct {
	TenantId   string `json:"tenantId"`
	TenantName string `json:"tenantName"`
}

type User added in v1.0.3

type User struct {
	UserId            string `json:"userId"`
	TenantId          string `json:"tenantId"`
	Email             string `json:"email"`
	EncryptedPassword string `json:"encryptedPassword"`
}

Jump to

Keyboard shortcuts

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