Documentation
¶
Index ¶
- Constants
- func AddService(engine *gin.Engine) *gin.RouterGroup
- func ChangePasswordInfo(c *gin.Context)
- func CheckAuth(c *gin.Context) bool
- func DeleteMultipleProfiles(c *gin.Context)
- func DeleteMultipleSubscribers(c *gin.Context)
- func DeleteProfile(c *gin.Context)
- func DeleteSubscriberByID(c *gin.Context)
- func DeleteTenantByID(c *gin.Context)
- func DeleteUserByID(c *gin.Context)
- func EscapeDnn(dnn string) string
- func GetChargingData(c *gin.Context)
- func GetChargingRecord(c *gin.Context)
- func GetProfile(c *gin.Context)
- func GetProfiles(c *gin.Context)
- func GetRegisteredUEContext(c *gin.Context)
- func GetSampleJSON(c *gin.Context)
- func GetSmfUserPlaneInfo() (interface{}, error)
- func GetStaticIpPoolsFromUserPlaneInfomation(userplaneinfo *smf_factory.UserPlaneInformation, snssai models.Snssai, ...) ([]netip.Prefix, error)
- func GetSubscriberByID(c *gin.Context)
- func GetSubscribers(c *gin.Context)
- func GetTenantByID(c *gin.Context)
- func GetTenantById(tenantId string) map[string]interface{}
- func GetTenantId(c *gin.Context) (string, error)
- func GetTenants(c *gin.Context)
- func GetUEPDUSessionInfo(c *gin.Context)
- func GetUserByID(c *gin.Context)
- func GetUsers(c *gin.Context)
- func InitJwtKey() error
- func JWT(email, userId, tenantId string) string
- func Login(c *gin.Context)
- func Logout(c *gin.Context)
- func NewRouter() *gin.Engine
- func OptionsSubscribers(c *gin.Context)
- func ParseJWT(tokenStr string) (jwt.MapClaims, error)
- func PatchSubscriberByID(c *gin.Context)
- func PostProfile(c *gin.Context)
- func PostSubscriberByID(c *gin.Context)
- func PostTenant(c *gin.Context)
- func PostUserByID(c *gin.Context)
- func PutProfile(c *gin.Context)
- func PutSubscriberByID(c *gin.Context)
- func PutTenantByID(c *gin.Context)
- func PutUserByID(c *gin.Context)
- func SetAdmin()
- func UnescapeDnn(dnnKey string) string
- func VerifyStaticIP(c *gin.Context)
- func VerifyStaticIpProcedure(c *gin.Context, checkData VerifyScope, staticPools []netip.Prefix)
- func WebAuthSubToModels(webAuth WebAuthenticationSubscription) (*models.AuthenticationSubscription, error)
- type AuthSub
- type ChargingData
- type ChargingRecord
- type FlowRule
- type LoginRequest
- type Milenage
- type OAuth
- type Op
- type Opc
- type PermanentKey
- type Profile
- type QosFlow
- type RatingGroupDataUsage
- type Route
- type Routes
- type SubsData
- type SubsListIE
- type Tenant
- type User
- type VerifyScope
- type WebAuthenticationSubscription
Constants ¶
const ( ChargingOffline = "Offline" ChargingOnline = "Online" )
const ( DefaultVar5qi = 9 DefaultPriorityLevel = 8 )
Constants for QoS profile configuration
const ( DefaultBcryptCost = 12 JWTKeySize = 256 JWTExpirationHours = 24 )
Security and configuration constants
Variables ¶
This section is empty.
Functions ¶
func AddService ¶
func AddService(engine *gin.Engine) *gin.RouterGroup
func ChangePasswordInfo ¶ added in v1.3.1
func DeleteMultipleProfiles ¶ added in v1.4.0
Delete multiple profiles
func DeleteMultipleSubscribers ¶ added in v1.4.0
Delete multiple subscribers
func DeleteProfile ¶ added in v1.3.3
Delete profile by profileName
func DeleteSubscriberByID ¶
Delete subscriber by IMSI(ueId) and PlmnID(servingPlmnId)
func DeleteTenantByID ¶ added in v1.0.3
func DeleteUserByID ¶ added in v1.0.3
func GetChargingData ¶ added in v1.3.1
func GetChargingRecord ¶ added in v1.3.1
func GetRegisteredUEContext ¶
func GetSampleJSON ¶
func GetSmfUserPlaneInfo ¶ added in v1.3.2
func GetSmfUserPlaneInfo() (interface{}, error)
func GetStaticIpPoolsFromUserPlaneInfomation ¶ added in v1.3.3
func GetStaticIpPoolsFromUserPlaneInfomation( userplaneinfo *smf_factory.UserPlaneInformation, snssai models.Snssai, dnn string, ) ([]netip.Prefix, error)
func GetSubscriberByID ¶
Get subscriber by IMSI(ueId) and PlmnID(servingPlmnId)
func GetTenantByID ¶ added in v1.0.3
func GetTenantById ¶ added in v1.0.3
Utility function.
func GetUEPDUSessionInfo ¶
func GetUserByID ¶ added in v1.0.3
func InitJwtKey ¶ added in v1.3.1
func InitJwtKey() error
func OptionsSubscribers ¶ added in v1.3.1
func PatchSubscriberByID ¶
Patch subscriber by IMSI(ueId) and PlmnID(servingPlmnId)
func PostSubscriberByID ¶
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 PostUserByID ¶ added in v1.0.3
func PutSubscriberByID ¶
Put subscriber by IMSI(ueId) and PlmnID(servingPlmnId)
func PutTenantByID ¶ added in v1.0.3
func PutUserByID ¶ added in v1.0.3
func UnescapeDnn ¶ added in v1.0.3
func VerifyStaticIP ¶ added in v1.3.2
func VerifyStaticIpProcedure ¶ added in v1.3.3
func VerifyStaticIpProcedure( c *gin.Context, checkData VerifyScope, staticPools []netip.Prefix, )
func WebAuthSubToModels ¶ added in v1.4.0
func WebAuthSubToModels( webAuth WebAuthenticationSubscription, ) (*models.AuthenticationSubscription, error)
Types ¶
type AuthSub ¶ added in v1.0.3
type AuthSub struct {
WebAuthenticationSubscription
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 PermanentKey ¶ added in v1.4.0
type Profile ¶ added in v1.3.3
type Profile struct {
ProfileName string `json:"profileName"`
TenantId string `json:"tenantId"`
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
}
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 SubsData ¶
type SubsData struct {
PlmnID string `json:"plmnID"`
UeId string `json:"ueId"`
WebAuthenticationSubscription WebAuthenticationSubscription `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 VerifyScope ¶ added in v1.3.2
type WebAuthenticationSubscription ¶ added in v1.4.0
type WebAuthenticationSubscription struct {
AuthenticationMethod models.AuthMethod `json:"authenticationMethod" bson:"authenticationMethod"`
PermanentKey *PermanentKey `json:"permanentKey" bson:"permanentKey"`
SequenceNumber string `json:"sequenceNumber" bson:"sequenceNumber"`
Milenage *Milenage `json:"milenage,omitempty" bson:"milenage"`
Opc *Opc `json:"opc,omitempty" bson:"opc"`
//nolint
AuthenticationManagementField string `json:"authenticationManagementField,omitempty" bson:"authenticationManagementField"`
}
Source Files
¶
- api_charging.go
- api_sample.go
- api_verify.go
- api_webui.go
- model_charging_data.go
- model_flow_rule.go
- model_profile_data.go
- model_qos_flow.go
- model_rating_group_data_usage.go
- model_subs_data.go
- model_subs_list_ie.go
- model_tenant_data.go
- model_user_data.go
- model_web_auth_subs.go
- models_charging_record.go
- routers.go
- utils.go