diff --git a/agent/app/api/v2/app.go b/agent/app/api/v2/app.go index 83d1a7a6a..1eb24ba48 100644 --- a/agent/app/api/v2/app.go +++ b/agent/app/api/v2/app.go @@ -10,7 +10,6 @@ import ( // @Tags App // @Summary List apps -// @Description 获取应用列表 // @Accept json // @Param request body request.AppSearch true "request" // @Success 200 @@ -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] @@ -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] @@ -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 @@ -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 版本" @@ -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 @@ -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 @@ -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 @@ -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] @@ -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 @@ -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] diff --git a/agent/app/api/v2/app_install.go b/agent/app/api/v2/app_install.go index c9a3fd1bd..a41a9bc12 100644 --- a/agent/app/api/v2/app_install.go +++ b/agent/app/api/v2/app_install.go @@ -10,7 +10,6 @@ import ( // @Tags App // @Summary Page app installed -// @Description 分页获取已安装应用列表 // @Accept json // @Param request body request.AppInstalledSearch true "request" // @Success 200 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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] @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/agent/app/api/v2/backup.go b/agent/app/api/v2/backup.go index e71a2b44a..b4dfea21c 100644 --- a/agent/app/api/v2/backup.go +++ b/agent/app/api/v2/backup.go @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/agent/app/api/v2/clam.go b/agent/app/api/v2/clam.go index c3d156cab..6d3f08df0 100644 --- a/agent/app/api/v2/clam.go +++ b/agent/app/api/v2/clam.go @@ -8,7 +8,6 @@ import ( // @Tags Clam // @Summary Create clam -// @Description 创建扫描规则 // @Accept json // @Param request body dto.ClamCreate true "request" // @Success 200 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/agent/app/api/v2/compose_template.go b/agent/app/api/v2/compose_template.go index 621e75bc5..6b4c25dc9 100644 --- a/agent/app/api/v2/compose_template.go +++ b/agent/app/api/v2/compose_template.go @@ -8,7 +8,6 @@ import ( // @Tags Container Compose-template // @Summary Create compose template -// @Description 创建容器编排模版 // @Accept json // @Param request body dto.ComposeTemplateCreate true "request" // @Success 200 @@ -30,7 +29,6 @@ func (b *BaseApi) CreateComposeTemplate(c *gin.Context) { // @Tags Container Compose-template // @Summary Page compose templates -// @Description 获取容器编排模版列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Produce json @@ -57,7 +55,6 @@ func (b *BaseApi) SearchComposeTemplate(c *gin.Context) { // @Tags Container Compose-template // @Summary List compose templates -// @Description 获取容器编排模版列表 // @Produce json // @Success 200 {array} dto.ComposeTemplateInfo // @Security ApiKeyAuth @@ -74,7 +71,6 @@ func (b *BaseApi) ListComposeTemplate(c *gin.Context) { // @Tags Container Compose-template // @Summary Delete compose template -// @Description 删除容器编排模版 // @Accept json // @Param request body dto.BatchDelete true "request" // @Success 200 @@ -96,7 +92,6 @@ func (b *BaseApi) DeleteComposeTemplate(c *gin.Context) { // @Tags Container Compose-template // @Summary Update compose template -// @Description 更新容器编排模版 // @Accept json // @Param request body dto.ComposeTemplateUpdate true "request" // @Success 200 diff --git a/agent/app/api/v2/container.go b/agent/app/api/v2/container.go index 50cd5a69a..810e86deb 100644 --- a/agent/app/api/v2/container.go +++ b/agent/app/api/v2/container.go @@ -11,7 +11,6 @@ import ( // @Tags Container // @Summary Page containers -// @Description 获取容器列表分页 // @Accept json // @Param request body dto.PageContainer true "request" // @Produce json @@ -37,7 +36,6 @@ func (b *BaseApi) SearchContainer(c *gin.Context) { // @Tags Container // @Summary List containers -// @Description 获取容器名称 // @Accept json // @Produce json // @Success 200 @@ -54,7 +52,6 @@ func (b *BaseApi) ListContainer(c *gin.Context) { // @Tags Container // @Summary Load containers status -// @Description 获取容器状态 // @Accept json // @Produce json // @Success 200 @@ -71,7 +68,6 @@ func (b *BaseApi) LoadContainerStatus(c *gin.Context) { // @Tags Container Compose // @Summary Page composes -// @Description 获取编排列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Success 200 {object} dto.PageResult @@ -96,7 +92,6 @@ func (b *BaseApi) SearchCompose(c *gin.Context) { // @Tags Container Compose // @Summary Test compose -// @Description 测试 compose 是否可用 // @Accept json // @Param request body dto.ComposeCreate true "request" // @Success 200 @@ -119,7 +114,6 @@ func (b *BaseApi) TestCompose(c *gin.Context) { // @Tags Container Compose // @Summary Create compose -// @Description 创建容器编排 // @Accept json // @Param request body dto.ComposeCreate true "request" // @Success 200 @@ -141,7 +135,6 @@ func (b *BaseApi) CreateCompose(c *gin.Context) { // @Tags Container Compose // @Summary Operate compose -// @Description 容器编排操作 // @Accept json // @Param request body dto.ComposeOperation true "request" // @Success 200 @@ -163,7 +156,6 @@ func (b *BaseApi) OperatorCompose(c *gin.Context) { // @Tags Container // @Summary Update container -// @Description 更新容器 // @Accept json // @Param request body dto.ContainerOperate true "request" // @Success 200 @@ -185,7 +177,6 @@ func (b *BaseApi) ContainerUpdate(c *gin.Context) { // @Tags Container // @Summary Load container info -// @Description 获取容器表单信息 // @Accept json // @Param request body dto.OperationWithName true "request" // @Success 200 {object} dto.ContainerOperate @@ -206,7 +197,6 @@ func (b *BaseApi) ContainerInfo(c *gin.Context) { } // @Summary Load container limits -// @Description 获取容器限制 // @Success 200 {object} dto.ResourceLimit // @Security ApiKeyAuth // @Router /containers/limit [get] @@ -220,7 +210,6 @@ func (b *BaseApi) LoadResourceLimit(c *gin.Context) { } // @Summary Load container stats -// @Description 获取容器列表资源占用 // @Success 200 {array} dto.ContainerListStats // @Security ApiKeyAuth // @Router /containers/list/stats [get] @@ -235,7 +224,6 @@ func (b *BaseApi) ContainerListStats(c *gin.Context) { // @Tags Container // @Summary Create container -// @Description 创建容器 // @Accept json // @Param request body dto.ContainerOperate true "request" // @Success 200 @@ -257,7 +245,6 @@ func (b *BaseApi) ContainerCreate(c *gin.Context) { // @Tags Container // @Summary Create container by command -// @Description 命令创建容器 // @Accept json // @Param request body dto.ContainerCreateByCommand true "request" // @Success 200 @@ -278,7 +265,6 @@ func (b *BaseApi) ContainerCreateByCommand(c *gin.Context) { // @Tags Container // @Summary Upgrade container -// @Description 更新容器镜像 // @Accept json // @Param request body dto.ContainerUpgrade true "request" // @Success 200 @@ -300,7 +286,6 @@ func (b *BaseApi) ContainerUpgrade(c *gin.Context) { // @Tags Container // @Summary Clean container -// @Description 容器清理 // @Accept json // @Param request body dto.ContainerPrune true "request" // @Success 200 {object} dto.ContainerPruneReport @@ -323,7 +308,6 @@ func (b *BaseApi) ContainerPrune(c *gin.Context) { // @Tags Container // @Summary Clean container log -// @Description 清理容器日志 // @Accept json // @Param request body dto.OperationWithName true "request" // @Success 200 @@ -345,7 +329,6 @@ func (b *BaseApi) CleanContainerLog(c *gin.Context) { // @Tags Container // @Summary Load container log -// @Description 获取容器操作日志 // @Accept json // @Param request body dto.OperationWithNameAndType true "request" // @Success 200 @@ -363,7 +346,6 @@ func (b *BaseApi) LoadContainerLog(c *gin.Context) { // @Tags Container // @Summary Rename Container -// @Description 容器重命名 // @Accept json // @Param request body dto.ContainerRename true "request" // @Success 200 @@ -385,7 +367,6 @@ func (b *BaseApi) ContainerRename(c *gin.Context) { // @Tags Container // @Summary Commit Container -// @Description 容器提交生成新镜像 // @Accept json // @Param request body dto.ContainerCommit true "request" // @Success 200 @@ -405,7 +386,6 @@ func (b *BaseApi) ContainerCommit(c *gin.Context) { // @Tags Container // @Summary Operate Container -// @Description 容器操作 // @Accept json // @Param request body dto.ContainerOperation true "request" // @Success 200 @@ -427,7 +407,6 @@ func (b *BaseApi) ContainerOperation(c *gin.Context) { // @Tags Container // @Summary Container stats -// @Description 容器监控信息 // @Param id path integer true "容器id" // @Success 200 {object} dto.ContainerStats // @Security ApiKeyAuth @@ -449,7 +428,6 @@ func (b *BaseApi) ContainerStats(c *gin.Context) { // @Tags Container // @Summary Container inspect -// @Description 容器详情 // @Accept json // @Param request body dto.InspectReq true "request" // @Success 200 {string} result @@ -469,7 +447,6 @@ func (b *BaseApi) Inspect(c *gin.Context) { helper.SuccessWithData(c, result) } -// @Description 下载容器日志 // @Router /containers/download/log [post] func (b *BaseApi) DownloadContainerLogs(c *gin.Context) { var req dto.ContainerLog @@ -484,7 +461,6 @@ func (b *BaseApi) DownloadContainerLogs(c *gin.Context) { // @Tags Container Network // @Summary Page networks -// @Description 获取容器网络列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Produce json @@ -510,7 +486,6 @@ func (b *BaseApi) SearchNetwork(c *gin.Context) { // @Tags Container Network // @Summary List networks -// @Description 获取容器网络列表 // @Accept json // @Produce json // @Success 200 {array} dto.Options @@ -527,7 +502,6 @@ func (b *BaseApi) ListNetwork(c *gin.Context) { // @Tags Container Network // @Summary Delete network -// @Description 删除容器网络 // @Accept json // @Param request body dto.BatchDelete true "request" // @Success 200 @@ -549,7 +523,6 @@ func (b *BaseApi) DeleteNetwork(c *gin.Context) { // @Tags Container Network // @Summary Create network -// @Description 创建容器网络 // @Accept json // @Param request body dto.NetworkCreate true "request" // @Success 200 @@ -571,7 +544,6 @@ func (b *BaseApi) CreateNetwork(c *gin.Context) { // @Tags Container Volume // @Summary Page volumes -// @Description 获取容器存储卷分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Produce json @@ -597,7 +569,6 @@ func (b *BaseApi) SearchVolume(c *gin.Context) { // @Tags Container Volume // @Summary List volumes -// @Description 获取容器存储卷列表 // @Accept json // @Produce json // @Success 200 {array} dto.Options @@ -614,7 +585,6 @@ func (b *BaseApi) ListVolume(c *gin.Context) { // @Tags Container Volume // @Summary Delete volume -// @Description 删除容器存储卷 // @Accept json // @Param request body dto.BatchDelete true "request" // @Success 200 @@ -636,7 +606,6 @@ func (b *BaseApi) DeleteVolume(c *gin.Context) { // @Tags Container Volume // @Summary Create volume -// @Description 创建容器存储卷 // @Accept json // @Param request body dto.VolumeCreate true "request" // @Success 200 @@ -658,7 +627,6 @@ func (b *BaseApi) CreateVolume(c *gin.Context) { // @Tags Container Compose // @Summary Update compose -// @Description 更新容器编排 // @Accept json // @Param request body dto.ComposeUpdate true "request" // @Success 200 @@ -680,7 +648,6 @@ func (b *BaseApi) ComposeUpdate(c *gin.Context) { // @Tags Container // @Summary Container logs -// @Description 容器日志 // @Param container query string false "容器名称" // @Param since query string false "时间筛选" // @Param follow query string false "是否追踪" diff --git a/agent/app/api/v2/cronjob.go b/agent/app/api/v2/cronjob.go index 1578da5d3..e2ccc7bbe 100644 --- a/agent/app/api/v2/cronjob.go +++ b/agent/app/api/v2/cronjob.go @@ -11,7 +11,6 @@ import ( // @Tags Cronjob // @Summary Create cronjob -// @Description 创建计划任务 // @Accept json // @Param request body dto.CronjobCreate true "request" // @Success 200 @@ -33,7 +32,6 @@ func (b *BaseApi) CreateCronjob(c *gin.Context) { // @Tags Cronjob // @Summary Load cronjob spec time -// @Description 预览最近五次执行时间 // @Accept json // @Param request body dto.CronjobSpec true "request" // @Success 200 @@ -55,7 +53,6 @@ func (b *BaseApi) LoadNextHandle(c *gin.Context) { // @Tags Cronjob // @Summary Page cronjobs -// @Description 获取计划任务分页 // @Accept json // @Param request body dto.PageCronjob true "request" // @Success 200 {object} dto.PageResult @@ -81,7 +78,6 @@ func (b *BaseApi) SearchCronjob(c *gin.Context) { // @Tags Cronjob // @Summary Page job records -// @Description 获取计划任务记录 // @Accept json // @Param request body dto.SearchRecord true "request" // @Success 200 {object} dto.PageResult @@ -111,7 +107,6 @@ func (b *BaseApi) SearchJobRecords(c *gin.Context) { // @Tags Cronjob // @Summary Load Cronjob record log -// @Description 获取计划任务记录日志 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 @@ -128,7 +123,6 @@ func (b *BaseApi) LoadRecordLog(c *gin.Context) { // @Tags Cronjob // @Summary Clean job records -// @Description 清空计划任务记录 // @Accept json // @Param request body dto.CronjobClean true "request" // @Success 200 @@ -151,7 +145,6 @@ func (b *BaseApi) CleanRecord(c *gin.Context) { // @Tags Cronjob // @Summary Delete cronjob -// @Description 删除计划任务 // @Accept json // @Param request body dto.CronjobBatchDelete true "request" // @Success 200 @@ -173,7 +166,6 @@ func (b *BaseApi) DeleteCronjob(c *gin.Context) { // @Tags Cronjob // @Summary Update cronjob -// @Description 更新计划任务 // @Accept json // @Param request body dto.CronjobUpdate true "request" // @Success 200 @@ -195,7 +187,6 @@ func (b *BaseApi) UpdateCronjob(c *gin.Context) { // @Tags Cronjob // @Summary Update cronjob status -// @Description 更新计划任务状态 // @Accept json // @Param request body dto.CronjobUpdateStatus true "request" // @Success 200 @@ -217,7 +208,6 @@ func (b *BaseApi) UpdateCronjobStatus(c *gin.Context) { // @Tags Cronjob // @Summary Download cronjob records -// @Description 下载计划任务记录 // @Accept json // @Param request body dto.CronjobDownload true "request" // @Success 200 @@ -241,7 +231,6 @@ func (b *BaseApi) TargetDownload(c *gin.Context) { // @Tags Cronjob // @Summary Handle cronjob once -// @Description 手动执行计划任务 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 diff --git a/agent/app/api/v2/dashboard.go b/agent/app/api/v2/dashboard.go index ec72ee77a..5ef823fa8 100644 --- a/agent/app/api/v2/dashboard.go +++ b/agent/app/api/v2/dashboard.go @@ -11,7 +11,6 @@ import ( // @Tags Dashboard // @Summary Load os info -// @Description 获取服务器基础数据 // @Accept json // @Success 200 {object} dto.OsInfo // @Security ApiKeyAuth @@ -27,7 +26,6 @@ func (b *BaseApi) LoadDashboardOsInfo(c *gin.Context) { // @Tags Dashboard // @Summary Load app launcher -// @Description 获取应用展示列表 // @Accept json // @Success 200 {Array} dto.dto.AppLauncher // @Security ApiKeyAuth @@ -43,7 +41,6 @@ func (b *BaseApi) LoadAppLauncher(c *gin.Context) { // @Tags Dashboard // @Summary Load app launcher options -// @Description 获取应用展示选项 // @Accept json // @Param request body dto.SearchByFilter true "request" // @Success 200 {Array} dto.LauncherOption @@ -64,7 +61,6 @@ func (b *BaseApi) LoadAppLauncherOption(c *gin.Context) { // @Tags Dashboard // @Summary Load dashboard base info -// @Description 获取首页基础数据 // @Accept json // @Param ioOption path string true "request" // @Param netOption path string true "request" @@ -92,7 +88,6 @@ func (b *BaseApi) LoadDashboardBaseInfo(c *gin.Context) { // @Tags Dashboard // @Summary Load dashboard current info for node -// @Description 获取节点实时数据 // @Success 200 {object} dto.NodeCurrent // @Security ApiKeyAuth // @Router /dashboard/current/node [get] @@ -103,7 +98,6 @@ func (b *BaseApi) LoadCurrentInfoForNode(c *gin.Context) { // @Tags Dashboard // @Summary Load dashboard current info -// @Description 获取首页实时数据 // @Accept json // @Param ioOption path string true "request" // @Param netOption path string true "request" @@ -128,7 +122,6 @@ func (b *BaseApi) LoadDashboardCurrentInfo(c *gin.Context) { // @Tags Dashboard // @Summary System restart -// @Description 重启服务器/面板 // @Accept json // @Param operation path string true "request" // @Success 200 diff --git a/agent/app/api/v2/database.go b/agent/app/api/v2/database.go index 7cc5de984..c2eb67b16 100644 --- a/agent/app/api/v2/database.go +++ b/agent/app/api/v2/database.go @@ -10,7 +10,6 @@ import ( // @Tags Database // @Summary Create database -// @Description 创建远程数据库 // @Accept json // @Param request body dto.DatabaseCreate true "request" // @Success 200 @@ -40,7 +39,6 @@ func (b *BaseApi) CreateDatabase(c *gin.Context) { // @Tags Database // @Summary Check database -// @Description 检测远程数据库连接性 // @Accept json // @Param request body dto.DatabaseCreate true "request" // @Success 200 @@ -66,7 +64,6 @@ func (b *BaseApi) CheckDatabase(c *gin.Context) { // @Tags Database // @Summary Page databases -// @Description 获取远程数据库列表分页 // @Accept json // @Param request body dto.DatabaseSearch true "request" // @Success 200 {object} dto.PageResult @@ -92,7 +89,6 @@ func (b *BaseApi) SearchDatabase(c *gin.Context) { // @Tags Database // @Summary List databases -// @Description 获取远程数据库列表 // @Success 200 {array} dto.DatabaseOption // @Security ApiKeyAuth // @Router /databases/db/list/:type [get] @@ -113,7 +109,6 @@ func (b *BaseApi) ListDatabase(c *gin.Context) { // @Tags Database // @Summary List databases -// @Description 获取数据库列表 // @Success 200 {array} dto.DatabaseItem // @Security ApiKeyAuth // @Router /databases/db/item/:type [get] @@ -134,7 +129,6 @@ func (b *BaseApi) LoadDatabaseItems(c *gin.Context) { // @Tags Database // @Summary Get databases -// @Description 获取远程数据库 // @Success 200 {object} dto.DatabaseInfo // @Security ApiKeyAuth // @Router /databases/db/:name [get] @@ -155,7 +149,6 @@ func (b *BaseApi) GetDatabase(c *gin.Context) { // @Tags Database // @Summary Check before delete remote database -// @Description Mysql 远程数据库删除前检查 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 {array} string @@ -177,7 +170,6 @@ func (b *BaseApi) DeleteCheckDatabase(c *gin.Context) { // @Tags Database // @Summary Delete database -// @Description 删除远程数据库 // @Accept json // @Param request body dto.DatabaseDelete true "request" // @Success 200 @@ -199,7 +191,6 @@ func (b *BaseApi) DeleteDatabase(c *gin.Context) { // @Tags Database // @Summary Update database -// @Description 更新远程数据库 // @Accept json // @Param request body dto.DatabaseUpdate true "request" // @Success 200 diff --git a/agent/app/api/v2/database_common.go b/agent/app/api/v2/database_common.go index ad65b4caa..45ac9b898 100644 --- a/agent/app/api/v2/database_common.go +++ b/agent/app/api/v2/database_common.go @@ -8,7 +8,6 @@ import ( // @Tags Database Common // @Summary Load base info -// @Description 获取数据库基础信息 // @Accept json // @Param request body dto.OperationWithNameAndType true "request" // @Success 200 {object} dto.DBBaseInfo @@ -31,7 +30,6 @@ func (b *BaseApi) LoadDBBaseInfo(c *gin.Context) { // @Tags Database Common // @Summary Load Database conf -// @Description 获取数据库配置文件 // @Accept json // @Param request body dto.OperationWithNameAndType true "request" // @Success 200 @@ -52,7 +50,6 @@ func (b *BaseApi) LoadDBFile(c *gin.Context) { // @Tags Database Common // @Summary Update conf by upload file -// @Description 上传替换配置文件 // @Accept json // @Param request body dto.DBConfUpdateByFile true "request" // @Success 200 diff --git a/agent/app/api/v2/database_mysql.go b/agent/app/api/v2/database_mysql.go index 5a9534684..a70fc0bbb 100644 --- a/agent/app/api/v2/database_mysql.go +++ b/agent/app/api/v2/database_mysql.go @@ -11,7 +11,6 @@ import ( // @Tags Database Mysql // @Summary Create mysql database -// @Description 创建 mysql 数据库 // @Accept json // @Param request body dto.MysqlDBCreate true "request" // @Success 200 @@ -42,7 +41,6 @@ func (b *BaseApi) CreateMysql(c *gin.Context) { // @Tags Database Mysql // @Summary Bind user of mysql database -// @Description 绑定 mysql 数据库用户 // @Accept json // @Param request body dto.BindUser true "request" // @Success 200 @@ -73,7 +71,6 @@ func (b *BaseApi) BindUser(c *gin.Context) { // @Tags Database Mysql // @Summary Update mysql database description -// @Description 更新 mysql 数据库库描述信息 // @Accept json // @Param request body dto.UpdateDescription true "request" // @Success 200 @@ -95,7 +92,6 @@ func (b *BaseApi) UpdateMysqlDescription(c *gin.Context) { // @Tags Database Mysql // @Summary Change mysql password -// @Description 修改 mysql 密码 // @Accept json // @Param request body dto.ChangeDBInfo true "request" // @Success 200 @@ -126,7 +122,6 @@ func (b *BaseApi) ChangeMysqlPassword(c *gin.Context) { // @Tags Database Mysql // @Summary Change mysql access -// @Description 修改 mysql 访问权限 // @Accept json // @Param request body dto.ChangeDBInfo true "request" // @Success 200 @@ -148,7 +143,6 @@ func (b *BaseApi) ChangeMysqlAccess(c *gin.Context) { // @Tags Database Mysql // @Summary Update mysql variables -// @Description mysql 性能调优 // @Accept json // @Param request body dto.MysqlVariablesUpdate true "request" // @Success 200 @@ -170,7 +164,6 @@ func (b *BaseApi) UpdateMysqlVariables(c *gin.Context) { // @Tags Database Mysql // @Summary Page mysql databases -// @Description 获取 mysql 数据库列表分页 // @Accept json // @Param request body dto.MysqlDBSearch true "request" // @Success 200 {object} dto.PageResult @@ -196,7 +189,6 @@ func (b *BaseApi) SearchMysql(c *gin.Context) { // @Tags Database Mysql // @Summary List mysql database names -// @Description 获取 mysql 数据库列表 // @Accept json // @Param request body dto.PageInfo true "request" // @Success 200 {array} dto.MysqlOption @@ -214,7 +206,6 @@ func (b *BaseApi) ListDBName(c *gin.Context) { // @Tags Database Mysql // @Summary Load mysql database from remote -// @Description 从服务器获取 // @Accept json // @Param request body dto.MysqlLoadDB true "request" // @Security ApiKeyAuth @@ -235,7 +226,6 @@ func (b *BaseApi) LoadDBFromRemote(c *gin.Context) { // @Tags Database Mysql // @Summary Check before delete mysql database -// @Description Mysql 数据库删除前检查 // @Accept json // @Param request body dto.MysqlDBDeleteCheck true "request" // @Success 200 {array} string @@ -257,7 +247,6 @@ func (b *BaseApi) DeleteCheckMysql(c *gin.Context) { // @Tags Database Mysql // @Summary Delete mysql database -// @Description 删除 mysql 数据库 // @Accept json // @Param request body dto.MysqlDBDelete true "request" // @Success 200 @@ -282,7 +271,6 @@ func (b *BaseApi) DeleteMysql(c *gin.Context) { // @Tags Database Mysql // @Summary Load mysql remote access -// @Description 获取 mysql 远程访问权限 // @Accept json // @Param request body dto.OperationWithNameAndType true "request" // @Success 200 {boolean} isRemote @@ -304,7 +292,6 @@ func (b *BaseApi) LoadRemoteAccess(c *gin.Context) { // @Tags Database Mysql // @Summary Load mysql status info -// @Description 获取 mysql 状态信息 // @Accept json // @Param request body dto.OperationWithNameAndType true "request" // @Success 200 {object} dto.MysqlStatus @@ -327,7 +314,6 @@ func (b *BaseApi) LoadStatus(c *gin.Context) { // @Tags Database Mysql // @Summary Load mysql variables info -// @Description 获取 mysql 性能参数信息 // @Accept json // @Param request body dto.OperationWithNameAndType true "request" // @Success 200 {object} dto.MysqlVariables diff --git a/agent/app/api/v2/database_postgresql.go b/agent/app/api/v2/database_postgresql.go index ffd9768bf..a9e061c5f 100644 --- a/agent/app/api/v2/database_postgresql.go +++ b/agent/app/api/v2/database_postgresql.go @@ -11,7 +11,6 @@ import ( // @Tags Database Postgresql // @Summary Create postgresql database -// @Description 创建 postgresql 数据库 // @Accept json // @Param request body dto.PostgresqlDBCreate true "request" // @Success 200 @@ -42,7 +41,6 @@ func (b *BaseApi) CreatePostgresql(c *gin.Context) { // @Tags Database Postgresql // @Summary Bind postgresql user -// @Description 绑定 postgresql 数据库用户 // @Accept json // @Param request body dto.PostgresqlBindUser true "request" // @Success 200 @@ -64,7 +62,6 @@ func (b *BaseApi) BindPostgresqlUser(c *gin.Context) { // @Tags Database Postgresql // @Summary Update postgresql database description -// @Description 更新 postgresql 数据库库描述信息 // @Accept json // @Param request body dto.UpdateDescription true "request" // @Success 200 @@ -86,7 +83,6 @@ func (b *BaseApi) UpdatePostgresqlDescription(c *gin.Context) { // @Tags Database Postgresql // @Summary Change postgresql privileges -// @Description 修改 postgresql 用户权限 // @Accept json // @Param request body dto.ChangeDBInfo true "request" // @Success 200 @@ -108,7 +104,6 @@ func (b *BaseApi) ChangePostgresqlPrivileges(c *gin.Context) { // @Tags Database Postgresql // @Summary Change postgresql password -// @Description 修改 postgresql 密码 // @Accept json // @Param request body dto.ChangeDBInfo true "request" // @Success 200 @@ -139,7 +134,6 @@ func (b *BaseApi) ChangePostgresqlPassword(c *gin.Context) { // @Tags Database Postgresql // @Summary Page postgresql databases -// @Description 获取 postgresql 数据库列表分页 // @Accept json // @Param request body dto.PostgresqlDBSearch true "request" // @Success 200 {object} dto.PageResult @@ -165,7 +159,6 @@ func (b *BaseApi) SearchPostgresql(c *gin.Context) { // @Tags Database Postgresql // @Summary Load postgresql database from remote -// @Description 从服务器获取 // @Accept json // @Param request body dto.PostgresqlLoadDB true "request" // @Security ApiKeyAuth @@ -187,7 +180,6 @@ func (b *BaseApi) LoadPostgresqlDBFromRemote(c *gin.Context) { // @Tags Database Postgresql // @Summary Check before delete postgresql database -// @Description Postgresql 数据库删除前检查 // @Accept json // @Param request body dto.PostgresqlDBDeleteCheck true "request" // @Success 200 {array} string @@ -209,7 +201,6 @@ func (b *BaseApi) DeleteCheckPostgresql(c *gin.Context) { // @Tags Database Postgresql // @Summary Delete postgresql database -// @Description 删除 postgresql 数据库 // @Accept json // @Param request body dto.PostgresqlDBDelete true "request" // @Success 200 diff --git a/agent/app/api/v2/database_redis.go b/agent/app/api/v2/database_redis.go index 26926da2c..ee599e423 100644 --- a/agent/app/api/v2/database_redis.go +++ b/agent/app/api/v2/database_redis.go @@ -10,7 +10,6 @@ import ( // @Tags Database Redis // @Summary Load redis status info -// @Description 获取 redis 状态信息 // @Accept json // @Param request body dto.OperationWithName true "request" // @Success 200 {object} dto.RedisStatus @@ -32,7 +31,6 @@ func (b *BaseApi) LoadRedisStatus(c *gin.Context) { // @Tags Database Redis // @Summary Load redis conf -// @Description 获取 redis 配置信息 // @Accept json // @Param request body dto.OperationWithName true "request" // @Success 200 {object} dto.RedisConf @@ -54,7 +52,6 @@ func (b *BaseApi) LoadRedisConf(c *gin.Context) { // @Tags Database Redis // @Summary Load redis persistence conf -// @Description 获取 redis 持久化配置 // @Accept json // @Param request body dto.OperationWithName true "request" // @Success 200 {object} dto.RedisPersistence @@ -80,7 +77,6 @@ func (b *BaseApi) CheckHasCli(c *gin.Context) { // @Tags Database Redis // @Summary Install redis-cli -// @Description 安装 redis cli // @Success 200 // @Security ApiKeyAuth // @Router /databases/redis/install/cli [post] @@ -95,7 +91,6 @@ func (b *BaseApi) InstallCli(c *gin.Context) { // @Tags Database Redis // @Summary Update redis conf -// @Description 更新 redis 配置信息 // @Accept json // @Param request body dto.RedisConfUpdate true "request" // @Success 200 @@ -117,7 +112,6 @@ func (b *BaseApi) UpdateRedisConf(c *gin.Context) { // @Tags Database Redis // @Summary Change redis password -// @Description 更新 redis 密码 // @Accept json // @Param request body dto.ChangeRedisPass true "request" // @Success 200 @@ -148,7 +142,6 @@ func (b *BaseApi) ChangeRedisPassword(c *gin.Context) { // @Tags Database Redis // @Summary Update redis persistence conf -// @Description 更新 redis 持久化配置 // @Accept json // @Param request body dto.RedisConfPersistenceUpdate true "request" // @Success 200 diff --git a/agent/app/api/v2/device.go b/agent/app/api/v2/device.go index f58dbe998..473c39d3f 100644 --- a/agent/app/api/v2/device.go +++ b/agent/app/api/v2/device.go @@ -10,7 +10,6 @@ import ( // @Tags Device // @Summary Load device base info -// @Description 获取设备基础信息 // @Success 200 {object} dto.DeviceBaseInfo // @Security ApiKeyAuth // @Router /toolbox/device/base [post] @@ -26,7 +25,6 @@ func (b *BaseApi) LoadDeviceBaseInfo(c *gin.Context) { // @Tags Device // @Summary list time zone options -// @Description 获取系统可用时区选项 // @Accept json // @Success 200 {Array} string // @Security ApiKeyAuth @@ -43,7 +41,6 @@ func (b *BaseApi) LoadTimeOption(c *gin.Context) { // @Tags Device // @Summary load conf -// @Description 获取系统配置文件 // @Accept json // @Param request body dto.OperationWithName true "request" // @Success 200 @@ -66,7 +63,6 @@ func (b *BaseApi) LoadDeviceConf(c *gin.Context) { // @Tags Device // @Summary Update device conf by file -// @Description 通过文件修改配置 // @Accept json // @Param request body dto.UpdateByNameAndFile true "request" // @Success 200 @@ -87,7 +83,6 @@ func (b *BaseApi) UpdateDeviceByFile(c *gin.Context) { // @Tags Device // @Summary Load user list -// @Description 获取服务器用户列表 // @Success 200 // @Security ApiKeyAuth // @Router /toolbox/device/users [get] @@ -102,7 +97,6 @@ func (b *BaseApi) LoadUsers(c *gin.Context) { // @Tags Device // @Summary Update device -// @Description 修改系统参数 // @Accept json // @Param request body dto.SettingUpdate true "request" // @Success 200 @@ -125,7 +119,6 @@ func (b *BaseApi) UpdateDeviceConf(c *gin.Context) { // @Tags Device // @Summary Update device hosts -// @Description 修改系统 hosts // @Success 200 // @Security ApiKeyAuth // @Router /toolbox/device/update/host [post] @@ -146,7 +139,6 @@ func (b *BaseApi) UpdateDeviceHost(c *gin.Context) { // @Tags Device // @Summary Update device passwd -// @Description 修改系统密码 // @Accept json // @Param request body dto.ChangePasswd true "request" // @Success 200 @@ -175,7 +167,6 @@ func (b *BaseApi) UpdateDevicePasswd(c *gin.Context) { // @Tags Device // @Summary Update device swap -// @Description 修改系统 Swap // @Accept json // @Param request body dto.SwapHelper true "request" // @Success 200 @@ -197,7 +188,6 @@ func (b *BaseApi) UpdateDeviceSwap(c *gin.Context) { // @Tags Device // @Summary Check device DNS conf -// @Description 检查系统 DNS 配置可用性 // @Accept json // @Param request body dto.SettingUpdate true "request" // @Success 200 @@ -220,7 +210,6 @@ func (b *BaseApi) CheckDNS(c *gin.Context) { // @Tags Device // @Summary Scan system -// @Description 扫描系统垃圾文件 // @Success 200 // @Security ApiKeyAuth // @Router /toolbox/scan [post] @@ -231,7 +220,6 @@ func (b *BaseApi) ScanSystem(c *gin.Context) { // @Tags Device // @Summary Clean system -// @Description 清理系统垃圾文件 // @Accept json // @Param request body []dto.Clean true "request" // @Success 200 diff --git a/agent/app/api/v2/docker.go b/agent/app/api/v2/docker.go index be7b00667..09fa94267 100644 --- a/agent/app/api/v2/docker.go +++ b/agent/app/api/v2/docker.go @@ -11,7 +11,6 @@ import ( // @Tags Container Docker // @Summary Load docker status -// @Description 获取 docker 服务状态 // @Produce json // @Success 200 {string} status // @Security ApiKeyAuth @@ -23,7 +22,6 @@ func (b *BaseApi) LoadDockerStatus(c *gin.Context) { // @Tags Container Docker // @Summary Load docker daemon.json -// @Description 获取 docker 配置信息(表单) // @Produce json // @Success 200 {object} string // @Security ApiKeyAuth @@ -43,7 +41,6 @@ func (b *BaseApi) LoadDaemonJsonFile(c *gin.Context) { // @Tags Container Docker // @Summary Load docker daemon.json -// @Description 获取 docker 配置信息 // @Produce json // @Success 200 {object} dto.DaemonJsonConf // @Security ApiKeyAuth @@ -55,7 +52,6 @@ func (b *BaseApi) LoadDaemonJson(c *gin.Context) { // @Tags Container Docker // @Summary Update docker daemon.json -// @Description 修改 docker 配置信息 // @Accept json // @Param request body dto.SettingUpdate true "request" // @Success 200 @@ -78,7 +74,6 @@ func (b *BaseApi) UpdateDaemonJson(c *gin.Context) { // @Tags Container Docker // @Summary Update docker daemon.json log option -// @Description 修改 docker 日志配置 // @Accept json // @Param request body dto.LogOption true "request" // @Success 200 @@ -101,7 +96,6 @@ func (b *BaseApi) UpdateLogOption(c *gin.Context) { // @Tags Container Docker // @Summary Update docker daemon.json ipv6 option -// @Description 修改 docker ipv6 配置 // @Accept json // @Param request body dto.LogOption true "request" // @Success 200 @@ -124,7 +118,6 @@ func (b *BaseApi) UpdateIpv6Option(c *gin.Context) { // @Tags Container Docker // @Summary Update docker daemon.json by upload file -// @Description 上传替换 docker 配置文件 // @Accept json // @Param request body dto.DaemonJsonUpdateByFile true "request" // @Success 200 @@ -147,7 +140,6 @@ func (b *BaseApi) UpdateDaemonJsonByFile(c *gin.Context) { // @Tags Container Docker // @Summary Operate docker -// @Description Docker 操作 // @Accept json // @Param request body dto.DockerOperation true "request" // @Success 200 diff --git a/agent/app/api/v2/fail2ban.go b/agent/app/api/v2/fail2ban.go index a1dd8ce1a..c1eb05381 100644 --- a/agent/app/api/v2/fail2ban.go +++ b/agent/app/api/v2/fail2ban.go @@ -10,7 +10,6 @@ import ( // @Tags Fail2ban // @Summary Load fail2ban base info -// @Description 获取 Fail2ban 基础信息 // @Success 200 {object} dto.Fail2BanBaseInfo // @Security ApiKeyAuth // @Router /toolbox/fail2ban/base [get] @@ -26,7 +25,6 @@ func (b *BaseApi) LoadFail2BanBaseInfo(c *gin.Context) { // @Tags Fail2ban // @Summary Page fail2ban ip list -// @Description 获取 Fail2ban ip // @Accept json // @Param request body dto.Fail2BanSearch true "request" // @Success 200 {Array} string @@ -49,7 +47,6 @@ func (b *BaseApi) SearchFail2Ban(c *gin.Context) { // @Tags Fail2ban // @Summary Operate fail2ban -// @Description 修改 Fail2ban 状态 // @Accept json // @Param request body dto.Operate true "request" // @Security ApiKeyAuth @@ -71,7 +68,6 @@ func (b *BaseApi) OperateFail2Ban(c *gin.Context) { // @Tags Fail2ban // @Summary Operate sshd of fail2ban -// @Description 配置 sshd // @Accept json // @Param request body dto.Operate true "request" // @Security ApiKeyAuth @@ -92,7 +88,6 @@ func (b *BaseApi) OperateSSHD(c *gin.Context) { // @Tags Fail2ban // @Summary Update fail2ban conf -// @Description 修改 Fail2ban 配置 // @Accept json // @Param request body dto.Fail2BanUpdate true "request" // @Success 200 @@ -114,7 +109,6 @@ func (b *BaseApi) UpdateFail2BanConf(c *gin.Context) { // @Tags Fail2ban // @Summary Load fail2ban conf -// @Description 获取 fail2ban 配置文件 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -132,7 +126,6 @@ func (b *BaseApi) LoadFail2BanConf(c *gin.Context) { // @Tags Fail2ban // @Summary Update fail2ban conf by file -// @Description 通过文件修改 fail2ban 配置 // @Accept json // @Param request body dto.UpdateByFile true "request" // @Success 200 diff --git a/agent/app/api/v2/favorite.go b/agent/app/api/v2/favorite.go index 5872a1fb8..0161a5b4c 100644 --- a/agent/app/api/v2/favorite.go +++ b/agent/app/api/v2/favorite.go @@ -9,7 +9,6 @@ import ( // @Tags File // @Summary List favorites -// @Description 获取收藏列表 // @Accept json // @Param request body dto.PageInfo true "request" // @Success 200 @@ -33,7 +32,6 @@ func (b *BaseApi) SearchFavorite(c *gin.Context) { // @Tags File // @Summary Create favorite -// @Description 创建收藏 // @Accept json // @Param request body request.FavoriteCreate true "request" // @Success 200 @@ -55,7 +53,6 @@ func (b *BaseApi) CreateFavorite(c *gin.Context) { // @Tags File // @Summary Delete favorite -// @Description 删除收藏 // @Accept json // @Param request body request.FavoriteDelete true "request" // @Success 200 diff --git a/agent/app/api/v2/file.go b/agent/app/api/v2/file.go index c148ee0a9..3160b205f 100644 --- a/agent/app/api/v2/file.go +++ b/agent/app/api/v2/file.go @@ -28,7 +28,6 @@ import ( // @Tags File // @Summary List files -// @Description 获取文件列表 // @Accept json // @Param request body request.FileOption true "request" // @Success 200 {object} response.FileInfo @@ -49,7 +48,6 @@ func (b *BaseApi) ListFiles(c *gin.Context) { // @Tags File // @Summary Page file -// @Description 分页获取上传文件 // @Accept json // @Param request body request.SearchUploadWithPage true "request" // @Success 200 {array} response.FileInfo @@ -73,7 +71,6 @@ func (b *BaseApi) SearchUploadWithPage(c *gin.Context) { // @Tags File // @Summary Load files tree -// @Description 加载文件树 // @Accept json // @Param request body request.FileOption true "request" // @Success 200 {array} response.FileTree @@ -94,7 +91,6 @@ func (b *BaseApi) GetFileTree(c *gin.Context) { // @Tags File // @Summary Create file -// @Description 创建文件/文件夹 // @Accept json // @Param request body request.FileCreate true "request" // @Success 200 @@ -116,7 +112,6 @@ func (b *BaseApi) CreateFile(c *gin.Context) { // @Tags File // @Summary Delete file -// @Description 删除文件/文件夹 // @Accept json // @Param request body request.FileDelete true "request" // @Success 200 @@ -138,7 +133,6 @@ func (b *BaseApi) DeleteFile(c *gin.Context) { // @Tags File // @Summary Batch delete file -// @Description 批量删除文件/文件夹 // @Accept json // @Param request body request.FileBatchDelete true "request" // @Success 200 @@ -160,7 +154,6 @@ func (b *BaseApi) BatchDeleteFile(c *gin.Context) { // @Tags File // @Summary Change file mode -// @Description 修改文件权限 // @Accept json // @Param request body request.FileCreate true "request" // @Success 200 @@ -182,7 +175,6 @@ func (b *BaseApi) ChangeFileMode(c *gin.Context) { // @Tags File // @Summary Change file owner -// @Description 修改文件用户/组 // @Accept json // @Param request body request.FileRoleUpdate true "request" // @Success 200 @@ -203,7 +195,6 @@ func (b *BaseApi) ChangeFileOwner(c *gin.Context) { // @Tags File // @Summary Compress file -// @Description 压缩文件 // @Accept json // @Param request body request.FileCompress true "request" // @Success 200 @@ -225,7 +216,6 @@ func (b *BaseApi) CompressFile(c *gin.Context) { // @Tags File // @Summary Decompress file -// @Description 解压文件 // @Accept json // @Param request body request.FileDeCompress true "request" // @Success 200 @@ -247,7 +237,6 @@ func (b *BaseApi) DeCompressFile(c *gin.Context) { // @Tags File // @Summary Load file content -// @Description 获取文件内容 // @Accept json // @Param request body request.FileContentReq true "request" // @Success 200 {object} response.FileInfo @@ -269,7 +258,6 @@ func (b *BaseApi) GetContent(c *gin.Context) { // @Tags File // @Summary Update file content -// @Description 更新文件内容 // @Accept json // @Param request body request.FileEdit true "request" // @Success 200 @@ -290,7 +278,6 @@ func (b *BaseApi) SaveContent(c *gin.Context) { // @Tags File // @Summary Upload file -// @Description 上传文件 // @Param file formData file true "request" // @Success 200 // @Security ApiKeyAuth @@ -398,7 +385,6 @@ func (b *BaseApi) UploadFiles(c *gin.Context) { // @Tags File // @Summary Check file exist -// @Description 检测文件是否存在 // @Accept json // @Param request body request.FilePathCheck true "request" // @Success 200 @@ -418,7 +404,6 @@ func (b *BaseApi) CheckFile(c *gin.Context) { // @Tags File // @Summary Change file name -// @Description 修改文件名称 // @Accept json // @Param request body request.FileRename true "request" // @Success 200 @@ -439,7 +424,6 @@ func (b *BaseApi) ChangeFileName(c *gin.Context) { // @Tags File // @Summary Wget file -// @Description 下载远端文件 // @Accept json // @Param request body request.FileWget true "request" // @Success 200 @@ -463,7 +447,6 @@ func (b *BaseApi) WgetFile(c *gin.Context) { // @Tags File // @Summary Move file -// @Description 移动文件 // @Accept json // @Param request body request.FileMove true "request" // @Success 200 @@ -484,7 +467,6 @@ func (b *BaseApi) MoveFile(c *gin.Context) { // @Tags File // @Summary Download file -// @Description 下载文件 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -504,7 +486,6 @@ func (b *BaseApi) Download(c *gin.Context) { // @Tags File // @Summary Chunk Download file -// @Description 分片下载下载文件 // @Accept json // @Param request body request.FileDownload true "request" // @Success 200 @@ -581,7 +562,6 @@ func (b *BaseApi) DownloadChunkFiles(c *gin.Context) { // @Tags File // @Summary Load file size -// @Description 获取文件夹大小 // @Accept json // @Param request body request.DirSizeReq true "request" // @Success 200 @@ -650,7 +630,6 @@ func mergeChunks(fileName string, fileDir string, dstDir string, chunkCount int, // @Tags File // @Summary ChunkUpload file -// @Description 分片上传文件 // @Param file formData file true "request" // @Success 200 // @Security ApiKeyAuth @@ -767,7 +746,6 @@ func (b *BaseApi) Keys(c *gin.Context) { // @Tags File // @Summary Read file by Line -// @Description 按行读取日志文件 // @Param request body request.FileReadByLineReq true "request" // @Success 200 // @Security ApiKeyAuth @@ -787,7 +765,6 @@ func (b *BaseApi) ReadFileByLine(c *gin.Context) { // @Tags File // @Summary Batch change file mode and owner -// @Description 批量修改文件权限和用户/组 // @Accept json // @Param request body request.FileRoleReq true "request" // @Success 200 diff --git a/agent/app/api/v2/firewall.go b/agent/app/api/v2/firewall.go index 42cee0e6a..9e8781c0c 100644 --- a/agent/app/api/v2/firewall.go +++ b/agent/app/api/v2/firewall.go @@ -8,7 +8,6 @@ import ( // @Tags Firewall // @Summary Load firewall base info -// @Description 获取防火墙基础信息 // @Success 200 {object} dto.FirewallBaseInfo // @Security ApiKeyAuth // @Router /hosts/firewall/base [get] @@ -24,7 +23,6 @@ func (b *BaseApi) LoadFirewallBaseInfo(c *gin.Context) { // @Tags Firewall // @Summary Page firewall rules -// @Description 获取防火墙规则列表分页 // @Accept json // @Param request body dto.RuleSearch true "request" // @Success 200 {object} dto.PageResult @@ -50,7 +48,6 @@ func (b *BaseApi) SearchFirewallRule(c *gin.Context) { // @Tags Firewall // @Summary Page firewall status -// @Description 修改防火墙状态 // @Accept json // @Param request body dto.FirewallOperation true "request" // @Success 200 {object} dto.PageResult @@ -73,7 +70,6 @@ func (b *BaseApi) OperateFirewall(c *gin.Context) { // @Tags Firewall // @Summary Create group -// @Description 创建防火墙端口规则 // @Accept json // @Param request body dto.PortRuleOperate true "request" // @Success 200 @@ -96,7 +92,6 @@ func (b *BaseApi) OperatePortRule(c *gin.Context) { // OperateForwardRule // @Tags Firewall // @Summary Create group -// @Description 更新防火墙端口转发规则 // @Accept json // @Param request body dto.ForwardRuleOperate true "request" // @Success 200 @@ -118,7 +113,6 @@ func (b *BaseApi) OperateForwardRule(c *gin.Context) { // @Tags Firewall // @Summary Create group -// @Description 创建防火墙 IP 规则 // @Accept json // @Param request body dto.AddrRuleOperate true "request" // @Success 200 @@ -140,7 +134,6 @@ func (b *BaseApi) OperateIPRule(c *gin.Context) { // @Tags Firewall // @Summary Create group -// @Description 批量删除防火墙规则 // @Accept json // @Param request body dto.BatchRuleOperate true "request" // @Success 200 @@ -161,7 +154,6 @@ func (b *BaseApi) BatchOperateRule(c *gin.Context) { // @Tags Firewall // @Summary Update rule description -// @Description 更新防火墙描述 // @Accept json // @Param request body dto.UpdateFirewallDescription true "request" // @Success 200 @@ -182,7 +174,6 @@ func (b *BaseApi) UpdateFirewallDescription(c *gin.Context) { // @Tags Firewall // @Summary Create group -// @Description 更新端口防火墙规则 // @Accept json // @Param request body dto.PortRuleUpdate true "request" // @Success 200 @@ -203,7 +194,6 @@ func (b *BaseApi) UpdatePortRule(c *gin.Context) { // @Tags Firewall // @Summary Create group -// @Description 更新 ip 防火墙规则 // @Accept json // @Param request body dto.AddrRuleUpdate true "request" // @Success 200 diff --git a/agent/app/api/v2/ftp.go b/agent/app/api/v2/ftp.go index b82b415be..28db4e5a4 100644 --- a/agent/app/api/v2/ftp.go +++ b/agent/app/api/v2/ftp.go @@ -11,7 +11,6 @@ import ( // @Tags FTP // @Summary Load FTP base info -// @Description 获取 FTP 基础信息 // @Success 200 {object} dto.FtpBaseInfo // @Security ApiKeyAuth // @Router /toolbox/ftp/base [get] @@ -27,7 +26,6 @@ func (b *BaseApi) LoadFtpBaseInfo(c *gin.Context) { // @Tags FTP // @Summary Load FTP operation log -// @Description 获取 FTP 操作日志 // @Accept json // @Param request body dto.FtpLogSearch true "request" // @Success 200 {object} dto.PageResult @@ -53,7 +51,6 @@ func (b *BaseApi) LoadFtpLogInfo(c *gin.Context) { // @Tags FTP // @Summary Operate FTP -// @Description 修改 FTP 状态 // @Accept json // @Param request body dto.Operate true "request" // @Security ApiKeyAuth @@ -75,7 +72,6 @@ func (b *BaseApi) OperateFtp(c *gin.Context) { // @Tags FTP // @Summary Page FTP user -// @Description 获取 FTP 账户列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Success 200 {object} dto.PageResult @@ -101,7 +97,6 @@ func (b *BaseApi) SearchFtp(c *gin.Context) { // @Tags FTP // @Summary Create FTP user -// @Description 创建 FTP 账户 // @Accept json // @Param request body dto.FtpCreate true "request" // @Success 200 @@ -131,7 +126,6 @@ func (b *BaseApi) CreateFtp(c *gin.Context) { // @Tags FTP // @Summary Delete FTP user -// @Description 删除 FTP 账户 // @Accept json // @Param request body dto.BatchDeleteReq true "request" // @Success 200 @@ -153,7 +147,6 @@ func (b *BaseApi) DeleteFtp(c *gin.Context) { // @Tags FTP // @Summary Sync FTP user -// @Description 同步 FTP 账户 // @Accept json // @Param request body dto.BatchDeleteReq true "request" // @Success 200 @@ -170,7 +163,6 @@ func (b *BaseApi) SyncFtp(c *gin.Context) { // @Tags FTP // @Summary Update FTP user -// @Description 修改 FTP 账户 // @Accept json // @Param request body dto.FtpUpdate true "request" // @Success 200 diff --git a/agent/app/api/v2/host_tool.go b/agent/app/api/v2/host_tool.go index 9052b1b53..1bb17882f 100644 --- a/agent/app/api/v2/host_tool.go +++ b/agent/app/api/v2/host_tool.go @@ -8,7 +8,6 @@ import ( // @Tags Host tool // @Summary Get tool -// @Description 获取主机工具状态 // @Accept json // @Param request body request.HostToolReq true "request" // @Success 200 @@ -30,7 +29,6 @@ func (b *BaseApi) GetToolStatus(c *gin.Context) { // @Tags Host tool // @Summary Create Host tool Config -// @Description 创建主机工具配置 // @Accept json // @Param request body request.HostToolCreate true "request" // @Success 200 @@ -52,7 +50,6 @@ func (b *BaseApi) InitToolConfig(c *gin.Context) { // @Tags Host tool // @Summary Operate tool -// @Description 操作主机工具 // @Accept json // @Param request body request.HostToolReq true "request" // @Success 200 @@ -74,7 +71,6 @@ func (b *BaseApi) OperateTool(c *gin.Context) { // @Tags Host tool // @Summary Get tool config -// @Description 操作主机工具配置文件 // @Accept json // @Param request body request.HostToolConfig true "request" // @Success 200 @@ -97,7 +93,6 @@ func (b *BaseApi) OperateToolConfig(c *gin.Context) { // @Tags Host tool // @Summary Get tool -// @Description 获取主机工具日志 // @Accept json // @Param request body request.HostToolLogReq true "request" // @Success 200 @@ -119,7 +114,6 @@ func (b *BaseApi) GetToolLog(c *gin.Context) { // @Tags Host tool // @Summary Create Supervisor process -// @Description 操作守护进程 // @Accept json // @Param request body request.SupervisorProcessConfig true "request" // @Success 200 @@ -142,7 +136,6 @@ func (b *BaseApi) OperateProcess(c *gin.Context) { // @Tags Host tool // @Summary Get Supervisor process config -// @Description 获取 Supervisor 进程配置 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -158,7 +151,6 @@ func (b *BaseApi) GetProcess(c *gin.Context) { // @Tags Host tool // @Summary Get Supervisor process config -// @Description 操作 Supervisor 进程文件 // @Accept json // @Param request body request.SupervisorProcessFileReq true "request" // @Success 200 diff --git a/agent/app/api/v2/image.go b/agent/app/api/v2/image.go index 900068934..3812f0531 100644 --- a/agent/app/api/v2/image.go +++ b/agent/app/api/v2/image.go @@ -8,7 +8,6 @@ import ( // @Tags Container Image // @Summary Page images -// @Description 获取镜像列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Produce json @@ -35,7 +34,6 @@ func (b *BaseApi) SearchImage(c *gin.Context) { // @Tags Container Image // @Summary List all images -// @Description 获取所有镜像列表 // @Produce json // @Success 200 {array} dto.ImageInfo // @Security ApiKeyAuth @@ -51,7 +49,6 @@ func (b *BaseApi) ListAllImage(c *gin.Context) { // @Tags Container Image // @Summary load images options -// @Description 获取镜像名称列表 // @Produce json // @Success 200 {array} dto.Options // @Security ApiKeyAuth @@ -67,7 +64,6 @@ func (b *BaseApi) ListImage(c *gin.Context) { // @Tags Container Image // @Summary Build image -// @Description 构建镜像 // @Accept json // @Param request body dto.ImageBuild true "request" // @Success 200 {string} log @@ -90,7 +86,6 @@ func (b *BaseApi) ImageBuild(c *gin.Context) { // @Tags Container Image // @Summary Pull image -// @Description 拉取镜像 // @Accept json // @Param request body dto.ImagePull true "request" // @Success 200 {string} log @@ -113,7 +108,6 @@ func (b *BaseApi) ImagePull(c *gin.Context) { // @Tags Container Image // @Summary Push image -// @Description 推送镜像 // @Accept json // @Param request body dto.ImagePush true "request" // @Success 200 {string} log @@ -136,7 +130,6 @@ func (b *BaseApi) ImagePush(c *gin.Context) { // @Tags Container Image // @Summary Delete image -// @Description 删除镜像 // @Accept json // @Param request body dto.BatchDelete true "request" // @Success 200 @@ -160,7 +153,6 @@ func (b *BaseApi) ImageRemove(c *gin.Context) { // @Tags Container Image // @Summary Save image -// @Description 导出镜像 // @Accept json // @Param request body dto.ImageSave true "request" // @Success 200 @@ -183,7 +175,6 @@ func (b *BaseApi) ImageSave(c *gin.Context) { // @Tags Container Image // @Summary Tag image -// @Description Tag 镜像 // @Accept json // @Param request body dto.ImageTag true "request" // @Success 200 @@ -206,7 +197,6 @@ func (b *BaseApi) ImageTag(c *gin.Context) { // @Tags Container Image // @Summary Load image -// @Description 导入镜像 // @Accept json // @Param request body dto.ImageLoad true "request" // @Success 200 diff --git a/agent/app/api/v2/image_repo.go b/agent/app/api/v2/image_repo.go index 32dc55f1c..152a3ad47 100644 --- a/agent/app/api/v2/image_repo.go +++ b/agent/app/api/v2/image_repo.go @@ -8,7 +8,6 @@ import ( // @Tags Container Image-repo // @Summary Page image repos -// @Description 获取镜像仓库列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Produce json @@ -35,7 +34,6 @@ func (b *BaseApi) SearchRepo(c *gin.Context) { // @Tags Container Image-repo // @Summary List image repos -// @Description 获取镜像仓库列表 // @Produce json // @Success 200 {array} dto.ImageRepoOption // @Security ApiKeyAuth @@ -52,7 +50,6 @@ func (b *BaseApi) ListRepo(c *gin.Context) { // @Tags Container Image-repo // @Summary Load repo status -// @Description 获取 docker 仓库状态 // @Accept json // @Param request body dto.OperateByID true "request" // @Produce json @@ -74,7 +71,6 @@ func (b *BaseApi) CheckRepoStatus(c *gin.Context) { // @Tags Container Image-repo // @Summary Create image repo -// @Description 创建镜像仓库 // @Accept json // @Param request body dto.ImageRepoDelete true "request" // @Produce json @@ -97,7 +93,6 @@ func (b *BaseApi) CreateRepo(c *gin.Context) { // @Tags Container Image-repo // @Summary Delete image repo -// @Description 删除镜像仓库 // @Accept json // @Param request body dto.ImageRepoDelete true "request" // @Produce json @@ -120,7 +115,6 @@ func (b *BaseApi) DeleteRepo(c *gin.Context) { // @Tags Container Image-repo // @Summary Update image repo -// @Description 更新镜像仓库 // @Accept json // @Param request body dto.ImageRepoUpdate true "request" // @Produce json diff --git a/agent/app/api/v2/logs.go b/agent/app/api/v2/logs.go index b096ff5ee..2563cac5e 100644 --- a/agent/app/api/v2/logs.go +++ b/agent/app/api/v2/logs.go @@ -8,7 +8,6 @@ import ( // @Tags Logs // @Summary Load system log files -// @Description 获取系统日志文件列表 // @Success 200 // @Security ApiKeyAuth // @Router /logs/system/files [get] @@ -24,7 +23,6 @@ func (b *BaseApi) GetSystemFiles(c *gin.Context) { // @Tags Logs // @Summary Load system logs -// @Description 获取系统日志 // @Success 200 // @Security ApiKeyAuth // @Router /logs/system [post] diff --git a/agent/app/api/v2/monitor.go b/agent/app/api/v2/monitor.go index a23e38be5..f874a8ce5 100644 --- a/agent/app/api/v2/monitor.go +++ b/agent/app/api/v2/monitor.go @@ -12,7 +12,6 @@ import ( // @Tags Monitor // @Summary Load monitor data -// @Description 获取监控数据 // @Param request body dto.MonitorSearch true "request" // @Success 200 // @Security ApiKeyAuth @@ -33,7 +32,6 @@ func (b *BaseApi) LoadMonitor(c *gin.Context) { // @Tags Monitor // @Summary Clean monitor data -// @Description 清空监控数据 // @Success 200 // @Security ApiKeyAuth // @Router /hosts/monitor/clean [post] @@ -49,7 +47,6 @@ func (b *BaseApi) CleanMonitor(c *gin.Context) { // @Tags Monitor // @Summary Load monitor setting -// @Description 获取默认监控设置 // @Success 200 // @Security ApiKeyAuth // @Router /hosts/monitor/setting [get] @@ -65,7 +62,6 @@ func (b *BaseApi) LoadMonitorSetting(c *gin.Context) { // @Tags Monitor // @Summary Update monitor setting -// @Description 更新默认监控设置 // @Param request body dto.MonitorSettingUpdate true "request" // @Success 200 // @Security ApiKeyAuth diff --git a/agent/app/api/v2/nginx.go b/agent/app/api/v2/nginx.go index 5a05cc2fb..4b499022c 100644 --- a/agent/app/api/v2/nginx.go +++ b/agent/app/api/v2/nginx.go @@ -8,7 +8,6 @@ import ( // @Tags OpenResty // @Summary Load OpenResty conf -// @Description 获取 OpenResty 配置信息 // @Success 200 {object} response.FileInfo // @Security ApiKeyAuth // @Router /openresty [get] @@ -23,7 +22,6 @@ func (b *BaseApi) GetNginx(c *gin.Context) { // @Tags OpenResty // @Summary Load partial OpenResty conf -// @Description 获取部分 OpenResty 配置信息 // @Accept json // @Param request body request.NginxScopeReq true "request" // @Success 200 {array} response.NginxParam @@ -45,7 +43,6 @@ func (b *BaseApi) GetNginxConfigByScope(c *gin.Context) { // @Tags OpenResty // @Summary Update OpenResty conf -// @Description 更新 OpenResty 配置信息 // @Accept json // @Param request body request.NginxConfigUpdate true "request" // @Success 200 @@ -66,7 +63,6 @@ func (b *BaseApi) UpdateNginxConfigByScope(c *gin.Context) { // @Tags OpenResty // @Summary Load OpenResty status info -// @Description 获取 OpenResty 状态信息 // @Success 200 {object} response.NginxStatus // @Security ApiKeyAuth // @Router /openresty/status [get] @@ -81,7 +77,6 @@ func (b *BaseApi) GetNginxStatus(c *gin.Context) { // @Tags OpenResty // @Summary Update OpenResty conf by upload file -// @Description 上传更新 OpenResty 配置文件 // @Accept json // @Param request body request.NginxConfigFileUpdate true "request" // @Success 200 @@ -103,7 +98,6 @@ func (b *BaseApi) UpdateNginxFile(c *gin.Context) { // @Tags OpenResty // @Summary Build OpenResty -// @Description 构建 OpenResty // @Accept json // @Param request body request.NginxBuildReq true "request" // @Success 200 @@ -124,7 +118,6 @@ func (b *BaseApi) BuildNginx(c *gin.Context) { // @Tags OpenResty // @Summary Update OpenResty module -// @Description 更新 OpenResty 模块 // @Accept json // @Param request body request.NginxModuleUpdate true "request" // @Success 200 @@ -145,7 +138,6 @@ func (b *BaseApi) UpdateNginxModule(c *gin.Context) { // @Tags OpenResty // @Summary Get OpenResty modules -// @Description 获取 OpenResty 模块 // @Success 200 {array} response.NginxModule // @Security ApiKeyAuth // @Router /openresty/modules [get] diff --git a/agent/app/api/v2/php_extensions.go b/agent/app/api/v2/php_extensions.go index 4d9543511..5e86079a0 100644 --- a/agent/app/api/v2/php_extensions.go +++ b/agent/app/api/v2/php_extensions.go @@ -9,7 +9,6 @@ import ( // @Tags PHP Extensions // @Summary Page Extensions -// @Description Page Extensions // @Accept json // @Param request body request.PHPExtensionsSearch true "request" // @Success 200 {array} response.PHPExtensionsDTO @@ -43,7 +42,6 @@ func (b *BaseApi) PagePHPExtensions(c *gin.Context) { // @Tags PHP Extensions // @Summary Create Extensions -// @Description Create Extensions // @Accept json // @Param request body request.PHPExtensionsCreate true "request" // @Success 200 @@ -63,7 +61,6 @@ func (b *BaseApi) CreatePHPExtensions(c *gin.Context) { // @Tags PHP Extensions // @Summary Update Extensions -// @Description Update Extensions // @Accept json // @Param request body request.PHPExtensionsUpdate true "request" // @Success 200 @@ -83,7 +80,6 @@ func (b *BaseApi) UpdatePHPExtensions(c *gin.Context) { // @Tags PHP Extensions // @Summary Delete Extensions -// @Description Delete Extensions // @Accept json // @Param request body request.PHPExtensionsDelete true "request" // @Success 200 diff --git a/agent/app/api/v2/process.go b/agent/app/api/v2/process.go index 3bcfe1b2a..920b1eb26 100644 --- a/agent/app/api/v2/process.go +++ b/agent/app/api/v2/process.go @@ -19,7 +19,6 @@ func (b *BaseApi) ProcessWs(c *gin.Context) { // @Tags Process // @Summary Stop Process -// @Description 停止进程 // @Param request body request.ProcessReq true "request" // @Success 200 // @Security ApiKeyAuth diff --git a/agent/app/api/v2/recycle_bin.go b/agent/app/api/v2/recycle_bin.go index 894eb59f2..dda4fe508 100644 --- a/agent/app/api/v2/recycle_bin.go +++ b/agent/app/api/v2/recycle_bin.go @@ -9,7 +9,6 @@ import ( // @Tags File // @Summary List RecycleBin files -// @Description 获取回收站文件列表 // @Accept json // @Param request body dto.PageInfo true "request" // @Success 200 @@ -33,7 +32,6 @@ func (b *BaseApi) SearchRecycleBinFile(c *gin.Context) { // @Tags File // @Summary Reduce RecycleBin files -// @Description 还原回收站文件 // @Accept json // @Param request body request.RecycleBinReduce true "request" // @Success 200 @@ -54,7 +52,6 @@ func (b *BaseApi) ReduceRecycleBinFile(c *gin.Context) { // @Tags File // @Summary Clear RecycleBin files -// @Description 清空回收站文件 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -70,7 +67,6 @@ func (b *BaseApi) ClearRecycleBinFile(c *gin.Context) { // @Tags File // @Summary Get RecycleBin status -// @Description 获取回收站状态 // @Accept json // @Success 200 // @Security ApiKeyAuth diff --git a/agent/app/api/v2/runtime.go b/agent/app/api/v2/runtime.go index e7912db40..60d25386f 100644 --- a/agent/app/api/v2/runtime.go +++ b/agent/app/api/v2/runtime.go @@ -9,7 +9,6 @@ import ( // @Tags Runtime // @Summary List runtimes -// @Description 获取运行环境列表 // @Accept json // @Param request body request.RuntimeSearch true "request" // @Success 200 @@ -33,7 +32,6 @@ func (b *BaseApi) SearchRuntimes(c *gin.Context) { // @Tags Runtime // @Summary Create runtime -// @Description 创建运行环境 // @Accept json // @Param request body request.RuntimeCreate true "request" // @Success 200 @@ -55,7 +53,6 @@ func (b *BaseApi) CreateRuntime(c *gin.Context) { // @Tags Website // @Summary Delete runtime -// @Description 删除运行环境 // @Accept json // @Param request body request.RuntimeDelete true "request" // @Success 200 @@ -77,7 +74,6 @@ func (b *BaseApi) DeleteRuntime(c *gin.Context) { // @Tags Website // @Summary Delete runtime -// @Description 删除运行环境校验 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -98,7 +94,6 @@ func (b *BaseApi) DeleteRuntimeCheck(c *gin.Context) { // @Tags Runtime // @Summary Update runtime -// @Description 更新运行环境 // @Accept json // @Param request body request.RuntimeUpdate true "request" // @Success 200 @@ -119,7 +114,6 @@ func (b *BaseApi) UpdateRuntime(c *gin.Context) { // @Tags Runtime // @Summary Get runtime -// @Description 获取运行环境 // @Accept json // @Param id path string true "request" // @Success 200 @@ -141,7 +135,6 @@ func (b *BaseApi) GetRuntime(c *gin.Context) { // @Tags Runtime // @Summary Get Node package scripts -// @Description 获取 Node 项目的 scripts // @Accept json // @Param request body request.NodePackageReq true "request" // @Success 200 @@ -162,7 +155,6 @@ func (b *BaseApi) GetNodePackageRunScript(c *gin.Context) { // @Tags Runtime // @Summary Operate runtime -// @Description 操作运行环境 // @Accept json // @Param request body request.RuntimeOperate true "request" // @Success 200 @@ -184,7 +176,6 @@ func (b *BaseApi) OperateRuntime(c *gin.Context) { // @Tags Runtime // @Summary Get Node modules -// @Description 获取 Node 项目的 modules // @Accept json // @Param request body request.NodeModuleReq true "request" // @Success 200 @@ -205,7 +196,6 @@ func (b *BaseApi) GetNodeModules(c *gin.Context) { // @Tags Runtime // @Summary Operate Node modules -// @Description 操作 Node 项目 modules // @Accept json // @Param request body request.NodeModuleReq true "request" // @Success 200 @@ -226,7 +216,6 @@ func (b *BaseApi) OperateNodeModules(c *gin.Context) { // @Tags Runtime // @Summary Sync runtime status -// @Description 同步运行环境状态 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -242,7 +231,6 @@ func (b *BaseApi) SyncStatus(c *gin.Context) { // @Tags Runtime // @Summary Get php runtime extension -// @Description 获取 PHP 运行环境扩展 // @Accept json // @Param id path string true "request" // @Success 200 @@ -264,7 +252,6 @@ func (b *BaseApi) GetRuntimeExtension(c *gin.Context) { // @Tags Runtime // @Summary Install php extension -// @Description 安装 PHP 扩展 // @Accept json // @Param request body request.PHPExtensionInstallReq true "request" // @Success 200 @@ -285,7 +272,6 @@ func (b *BaseApi) InstallPHPExtension(c *gin.Context) { // @Tags Runtime // @Summary UnInstall php extension -// @Description 卸载 PHP 扩展 // @Accept json // @Param request body request.PHPExtensionInstallReq true "request" // @Success 200 @@ -306,7 +292,6 @@ func (b *BaseApi) UnInstallPHPExtension(c *gin.Context) { // @Tags Runtime // @Summary Load php runtime conf -// @Description 获取 php 运行环境配置 // @Accept json // @Param id path integer true "request" // @Success 200 {object} response.PHPConfig @@ -328,7 +313,6 @@ func (b *BaseApi) GetPHPConfig(c *gin.Context) { // @Tags Runtime // @Summary Update runtime php conf -// @Description 更新运行环境 PHP 配置 // @Accept json // @Param request body request.PHPConfigUpdate true "request" // @Success 200 @@ -349,7 +333,6 @@ func (b *BaseApi) UpdatePHPConfig(c *gin.Context) { // @Tags Runtime // @Summary Update php conf file -// @Description 更新 php 配置文件 // @Accept json // @Param request body request.PHPFileUpdate true "request" // @Success 200 @@ -370,7 +353,6 @@ func (b *BaseApi) UpdatePHPFile(c *gin.Context) { // @Tags Runtime // @Summary Get php conf file -// @Description 获取 php 配置文件 // @Accept json // @Param request body request.PHPFileReq true "request" // @Success 200 @@ -391,7 +373,6 @@ func (b *BaseApi) GetPHPConfigFile(c *gin.Context) { // @Tags Runtime // @Summary Update fpm config -// @Description 更新 fpm 配置 // @Accept json // @Param request body request.FPMConfig true "request" // @Success 200 @@ -411,7 +392,6 @@ func (b *BaseApi) UpdateFPMConfig(c *gin.Context) { // @Tags Runtime // @Summary Get fpm config -// @Description 获取 fpm 配置 // @Accept json // @Param id path integer true "request" // @Success 200 {object} request.FPMConfig @@ -433,7 +413,6 @@ func (b *BaseApi) GetFPMConfig(c *gin.Context) { // @Tags Runtime // @Summary Get supervisor process -// @Description 获取 supervisor 进程 // @Accept json // @Param id path integer true "request" // @Success 200 {object} response.SupervisorProcessConfig @@ -455,7 +434,6 @@ func (b *BaseApi) GetSupervisorProcess(c *gin.Context) { // @Tags Runtime // @Summary Operate supervisor process -// @Description 操作 supervisor 进程 // @Accept json // @Param request body request.PHPSupervisorProcessConfig true "request" // @Success 200 @@ -476,7 +454,6 @@ func (b *BaseApi) OperateSupervisorProcess(c *gin.Context) { // @Tags Runtime // @Summary Operate supervisor process file -// @Description 操作 supervisor 进程文件 // @Accept json // @Param request body request.PHPSupervisorProcessFileReq true "request" // @Success 200 diff --git a/agent/app/api/v2/setting.go b/agent/app/api/v2/setting.go index e241f0db8..2623f0c9d 100644 --- a/agent/app/api/v2/setting.go +++ b/agent/app/api/v2/setting.go @@ -9,7 +9,6 @@ import ( // @Tags System Setting // @Summary Load system setting info -// @Description 加载系统配置信息 // @Success 200 {object} dto.SettingInfo // @Security ApiKeyAuth // @Router /settings/search [post] @@ -24,7 +23,6 @@ func (b *BaseApi) GetSettingInfo(c *gin.Context) { // @Tags System Setting // @Summary Load system available status -// @Description 获取系统可用状态 // @Success 200 // @Security ApiKeyAuth // @Router /settings/search/available [get] @@ -34,7 +32,6 @@ func (b *BaseApi) GetSystemAvailable(c *gin.Context) { // @Tags System Setting // @Summary Update system setting -// @Description 更新系统配置 // @Accept json // @Param request body dto.SettingUpdate true "request" // @Success 200 @@ -56,7 +53,6 @@ func (b *BaseApi) UpdateSetting(c *gin.Context) { // @Tags System Setting // @Summary Load local backup dir -// @Description 获取安装根目录 // @Success 200 {string} path // @Security ApiKeyAuth // @Router /settings/basedir [get] diff --git a/agent/app/api/v2/snapshot.go b/agent/app/api/v2/snapshot.go index e9a268b6c..1af151e93 100644 --- a/agent/app/api/v2/snapshot.go +++ b/agent/app/api/v2/snapshot.go @@ -8,7 +8,6 @@ import ( // @Tags System Setting // @Summary Load system snapshot data -// @Description 获取系统快照数据 // @Success 200 // @Security ApiKeyAuth // @Router /settings/snapshot/load [get] @@ -23,7 +22,6 @@ func (b *BaseApi) LoadSnapshotData(c *gin.Context) { // @Tags System Setting // @Summary Create system snapshot -// @Description 创建系统快照 // @Accept json // @Param request body dto.SnapshotCreate true "request" // @Success 200 @@ -45,7 +43,6 @@ func (b *BaseApi) CreateSnapshot(c *gin.Context) { // @Tags System Setting // @Summary Recreate system snapshot -// @Description 创建系统快照重试 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 @@ -67,7 +64,6 @@ func (b *BaseApi) RecreateSnapshot(c *gin.Context) { // @Tags System Setting // @Summary Import system snapshot -// @Description 导入已有快照 // @Accept json // @Param request body dto.SnapshotImport true "request" // @Success 200 @@ -89,7 +85,6 @@ func (b *BaseApi) ImportSnapshot(c *gin.Context) { // @Tags System Setting // @Summary Update snapshot description -// @Description 更新快照描述信息 // @Accept json // @Param request body dto.UpdateDescription true "request" // @Success 200 @@ -111,7 +106,6 @@ func (b *BaseApi) UpdateSnapDescription(c *gin.Context) { // @Tags System Setting // @Summary Page system snapshot -// @Description 获取系统快照列表分页 // @Accept json // @Param request body dto.PageSnapshot true "request" // @Success 200 {object} dto.PageResult @@ -136,7 +130,6 @@ func (b *BaseApi) SearchSnapshot(c *gin.Context) { // @Tags System Setting // @Summary Recover system backup -// @Description 从系统快照恢复 // @Accept json // @Param request body dto.SnapshotRecover true "request" // @Success 200 @@ -158,7 +151,6 @@ func (b *BaseApi) RecoverSnapshot(c *gin.Context) { // @Tags System Setting // @Summary Rollback system backup -// @Description 从系统快照回滚 // @Accept json // @Param request body dto.SnapshotRecover true "request" // @Success 200 @@ -180,7 +172,6 @@ func (b *BaseApi) RollbackSnapshot(c *gin.Context) { // @Tags System Setting // @Summary Delete system backup -// @Description 删除系统快照 // @Accept json // @Param request body dto.SnapshotBatchDelete true "request" // @Success 200 diff --git a/agent/app/api/v2/ssh.go b/agent/app/api/v2/ssh.go index 4772818ac..675740525 100644 --- a/agent/app/api/v2/ssh.go +++ b/agent/app/api/v2/ssh.go @@ -8,7 +8,6 @@ import ( // @Tags SSH // @Summary Load host SSH setting info -// @Description 加载 SSH 配置信息 // @Success 200 {object} dto.SSHInfo // @Security ApiKeyAuth // @Router /host/ssh/search [post] @@ -23,7 +22,6 @@ func (b *BaseApi) GetSSHInfo(c *gin.Context) { // @Tags SSH // @Summary Operate SSH -// @Description 修改 SSH 服务状态 // @Accept json // @Param request body dto.Operate true "request" // @Security ApiKeyAuth @@ -44,7 +42,6 @@ func (b *BaseApi) OperateSSH(c *gin.Context) { // @Tags SSH // @Summary Update host SSH setting -// @Description 更新 SSH 配置 // @Accept json // @Param request body dto.SSHUpdate true "request" // @Success 200 @@ -66,7 +63,6 @@ func (b *BaseApi) UpdateSSH(c *gin.Context) { // @Tags SSH // @Summary Update host SSH setting by file -// @Description 上传文件更新 SSH 配置 // @Accept json // @Param request body dto.SSHConf true "request" // @Success 200 @@ -88,7 +84,6 @@ func (b *BaseApi) UpdateSSHByfile(c *gin.Context) { // @Tags SSH // @Summary Generate host SSH secret -// @Description 生成 SSH 密钥 // @Accept json // @Param request body dto.GenerateSSH true "request" // @Success 200 @@ -110,7 +105,6 @@ func (b *BaseApi) GenerateSSH(c *gin.Context) { // @Tags SSH // @Summary Load host SSH secret -// @Description 获取 SSH 密钥 // @Accept json // @Param request body dto.GenerateLoad true "request" // @Success 200 @@ -132,7 +126,6 @@ func (b *BaseApi) LoadSSHSecret(c *gin.Context) { // @Tags SSH // @Summary Load host SSH logs -// @Description 获取 SSH 登录日志 // @Accept json // @Param request body dto.SearchSSHLog true "request" // @Success 200 {object} dto.SSHLog @@ -154,7 +147,6 @@ func (b *BaseApi) LoadSSHLogs(c *gin.Context) { // @Tags SSH // @Summary Load host SSH conf -// @Description 获取 SSH 配置文件 // @Success 200 // @Security ApiKeyAuth // @Router /host/ssh/conf [get] diff --git a/agent/app/api/v2/task.go b/agent/app/api/v2/task.go index 6b50bb427..fa0aa0494 100644 --- a/agent/app/api/v2/task.go +++ b/agent/app/api/v2/task.go @@ -8,7 +8,6 @@ import ( // @Tags TaskLog // @Summary Page task logs -// @Description 获取任务日志列表 // @Accept json // @Param request body dto.SearchTaskLogReq true "request" // @Success 200 {object} dto.PageResult diff --git a/agent/app/api/v2/website.go b/agent/app/api/v2/website.go index e617fe67d..7810fbf52 100644 --- a/agent/app/api/v2/website.go +++ b/agent/app/api/v2/website.go @@ -9,7 +9,6 @@ import ( // @Tags Website // @Summary Page websites -// @Description 获取网站列表分页 // @Accept json // @Param request body request.WebsiteSearch true "request" // @Success 200 {object} dto.PageResult @@ -33,7 +32,6 @@ func (b *BaseApi) PageWebsite(c *gin.Context) { // @Tags Website // @Summary List websites -// @Description 获取网站列表 // @Success 200 {array} response.WebsiteDTO // @Security ApiKeyAuth // @Router /websites/list [get] @@ -48,7 +46,6 @@ func (b *BaseApi) GetWebsites(c *gin.Context) { // @Tags Website // @Summary List website names -// @Description 获取网站列表 // @Success 200 {array} string // @Security ApiKeyAuth // @Router /websites/options [post] @@ -67,7 +64,6 @@ func (b *BaseApi) GetWebsiteOptions(c *gin.Context) { // @Tags Website // @Summary Create website -// @Description 创建网站 // @Accept json // @Param request body request.WebsiteCreate true "request" // @Success 200 @@ -89,7 +85,6 @@ func (b *BaseApi) CreateWebsite(c *gin.Context) { // @Tags Website // @Summary Operate website -// @Description 操作网站 // @Accept json // @Param request body request.WebsiteOp true "request" // @Success 200 @@ -111,7 +106,6 @@ func (b *BaseApi) OpWebsite(c *gin.Context) { // @Tags Website // @Summary Delete website -// @Description 删除网站 // @Accept json // @Param request body request.WebsiteDelete true "request" // @Success 200 @@ -133,7 +127,6 @@ func (b *BaseApi) DeleteWebsite(c *gin.Context) { // @Tags Website // @Summary Update website -// @Description 更新网站 // @Accept json // @Param request body request.WebsiteUpdate true "request" // @Success 200 @@ -154,7 +147,6 @@ func (b *BaseApi) UpdateWebsite(c *gin.Context) { // @Tags Website // @Summary Search website by id -// @Description 通过 id 查询网站 // @Accept json // @Param id path integer true "request" // @Success 200 {object} response.WebsiteDTO @@ -176,7 +168,6 @@ func (b *BaseApi) GetWebsite(c *gin.Context) { // @Tags Website Nginx // @Summary Search website nginx by id -// @Description 通过 id 查询网站 nginx // @Accept json // @Param id path integer true "request" // @Success 200 {object} response.FileInfo @@ -200,7 +191,6 @@ func (b *BaseApi) GetWebsiteNginx(c *gin.Context) { // @Tags Website Nginx // @Summary Load nginx conf -// @Description 获取 nginx 配置 // @Accept json // @Param request body request.NginxScopeReq true "request" // @Success 200 {object} response.WebsiteNginxConfig @@ -221,7 +211,6 @@ func (b *BaseApi) GetNginxConfig(c *gin.Context) { // @Tags Website Nginx // @Summary Update nginx conf -// @Description 更新 nginx 配置 // @Accept json // @Param request body request.NginxConfigUpdate true "request" // @Success 200 @@ -242,7 +231,6 @@ func (b *BaseApi) UpdateNginxConfig(c *gin.Context) { // @Tags Website HTTPS // @Summary Load https conf -// @Description 获取 https 配置 // @Accept json // @Param id path integer true "request" // @Success 200 {object} response.WebsiteHTTPS @@ -264,7 +252,6 @@ func (b *BaseApi) GetHTTPSConfig(c *gin.Context) { // @Tags Website HTTPS // @Summary Update https conf -// @Description 更新 https 配置 // @Accept json // @Param request body request.WebsiteHTTPSOp true "request" // @Success 200 {object} response.WebsiteHTTPS @@ -289,7 +276,6 @@ func (b *BaseApi) UpdateHTTPSConfig(c *gin.Context) { // @Tags Website // @Summary Check before create website -// @Description 网站创建前检查 // @Accept json // @Param request body request.WebsiteInstallCheckReq true "request" // @Success 200 {array} response.WebsitePreInstallCheck @@ -310,7 +296,6 @@ func (b *BaseApi) CreateWebsiteCheck(c *gin.Context) { // @Tags Website Nginx // @Summary Update website nginx conf -// @Description 更新 网站 nginx 配置 // @Accept json // @Param request body request.WebsiteNginxUpdate true "request" // @Success 200 @@ -331,7 +316,6 @@ func (b *BaseApi) UpdateWebsiteNginxConfig(c *gin.Context) { // @Tags Website // @Summary Operate website log -// @Description 操作网站日志 // @Accept json // @Param request body request.WebsiteLogReq true "request" // @Success 200 {object} response.WebsiteLog @@ -353,7 +337,6 @@ func (b *BaseApi) OpWebsiteLog(c *gin.Context) { // @Tags Website // @Summary Change default server -// @Description 操作网站日志 // @Accept json // @Param request body request.WebsiteDefaultUpdate true "request" // @Success 200 @@ -374,7 +357,6 @@ func (b *BaseApi) ChangeDefaultServer(c *gin.Context) { // @Tags Website PHP // @Summary Update php version -// @Description 变更 php 版本 // @Accept json // @Param request body request.WebsitePHPVersionReq true "request" // @Success 200 @@ -395,7 +377,6 @@ func (b *BaseApi) ChangePHPVersion(c *gin.Context) { // @Tags Website // @Summary Get rewrite conf -// @Description 获取伪静态配置 // @Accept json // @Param request body request.NginxRewriteReq true "request" // @Success 200 @@ -416,7 +397,6 @@ func (b *BaseApi) GetRewriteConfig(c *gin.Context) { // @Tags Website // @Summary Update rewrite conf -// @Description 更新伪静态配置 // @Accept json // @Param request body request.NginxRewriteUpdate true "request" // @Success 200 @@ -437,7 +417,6 @@ func (b *BaseApi) UpdateRewriteConfig(c *gin.Context) { // @Tags Website // @Summary Update Site Dir -// @Description 更新网站目录 // @Accept json // @Param request body request.WebsiteUpdateDir true "request" // @Success 200 @@ -458,7 +437,6 @@ func (b *BaseApi) UpdateSiteDir(c *gin.Context) { // @Tags Website // @Summary Update Site Dir permission -// @Description 更新网站目录权限 // @Accept json // @Param request body request.WebsiteUpdateDirPermission true "request" // @Success 200 @@ -479,7 +457,6 @@ func (b *BaseApi) UpdateSiteDirPermission(c *gin.Context) { // @Tags Website // @Summary Get proxy conf -// @Description 获取反向代理配置 // @Accept json // @Param request body request.WebsiteProxyReq true "request" // @Success 200 @@ -500,7 +477,6 @@ func (b *BaseApi) GetProxyConfig(c *gin.Context) { // @Tags Website // @Summary Update proxy conf -// @Description 修改反向代理配置 // @Accept json // @Param request body request.WebsiteProxyConfig true "request" // @Success 200 @@ -522,7 +498,6 @@ func (b *BaseApi) UpdateProxyConfig(c *gin.Context) { // @Tags Website // @Summary Update proxy file -// @Description 更新反向代理文件 // @Accept json // @Param request body request.NginxProxyUpdate true "request" // @Success 200 @@ -543,7 +518,6 @@ func (b *BaseApi) UpdateProxyConfigFile(c *gin.Context) { // @Tags Website // @Summary Get AuthBasic conf -// @Description 获取密码访问配置 // @Accept json // @Param request body request.NginxAuthReq true "request" // @Success 200 @@ -564,7 +538,6 @@ func (b *BaseApi) GetAuthConfig(c *gin.Context) { // @Tags Website // @Summary Get AuthBasic conf -// @Description 更新密码访问配置 // @Accept json // @Param request body request.NginxAuthUpdate true "request" // @Success 200 @@ -584,7 +557,6 @@ func (b *BaseApi) UpdateAuthConfig(c *gin.Context) { // @Tags Website // @Summary Get AuthBasic conf -// @Description 获取路由密码访问配置 // @Accept json // @Param request body request.NginxAuthReq true "request" // @Success 200 @@ -605,7 +577,6 @@ func (b *BaseApi) GetPathAuthConfig(c *gin.Context) { // @Tags Website // @Summary Get AuthBasic conf -// @Description 更新路由密码访问配置 // @Accept json // @Param request body request.NginxPathAuthUpdate true "request" // @Success 200 @@ -625,7 +596,6 @@ func (b *BaseApi) UpdatePathAuthConfig(c *gin.Context) { // @Tags Website // @Summary Get AntiLeech conf -// @Description 获取防盗链配置 // @Accept json // @Param request body request.NginxCommonReq true "request" // @Success 200 @@ -646,7 +616,6 @@ func (b *BaseApi) GetAntiLeech(c *gin.Context) { // @Tags Website // @Summary Update AntiLeech -// @Description 更新防盗链配置 // @Accept json // @Param request body request.NginxAntiLeechUpdate true "request" // @Success 200 @@ -666,7 +635,6 @@ func (b *BaseApi) UpdateAntiLeech(c *gin.Context) { // @Tags Website // @Summary Update redirect conf -// @Description 修改重定向配置 // @Accept json // @Param request body request.NginxRedirectReq true "request" // @Success 200 @@ -688,7 +656,6 @@ func (b *BaseApi) UpdateRedirectConfig(c *gin.Context) { // @Tags Website // @Summary Get redirect conf -// @Description 获取重定向配置 // @Accept json // @Param request body request.WebsiteProxyReq true "request" // @Success 200 @@ -709,7 +676,6 @@ func (b *BaseApi) GetRedirectConfig(c *gin.Context) { // @Tags Website // @Summary Update redirect file -// @Description 更新重定向文件 // @Accept json // @Param request body request.NginxRedirectUpdate true "request" // @Success 200 @@ -730,7 +696,6 @@ func (b *BaseApi) UpdateRedirectConfigFile(c *gin.Context) { // @Tags Website // @Summary Get website dir -// @Description 获取网站目录配置 // @Accept json // @Param request body request.WebsiteCommonReq true "request" // @Success 200 @@ -751,7 +716,6 @@ func (b *BaseApi) GetDirConfig(c *gin.Context) { // @Tags Website // @Summary Get default html -// @Description 获取默认 html // @Accept json // @Success 200 {object} response.FileInfo // @Security ApiKeyAuth @@ -772,7 +736,6 @@ func (b *BaseApi) GetDefaultHtml(c *gin.Context) { // @Tags Website // @Summary Update default html -// @Description 更新默认 html // @Accept json // @Param request body request.WebsiteHtmlUpdate true "request" // @Success 200 @@ -793,7 +756,6 @@ func (b *BaseApi) UpdateDefaultHtml(c *gin.Context) { // @Tags Website // @Summary Get website upstreams -// @Description 获取网站 upstreams // @Accept json // @Param request body request.WebsiteCommonReq true "request" // @Success 200 @@ -815,7 +777,6 @@ func (b *BaseApi) GetLoadBalances(c *gin.Context) { // @Tags Website // @Summary Create website upstream -// @Description 创建网站 upstream // @Accept json // @Param request body request.WebsiteLBCreate true "request" // @Success 200 @@ -835,7 +796,6 @@ func (b *BaseApi) CreateLoadBalance(c *gin.Context) { // @Tags Website // @Summary Delete website upstream -// @Description 删除网站 upstream // @Accept json // @Param request body request.WebsiteLBDelete true "request" // @Success 200 @@ -855,7 +815,6 @@ func (b *BaseApi) DeleteLoadBalance(c *gin.Context) { // @Tags Website // @Summary Update website upstream -// @Description 更新网站 upstream // @Accept json // @Param request body request.WebsiteLBUpdate true "request" // @Success 200 @@ -875,7 +834,6 @@ func (b *BaseApi) UpdateLoadBalance(c *gin.Context) { // @Tags Website // @Summary Update website upstream file -// @Description 更新网站 upstream 文件 // @Accept json // @Param request body request.WebsiteLBUpdateFile true "request" // @Success 200 @@ -907,7 +865,6 @@ func (b *BaseApi) ChangeWebsiteGroup(c *gin.Context) { // @Tags Website // @Summary update website proxy cache config -// @Description 更新网站反代缓存配置 // @Accept json // @Param request body request.NginxProxyCacheUpdate true "request" // @Success 200 @@ -926,7 +883,6 @@ func (b *BaseApi) UpdateProxyCache(c *gin.Context) { } // @Summary Get website proxy cache config -// @Description 获取网站反代缓存配置 // @Accept json // @Param id path int true "id" // @Success 200 {object} response.NginxProxyCache @@ -948,7 +904,6 @@ func (b *BaseApi) GetProxyCache(c *gin.Context) { // @Tags Website // @Summary Set Real IP -// @Description 设置真实IP // @Accept json // @Param request body request.WebsiteRealIP true "request" // @Success 200 @@ -969,7 +924,6 @@ func (b *BaseApi) SetRealIPConfig(c *gin.Context) { // @Tags Website // @Summary Get Real IP Config -// @Description 获取真实 IP 配置 // @Accept json // @Param id path int true "id" // @Success 200 {object} response.WebsiteRealIP @@ -991,7 +945,6 @@ func (b *BaseApi) GetRealIPConfig(c *gin.Context) { // @Tags Website // @Summary Get website resource -// @Description 获取网站资源 // @Accept json // @Param id path int true "id" // @Success 200 {object} response.Resource @@ -1013,7 +966,6 @@ func (b *BaseApi) GetWebsiteResource(c *gin.Context) { // @Tags Website // @Summary Get databases -// @Description 获取数据库列表 // @Accept json // @Success 200 {object} response.Database // @Security ApiKeyAuth @@ -1029,7 +981,6 @@ func (b *BaseApi) GetWebsiteDatabase(c *gin.Context) { // @Tags Website // @Summary Change website database -// @Description 切换网站数据库 // @Accept json // @Param request body request.ChangeDatabase true "request" // @Success 200 @@ -1049,7 +1000,6 @@ func (b *BaseApi) ChangeWebsiteDatabase(c *gin.Context) { // @Tags Website // @Summary Operate custom rewrite -// @Description 编辑自定义重写模版 // @Accept json // @Param request body request.CustomRewriteOperate true "request" // @Success 200 @@ -1069,7 +1019,6 @@ func (b *BaseApi) OperateCustomRewrite(c *gin.Context) { // @Tags Website // @Summary List custom rewrite -// @Description 获取自定义重写模版列表 // @Accept json // @Success 200 {object} []string // @Security ApiKeyAuth diff --git a/agent/app/api/v2/website_acme_account.go b/agent/app/api/v2/website_acme_account.go index ea98d5a94..24a0eb05a 100644 --- a/agent/app/api/v2/website_acme_account.go +++ b/agent/app/api/v2/website_acme_account.go @@ -9,7 +9,6 @@ import ( // @Tags Website Acme // @Summary Page website acme accounts -// @Description 获取网站 acme 列表分页 // @Accept json // @Param request body dto.PageInfo true "request" // @Success 200 {object} dto.PageResult @@ -33,7 +32,6 @@ func (b *BaseApi) PageWebsiteAcmeAccount(c *gin.Context) { // @Tags Website Acme // @Summary Create website acme account -// @Description 创建网站 acme // @Accept json // @Param request body request.WebsiteAcmeAccountCreate true "request" // @Success 200 {object} response.WebsiteAcmeAccountDTO @@ -55,7 +53,6 @@ func (b *BaseApi) CreateWebsiteAcmeAccount(c *gin.Context) { // @Tags Website Acme // @Summary Delete website acme account -// @Description 删除网站 acme // @Accept json // @Param request body request.WebsiteResourceReq true "request" // @Success 200 diff --git a/agent/app/api/v2/website_ca.go b/agent/app/api/v2/website_ca.go index 3f8fa3d93..befa00e78 100644 --- a/agent/app/api/v2/website_ca.go +++ b/agent/app/api/v2/website_ca.go @@ -13,7 +13,6 @@ import ( // @Tags Website CA // @Summary Page website ca -// @Description 获取网站 ca 列表分页 // @Accept json // @Param request body request.WebsiteCASearch true "request" // @Success 200 {object} dto.PageResult @@ -37,7 +36,6 @@ func (b *BaseApi) PageWebsiteCA(c *gin.Context) { // @Tags Website CA // @Summary Create website ca -// @Description 创建网站 ca // @Accept json // @Param request body request.WebsiteCACreate true "request" // @Success 200 {object} request.WebsiteCACreate @@ -59,7 +57,6 @@ func (b *BaseApi) CreateWebsiteCA(c *gin.Context) { // @Tags Website CA // @Summary Get website ca -// @Description 获取网站 ca // @Accept json // @Param id path int true "id" // @Success 200 {object} response.WebsiteCADTO @@ -80,7 +77,6 @@ func (b *BaseApi) GetWebsiteCA(c *gin.Context) { // @Tags Website CA // @Summary Delete website ca -// @Description 删除网站 ca // @Accept json // @Param request body request.WebsiteCommonReq true "request" // @Success 200 @@ -101,7 +97,6 @@ func (b *BaseApi) DeleteWebsiteCA(c *gin.Context) { // @Tags Website CA // @Summary Obtain SSL -// @Description 自签 SSL 证书 // @Accept json // @Param request body request.WebsiteCAObtain true "request" // @Success 200 @@ -122,7 +117,6 @@ func (b *BaseApi) ObtainWebsiteCA(c *gin.Context) { // @Tags Website CA // @Summary Obtain SSL -// @Description 续签 SSL 证书 // @Accept json // @Param request body request.WebsiteCAObtain true "request" // @Success 200 @@ -148,7 +142,6 @@ func (b *BaseApi) RenewWebsiteCA(c *gin.Context) { // @Tags Website CA // @Summary Download CA file -// @Description 下载 CA 证书文件 // @Accept json // @Param request body request.WebsiteResourceReq true "request" // @Success 200 diff --git a/agent/app/api/v2/website_dns_account.go b/agent/app/api/v2/website_dns_account.go index 7902b51a8..981f00670 100644 --- a/agent/app/api/v2/website_dns_account.go +++ b/agent/app/api/v2/website_dns_account.go @@ -9,7 +9,6 @@ import ( // @Tags Website DNS // @Summary Page website dns accounts -// @Description 获取网站 dns 列表分页 // @Accept json // @Param request body dto.PageInfo true "request" // @Success 200 {object} dto.PageResult @@ -33,7 +32,6 @@ func (b *BaseApi) PageWebsiteDnsAccount(c *gin.Context) { // @Tags Website DNS // @Summary Create website dns account -// @Description 创建网站 dns // @Accept json // @Param request body request.WebsiteDnsAccountCreate true "request" // @Success 200 @@ -54,7 +52,6 @@ func (b *BaseApi) CreateWebsiteDnsAccount(c *gin.Context) { // @Tags Website DNS // @Summary Update website dns account -// @Description 更新网站 dns // @Accept json // @Param request body request.WebsiteDnsAccountUpdate true "request" // @Success 200 @@ -75,7 +72,6 @@ func (b *BaseApi) UpdateWebsiteDnsAccount(c *gin.Context) { // @Tags Website DNS // @Summary Delete website dns account -// @Description 删除网站 dns // @Accept json // @Param request body request.WebsiteResourceReq true "request" // @Success 200 diff --git a/agent/app/api/v2/website_domain.go b/agent/app/api/v2/website_domain.go index 7d08e32ff..203ccbfa0 100644 --- a/agent/app/api/v2/website_domain.go +++ b/agent/app/api/v2/website_domain.go @@ -8,7 +8,6 @@ import ( // @Tags Website Domain // @Summary Delete website domain -// @Description 删除网站域名 // @Accept json // @Param request body request.WebsiteDomainDelete true "request" // @Success 200 @@ -29,7 +28,6 @@ func (b *BaseApi) DeleteWebDomain(c *gin.Context) { // @Tags Website Domain // @Summary Create website domain -// @Description 创建网站域名 // @Accept json // @Param request body request.WebsiteDomainCreate true "request" // @Success 200 {object} model.WebsiteDomain @@ -51,7 +49,6 @@ func (b *BaseApi) CreateWebDomain(c *gin.Context) { // @Tags Website Domain // @Summary Search website domains by websiteId -// @Description 通过网站 id 查询域名 // @Accept json // @Param websiteId path integer true "request" // @Success 200 {array} model.WebsiteDomain @@ -74,7 +71,6 @@ func (b *BaseApi) GetWebDomains(c *gin.Context) { // 写一个 update website domain 的接口 // @Tags Website Domain // @Summary Update website domain -// @Description 更新网站域名 // @Accept json // @Param request body request.WebsiteDomainUpdate true "request" // @Success 200 diff --git a/agent/app/api/v2/website_ssl.go b/agent/app/api/v2/website_ssl.go index ca08d361a..82d7b9f40 100644 --- a/agent/app/api/v2/website_ssl.go +++ b/agent/app/api/v2/website_ssl.go @@ -14,7 +14,6 @@ import ( // @Tags Website SSL // @Summary Page website ssl -// @Description 获取网站 ssl 列表分页 // @Accept json // @Param request body request.WebsiteSSLSearch true "request" // @Success 200 @@ -47,7 +46,6 @@ func (b *BaseApi) PageWebsiteSSL(c *gin.Context) { // @Tags Website SSL // @Summary Create website ssl -// @Description 创建网站 ssl // @Accept json // @Param request body request.WebsiteSSLCreate true "request" // @Success 200 {object} request.WebsiteSSLCreate @@ -69,7 +67,6 @@ func (b *BaseApi) CreateWebsiteSSL(c *gin.Context) { // @Tags Website SSL // @Summary Apply ssl -// @Description 申请证书 // @Accept json // @Param request body request.WebsiteSSLApply true "request" // @Success 200 @@ -90,7 +87,6 @@ func (b *BaseApi) ApplyWebsiteSSL(c *gin.Context) { // @Tags Website SSL // @Summary Resolve website ssl -// @Description 解析网站 ssl // @Accept json // @Param request body request.WebsiteDNSReq true "request" // @Success 200 {array} response.WebsiteDNSRes @@ -111,7 +107,6 @@ func (b *BaseApi) GetDNSResolve(c *gin.Context) { // @Tags Website SSL // @Summary Delete website ssl -// @Description 删除网站 ssl // @Accept json // @Param request body request.WebsiteBatchDelReq true "request" // @Success 200 @@ -132,7 +127,6 @@ func (b *BaseApi) DeleteWebsiteSSL(c *gin.Context) { // @Tags Website SSL // @Summary Search website ssl by website id -// @Description 通过网站 id 查询 ssl // @Accept json // @Param websiteId path integer true "request" // @Success 200 @@ -154,7 +148,6 @@ func (b *BaseApi) GetWebsiteSSLByWebsiteId(c *gin.Context) { // @Tags Website SSL // @Summary Search website ssl by id -// @Description 通过 id 查询 ssl // @Accept json // @Param id path integer true "request" // @Success 200 @@ -176,7 +169,6 @@ func (b *BaseApi) GetWebsiteSSLById(c *gin.Context) { // @Tags Website SSL // @Summary Update ssl -// @Description 更新 ssl // @Accept json // @Param request body request.WebsiteSSLUpdate true "request" // @Success 200 @@ -197,7 +189,6 @@ func (b *BaseApi) UpdateWebsiteSSL(c *gin.Context) { // @Tags Website SSL // @Summary Upload ssl -// @Description 上传 ssl // @Accept json // @Param request body request.WebsiteSSLUpload true "request" // @Success 200 @@ -218,7 +209,6 @@ func (b *BaseApi) UploadWebsiteSSL(c *gin.Context) { // @Tags Website SSL // @Summary Download SSL file -// @Description 下载证书文件 // @Accept json // @Param request body request.WebsiteResourceReq true "request" // @Success 200 diff --git a/agent/app/model/app.go b/agent/app/model/app.go index db670c649..1842646fe 100644 --- a/agent/app/model/app.go +++ b/agent/app/model/app.go @@ -13,6 +13,7 @@ type App struct { Key string `json:"key" gorm:"not null;"` ShortDescZh string `json:"shortDescZh" yaml:"shortDescZh"` ShortDescEn string `json:"shortDescEn" yaml:"shortDescEn"` + Description string `json:"description"` Icon string `json:"icon"` Type string `json:"type" gorm:"not null"` Status string `json:"status" gorm:"not null"` diff --git a/agent/app/service/website_ssl.go b/agent/app/service/website_ssl.go index 828432e4b..8da25b154 100644 --- a/agent/app/service/website_ssl.go +++ b/agent/app/service/website_ssl.go @@ -523,6 +523,8 @@ func (w WebsiteSSLService) Update(update request.WebsiteSSLUpdate) error { return err } updateParams["dns_account_id"] = dnsAccount.ID + } else { + updateParams["dns_account_id"] = 0 } return websiteSSLRepo.SaveByMap(websiteSSL, updateParams) } diff --git a/agent/cmd/server/main.go b/agent/cmd/server/main.go index f8f079f67..4a7364f7d 100644 --- a/agent/cmd/server/main.go +++ b/agent/cmd/server/main.go @@ -7,7 +7,7 @@ import ( ) // @title 1Panel -// @version 1.0 +// @version 2.0 // @description 开源Linux面板 // @termsOfService http://swagger.io/terms/ // @license.name Apache 2.0 diff --git a/agent/go.mod b/agent/go.mod index 93c0b3c9f..c0e5e6c2a 100644 --- a/agent/go.mod +++ b/agent/go.mod @@ -10,14 +10,14 @@ require ( github.com/docker/compose/v2 v2.29.0 github.com/docker/docker v27.1.0+incompatible github.com/docker/go-connections v0.5.0 - github.com/fsnotify/fsnotify v1.7.0 + github.com/fsnotify/fsnotify v1.8.0 github.com/gin-gonic/gin v1.10.0 github.com/glebarez/sqlite v1.11.0 - github.com/go-acme/lego/v4 v4.17.4 + github.com/go-acme/lego/v4 v4.21.0 github.com/go-gormigrate/gormigrate/v2 v2.1.2 github.com/go-playground/validator/v10 v10.22.0 github.com/go-redis/redis v6.15.9+incompatible - github.com/go-resty/resty/v2 v2.11.0 + github.com/go-resty/resty/v2 v2.16.2 github.com/go-sql-driver/mysql v1.8.1 github.com/goh-chunlin/go-onedrive v1.1.1 github.com/google/uuid v1.6.0 @@ -45,11 +45,11 @@ require ( github.com/subosito/gotenv v1.6.0 github.com/tencentyun/cos-go-sdk-v5 v0.7.54 github.com/upyun/go-sdk v2.1.0+incompatible - golang.org/x/crypto v0.25.0 - golang.org/x/net v0.27.0 - golang.org/x/oauth2 v0.21.0 - golang.org/x/sys v0.22.0 - golang.org/x/text v0.16.0 + golang.org/x/crypto v0.31.0 + golang.org/x/net v0.33.0 + golang.org/x/oauth2 v0.24.0 + golang.org/x/sys v0.28.0 + golang.org/x/text v0.21.0 gopkg.in/ini.v1 v1.67.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.25.11 @@ -62,7 +62,7 @@ require ( github.com/BurntSushi/toml v1.4.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect - github.com/aliyun/alibaba-cloud-sdk-go v1.62.712 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.63.72 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bodgit/plumbing v1.2.0 // indirect @@ -71,9 +71,9 @@ require ( github.com/bytedance/sonic v1.11.6 // indirect github.com/bytedance/sonic/loader v0.1.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/clbanning/mxj v1.8.4 // indirect - github.com/cloudflare/cloudflare-go v0.97.0 // indirect + github.com/cloudflare/cloudflare-go v0.112.0 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect github.com/connesc/cipherio v0.2.1 // indirect @@ -103,15 +103,15 @@ require ( github.com/gin-contrib/sse v0.1.0 // indirect github.com/glebarez/go-sqlite v1.21.2 // indirect github.com/go-ini/ini v1.67.0 // indirect - github.com/go-jose/go-jose/v4 v4.0.2 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-jose/go-jose/v4 v4.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-viper/mapstructure/v2 v2.0.0 // indirect - github.com/goccy/go-json v0.10.3 // indirect - github.com/gofrs/flock v0.12.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/goccy/go-json v0.10.4 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -149,7 +149,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.59 // indirect + github.com/miekg/dns v1.1.62 // indirect github.com/miekg/pkcs11 v1.1.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect @@ -192,9 +192,9 @@ require ( github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.9.0 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.898 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.898 // indirect + github.com/stretchr/testify v1.10.0 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1065 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1065 // indirect github.com/therootcompany/xz v1.0.1 // indirect github.com/theupdateframework/notary v0.7.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -212,32 +212,32 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect go4.org v0.0.0-20200411211856-f5505b9728dd // indirect golang.org/x/arch v0.8.0 // indirect - golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.22.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect - google.golang.org/grpc v1.63.1 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/time v0.8.0 // indirect + golang.org/x/tools v0.28.0 // indirect + google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/apimachinery v0.29.2 // indirect diff --git a/agent/go.sum b/agent/go.sum index 6f841f001..4a2b3a0ac 100644 --- a/agent/go.sum +++ b/agent/go.sum @@ -61,6 +61,7 @@ github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 h1:7dONQ3WNZ1zy960 github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82/go.mod h1:nLnM0KdK1CmygvjpDUO6m1TjSsiQtL61juhNsvV/JVI= github.com/aliyun/alibaba-cloud-sdk-go v1.62.712 h1:lM7JnA9dEdDFH9XOgRNQMDTQnOjlLkDTNA7c0aWTQ30= github.com/aliyun/alibaba-cloud-sdk-go v1.62.712/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= +github.com/aliyun/alibaba-cloud-sdk-go v1.63.72/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible h1:8psS8a+wKfiLt1iVDX79F7Y6wUM49Lcha2FMXt4UM8g= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= @@ -99,6 +100,7 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -109,6 +111,7 @@ github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/cloudflare/cloudflare-go v0.97.0 h1:feZRGiRF1EbljnNIYdt8014FnOLtC3CCvgkLXu915ks= github.com/cloudflare/cloudflare-go v0.97.0/go.mod h1:JXRwuTfHpe5xFg8xytc2w0XC6LcrFsBVMS4WlVaiGg8= +github.com/cloudflare/cloudflare-go v0.112.0/go.mod h1:QB55kuJ5ZTeLNFcLJePfMuBilhu/LDKpLBmKFQIoSZ0= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= @@ -213,6 +216,7 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= @@ -227,6 +231,8 @@ github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GM github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= github.com/go-acme/lego/v4 v4.17.4 h1:h0nePd3ObP6o7kAkndtpTzCw8shOZuWckNYeUQwo36Q= github.com/go-acme/lego/v4 v4.17.4/go.mod h1:dU94SvPNqimEeb7EVilGGSnS0nU1O5Exir0pQ4QFL4U= +github.com/go-acme/lego/v4 v4.21.0 h1:arEW+8o5p7VI8Bk1kr/PDlgD1DrxtTH1gJ4b7mehL8o= +github.com/go-acme/lego/v4 v4.21.0/go.mod h1:HrSWzm3Ckj45Ie3i+p1zKVobbQoMOaGu9m4up0dUeDI= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -236,6 +242,7 @@ github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-jose/go-jose/v4 v4.0.2 h1:R3l3kkBds16bO7ZFAEEcofK0MkrAJt3jlJznWZG0nvk= github.com/go-jose/go-jose/v4 v4.0.2/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= +github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -243,6 +250,7 @@ github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -271,6 +279,8 @@ github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGK github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= +github.com/go-resty/resty/v2 v2.16.2 h1:CpRqTjIzq/rweXUt9+GxzzQdlkqMdt8Lm/fuK/CAbAg= +github.com/go-resty/resty/v2 v2.16.2/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU= github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= @@ -278,11 +288,15 @@ github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqw github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.12.0 h1:xHW8t8GPAiGtqz7KxiSqfOEXwpOaqhpYZrTE2MQBgXY= github.com/gofrs/flock v0.12.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -510,6 +524,7 @@ github.com/mholt/archiver/v4 v4.0.0-alpha.8 h1:tRGQuDVPh66WCOelqe6LIGh0gwmfwxUrS github.com/mholt/archiver/v4 v4.0.0-alpha.8/go.mod h1:5f7FUYGXdJWUjESffJaYR4R60VhnHxb2X3T1teMyv5A= github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs= github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk= +github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= @@ -705,6 +720,7 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/studio-b12/gowebdav v0.9.0 h1:1j1sc9gQnNxbXXM4M/CebPOX4aXYtr7MojAVcN4dHjU= github.com/studio-b12/gowebdav v0.9.0/go.mod h1:bHA7t77X/QFExdeAnDzK6vKM34kEZAcE1OX4MfiwjkE= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= @@ -712,8 +728,10 @@ github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSW github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.898 h1:ERwcXqhc94L9cFxtiI0pvt7IJtlHl/p/Jayl3mLw+ms= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.898/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1065/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.898 h1:LoYv5u+gUoFpU/AmIuTRG/2KiEkdm9gCC0dTvk8WITQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.898/go.mod h1:c1j6YQ+vCbeA8kJ59Im4UnMd1GxovlpPBDhGZoewfn8= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1065/go.mod h1:HWvwy09hFSMXrj9SMvVRWV4U7rZO3l+WuogyNuxiT3M= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= github.com/tencentyun/cos-go-sdk-v5 v0.7.54 h1:FRamEhNBbSeggyYfWfzFejTLftgbICocSYFk4PKTSV4= github.com/tencentyun/cos-go-sdk-v5 v0.7.54/go.mod h1:UN+VdbCl1hg+kKi5RXqZgaP+Boqfmk+D04GRc4XFk70= @@ -775,8 +793,10 @@ go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0. go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.1/go.mod h1:GnOaBaFQ2we3b9AGWJpsBa7v1S5RlQzlC3O7dRMxZhM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 h1:NmnYCiR0qNufkldjVvyQfZTHSdzeHoZ41zggMsdMcLM= @@ -789,12 +809,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 h1:digkE go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0/go.mod h1:/OpE/y70qVkndM0TrxT4KBoN3RsFZP0QaofcfYrj76I= go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -824,6 +846,7 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -839,6 +862,7 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20241210194714-1829a127f884/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -864,6 +888,7 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -903,6 +928,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -911,6 +938,7 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -924,6 +952,7 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -975,6 +1004,7 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -984,6 +1014,7 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -997,12 +1028,14 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1051,6 +1084,7 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1112,10 +1146,13 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38/go.mod h1:xBI+tzfqGGN2JBeSebfKXFSdBpWVQ7sLW40PTupVRm4= google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697/go.mod h1:+D9ySVjN8nY8YCVjc5O7PZDIdZporIDY3KaGfJunh88= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1131,6 +1168,7 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.63.1 h1:pNClQmvdlyNUiwFETOux/PYqfhmA7BrswEdGRnib1fA= google.golang.org/grpc v1.63.1/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1145,6 +1183,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= diff --git a/agent/utils/geo/geo.go b/agent/utils/geo/geo.go index df469c91b..972dc6829 100644 --- a/agent/utils/geo/geo.go +++ b/agent/utils/geo/geo.go @@ -41,7 +41,7 @@ func GetIPLocation(reader *maxminddb.Reader, ip, lang string) (string, error) { return "", err } if lang == "zh" { - return geoLocation.Country.Zh + geoLocation.Province.Zh, nil + return geoLocation.Country.Zh + " " + geoLocation.Province.Zh, nil } - return geoLocation.Country.En + geoLocation.Province.En, nil + return geoLocation.Country.En + " " + geoLocation.Province.En, nil } diff --git a/agent/utils/ssl/client.go b/agent/utils/ssl/client.go index 38199ccc2..7046e5011 100644 --- a/agent/utils/ssl/client.go +++ b/agent/utils/ssl/client.go @@ -3,6 +3,8 @@ package ssl import ( "crypto" "encoding/json" + "github.com/go-acme/lego/v4/providers/dns/clouddns" + "github.com/go-acme/lego/v4/providers/dns/rainyun" "os" "strings" "time" @@ -67,11 +69,13 @@ const ( DnsPod DnsType = "DnsPod" AliYun DnsType = "AliYun" CloudFlare DnsType = "CloudFlare" + CloudDns DnsType = "CloudDns" NameSilo DnsType = "NameSilo" NameCheap DnsType = "NameCheap" NameCom DnsType = "NameCom" Godaddy DnsType = "Godaddy" TencentCloud DnsType = "TencentCloud" + RainYun DnsType = "RainYun" ) type DNSParam struct { @@ -84,6 +88,8 @@ type DNSParam struct { APIUser string `json:"apiUser"` APISecret string `json:"apiSecret"` SecretID string `json:"secretID"` + ClientID string `json:"clientID"` + Password string `json:"password"` } var ( @@ -127,6 +133,15 @@ func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.Web cloudflareConfig.PollingInterval = pollingInterval cloudflareConfig.TTL = 3600 p, err = cloudflare.NewDNSProviderConfig(cloudflareConfig) + case CloudDns: + clouddnsConfig := clouddns.NewDefaultConfig() + clouddnsConfig.ClientID = param.ClientID + clouddnsConfig.Email = param.Email + clouddnsConfig.Password = param.Password + clouddnsConfig.PropagationTimeout = propagationTimeout + clouddnsConfig.PollingInterval = pollingInterval + clouddnsConfig.TTL = ttl + p, err = clouddns.NewDNSProviderConfig(clouddnsConfig) case NameCheap: namecheapConfig := namecheap.NewDefaultConfig() namecheapConfig.APIKey = param.APIkey @@ -166,6 +181,13 @@ func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.Web tencentCloudConfig.PollingInterval = pollingInterval tencentCloudConfig.TTL = ttl p, err = tencentcloud.NewDNSProviderConfig(tencentCloudConfig) + case RainYun: + rainyunConfig := rainyun.NewDefaultConfig() + rainyunConfig.APIKey = param.APIkey + rainyunConfig.PropagationTimeout = propagationTimeout + rainyunConfig.PollingInterval = pollingInterval + rainyunConfig.TTL = ttl + p, err = rainyun.NewDNSProviderConfig(rainyunConfig) } if err != nil { return err diff --git a/core/app/api/v2/app_launcher.go b/core/app/api/v2/app_launcher.go index b923687c7..b63984003 100644 --- a/core/app/api/v2/app_launcher.go +++ b/core/app/api/v2/app_launcher.go @@ -18,7 +18,6 @@ func (b *BaseApi) SearchAppLauncher(c *gin.Context) { // @Tags App Launcher // @Summary Update app Launcher -// @Description 更新首页显示应用 // @Accept json // @Param request body dto.ChangeShow true "request" // @Success 200 diff --git a/core/app/api/v2/auth.go b/core/app/api/v2/auth.go index 7e621ffb0..fa2c49b4a 100644 --- a/core/app/api/v2/auth.go +++ b/core/app/api/v2/auth.go @@ -2,14 +2,11 @@ package v2 import ( "encoding/base64" - "github.com/1Panel-dev/1Panel/core/utils/geo" - "github.com/1Panel-dev/1Panel/core/app/api/v2/helper" "github.com/1Panel-dev/1Panel/core/app/dto" "github.com/1Panel-dev/1Panel/core/app/model" "github.com/1Panel-dev/1Panel/core/constant" "github.com/1Panel-dev/1Panel/core/global" - "github.com/1Panel-dev/1Panel/core/middleware" "github.com/1Panel-dev/1Panel/core/utils/captcha" "github.com/gin-gonic/gin" ) @@ -18,7 +15,6 @@ type BaseApi struct{} // @Tags Auth // @Summary User login -// @Description 用户登录 // @Accept json // @Param EntranceCode header string true "安全入口 base64 加密串" // @Param request body dto.Login true "request" @@ -53,7 +49,6 @@ func (b *BaseApi) Login(c *gin.Context) { // @Tags Auth // @Summary User login with mfa -// @Description 用户 mfa 登录 // @Accept json // @Param request body dto.MFALogin true "request" // @Success 200 {object} dto.UserLoginInfo @@ -81,7 +76,6 @@ func (b *BaseApi) MFALogin(c *gin.Context) { // @Tags Auth // @Summary User logout -// @Description 用户登出 // @Success 200 // @Security ApiKeyAuth // @Router /core/auth/logout [post] @@ -95,7 +89,6 @@ func (b *BaseApi) LogOut(c *gin.Context) { // @Tags Auth // @Summary Load captcha -// @Description 加载验证码 // @Success 200 {object} dto.CaptchaResponse // @Router /core/auth/captcha [get] func (b *BaseApi) Captcha(c *gin.Context) { @@ -107,33 +100,6 @@ func (b *BaseApi) Captcha(c *gin.Context) { helper.SuccessWithData(c, captcha) } -// @Tags Auth -// @Summary Load safety status -// @Description 获取系统安全登录状态 -// @Success 200 -// @Router /core/auth/issafety [get] -func (b *BaseApi) CheckIsSafety(c *gin.Context) { - code := c.DefaultQuery("code", "") - status, err := authService.CheckIsSafety(code) - if err != nil { - helper.InternalServer(c, err) - return - } - if status == "disable" && len(code) != 0 { - helper.ErrorWithDetail(c, constant.CodeErrNotFound, constant.ErrTypeInternalServer, err) - return - } - if status == "unpass" { - if middleware.LoadErrCode("err-entrance") != 200 { - helper.ErrResponse(c, middleware.LoadErrCode("err-entrance")) - return - } - helper.ErrorWithDetail(c, constant.CodeErrEntrance, constant.ErrTypeInternalServer, nil) - return - } - helper.SuccessWithOutData(c) -} - func (b *BaseApi) GetResponsePage(c *gin.Context) { pageCode, err := authService.GetResponsePage() if err != nil { @@ -145,7 +111,6 @@ func (b *BaseApi) GetResponsePage(c *gin.Context) { // @Tags Auth // @Summary Check System isDemo -// @Description 判断是否为demo环境 // @Success 200 // @Router /core/auth/demo [get] func (b *BaseApi) CheckIsDemo(c *gin.Context) { @@ -154,7 +119,6 @@ func (b *BaseApi) CheckIsDemo(c *gin.Context) { // @Tags Auth // @Summary Load System Language -// @Description 获取系统语言设置 // @Success 200 // @Router /core/auth/language [get] func (b *BaseApi) GetLanguage(c *gin.Context) { @@ -175,15 +139,15 @@ func saveLoginLogs(c *gin.Context, err error) { logs.Status = constant.StatusSuccess } logs.IP = c.ClientIP() - lang := c.GetHeader("Accept-Language") - if lang == "" { - lang = "zh" - } - address, err := geo.GetIPLocation(logs.IP, lang) - if err != nil { - global.LOG.Errorf("get ip location failed: %s", err) - } + //lang := c.GetHeader("Accept-Language") + //if lang == "" { + // lang = "zh" + //} + //address, err := geo.GetIPLocation(logs.IP, lang) + //if err != nil { + // global.LOG.Errorf("get ip location failed: %s", err) + //} logs.Agent = c.GetHeader("User-Agent") - logs.Address = address + //logs.Address = address _ = logService.CreateLoginLog(logs) } diff --git a/core/app/api/v2/backup.go b/core/app/api/v2/backup.go index 34e57df83..c5924527c 100644 --- a/core/app/api/v2/backup.go +++ b/core/app/api/v2/backup.go @@ -10,7 +10,6 @@ import ( // @Tags Backup Account // @Summary Create backup account -// @Description 创建备份账号 // @Accept json // @Param request body dto.BackupOperate true "request" // @Success 200 @@ -32,7 +31,6 @@ func (b *BaseApi) CreateBackup(c *gin.Context) { // @Tags Backup Account // @Summary Refresh token -// @Description 刷新 token // @Accept json // @Param request body dto.BackupOperate true "request" // @Success 200 @@ -52,7 +50,6 @@ func (b *BaseApi) RefreshToken(c *gin.Context) { // @Tags Backup Account // @Summary List buckets -// @Description 获取 bucket 列表 // @Accept json // @Param request body dto.ForBuckets true "request" // @Success 200 {array} string @@ -74,7 +71,6 @@ func (b *BaseApi) ListBuckets(c *gin.Context) { // @Tags Backup Account // @Summary Load backup account base info -// @Description 获取预定义备份账号信息 // @Accept json // @Success 200 {object} dto.OneDriveInfo // @Security ApiKeyAuth @@ -95,7 +91,6 @@ func (b *BaseApi) LoadBackupClientInfo(c *gin.Context) { // @Tags Backup Account // @Summary Delete backup account -// @Description 删除备份账号 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 @@ -117,7 +112,6 @@ func (b *BaseApi) DeleteBackup(c *gin.Context) { // @Tags Backup Account // @Summary Update backup account -// @Description 更新备份账号信息 // @Accept json // @Param request body dto.BackupOperate true "request" // @Success 200 @@ -135,4 +129,4 @@ func (b *BaseApi) UpdateBackup(c *gin.Context) { return } helper.SuccessWithData(c, nil) -} +} \ No newline at end of file diff --git a/core/app/api/v2/command.go b/core/app/api/v2/command.go index e8956dd62..b1e558e5d 100644 --- a/core/app/api/v2/command.go +++ b/core/app/api/v2/command.go @@ -9,7 +9,6 @@ import ( // @Tags Command // @Summary Create command -// @Description 创建快速命令 // @Accept json // @Param request body dto.CommandOperate true "request" // @Success 200 @@ -31,7 +30,6 @@ func (b *BaseApi) CreateCommand(c *gin.Context) { // @Tags Command // @Summary Page commands -// @Description 获取快速命令列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Success 200 {object} dto.PageResult @@ -57,7 +55,6 @@ func (b *BaseApi) SearchCommand(c *gin.Context) { // @Tags Command // @Summary Tree commands -// @Description 获取快速命令树 // @Accept json // @Param request body dto.OperateByType true "request" // @Success 200 {Array} dto.CommandTree @@ -80,7 +77,6 @@ func (b *BaseApi) SearchCommandTree(c *gin.Context) { // @Tags Command // @Summary List commands -// @Description 获取快速命令列表 // @Accept json // @Param request body dto.OperateByType true "request" // @Success 200 {object} dto.CommandInfo @@ -103,7 +99,6 @@ func (b *BaseApi) ListCommand(c *gin.Context) { // @Tags Command // @Summary Delete command -// @Description 删除快速命令 // @Accept json // @Param request body dto.OperateByIDs true "request" // @Success 200 @@ -125,7 +120,6 @@ func (b *BaseApi) DeleteCommand(c *gin.Context) { // @Tags Command // @Summary Update command -// @Description 更新快速命令 // @Accept json // @Param request body dto.CommandOperate true "request" // @Success 200 diff --git a/core/app/api/v2/group.go b/core/app/api/v2/group.go index 80940e8b0..8621e20b6 100644 --- a/core/app/api/v2/group.go +++ b/core/app/api/v2/group.go @@ -9,7 +9,6 @@ import ( // @Tags System Group // @Summary Create group -// @Description 创建系统组 // @Accept json // @Param request body dto.GroupCreate true "request" // @Success 200 @@ -31,7 +30,6 @@ func (b *BaseApi) CreateGroup(c *gin.Context) { // @Tags System Group // @Summary Delete group -// @Description 删除系统组 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 @@ -53,7 +51,6 @@ func (b *BaseApi) DeleteGroup(c *gin.Context) { // @Tags System Group // @Summary Update group -// @Description 更新系统组 // @Accept json // @Param request body dto.GroupUpdate true "request" // @Success 200 @@ -75,7 +72,6 @@ func (b *BaseApi) UpdateGroup(c *gin.Context) { // @Tags System Group // @Summary List groups -// @Description 查询系统组 // @Accept json // @Param request body dto.GroupSearch true "request" // @Success 200 {array} dto.OperateByType diff --git a/core/app/api/v2/host.go b/core/app/api/v2/host.go index b4d1874cf..4c2597cf6 100644 --- a/core/app/api/v2/host.go +++ b/core/app/api/v2/host.go @@ -22,7 +22,6 @@ import ( // @Tags Host // @Summary Create host -// @Description 创建主机 // @Accept json // @Param request body dto.HostOperate true "request" // @Success 200 @@ -45,7 +44,6 @@ func (b *BaseApi) CreateHost(c *gin.Context) { // @Tags Host // @Summary Test host conn by info -// @Description 测试主机连接 // @Accept json // @Param request body dto.HostConnTest true "request" // @Success 200 @@ -63,7 +61,6 @@ func (b *BaseApi) TestByInfo(c *gin.Context) { // @Tags Host // @Summary Test host conn by host id -// @Description 测试主机连接 // @Accept json // @Param id path integer true "request" // @Success 200 {boolean} connStatus @@ -87,7 +84,6 @@ func (b *BaseApi) TestByID(c *gin.Context) { // @Tags Host // @Summary Load host tree -// @Description 加载主机树 // @Accept json // @Param request body dto.SearchForTree true "request" // @Success 200 {array} dto.HostTree @@ -110,7 +106,6 @@ func (b *BaseApi) HostTree(c *gin.Context) { // @Tags Host // @Summary Page host -// @Description 获取主机列表分页 // @Accept json // @Param request body dto.SearchHostWithPage true "request" // @Success 200 {array} dto.HostTree @@ -136,7 +131,6 @@ func (b *BaseApi) SearchHost(c *gin.Context) { // @Tags Host // @Summary Delete host -// @Description 删除主机 // @Accept json // @Param request body dto.OperateByIDs true "request" // @Success 200 @@ -158,7 +152,6 @@ func (b *BaseApi) DeleteHost(c *gin.Context) { // @Tags Host // @Summary Update host -// @Description 更新主机 // @Accept json // @Param request body dto.HostOperate true "request" // @Success 200 @@ -224,7 +217,6 @@ func (b *BaseApi) UpdateHost(c *gin.Context) { // @Tags Host // @Summary Update host group -// @Description 切换分组 // @Accept json // @Param request body dto.ChangeHostGroup true "request" // @Success 200 diff --git a/core/app/api/v2/logs.go b/core/app/api/v2/logs.go index 86282d513..ea9154cc4 100644 --- a/core/app/api/v2/logs.go +++ b/core/app/api/v2/logs.go @@ -9,7 +9,6 @@ import ( // @Tags Logs // @Summary Page login logs -// @Description 获取系统登录日志列表分页 // @Accept json // @Param request body dto.SearchLgLogWithPage true "request" // @Success 200 {object} dto.PageResult @@ -21,7 +20,7 @@ func (b *BaseApi) GetLoginLogs(c *gin.Context) { return } - total, list, err := logService.PageLoginLog(req) + total, list, err := logService.PageLoginLog(c, req) if err != nil { helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) return @@ -35,7 +34,6 @@ func (b *BaseApi) GetLoginLogs(c *gin.Context) { // @Tags Logs // @Summary Page operation logs -// @Description 获取系统操作日志列表分页 // @Accept json // @Param request body dto.SearchOpLogWithPage true "request" // @Success 200 {object} dto.PageResult @@ -61,7 +59,6 @@ func (b *BaseApi) GetOperationLogs(c *gin.Context) { // @Tags Logs // @Summary Clean operation logs -// @Description 清空操作日志 // @Accept json // @Param request body dto.CleanLog true "request" // @Success 200 {object} dto.PageResult diff --git a/core/app/api/v2/setting.go b/core/app/api/v2/setting.go index 163def23a..1ad1d51f8 100644 --- a/core/app/api/v2/setting.go +++ b/core/app/api/v2/setting.go @@ -16,7 +16,6 @@ import ( // @Tags System Setting // @Summary Load system setting info -// @Description 加载系统配置信息 // @Success 200 {object} dto.SettingInfo // @Security ApiKeyAuth // @Router /core/settings/search [post] @@ -31,7 +30,6 @@ func (b *BaseApi) GetSettingInfo(c *gin.Context) { // @Tags System Setting // @Summary Load system terminal setting info -// @Description 加载系统终端配置信息 // @Success 200 {object} dto.TerminalInfo // @Security ApiKeyAuth // @Router /core/settings/terminal/search [post] @@ -46,7 +44,6 @@ func (b *BaseApi) GetTerminalSettingInfo(c *gin.Context) { // @Tags System Setting // @Summary Load system available status -// @Description 获取系统可用状态 // @Success 200 // @Security ApiKeyAuth // @Router /core/settings/search/available [get] @@ -56,7 +53,6 @@ func (b *BaseApi) GetSystemAvailable(c *gin.Context) { // @Tags System Setting // @Summary Update system setting -// @Description 更新系统配置 // @Accept json // @Param request body dto.SettingUpdate true "request" // @Success 200 @@ -78,7 +74,6 @@ func (b *BaseApi) UpdateSetting(c *gin.Context) { // @Tags System Setting // @Summary Update system terminal setting -// @Description 更新系统终端配置 // @Accept json // @Param request body dto.TerminalInfo true "request" // @Success 200 @@ -100,7 +95,6 @@ func (b *BaseApi) UpdateTerminalSetting(c *gin.Context) { // @Tags System Setting // @Summary Update proxy setting -// @Description 服务器代理配置 // @Accept json // @Param request body dto.ProxyUpdate true "request" // @Success 200 @@ -131,7 +125,6 @@ func (b *BaseApi) UpdateProxy(c *gin.Context) { // @Tags System Setting // @Summary Update system setting -// @Description 隐藏高级功能菜单 // @Accept json // @Param request body dto.SettingUpdate true "request" // @Success 200 @@ -153,7 +146,6 @@ func (b *BaseApi) UpdateMenu(c *gin.Context) { // @Tags System Setting // @Summary Update system password -// @Description 更新系统登录密码 // @Accept json // @Param request body dto.PasswordUpdate true "request" // @Success 200 @@ -175,7 +167,6 @@ func (b *BaseApi) UpdatePassword(c *gin.Context) { // @Tags System Setting // @Summary Update system ssl -// @Description 修改系统 ssl 登录 // @Accept json // @Param request body dto.SSLUpdate true "request" // @Success 200 @@ -197,7 +188,6 @@ func (b *BaseApi) UpdateSSL(c *gin.Context) { // @Tags System Setting // @Summary Load system cert info -// @Description 获取证书信息 // @Success 200 {object} dto.SettingInfo // @Security ApiKeyAuth // @Router /core/settings/ssl/info [get] @@ -212,7 +202,6 @@ func (b *BaseApi) LoadFromCert(c *gin.Context) { // @Tags System Setting // @Summary Download system cert -// @Description 下载证书 // @Success 200 // @Security ApiKeyAuth // @Router /core/settings/ssl/download [post] @@ -228,7 +217,6 @@ func (b *BaseApi) DownloadSSL(c *gin.Context) { // @Tags System Setting // @Summary Load system address -// @Description 获取系统地址信息 // @Accept json // @Success 200 // @Security ApiKeyAuth @@ -244,7 +232,6 @@ func (b *BaseApi) LoadInterfaceAddr(c *gin.Context) { // @Tags System Setting // @Summary Update system bind info -// @Description 更新系统监听信息 // @Accept json // @Param request body dto.BindInfo true "request" // @Success 200 @@ -266,7 +253,6 @@ func (b *BaseApi) UpdateBindInfo(c *gin.Context) { // @Tags System Setting // @Summary Update system port -// @Description 更新系统端口 // @Accept json // @Param request body dto.PortUpdate true "request" // @Success 200 @@ -288,7 +274,6 @@ func (b *BaseApi) UpdatePort(c *gin.Context) { // @Tags System Setting // @Summary Reset system password expired -// @Description 重置过期系统登录密码 // @Accept json // @Param request body dto.PasswordUpdate true "request" // @Success 200 @@ -310,7 +295,6 @@ func (b *BaseApi) HandlePasswordExpired(c *gin.Context) { // @Tags System Setting // @Summary Load mfa info -// @Description 获取 mfa 信息 // @Accept json // @Param request body dto.MfaCredential true "request" // @Success 200 {object} mfa.Otp @@ -333,7 +317,6 @@ func (b *BaseApi) LoadMFA(c *gin.Context) { // @Tags System Setting // @Summary Bind mfa -// @Description Mfa 绑定 // @Accept json // @Param request body dto.MfaCredential true "request" // @Success 200 diff --git a/core/app/api/v2/upgrade.go b/core/app/api/v2/upgrade.go index b99b07365..c0f68a06e 100644 --- a/core/app/api/v2/upgrade.go +++ b/core/app/api/v2/upgrade.go @@ -9,7 +9,6 @@ import ( // @Tags System Setting // @Summary Load upgrade info -// @Description 系统更新信息 // @Success 200 {object} dto.UpgradeInfo // @Security ApiKeyAuth // @Router /core/settings/upgrade [get] @@ -24,7 +23,6 @@ func (b *BaseApi) GetUpgradeInfo(c *gin.Context) { // @Tags System Setting // @Summary Load release notes by version -// @Description 获取版本 release notes // @Accept json // @Param request body dto.Upgrade true "request" // @Success 200 @@ -46,7 +44,6 @@ func (b *BaseApi) GetNotesByVersion(c *gin.Context) { // @Tags System Setting // @Summary Upgrade -// @Description 系统更新 // @Accept json // @Param request body dto.Upgrade true "request" // @Success 200 @@ -68,7 +65,6 @@ func (b *BaseApi) Upgrade(c *gin.Context) { // @Tags System Setting // @Summary Upgrade -// @Description 系统回滚 // @Accept json // @Param request body dto.OperateByID true "request" // @Success 200 diff --git a/core/app/service/logs.go b/core/app/service/logs.go index f6ec9820e..2dc277c08 100644 --- a/core/app/service/logs.go +++ b/core/app/service/logs.go @@ -1,6 +1,9 @@ package service import ( + "github.com/1Panel-dev/1Panel/core/utils/common" + geo2 "github.com/1Panel-dev/1Panel/core/utils/geo" + "github.com/gin-gonic/gin" "os" "path" "path/filepath" @@ -25,7 +28,7 @@ const logs = "https://resource.fit2cloud.com/installation-log.sh" type ILogService interface { ListSystemLogFile() ([]string, error) CreateLoginLog(operation model.LoginLog) error - PageLoginLog(search dto.SearchLgLogWithPage) (int64, interface{}, error) + PageLoginLog(ctx *gin.Context, search dto.SearchLgLogWithPage) (int64, interface{}, error) CreateOperationLog(operation *model.OperationLog) error PageOperationLog(search dto.SearchOpLogWithPage) (int64, interface{}, error) @@ -74,7 +77,7 @@ func (u *LogService) ListSystemLogFile() ([]string, error) { return files, nil } -func (u *LogService) PageLoginLog(req dto.SearchLgLogWithPage) (int64, interface{}, error) { +func (u *LogService) PageLoginLog(ctx *gin.Context, req dto.SearchLgLogWithPage) (int64, interface{}, error) { options := []global.DBOption{ repo.WithOrderBy("created_at desc"), } @@ -90,11 +93,15 @@ func (u *LogService) PageLoginLog(req dto.SearchLgLogWithPage) (int64, interface options..., ) var dtoOps []dto.LoginLog + geoDB, _ := geo2.NewGeo() for _, op := range ops { var item dto.LoginLog if err := copier.Copy(&item, &op); err != nil { return 0, nil, errors.WithMessage(constant.ErrTransform, err.Error()) } + if geoDB != nil { + item.Address, _ = geo2.GetIPLocation(geoDB, item.IP, common.GetLang(ctx)) + } dtoOps = append(dtoOps, item) } return total, dtoOps, err diff --git a/core/init/router/router.go b/core/init/router/router.go index c5cff9292..65ccad618 100644 --- a/core/init/router/router.go +++ b/core/init/router/router.go @@ -126,8 +126,8 @@ func setWebStatic(rootRouter *gin.RouterGroup) { entrance := authService.GetSecurityEntrance() if entrance != "" { rootRouter.GET("/"+entrance, func(c *gin.Context) { - entrance = authService.GetSecurityEntrance() - if entrance == "" { + currentEntrance := authService.GetSecurityEntrance() + if currentEntrance != entrance { handleNoRoute(c) return } diff --git a/core/middleware/bind_domain.go b/core/middleware/bind_domain.go index 050f0a826..8c5cda8de 100644 --- a/core/middleware/bind_domain.go +++ b/core/middleware/bind_domain.go @@ -29,8 +29,8 @@ func BindDomain() gin.HandlerFunc { } if domains != status.Value { - if LoadErrCode("err-domain") != 200 { - helper.ErrResponse(c, LoadErrCode("err-domain")) + if LoadErrCode() != 200 { + helper.ErrResponse(c, LoadErrCode()) return } helper.ErrorWithDetail(c, constant.CodeErrDomain, constant.ErrTypeInternalServer, errors.New("domain not allowed")) diff --git a/core/middleware/helper.go b/core/middleware/helper.go index e34d32c8e..b115b3412 100644 --- a/core/middleware/helper.go +++ b/core/middleware/helper.go @@ -6,7 +6,7 @@ import ( "github.com/1Panel-dev/1Panel/core/app/repo" ) -func LoadErrCode(errInfo string) int { +func LoadErrCode() int { settingRepo := repo.NewISettingRepo() codeVal, err := settingRepo.Get(repo.WithByKey("NoAuthSetting")) if err != nil { @@ -26,6 +26,10 @@ func LoadErrCode(errInfo string) int { return http.StatusRequestTimeout case "416": return http.StatusRequestedRangeNotSatisfiable + case "500": + return http.StatusInternalServerError + case "444": + return 444 default: return http.StatusOK } diff --git a/core/middleware/ip_limit.go b/core/middleware/ip_limit.go index 27fbff887..078af16ed 100644 --- a/core/middleware/ip_limit.go +++ b/core/middleware/ip_limit.go @@ -35,8 +35,8 @@ func WhiteAllow() gin.HandlerFunc { return } } - if LoadErrCode("err-ip") != 200 { - helper.ErrResponse(c, LoadErrCode("err-ip")) + if LoadErrCode() != 200 { + helper.ErrResponse(c, LoadErrCode()) return } helper.ErrorWithDetail(c, constant.CodeErrIP, constant.ErrTypeInternalServer, errors.New("IP address not allowed")) diff --git a/core/router/ro_base.go b/core/router/ro_base.go index 3c38c7eac..1de636851 100644 --- a/core/router/ro_base.go +++ b/core/router/ro_base.go @@ -14,7 +14,6 @@ func (s *BaseRouter) InitRouter(Router *gin.RouterGroup) { baseRouter.GET("/captcha", baseApi.Captcha) baseRouter.POST("/mfalogin", baseApi.MFALogin) baseRouter.POST("/login", baseApi.Login) - baseRouter.GET("/issafety", baseApi.CheckIsSafety) baseRouter.POST("/logout", baseApi.LogOut) baseRouter.GET("/demo", baseApi.CheckIsDemo) baseRouter.GET("/language", baseApi.GetLanguage) diff --git a/core/utils/common/common.go b/core/utils/common/common.go index 2761f355c..b255d9688 100644 --- a/core/utils/common/common.go +++ b/core/utils/common/common.go @@ -2,6 +2,7 @@ package common import ( "fmt" + "github.com/gin-gonic/gin" mathRand "math/rand" "net" "os" @@ -154,3 +155,11 @@ func CreateDirWhenNotExist(isDir bool, pathItem string) (string, error) { } return pathItem, nil } + +func GetLang(c *gin.Context) string { + lang := c.GetHeader("Accept-Language") + if lang == "" { + lang = "en" + } + return lang +} diff --git a/core/utils/geo/geo.go b/core/utils/geo/geo.go index b55f46f99..252aa39f0 100644 --- a/core/utils/geo/geo.go +++ b/core/utils/geo/geo.go @@ -20,20 +20,28 @@ type LocationRes struct { Province Location `maxminddb:"province"` } -func GetIPLocation(ip, lang string) (string, error) { +func NewGeo() (*maxminddb.Reader, error) { geoPath := path.Join(global.CONF.System.BaseDir, "1panel", "geo", "GeoIP.mmdb") - reader, err := maxminddb.Open(geoPath) - if err != nil { - return "", err - } + return maxminddb.Open(geoPath) +} + +func GetIPLocation(reader *maxminddb.Reader, ip, lang string) (string, error) { + var err error var geoLocation LocationRes + if reader == nil { + geoPath := path.Join(global.CONF.System.BaseDir, "1panel", "geo", "GeoIP.mmdb") + reader, err = maxminddb.Open(geoPath) + if err != nil { + return "", err + } + } ipNet := net.ParseIP(ip) err = reader.Lookup(ipNet, &geoLocation) if err != nil { return "", err } - if lang == "en" { - return geoLocation.Country.En + geoLocation.Province.En, nil + if lang == "zh" { + return geoLocation.Country.Zh + " " + geoLocation.Province.Zh, nil } - return geoLocation.Country.Zh + geoLocation.Province.Zh, nil + return geoLocation.Country.En + " " + geoLocation.Province.En, nil } diff --git a/frontend/src/global/form-rules.ts b/frontend/src/global/form-rules.ts index dcce0f9df..d7d10b177 100644 --- a/frontend/src/global/form-rules.ts +++ b/frontend/src/global/form-rules.ts @@ -306,7 +306,7 @@ const checkAppName = (rule: any, value: any, callback: any) => { if (value === '' || typeof value === 'undefined' || value == null) { callback(new Error(i18n.global.t('commons.rule.appName'))); } else { - const reg = /^(?![_-])[a-zA-Z0-9_-]{1,29}[a-zA-Z0-9]$/; + const reg = /^(?![_-])[a-z0-9_-]{1,29}[a-z0-9]$/; if (!reg.test(value) && value !== '') { callback(new Error(i18n.global.t('commons.rule.appName'))); } else { diff --git a/frontend/src/global/mimetype.ts b/frontend/src/global/mimetype.ts index f96917aa5..a60ef4416 100644 --- a/frontend/src/global/mimetype.ts +++ b/frontend/src/global/mimetype.ts @@ -199,6 +199,14 @@ export const DNSTypes = [ label: 'GoDaddy', value: 'Godaddy', }, + { + label: 'CloudDNS', + value: 'CloudDns', + }, + { + label: i18n.global.t('website.rainyun'), + value: 'RainYun', + }, ]; export const Fields = [ diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 6bf42b87d..6d8029d66 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -2346,6 +2346,7 @@ const message = { changeDatabaseHelper1: 'Database association is used for backing up and restoring the website.', changeDatabaseHelper2: 'Switching to another database will cause previous backups to be unrecoverable.', saveCustom: 'Save as Template', + rainyun: 'Rain Yun', }, php: { short_open_tag: 'Short tag support', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 7ad7fbf82..9d99e8b0c 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -2180,6 +2180,7 @@ const message = { changeDatabaseHelper1: '資料庫關聯用於備份恢復網站。', changeDatabaseHelper2: '切換其他資料庫會導致以前的備份無法恢復。', saveCustom: '另存为模版', + rainyun: '瑞雲', }, php: { short_open_tag: '短標簽支持', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 8b0084882..b25b94bc4 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -2179,6 +2179,7 @@ const message = { changeDatabaseHelper1: '数据库关联用于备份恢复网站', changeDatabaseHelper2: '切换其他数据库会导致以前的备份无法恢复', saveCustom: '另存为模版', + rainyun: '雨云', }, php: { short_open_tag: '短标签支持', diff --git a/frontend/src/views/website/ssl/dns-account/create/index.vue b/frontend/src/views/website/ssl/dns-account/create/index.vue index 99e3d4cfc..8d6726286 100644 --- a/frontend/src/views/website/ssl/dns-account/create/index.vue +++ b/frontend/src/views/website/ssl/dns-account/create/index.vue @@ -43,7 +43,22 @@ - +
+ + + +
+
+ + + + + + + + + +