Skip to content

Commit

Permalink
feat: merge from dev (#7729)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored Jan 15, 2025
1 parent b90a90c commit 3105737
Show file tree
Hide file tree
Showing 70 changed files with 186 additions and 543 deletions.
11 changes: 0 additions & 11 deletions agent/app/api/v2/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

// @Tags App
// @Summary List apps
// @Description 获取应用列表
// @Accept json
// @Param request body request.AppSearch true "request"
// @Success 200
Expand All @@ -31,7 +30,6 @@ func (b *BaseApi) SearchApp(c *gin.Context) {

// @Tags App
// @Summary Sync remote app list
// @Description 同步远程应用列表
// @Success 200
// @Security ApiKeyAuth
// @Router /apps/sync/remote [post]
Expand Down Expand Up @@ -63,7 +61,6 @@ func (b *BaseApi) SyncApp(c *gin.Context) {

// @Tags App
// @Summary Sync local app list
// @Description 同步本地应用列表
// @Success 200
// @Security ApiKeyAuth
// @Router /apps/sync/local [post]
Expand All @@ -79,7 +76,6 @@ func (b *BaseApi) SyncLocalApp(c *gin.Context) {

// @Tags App
// @Summary Search app by key
// @Description 通过 key 获取应用信息
// @Accept json
// @Param key path string true "app key"
// @Success 200 {object} response.AppDTO
Expand All @@ -101,7 +97,6 @@ func (b *BaseApi) GetApp(c *gin.Context) {

// @Tags App
// @Summary Search app detail by appid
// @Description 通过 appid 获取应用详情
// @Accept json
// @Param appId path integer true "app id"
// @Param version path string true "app 版本"
Expand All @@ -127,7 +122,6 @@ func (b *BaseApi) GetAppDetail(c *gin.Context) {

// @Tags App
// @Summary Get app detail by id
// @Description 通过 id 获取应用详情
// @Accept json
// @Param appId path integer true "id"
// @Success 200 {object} response.AppDetailDTO
Expand All @@ -149,7 +143,6 @@ func (b *BaseApi) GetAppDetailByID(c *gin.Context) {

// @Tags App
// @Summary Get Ignore App
// @Description 获取忽略的应用版本
// @Accept json
// @Success 200 {object} response.IgnoredApp
// @Security ApiKeyAuth
Expand All @@ -165,7 +158,6 @@ func (b *BaseApi) GetIgnoredApp(c *gin.Context) {

// @Tags App
// @Summary Install app
// @Description 安装应用
// @Accept json
// @Param request body request.AppInstallCreate true "request"
// @Success 200 {object} model.AppInstall
Expand Down Expand Up @@ -196,7 +188,6 @@ func (b *BaseApi) GetAppTags(c *gin.Context) {

// @Tags App
// @Summary Get app list update
// @Description 获取应用更新版本
// @Success 200
// @Security ApiKeyAuth
// @Router /apps/checkupdate [get]
Expand All @@ -211,7 +202,6 @@ func (b *BaseApi) GetAppListUpdate(c *gin.Context) {

// @Tags App
// @Summary Update appstore config
// @Description 更新应用商店配置
// @Accept json
// @Param request body request.AppstoreUpdate true "request"
// @Success 200
Expand All @@ -232,7 +222,6 @@ func (b *BaseApi) UpdateAppstoreConfig(c *gin.Context) {

// @Tags App
// @Summary Get appstore config
// @Description 获取应用商店配置
// @Success 200 {object} response.AppstoreConfig
// @Security ApiKeyAuth
// @Router /apps/store/config [get]
Expand Down
16 changes: 0 additions & 16 deletions agent/app/api/v2/app_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

// @Tags App
// @Summary Page app installed
// @Description 分页获取已安装应用列表
// @Accept json
// @Param request body request.AppInstalledSearch true "request"
// @Success 200
Expand Down Expand Up @@ -43,7 +42,6 @@ func (b *BaseApi) SearchAppInstalled(c *gin.Context) {

// @Tags App
// @Summary List app installed
// @Description 获取已安装应用列表
// @Accept json
// @Success 200 array dto.AppInstallInfo
// @Security ApiKeyAuth
Expand All @@ -59,7 +57,6 @@ func (b *BaseApi) ListAppInstalled(c *gin.Context) {

// @Tags App
// @Summary Check app installed
// @Description 检查应用安装情况
// @Accept json
// @Param request body request.AppInstalledInfo true "request"
// @Success 200 {object} response.AppInstalledCheck
Expand All @@ -80,7 +77,6 @@ func (b *BaseApi) CheckAppInstalled(c *gin.Context) {

// @Tags App
// @Summary Search app port by key
// @Description 获取应用端口
// @Accept json
// @Param request body dto.OperationWithNameAndType true "request"
// @Success 200 {integer} port
Expand All @@ -101,7 +97,6 @@ func (b *BaseApi) LoadPort(c *gin.Context) {

// @Tags App
// @Summary Search app password by key
// @Description 获取应用连接信息
// @Accept json
// @Param request body dto.OperationWithNameAndType true "request"
// @Success 200 {string} response.DatabaseConn
Expand All @@ -122,7 +117,6 @@ func (b *BaseApi) LoadConnInfo(c *gin.Context) {

// @Tags App
// @Summary Check before delete
// @Description 删除前检查
// @Accept json
// @Param appInstallId path integer true "App install id"
// @Success 200 {array} dto.AppResource
Expand All @@ -145,7 +139,6 @@ func (b *BaseApi) DeleteCheck(c *gin.Context) {
// Sync app installed
// @Tags App
// @Summary Sync app installed
// @Description 同步已安装应用列表
// @Success 200
// @Security ApiKeyAuth
// @Router /apps/installed/sync [post]
Expand All @@ -160,7 +153,6 @@ func (b *BaseApi) SyncInstalled(c *gin.Context) {

// @Tags App
// @Summary Operate installed app
// @Description 操作已安装应用
// @Accept json
// @Param request body request.AppInstalledOperate true "request"
// @Success 200
Expand All @@ -181,7 +173,6 @@ func (b *BaseApi) OperateInstalled(c *gin.Context) {

// @Tags App
// @Summary Search app service by key
// @Description 通过 key 获取应用 service
// @Accept json
// @Param key path string true "request"
// @Success 200 {array} response.AppService
Expand All @@ -199,7 +190,6 @@ func (b *BaseApi) GetServices(c *gin.Context) {

// @Tags App
// @Summary Search app update version by install id
// @Description 通过 install id 获取应用更新版本
// @Accept json
// @Param appInstallId path integer true "request"
// @Success 200 {array} dto.AppVersion
Expand All @@ -220,7 +210,6 @@ func (b *BaseApi) GetUpdateVersions(c *gin.Context) {

// @Tags App
// @Summary Change app port
// @Description 修改应用端口
// @Accept json
// @Param request body request.PortUpdate true "request"
// @Success 200
Expand All @@ -241,7 +230,6 @@ func (b *BaseApi) ChangeAppPort(c *gin.Context) {

// @Tags App
// @Summary Search default config by key
// @Description 通过 key 获取应用默认配置
// @Accept json
// @Param request body dto.OperationWithNameAndType true "request"
// @Success 200 {string} content
Expand All @@ -263,7 +251,6 @@ func (b *BaseApi) GetDefaultConfig(c *gin.Context) {

// @Tags App
// @Summary Search params by appInstallId
// @Description 通过 install id 获取应用参数
// @Accept json
// @Param appInstallId path string true "request"
// @Success 200 {object} response.AppParam
Expand All @@ -285,7 +272,6 @@ func (b *BaseApi) GetParams(c *gin.Context) {

// @Tags App
// @Summary Change app params
// @Description 修改应用参数
// @Accept json
// @Param request body request.AppInstalledUpdate true "request"
// @Success 200
Expand All @@ -306,7 +292,6 @@ func (b *BaseApi) UpdateInstalled(c *gin.Context) {

// @Tags App
// @Summary ignore App Update
// @Description 忽略应用升级版本
// @Accept json
// @Param request body request.AppInstalledIgnoreUpgrade true "request"
// @Success 200
Expand All @@ -327,7 +312,6 @@ func (b *BaseApi) IgnoreUpgrade(c *gin.Context) {

// @Tags App
// @Summary Update app config
// @Description 更新应用配置
// @Accept json
// @Param request body request.AppConfigUpdate true "request"
// @Success 200
Expand Down
9 changes: 0 additions & 9 deletions agent/app/api/v2/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ func (b *BaseApi) UpdateBackup(c *gin.Context) {

// @Tags Backup Account
// @Summary Load backup account options
// @Description 获取备份账号选项
// @Accept json
// @Success 200 {array} dto.BackupOption
// @Security ApiKeyAuth
Expand Down Expand Up @@ -230,7 +229,6 @@ func (b *BaseApi) LoadBackupRecordSize(c *gin.Context) {

// @Tags Backup Account
// @Summary Page backup records
// @Description 获取备份记录列表分页
// @Accept json
// @Param request body dto.RecordSearch true "request"
// @Success 200
Expand All @@ -256,7 +254,6 @@ func (b *BaseApi) SearchBackupRecords(c *gin.Context) {

// @Tags Backup Account
// @Summary Page backup records by cronjob
// @Description 通过计划任务获取备份记录列表分页
// @Accept json
// @Param request body dto.RecordSearchByCronjob true "request"
// @Success 200
Expand All @@ -282,7 +279,6 @@ func (b *BaseApi) SearchBackupRecordsByCronjob(c *gin.Context) {

// @Tags Backup Account
// @Summary Download backup record
// @Description 下载备份记录
// @Accept json
// @Param request body dto.DownloadRecord true "request"
// @Success 200
Expand All @@ -305,7 +301,6 @@ func (b *BaseApi) DownloadRecord(c *gin.Context) {

// @Tags Backup Account
// @Summary Delete backup record
// @Description 删除备份记录
// @Accept json
// @Param request body dto.BatchDeleteReq true "request"
// @Success 200
Expand All @@ -327,7 +322,6 @@ func (b *BaseApi) DeleteBackupRecord(c *gin.Context) {

// @Tags Backup Account
// @Summary List files from backup accounts
// @Description 获取备份账号内文件列表
// @Accept json
// @Param request body dto.OperateByID true "request"
// @Success 200 {array} string
Expand All @@ -345,7 +339,6 @@ func (b *BaseApi) LoadFilesFromBackup(c *gin.Context) {

// @Tags Backup Account
// @Summary Backup system data
// @Description 备份系统数据
// @Accept json
// @Param request body dto.CommonBackup true "request"
// @Success 200
Expand Down Expand Up @@ -390,7 +383,6 @@ func (b *BaseApi) Backup(c *gin.Context) {

// @Tags Backup Account
// @Summary Recover system data
// @Description 恢复系统数据
// @Accept json
// @Param request body dto.CommonRecover true "request"
// @Success 200
Expand Down Expand Up @@ -445,7 +437,6 @@ func (b *BaseApi) Recover(c *gin.Context) {

// @Tags Backup Account
// @Summary Recover system data by upload
// @Description 从上传恢复系统数据
// @Accept json
// @Param request body dto.CommonRecover true "request"
// @Success 200
Expand Down
13 changes: 0 additions & 13 deletions agent/app/api/v2/clam.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

// @Tags Clam
// @Summary Create clam
// @Description 创建扫描规则
// @Accept json
// @Param request body dto.ClamCreate true "request"
// @Success 200
Expand All @@ -30,7 +29,6 @@ func (b *BaseApi) CreateClam(c *gin.Context) {

// @Tags Clam
// @Summary Update clam
// @Description 修改扫描规则
// @Accept json
// @Param request body dto.ClamUpdate true "request"
// @Success 200
Expand All @@ -52,7 +50,6 @@ func (b *BaseApi) UpdateClam(c *gin.Context) {

// @Tags Clam
// @Summary Update clam status
// @Description 修改扫描规则状态
// @Accept json
// @Param request body dto.ClamUpdateStatus true "request"
// @Success 200
Expand All @@ -74,7 +71,6 @@ func (b *BaseApi) UpdateClamStatus(c *gin.Context) {

// @Tags Clam
// @Summary Page clam
// @Description 获取扫描规则列表分页
// @Accept json
// @Param request body dto.SearchClamWithPage true "request"
// @Success 200 {object} dto.PageResult
Expand All @@ -100,7 +96,6 @@ func (b *BaseApi) SearchClam(c *gin.Context) {

// @Tags Clam
// @Summary Load clam base info
// @Description 获取 Clam 基础信息
// @Accept json
// @Success 200 {object} dto.ClamBaseInfo
// @Security ApiKeyAuth
Expand All @@ -117,7 +112,6 @@ func (b *BaseApi) LoadClamBaseInfo(c *gin.Context) {

// @Tags Clam
// @Summary Operate Clam
// @Description 修改 Clam 状态
// @Accept json
// @Param request body dto.Operate true "request"
// @Security ApiKeyAuth
Expand All @@ -139,7 +133,6 @@ func (b *BaseApi) OperateClam(c *gin.Context) {

// @Tags Clam
// @Summary Clean clam record
// @Description 清空扫描报告
// @Accept json
// @Param request body dto.OperateByID true "request"
// @Security ApiKeyAuth
Expand All @@ -160,7 +153,6 @@ func (b *BaseApi) CleanClamRecord(c *gin.Context) {

// @Tags Clam
// @Summary Page clam record
// @Description 获取扫描结果列表分页
// @Accept json
// @Param request body dto.ClamLogSearch true "request"
// @Success 200 {object} dto.PageResult
Expand All @@ -186,7 +178,6 @@ func (b *BaseApi) SearchClamRecord(c *gin.Context) {

// @Tags Clam
// @Summary Load clam record detail
// @Description 获取扫描结果详情
// @Accept json
// @Param request body dto.ClamLogReq true "request"
// @Success 200
Expand All @@ -209,7 +200,6 @@ func (b *BaseApi) LoadClamRecordLog(c *gin.Context) {

// @Tags Clam
// @Summary Load clam file
// @Description 获取扫描文件
// @Accept json
// @Param request body dto.ClamFileReq true "request"
// @Success 200 {object} dto.PageResult
Expand All @@ -232,7 +222,6 @@ func (b *BaseApi) SearchClamFile(c *gin.Context) {

// @Tags Clam
// @Summary Update clam file
// @Description 更新病毒扫描配置文件
// @Accept json
// @Param request body dto.UpdateByNameAndFile true "request"
// @Success 200
Expand All @@ -252,7 +241,6 @@ func (b *BaseApi) UpdateFile(c *gin.Context) {

// @Tags Clam
// @Summary Delete clam
// @Description 删除扫描规则
// @Accept json
// @Param request body dto.ClamDelete true "request"
// @Success 200
Expand All @@ -274,7 +262,6 @@ func (b *BaseApi) DeleteClam(c *gin.Context) {

// @Tags Clam
// @Summary Handle clam scan
// @Description 执行病毒扫描
// @Accept json
// @Param request body dto.OperateByID true "request"
// @Success 200
Expand Down
Loading

0 comments on commit 3105737

Please sign in to comment.