docs: 更新swagger注释信息

This commit is contained in:
TsMask
2025-02-06 20:33:55 +08:00
parent 0b94281520
commit 89e03ca3d9
6 changed files with 688 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ import (
// FileListRow 文件列表行数据
type FileListRow struct {
FileType string `json:"fileType"` // 文件类型
FileType string `json:"fileType"` // 文件类型 dir, file, symlink
FileMode string `json:"fileMode"` // 文件的权限
LinkCount int64 `json:"linkCount"` // 硬链接数目
Owner string `json:"owner"` // 所属用户

View File

@@ -38,7 +38,8 @@ type NeActionController struct {
// @Tags network_element/action
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security TokenAuth
// @Summary Sending files from local to network elements
// @Description Sending files from local to network elements
@@ -104,7 +105,12 @@ func (s *NeActionController) PushFile(c *gin.Context) {
// @Tags network_element/action
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF)
// @Param neId query string true "NE ID" default(001)
// @Param path query string true "dir path" default(/var/log)
// @Param fileName query string true "file name"
// @Param delTemp query boolean false "Delete Temp File" default(false)
// @Success 200 {object} object "Response Results"
// @Security TokenAuth
// @Summary Getting files from the network element to the local
// @Description Getting files from the network element to the local
@@ -172,7 +178,11 @@ func (s *NeActionController) PullFile(c *gin.Context) {
// @Tags network_element/action
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF)
// @Param neId query string true "NE ID" default(001)
// @Param path query string true "dir path" default(/var/log)
// @Param delTemp query boolean false "Delete Temp File" default(false)
// @Success 200 {object} object "Response Results"
// @Security TokenAuth
// @Summary Get directories compressed to ZIP from the network element to the local area
// @Description Get directories compressed to ZIP from the network element to the local area
@@ -248,7 +258,11 @@ func (s *NeActionController) PullDirZip(c *gin.Context) {
// @Tags network_element/action
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF)
// @Param neId query string true "NE ID" default(001)
// @Param path query string true "file path" default(/var/log)
// @Param fileName query string true "file name"
// @Success 200 {object} object "Response Results"
// @Security TokenAuth
// @Summary Viewing the contents of a file on the network element side
// @Description Viewing the contents of a file on the network element side
@@ -300,7 +314,13 @@ func (s *NeActionController) ViewFile(c *gin.Context) {
// @Tags network_element/action
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF)
// @Param neId query string true "NE ID" default(001)
// @Param path query string true "file path" default(/var/log)
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Param search query string false "search prefix" default(upf)
// @Success 200 {object} object "Response Results"
// @Security TokenAuth
// @Summary List of files on the network element side
// @Description List of files on the network element side
@@ -373,7 +393,8 @@ func (s *NeActionController) Files(c *gin.Context) {
// @Tags network_element/action
// @Accept json
// @Produce json
// @Success 200 {object} object "Response Results"
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security TokenAuth
// @Summary Network element service operation
// @Description Network element service operation

View File

@@ -21,15 +21,15 @@ import (
const (
// 数据库
DbHost = "127.0.0.1"
DbPort = 33066
DbHost = "192.168.9.58"
DbPort = 13306
DbUser = "root"
DbPassswd = "1000omc@kp!"
DbName = "omc_db"
// 配置文件路径
configParamDir = "../../../config/param"
// configParamFile = "*" // 目录下全部更新
configParamFile = "omc_param_config.yaml" // 单文件更新
configParamFile = "mme_param_config.yaml" // 单文件更新
)
func TestConfig(t *testing.T) {