feat: swagger接口文档更新1.0.8

This commit is contained in:
TsMask
2025-01-23 15:07:22 +08:00
parent 788e406c32
commit ed9aa17bc3
47 changed files with 16033 additions and 119 deletions

View File

@@ -27,6 +27,20 @@ type PerfKPIController struct {
// 获取统计数据
//
// GET /data
//
// @Tags network_data/kpi
// @Accept json
// @Produce json
// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC)
// @Param neId query string true "NE ID" default(001)
// @Param startTime query number true "Start time (timestamped milliseconds)" default(1737453599059)
// @Param endTime query number true "End time (timestamped milliseconds)" default(1737453599059)
// @Param interval query number true "interval" Enums(5,10,15,30,60,300,600,900,1800,3600)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access to statistical data
// @Description Access to statistical data
// @Router /neData/kpi/data [get]
func (s *PerfKPIController) GoldKPI(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.GoldKPIQuery
@@ -55,6 +69,16 @@ func (s *PerfKPIController) GoldKPI(c *gin.Context) {
// 获取统计标题
//
// GET /title
//
// @Tags network_data/kpi
// @Accept json
// @Produce json
// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Get Statistical Headings
// @Description Get Statistical Headings
// @Router /neData/kpi/title [get]
func (s *PerfKPIController) Title(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neType := c.Query("neType")

View File

@@ -34,6 +34,20 @@ type AMFController struct {
// UE会话列表
//
// GET /ue/list
//
// @Tags network_data/amf
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only AMF" Enums(AMF)
// @Param neId query string true "NE ID" default(001)
// @Param imsi query string false "imsi"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session List
// @Description UE Session List
// @Router /neData/amf/ue/list [get]
func (s *AMFController) UEList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.UEEventAMFQuery
@@ -58,6 +72,16 @@ func (s *AMFController) UEList(c *gin.Context) {
// UE会话删除
//
// DELETE /ue/:ueIds
//
// @Tags network_data/amf
// @Accept json
// @Produce json
// @Param ueIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session Deletion
// @Description UE Session Deletion
// @Router /neData/amf/ue/{ueIds} [delete]
func (s *AMFController) UERemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
ueIds := c.Param("ueIds")
@@ -84,6 +108,16 @@ func (s *AMFController) UERemove(c *gin.Context) {
// UE会话列表导出
//
// POST /ue/export
//
// @Tags network_data/amf
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session List Export
// @Description UE Session List Export
// @Router /neData/amf/ue/export [post]
func (s *AMFController) UEExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -125,6 +159,17 @@ func (s *AMFController) UEExport(c *gin.Context) {
// 接入基站信息列表
//
// GET /nb/list
//
// @Tags network_data/amf
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Param id query string false "Base Station ID"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access Base Station Information List
// @Description Access Base Station Information List
// @Router /neData/amf/nb/list [get]
func (s *AMFController) NbInfoList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
@@ -158,6 +203,16 @@ func (s *AMFController) NbInfoList(c *gin.Context) {
// 接入基站状态信息列表
//
// GET /nb/list-cfg
//
// @Tags network_data/amf
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access to the base station status information list
// @Description Access to the base station status information list
// @Router /neData/amf/nb/list-cfg [get]
func (s *AMFController) NbStateList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {

View File

@@ -34,6 +34,21 @@ type IMSController struct {
// CDR会话列表
//
// GET /cdr/list
//
// @Tags network_data/ims
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only IMS" Enums(IMS)
// @Param neId query string true "NE ID" default(001)
// @Param callerParty query string false "callerParty"
// @Param calledParty query string false "calledParty"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List
// @Description CDR Session List
// @Router /neData/ims/cdr/list [get]
func (s *IMSController) CDRList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.CDREventIMSQuery
@@ -58,6 +73,16 @@ func (s *IMSController) CDRList(c *gin.Context) {
// CDR会话删除
//
// DELETE /cdr/:cdrIds
//
// @Tags network_data/ims
// @Accept json
// @Produce json
// @Param cdrIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session Delete
// @Description CDR Session Delete
// @Router /neData/ims/cdr/{cdrIds} [delete]
func (s *IMSController) CDRRemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
cdrIds := c.Param("cdrIds")
@@ -84,6 +109,16 @@ func (s *IMSController) CDRRemove(c *gin.Context) {
// CDR会话列表导出
//
// POST /cdr/export
//
// @Tags network_data/ims
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List Export
// @Description CDR Session List Export
// @Router /neData/ims/cdr/export [post]
func (s *IMSController) CDRExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -125,6 +160,16 @@ func (s *IMSController) CDRExport(c *gin.Context) {
// 在线会话用户数量
//
// GET /session/num
//
// @Tags network_data/ims
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Number of online session users
// @Description Number of online session users
// @Router /neData/ims/session/num [get]
func (s *IMSController) UeSessionNum(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
@@ -155,6 +200,18 @@ func (s *IMSController) UeSessionNum(c *gin.Context) {
// 在线会话用户列表信息
//
// GET /session/list
//
// @Tags network_data/ims
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Param imsi query string false "imsi"
// @Param msisdn query string false "msisdn"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Online session user list information
// @Description Online session user list information
// @Router /neData/ims/session/list [get]
func (s *IMSController) UeSessionList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {

View File

@@ -34,6 +34,20 @@ type MMEController struct {
// UE会话列表
//
// GET /ue/list
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only MME" Enums(MME)
// @Param neId query string true "NE ID" default(001)
// @Param imsi query string false "imsi"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session List
// @Description UE Session List
// @Router /neData/mme/ue/list [get]
func (s *MMEController) UEList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.UEEventMMEQuery
@@ -58,6 +72,16 @@ func (s *MMEController) UEList(c *gin.Context) {
// UE会话删除
//
// DELETE /ue/:ueIds
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param ueIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session Deletion
// @Description UE Session Deletion
// @Router /neData/mme/ue/{ueIds} [delete]
func (s *MMEController) UERemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
ueIds := c.Param("ueIds")
@@ -84,6 +108,16 @@ func (s *MMEController) UERemove(c *gin.Context) {
// UE会话列表导出
//
// POST /ue/export
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session List Export
// @Description UE Session List Export
// @Router /neData/mme/ue/export [post]
func (s *MMEController) UEExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -125,6 +159,17 @@ func (s *MMEController) UEExport(c *gin.Context) {
// 接入基站信息列表
//
// GET /nb/list
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Param id query string false "Base Station ID"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access Base Station Information List
// @Description Access Base Station Information List
// @Router /neData/mme/nb/list [get]
func (s *MMEController) NbInfoList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
@@ -154,3 +199,43 @@ func (s *MMEController) NbInfoList(c *gin.Context) {
c.JSON(200, result.OkData(data))
}
// 接入基站状态信息列表
//
// GET /nb/list-cfg
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access to the base station status information list
// @Description Access to the base station status information list
// @Router /neData/mme/nb/list-cfg [get]
func (s *MMEController) NbStateList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
NeId string `form:"neId" binding:"required"`
}
if err := c.ShouldBindQuery(&query); err != nil {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
return
}
// 查询网元信息
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("MME", query.NeId)
if neInfo.NeId != query.NeId || neInfo.IP == "" {
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
return
}
// 网元直连
data, err := neFetchlink.MMEEnbStateList(neInfo)
if err != nil {
c.JSON(200, result.ErrMsg(err.Error()))
return
}
c.JSON(200, result.OkData(data))
}

View File

@@ -24,7 +24,7 @@ var NewSGWC = &SGWCController{
// 网元SGWC
//
// PATH /SGWC
// PATH /sgwc
type SGWCController struct {
neInfoService *neService.NeInfo // 网元信息服务
cdrEventService *neDataService.CDREventSGWC // CDR会话事件服务
@@ -34,6 +34,21 @@ type SGWCController struct {
// CDR会话列表
//
// GET /cdr/list
//
// @Tags network_data/sgwc
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only SGWC" Enums(SGWC)
// @Param neId query string true "NE ID" default(001)
// @Param imsi query string false "imsi"
// @Param msisdn query string false "msisdn"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List
// @Description CDR Session List
// @Router /neData/sgwc/cdr/list [get]
func (s *SGWCController) CDRList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.CDREventSGWCQuery
@@ -58,6 +73,16 @@ func (s *SGWCController) CDRList(c *gin.Context) {
// CDR会话删除
//
// DELETE /cdr/:cdrIds
//
// @Tags network_data/sgwc
// @Accept json
// @Produce json
// @Param cdrIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session Delete
// @Description CDR Session Delete
// @Router /neData/sgwc/cdr/{cdrIds} [delete]
func (s *SGWCController) CDRRemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
cdrIds := c.Param("cdrIds")
@@ -84,6 +109,16 @@ func (s *SGWCController) CDRRemove(c *gin.Context) {
// CDR会话列表导出
//
// POST /cdr/export
//
// @Tags network_data/sgwc
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List Export
// @Description CDR Session List Export
// @Router /neData/sgwc/cdr/export [post]
func (s *SGWCController) CDRExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制

View File

@@ -36,6 +36,20 @@ type SMFController struct {
// CDR会话列表
//
// GET /cdr/list
//
// @Tags network_data/smf
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only SMF" Enums(SMF)
// @Param neId query string true "NE ID" default(001)
// @Param subscriberID query string false "subscriberID is IMSI"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List
// @Description CDR Session List
// @Router /neData/smf/cdr/list [get]
func (s *SMFController) CDRList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.CDREventSMFQuery
@@ -60,6 +74,16 @@ func (s *SMFController) CDRList(c *gin.Context) {
// CDR会话删除
//
// DELETE /cdr/:cdrIds
//
// @Tags network_data/smf
// @Accept json
// @Produce json
// @Param cdrIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session Delete
// @Description CDR Session Delete
// @Router /neData/smf/cdr/{cdrIds} [delete]
func (s *SMFController) CDRRemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
cdrIds := c.Param("cdrIds")
@@ -86,6 +110,16 @@ func (s *SMFController) CDRRemove(c *gin.Context) {
// CDR会话列表导出
//
// POST /cdr/export
//
// @Tags network_data/smf
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List Export
// @Description CDR Session List Export
// @Router /neData/smf/cdr/export [post]
func (s *SMFController) CDRExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -127,6 +161,16 @@ func (s *SMFController) CDRExport(c *gin.Context) {
// 在线订阅用户数量
//
// GET /sub/num
//
// @Tags network_data/smf
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Number of online session users
// @Description Number of online session users
// @Router /neData/smf/sub/num [get]
func (s *SMFController) SubUserNum(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
@@ -157,6 +201,20 @@ func (s *SMFController) SubUserNum(c *gin.Context) {
// 在线订阅用户列表信息
//
// GET /sub/list
//
// @Tags network_data/smf
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Param imsi query string false "imsi"
// @Param msisdn query string false "msisdn"
// @Param upstate query string false "upstate"
// @Param pageNum query string true "pageNum" default(50)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Online session user list information
// @Description Online session user list information
// @Router /neData/smf/session/list [get]
func (s *SMFController) SubUserList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {

View File

@@ -33,6 +33,21 @@ type SMSCController struct {
// CDR会话列表
//
// GET /cdr/list
//
// @Tags network_data/smsc
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only SMSC" Enums(SMSC)
// @Param neId query string true "NE ID" default(001)
// @Param callerParty query string false "callerParty"
// @Param calledParty query string false "calledParty"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List
// @Description CDR Session List
// @Router /neData/smsc/cdr/list [get]
func (s *SMSCController) CDRList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.CDREventSMSCQuery
@@ -57,6 +72,16 @@ func (s *SMSCController) CDRList(c *gin.Context) {
// CDR会话删除
//
// DELETE /cdr/:cdrIds
//
// @Tags network_data/smsc
// @Accept json
// @Produce json
// @Param cdrIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session Delete
// @Description CDR Session Delete
// @Router /neData/smsc/cdr/{cdrIds} [delete]
func (s *SMSCController) CDRRemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
cdrIds := c.Param("cdrIds")
@@ -83,6 +108,16 @@ func (s *SMSCController) CDRRemove(c *gin.Context) {
// CDR会话列表导出
//
// POST /cdr/export
//
// @Tags network_data/smsc
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary CDR Session List Export
// @Description CDR Session List Export
// @Router /neData/smsc/cdr/export [post]
func (s *SMSCController) CDRExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制

View File

@@ -38,6 +38,16 @@ type UDMAuthController struct {
// UDM鉴权用户重载数据
//
// POST /resetData/:neId
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authentication User Reload Data
// @Description UDM Authentication User Reload Data
// @Router /neData/udm/auth/resetData/{neId} [post]
func (s *UDMAuthController) ResetData(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -53,6 +63,15 @@ func (s *UDMAuthController) ResetData(c *gin.Context) {
// UDM鉴权用户列表
//
// GET /list
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authentication User List
// @Description UDM Authentication User List
// @Router /neData/udm/auth/list [get]
func (s *UDMAuthController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
total, rows := s.udmAuthService.SelectPage(querys)
@@ -62,6 +81,17 @@ func (s *UDMAuthController) List(c *gin.Context) {
// UDM鉴权用户信息
//
// GET /:neId/:imsi
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param value path string true "User data imsi"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authentication User Information
// @Description UDM Authentication User Information
// @Router /neData/udm/auth/{neId}/{value} [get]
func (s *UDMAuthController) Info(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -107,6 +137,17 @@ func (s *UDMAuthController) Info(c *gin.Context) {
// UDM鉴权用户新增
//
// POST /:neId
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authentication User Added
// @Description UDM Authentication User Added
// @Router /neData/udm/auth/{neId} [post]
func (s *UDMAuthController) Add(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -155,6 +196,18 @@ func (s *UDMAuthController) Add(c *gin.Context) {
// UDM鉴权用户批量新增
//
// POST /:neId/:num
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param value path number true "Incremental number"
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authentication User Batch Add
// @Description UDM Authentication User Batch Add
// @Router /neData/udm/auth/{neId}/{value} [post]
func (s *UDMAuthController) Adds(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -204,6 +257,17 @@ func (s *UDMAuthController) Adds(c *gin.Context) {
// UDM鉴权用户修改
//
// PUT /:neId
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authenticated User Modification
// @Description UDM Authenticated User Modification
// @Router /neData/udm/auth/{neId} [put]
func (s *UDMAuthController) Edit(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -252,6 +316,17 @@ func (s *UDMAuthController) Edit(c *gin.Context) {
// UDM鉴权用户删除
//
// DELETE /:neId/:imsi
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param value path string true "User data imsi, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authenticated User Deletion
// @Description UDM Authenticated User Deletion
// @Router /neData/udm/auth/{neId}/{value} [delete]
func (s *UDMAuthController) Remove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -305,6 +380,18 @@ func (s *UDMAuthController) Remove(c *gin.Context) {
// UDM鉴权用户批量删除
//
// DELETE /:neId/:imsi/:num
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param imsi path string true "User data imsi"
// @Param num path number true "Incremental number"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authentication User Batch Deletion
// @Description UDM Authentication User Batch Deletion
// @Router /neData/udm/auth/{neId}/{imsi}/{num} [delete]
func (s *UDMAuthController) Removes(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -347,6 +434,15 @@ func (s *UDMAuthController) Removes(c *gin.Context) {
// UDM鉴权用户导出
//
// POST /export
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authenticated User Export
// @Description UDM Authenticated User Export
// @Router /neData/udm/auth/export [post]
func (s *UDMAuthController) Export(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -425,6 +521,16 @@ func (s *UDMAuthController) Export(c *gin.Context) {
// UDM鉴权用户导入
//
// POST /import
//
// @Tags network_data/udm/auth
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Authenticated User Import
// @Description UDM Authenticated User Import
// @Router /neData/udm/auth/import [post]
func (s *UDMAuthController) Import(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var body struct {

View File

@@ -37,6 +37,16 @@ type UDMSubController struct {
// UDM签约用户重载数据
//
// POST /resetData/:neId
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Reload Data
// @Description UDM Subscriber User Reload Data
// @Router /neData/udm/sub/resetData/{neId} [post]
func (s *UDMSubController) ResetData(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -52,6 +62,15 @@ func (s *UDMSubController) ResetData(c *gin.Context) {
// UDM签约用户列表
//
// GET /list
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User List
// @Description UDM Subscriber User List
// @Router /neData/udm/sub/list [get]
func (s *UDMSubController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
total, rows := s.udmSubService.SelectPage(querys)
@@ -61,6 +80,17 @@ func (s *UDMSubController) List(c *gin.Context) {
// UDM签约用户信息
//
// GET /:neId/:imsi
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param value path string true "User data imsi"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Information
// @Description UDM Subscriber User Information
// @Router /neData/udm/sub/{neId}/{value} [get]
func (s *UDMSubController) Info(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -106,6 +136,17 @@ func (s *UDMSubController) Info(c *gin.Context) {
// UDM签约用户新增
//
// POST /:neId
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Added
// @Description UDM Subscriber User Added
// @Router /neData/udm/sub/{neId} [post]
func (s *UDMSubController) Add(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -155,6 +196,18 @@ func (s *UDMSubController) Add(c *gin.Context) {
// UDM签约用户批量新增
//
// POST /:neId/:num
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param value path number true "Incremental number" default(1)
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Batch Add
// @Description UDM Subscriber User Batch Add
// @Router /neData/udm/sub/{neId}/{value} [post]
func (s *UDMSubController) Adds(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -207,6 +260,17 @@ func (s *UDMSubController) Adds(c *gin.Context) {
// UDM签约用户修改
//
// PUT /:neId
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Modification
// @Description UDM Subscriber User Modification
// @Router /neData/udm/sub/{neId} [put]
func (s *UDMSubController) Edit(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -256,6 +320,17 @@ func (s *UDMSubController) Edit(c *gin.Context) {
// UDM签约用户删除
//
// DELETE /:neId/:imsi
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param value path string true "User data imsi, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Deletion
// @Description UDM Subscriber User Deletion
// @Router /neData/udm/sub/{neId}/{value} [delete]
func (s *UDMSubController) Remove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -309,6 +384,18 @@ func (s *UDMSubController) Remove(c *gin.Context) {
// UDM签约用户批量删除
//
// DELETE /:neId/:imsi/:num
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param neId path string true "NE ID" default(001)
// @Param imsi path string true "User data imsi"
// @Param num path number true "Incremental number" default(1)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Batch Deletion
// @Description UDM Subscriber User Batch Deletion
// @Router /neData/udm/sub/{neId}/{imsi}/{num} [delete]
func (s *UDMSubController) Removes(c *gin.Context) {
language := ctx.AcceptLanguage(c)
neId := c.Param("neId")
@@ -351,6 +438,16 @@ func (s *UDMSubController) Removes(c *gin.Context) {
// UDM签约用户导出
//
// POST /export
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Export
// @Description UDM Subscriber User Export
// @Router /neData/udm/sub/export [post]
func (s *UDMSubController) Export(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -421,6 +518,16 @@ func (s *UDMSubController) Export(c *gin.Context) {
// UDM签约用户导入
//
// POST /import
//
// @Tags network_data/udm/sub
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UDM Subscriber User Import
// @Description UDM Subscriber User Import
// @Router /neData/udm/sub/import [post]
func (s *UDMSubController) Import(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var body struct {

View File

@@ -27,11 +27,22 @@ type UPFController struct {
// 单位 比特(bit)
//
// GET /totalFlow
//
// @Tags network_data/upf
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Param day query number true "Statistical time a few days before" Enums(0, 7, 30)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Total number of flows N3 upstream N6 downstream
// @Description Total number of flows N3 upstream N6 downstream
// @Router /neData/upf/totalFlow [get]
func (s *UPFController) TotalFlow(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys struct {
NeID string `form:"neId" binding:"required"`
Day int `form:"day" binding:"required"`
Day int `form:"day"`
}
if err := c.ShouldBindQuery(&querys); querys.Day < 0 || err != nil {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))