From 5a20546fc64bb0303809d1311c5d93e0c0294db1 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Thu, 5 Jan 2023 11:57:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B3=BB=E7=BB=9F=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B0=83=E6=95=B4=E4=B8=BA=E4=BB=8E=20swagge?= =?UTF-8?q?r.json=20=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/v1/app.go | 37 +- backend/app/api/v1/app_install.go | 110 +- backend/app/api/v1/auth.go | 6 - backend/app/api/v1/backup.go | 14 +- backend/app/api/v1/command.go | 11 +- backend/app/api/v1/compose_template.go | 11 +- backend/app/api/v1/container.go | 27 +- backend/app/api/v1/cronjob.go | 24 +- backend/app/api/v1/dashboard.go | 2 - backend/app/api/v1/database_mysql.go | 25 +- backend/app/api/v1/database_redis.go | 12 +- backend/app/api/v1/docker.go | 5 - backend/app/api/v1/file.go | 21 +- backend/app/api/v1/group.go | 9 +- backend/app/api/v1/host.go | 23 +- backend/app/api/v1/image.go | 13 +- backend/app/api/v1/image_repo.go | 9 +- backend/app/api/v1/logs.go | 7 +- backend/app/api/v1/nginx.go | 11 +- backend/app/api/v1/setting.go | 8 - backend/app/api/v1/website.go | 41 +- backend/app/api/v1/website_acme_account.go | 5 +- backend/app/api/v1/website_dns_account.go | 6 +- backend/app/api/v1/website_group.go | 6 +- backend/app/api/v1/website_ssl.go | 9 +- backend/middleware/operation.go | 52 +- backend/router/ro_website.go | 6 +- cmd/server/docs/docs.go | 7000 +++++++++++++++++++- cmd/server/docs/swagger.go | 6 + cmd/server/docs/swagger.json | 7000 +++++++++++++++++++- cmd/server/docs/swagger.yaml | 4552 ++++++++++++- cmd/server/main.go | 2 +- cmd/server/operation/operation.go | 6 - cmd/server/operation/operation.json | 130 - frontend/src/lang/modules/en.ts | 1 + frontend/src/lang/modules/zh.ts | 1 + 36 files changed, 18473 insertions(+), 735 deletions(-) create mode 100644 cmd/server/docs/swagger.go delete mode 100644 cmd/server/operation/operation.go delete mode 100644 cmd/server/operation/operation.json diff --git a/backend/app/api/v1/app.go b/backend/app/api/v1/app.go index 5b9d5eaff..c18a0c345 100644 --- a/backend/app/api/v1/app.go +++ b/backend/app/api/v1/app.go @@ -7,9 +7,8 @@ import ( "github.com/gin-gonic/gin" ) -// List app // @Tags App -// @Summary Search app list +// @Summary List apps // @Description 获取应用列表 // @Accept json // @Param request body request.AppSearch true "request" @@ -30,6 +29,13 @@ func (b *BaseApi) SearchApp(c *gin.Context) { helper.SuccessWithData(c, list) } +// @Tags App +// @Summary Sync app list +// @Description 同步应用列表 +// @Success 200 +// @Security ApiKeyAuth +// @Router /apps/sync [post] +// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFuntions":[],"formatZH":"应用商店同步","formatEN":"App store synchronization"} func (b *BaseApi) SyncApp(c *gin.Context) { if err := appService.SyncAppList(); err != nil { helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) @@ -38,6 +44,14 @@ func (b *BaseApi) SyncApp(c *gin.Context) { helper.SuccessWithData(c, "") } +// @Tags App +// @Summary Search app by id +// @Description 通过 id 获取应用信息 +// @Accept json +// @Param id path integer true "app id" +// @Success 200 {object} response.AppDTO +// @Security ApiKeyAuth +// @Router /apps/:id [get] func (b *BaseApi) GetApp(c *gin.Context) { id, err := helper.GetParamID(c) if err != nil { @@ -51,6 +65,16 @@ func (b *BaseApi) GetApp(c *gin.Context) { } helper.SuccessWithData(c, appDTO) } + +// @Tags App +// @Summary Search app detail by id +// @Description 通过 id 获取应用详情 +// @Accept json +// @Param appId path integer true "app id" +// @Param version path string true "app 版本" +// @Success 200 {object} response.AppDetailDTO +// @Security ApiKeyAuth +// @Router /apps/detail/:appId/:version [get] func (b *BaseApi) GetAppDetail(c *gin.Context) { appId, err := helper.GetIntParamByKey(c, "appId") if err != nil { @@ -66,6 +90,15 @@ func (b *BaseApi) GetAppDetail(c *gin.Context) { helper.SuccessWithData(c, appDetailDTO) } +// @Tags App +// @Summary Install app +// @Description 安装应用 +// @Accept json +// @Param request body request.AppInstallCreate true "request" +// @Success 200 {object} model.AppInstall +// @Security ApiKeyAuth +// @Router /apps/install [post] +// @x-panel-log {"bodyKeys":["name"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"name","input_value":"name","isList":false,"db":"app_installs","output_colume":"app_id","output_value":"appId"},{"info":"appId","isList":false,"db":"apps","output_colume":"key","output_value":"appKey"}],"formatZH":"安装应用 [appKey]-[name]","formatEN":"Install app [appKey]-[name]"} func (b *BaseApi) InstallApp(c *gin.Context) { var req request.AppInstallCreate if err := c.ShouldBindJSON(&req); err != nil { diff --git a/backend/app/api/v1/app_install.go b/backend/app/api/v1/app_install.go index d5b77d6b4..a03d2db8e 100644 --- a/backend/app/api/v1/app_install.go +++ b/backend/app/api/v1/app_install.go @@ -13,9 +13,8 @@ import ( "github.com/gin-gonic/gin" ) -// List app installed // @Tags App -// @Summary Search app list installed +// @Summary List app installed // @Description 获取已安装应用列表 // @Accept json // @Param request body request.AppInstalledSearch true "request" @@ -48,6 +47,14 @@ func (b *BaseApi) SearchAppInstalled(c *gin.Context) { } } +// @Tags App +// @Summary Check app installed +// @Description 检查应用安装情况 +// @Accept json +// @Param key path string true "request" +// @Success 200 {object} response.AppInstalledCheck +// @Security ApiKeyAuth +// @Router /apps/installed/check/:key [get] func (b *BaseApi) CheckAppInstalled(c *gin.Context) { key, ok := c.Params.Get("key") if !ok { @@ -62,6 +69,14 @@ func (b *BaseApi) CheckAppInstalled(c *gin.Context) { helper.SuccessWithData(c, checkData) } +// @Tags App +// @Summary Search app port by key +// @Description 获取应用端口 +// @Accept json +// @Param key path string true "request" +// @Success 200 {integer} port +// @Security ApiKeyAuth +// @Router /apps/installed/loadport/:key [get] func (b *BaseApi) LoadPort(c *gin.Context) { key, ok := c.Params.Get("key") if !ok { @@ -76,6 +91,14 @@ func (b *BaseApi) LoadPort(c *gin.Context) { helper.SuccessWithData(c, port) } +// @Tags App +// @Summary Search app password by key +// @Description 获取应用密码 +// @Accept json +// @Param key path string true "request" +// @Success 200 {string} password +// @Security ApiKeyAuth +// @Router /apps/installed/loadpassword/:key [get] func (b *BaseApi) LoadPassword(c *gin.Context) { key, ok := c.Params.Get("key") if !ok { @@ -90,6 +113,14 @@ func (b *BaseApi) LoadPassword(c *gin.Context) { helper.SuccessWithData(c, password) } +// @Tags App +// @Summary Check before delete +// @Description 删除前检查 +// @Accept json +// @Param appInstallId path integer true "App install id" +// @Success 200 {anrry} dto.AppResource +// @Security ApiKeyAuth +// @Router /apps/installed/delete/check/:appInstallId [get] func (b *BaseApi) DeleteCheck(c *gin.Context) { appInstallId, err := helper.GetIntParamByKey(c, "appInstallId") if err != nil { @@ -104,6 +135,14 @@ func (b *BaseApi) DeleteCheck(c *gin.Context) { helper.SuccessWithData(c, checkData) } +// Sync app installed +// @Tags App +// @Summary Sync app installed +// @Description 同步已安装应用列表 +// @Success 200 +// @Security ApiKeyAuth +// @Router /apps/installed/sync [post] +// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFuntions":[],"formatZH":"同步已安装应用列表","formatEN":"Sync the list of installed apps"} func (b *BaseApi) SyncInstalled(c *gin.Context) { if err := appInstallService.SyncAll(); err != nil { helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) @@ -112,6 +151,14 @@ func (b *BaseApi) SyncInstalled(c *gin.Context) { helper.SuccessWithData(c, "") } +// @Tags App +// @Summary Page installed backups +// @Description 查询已安装备份列表分页 +// @Accept json +// @Param request body request.AppBackupSearch true "request" +// @Success 200 {object} dto.PageResult +// @Security ApiKeyAuth +// @Router /apps/installed/backups [post] func (b *BaseApi) SearchInstalledBackup(c *gin.Context) { var req request.AppBackupSearch if err := c.ShouldBindJSON(&req); err != nil { @@ -129,6 +176,15 @@ func (b *BaseApi) SearchInstalledBackup(c *gin.Context) { }) } +// @Tags App +// @Summary Operate installed app +// @Description 操作已安装应用 +// @Accept json +// @Param request body request.AppInstalledOperate true "request" +// @Success 200 +// @Security ApiKeyAuth +// @Router /apps/installed/op [post] +// @x-panel-log {"bodyKeys":["installId","operate"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"installId","isList":false,"db":"app_installs","output_colume":"app_id","output_value":"appId"},{"input_colume":"id","input_value":"installId","isList":false,"db":"app_installs","output_colume":"name","output_value":"appName"},{"input_colume":"id","input_value":"appId","isList":false,"db":"apps","output_colume":"key","output_value":"appKey"}],"formatZH":"[appKey] 应用 [appName] [operate]","formatEN":"[appKey] App [appName] [operate]"} func (b *BaseApi) OperateInstalled(c *gin.Context) { var req request.AppInstalledOperate if err := c.ShouldBindJSON(&req); err != nil { @@ -142,6 +198,15 @@ func (b *BaseApi) OperateInstalled(c *gin.Context) { helper.SuccessWithData(c, nil) } +// @Tags App +// @Summary Delete app backup record +// @Description 删除应用备份记录 +// @Accept json +// @Param request body request.AppBackupDelete true "request" +// @Success 200 +// @Security ApiKeyAuth +// @Router /apps/installed/backups/del [post] +// @x-panel-log {"bodyKeys":["ids"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"ids","isList":true,"db":"app_install_backups","output_colume":"name","output_value":"names"}],"formatZH":"删除应用备份 [names]","formatEN":"Deleting an Application Backup [names]"} func (b *BaseApi) DeleteAppBackup(c *gin.Context) { var req request.AppBackupDelete if err := c.ShouldBindJSON(&req); err != nil { @@ -155,6 +220,14 @@ func (b *BaseApi) DeleteAppBackup(c *gin.Context) { helper.SuccessWithData(c, nil) } +// @Tags App +// @Summary Search app service by key +// @Description 通过 key 获取应用 service +// @Accept json +// @Param key path string true "request" +// @Success 200 {anrry} response.AppService +// @Security ApiKeyAuth +// @Router /apps/services/:key [get] func (b *BaseApi) GetServices(c *gin.Context) { key := c.Param("key") services, err := appInstallService.GetServices(key) @@ -165,6 +238,14 @@ func (b *BaseApi) GetServices(c *gin.Context) { helper.SuccessWithData(c, services) } +// @Tags App +// @Summary Search app update version by install id +// @Description 通过 install id 获取应用更新版本 +// @Accept json +// @Param appInstallId path integer true "request" +// @Success 200 {anrry} dto.AppVersion +// @Security ApiKeyAuth +// @Router /apps/installed/:appInstallId/versions [get] func (b *BaseApi) GetUpdateVersions(c *gin.Context) { appInstallId, err := helper.GetIntParamByKey(c, "appInstallId") if err != nil { @@ -179,6 +260,15 @@ func (b *BaseApi) GetUpdateVersions(c *gin.Context) { helper.SuccessWithData(c, versions) } +// @Tags App +// @Summary Change app port +// @Description 修改应用端口 +// @Accept json +// @Param request body request.PortUpdate true "request" +// @Success 200 +// @Security ApiKeyAuth +// @Router /apps/installed/port/change [post] +// @x-panel-log {"bodyKeys":["key","name","port"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"应用端口修改 [key]-[name] => [port]","formatEN":"Application port update [key]-[name] => [port]"} func (b *BaseApi) ChangeAppPort(c *gin.Context) { var req request.PortUpdate if err := c.ShouldBindJSON(&req); err != nil { @@ -196,6 +286,14 @@ func (b *BaseApi) ChangeAppPort(c *gin.Context) { helper.SuccessWithData(c, nil) } +// @Tags App +// @Summary Search default config by key +// @Description 通过 key 获取应用默认配置 +// @Accept json +// @Param key path string true "request" +// @Success 200 {string} content +// @Security ApiKeyAuth +// @Router /apps/installed/conf/:key [get] func (b *BaseApi) GetDefaultConfig(c *gin.Context) { key := c.Param("key") if key == "" { @@ -211,6 +309,14 @@ func (b *BaseApi) GetDefaultConfig(c *gin.Context) { helper.SuccessWithData(c, content) } +// @Tags App +// @Summary Search params by appInstallId +// @Description 通过 install id 获取应用参数 +// @Accept json +// @Param appInstallId path string true "request" +// @Success 200 {object} response.AppParam +// @Security ApiKeyAuth +// @Router /apps/installed/params/:appInstallId [get] func (b *BaseApi) GetParams(c *gin.Context) { appInstallId, err := helper.GetIntParamByKey(c, "appInstallId") if err != nil { diff --git a/backend/app/api/v1/auth.go b/backend/app/api/v1/auth.go index 6963605e0..319557b9c 100644 --- a/backend/app/api/v1/auth.go +++ b/backend/app/api/v1/auth.go @@ -15,7 +15,6 @@ import ( type BaseApi struct{} -// User login // @Tags Auth // @Summary User login // @Description 用户登录 @@ -47,7 +46,6 @@ func (b *BaseApi) Login(c *gin.Context) { helper.SuccessWithData(c, user) } -// User login with mfa // @Tags Auth // @Summary User login with mfa // @Description 用户 mfa 登录 @@ -74,7 +72,6 @@ func (b *BaseApi) MFALogin(c *gin.Context) { helper.SuccessWithData(c, user) } -// User logout // @Tags Auth // @Summary User logout // @Description 用户登出 @@ -89,7 +86,6 @@ func (b *BaseApi) LogOut(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load captcha // @Tags Auth // @Summary Load captcha // @Description 加载验证码 @@ -104,7 +100,6 @@ func (b *BaseApi) Captcha(c *gin.Context) { helper.SuccessWithData(c, captcha) } -// Load safety status // @Tags Auth // @Summary Load safety status // @Description 获取系统安全登录状态 @@ -146,7 +141,6 @@ func (b *BaseApi) CheckIsFirstLogin(c *gin.Context) { helper.SuccessWithData(c, authService.CheckIsFirst()) } -// Init user // @Tags Auth // @Summary Init user // @Description 初始化用户 diff --git a/backend/app/api/v1/backup.go b/backend/app/api/v1/backup.go index 146c9627c..6bf428fec 100644 --- a/backend/app/api/v1/backup.go +++ b/backend/app/api/v1/backup.go @@ -8,7 +8,6 @@ import ( "github.com/gin-gonic/gin" ) -// Create backup account // @Tags Backup Account // @Summary Create backup account // @Description 创建备份账号 @@ -35,9 +34,8 @@ func (b *BaseApi) CreateBackup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// List bucket // @Tags Backup Account -// @Summary List bucket +// @Summary List buckets // @Description 获取 bucket 列表 // @Accept json // @Param request body dto.ForBuckets true "request" @@ -62,7 +60,6 @@ func (b *BaseApi) ListBuckets(c *gin.Context) { helper.SuccessWithData(c, buckets) } -// Delete backup account // @Tags Backup Account // @Summary Delete backup account // @Description 删除备份账号 @@ -90,9 +87,8 @@ func (b *BaseApi) DeleteBackup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Page backup records // @Tags Backup Account -// @Summary Search backup records with page +// @Summary Page backup records // @Description 获取备份记录列表分页 // @Accept json // @Param request body dto.RecordSearch true "request" @@ -118,7 +114,6 @@ func (b *BaseApi) SearchBackupRecords(c *gin.Context) { }) } -// Download backup record // @Tags Backup Account // @Summary Download backup record // @Description 下载备份记录 @@ -147,7 +142,6 @@ func (b *BaseApi) DownloadRecord(c *gin.Context) { c.File(filePath) } -// Delete backup record // @Tags Backup Account // @Summary Delete backup record // @Description 删除备份记录 @@ -175,7 +169,6 @@ func (b *BaseApi) DeleteBackupRecord(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update backup account // @Tags Backup Account // @Summary Update backup account // @Description 更新备份账号信息 @@ -207,9 +200,8 @@ func (b *BaseApi) UpdateBackup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// List backup account // @Tags Backup Account -// @Summary Search backup account +// @Summary List backup accounts // @Description 获取备份账号列表 // @Success 200 {anrry} dto.BackupInfo // @Security ApiKeyAuth diff --git a/backend/app/api/v1/command.go b/backend/app/api/v1/command.go index 0b616527b..615408a9f 100644 --- a/backend/app/api/v1/command.go +++ b/backend/app/api/v1/command.go @@ -8,7 +8,6 @@ import ( "github.com/gin-gonic/gin" ) -// Create command // @Tags Command // @Summary Create command // @Description 创建快速命令 @@ -35,15 +34,14 @@ func (b *BaseApi) CreateCommand(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Page command // @Tags Command -// @Summary Search command with page +// @Summary Page commands // @Description 获取快速命令列表分页 // @Accept json // @Param request body dto.SearchWithPage true "request" // @Success 200 {object} dto.PageResult // @Security ApiKeyAuth -// @Router /commands [post] +// @Router /commands/search [post] func (b *BaseApi) SearchCommand(c *gin.Context) { var req dto.SearchWithPage if err := c.ShouldBindJSON(&req); err != nil { @@ -63,9 +61,8 @@ func (b *BaseApi) SearchCommand(c *gin.Context) { }) } -// List command // @Tags Command -// @Summary Search command +// @Summary List commands // @Description 获取快速命令列表 // @Success 200 {object} dto.CommandInfo // @Security ApiKeyAuth @@ -80,7 +77,6 @@ func (b *BaseApi) ListCommand(c *gin.Context) { helper.SuccessWithData(c, list) } -// Delete command // @Tags Command // @Summary Delete command // @Description 删除快速命令 @@ -108,7 +104,6 @@ func (b *BaseApi) DeleteCommand(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update command // @Tags Command // @Summary Update command // @Description 更新快速命令 diff --git a/backend/app/api/v1/compose_template.go b/backend/app/api/v1/compose_template.go index f66937a0c..b85bf7d5a 100644 --- a/backend/app/api/v1/compose_template.go +++ b/backend/app/api/v1/compose_template.go @@ -8,9 +8,8 @@ import ( "github.com/gin-gonic/gin" ) -// Create Compose template // @Tags Container Compose-template -// @Summary Create Compose template +// @Summary Create compose template // @Description 创建容器编排模版 // @Accept json // @Param request body dto.ComposeTemplateCreate true "request" @@ -35,9 +34,8 @@ func (b *BaseApi) CreateComposeTemplate(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Page compose template // @Tags Container Compose-template -// @Summary Search compose template list with page +// @Summary Page compose templates // @Description 获取容器编排模版列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -64,9 +62,8 @@ func (b *BaseApi) SearchComposeTemplate(c *gin.Context) { }) } -// List compose template // @Tags Container Compose-template -// @Summary Search compose template list +// @Summary List compose templates // @Description 获取容器编排模版列表 // @Produce json // @Success 200 {anrry} dto.ComposeTemplateInfo @@ -82,7 +79,6 @@ func (b *BaseApi) ListComposeTemplate(c *gin.Context) { helper.SuccessWithData(c, list) } -// Delete compose template // @Tags Container Compose-template // @Summary Delete compose template // @Description 删除容器编排模版 @@ -110,7 +106,6 @@ func (b *BaseApi) DeleteComposeTemplate(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update compose template // @Tags Container Compose-template // @Summary Update compose template // @Description 更新容器编排模版 diff --git a/backend/app/api/v1/container.go b/backend/app/api/v1/container.go index 832a3277b..c5b614877 100644 --- a/backend/app/api/v1/container.go +++ b/backend/app/api/v1/container.go @@ -15,9 +15,8 @@ import ( "github.com/pkg/errors" ) -// Page container // @Tags Container -// @Summary Search container list with page +// @Summary Page containers // @Description 获取容器列表分页 // @Accept json // @Param request body dto.PageContainer true "request" @@ -47,9 +46,8 @@ func (b *BaseApi) SearchContainer(c *gin.Context) { }) } -// Page compose // @Tags Container Compose -// @Summary Search compose list with page +// @Summary Page composes // @Description 获取编排列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -78,7 +76,6 @@ func (b *BaseApi) SearchCompose(c *gin.Context) { }) } -// Create compose // @Tags Container Compose // @Summary Create compose // @Description 创建容器编排 @@ -106,7 +103,6 @@ func (b *BaseApi) CreateCompose(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Operate compose // @Tags Container Compose // @Summary Operate compose // @Description 容器编排操作 @@ -134,7 +130,6 @@ func (b *BaseApi) OperatorCompose(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Create container // @Tags Container // @Summary Create container // @Description 创建容器 @@ -161,7 +156,6 @@ func (b *BaseApi) ContainerCreate(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Operate Container // @Tags Container // @Summary Operate Container // @Description 容器操作 @@ -188,7 +182,6 @@ func (b *BaseApi) ContainerOperation(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Container stats // @Tags Container // @Summary Container stats // @Description 容器监控信息 @@ -211,7 +204,6 @@ func (b *BaseApi) ContainerStats(c *gin.Context) { helper.SuccessWithData(c, result) } -// Container inspect // @Tags Container // @Summary Container inspect // @Description 容器详情 @@ -296,7 +288,6 @@ func (b *BaseApi) ContainerExec(c *gin.Context) { } } -// Container logs // @Tags Container // @Summary Container logs // @Description 容器日志 @@ -323,9 +314,8 @@ func (b *BaseApi) ContainerLogs(c *gin.Context) { helper.SuccessWithData(c, logs) } -// Page network // @Tags Container Network -// @Summary Search network list with page +// @Summary Page networks // @Description 获取容器网络列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -355,7 +345,6 @@ func (b *BaseApi) SearchNetwork(c *gin.Context) { }) } -// Delete network // @Tags Container Network // @Summary Delete network // @Description 删除容器网络 @@ -383,7 +372,6 @@ func (b *BaseApi) DeleteNetwork(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Create network // @Tags Container Network // @Summary Create network // @Description 创建容器网络 @@ -411,9 +399,8 @@ func (b *BaseApi) CreateNetwork(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Page volume // @Tags Container Volume -// @Summary Search volume list with page +// @Summary Page volumes // @Description 获取容器存储卷分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -443,9 +430,8 @@ func (b *BaseApi) SearchVolume(c *gin.Context) { }) } -// List volume // @Tags Container Volume -// @Summary Search volume list +// @Summary List volumes // @Description 获取容器存储卷列表 // @Accept json // @Param request body dto.PageInfo true "request" @@ -462,7 +448,6 @@ func (b *BaseApi) ListVolume(c *gin.Context) { helper.SuccessWithData(c, list) } -// Delete volume // @Tags Container Volume // @Summary Delete volume // @Description 删除容器存储卷 @@ -490,7 +475,6 @@ func (b *BaseApi) DeleteVolume(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Create volume // @Tags Container Volume // @Summary Create volume // @Description 创建容器存储卷 @@ -518,7 +502,6 @@ func (b *BaseApi) CreateVolume(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update compose // @Tags Container Compose // @Summary Update compose // @Description 更新容器编排 diff --git a/backend/app/api/v1/cronjob.go b/backend/app/api/v1/cronjob.go index d313b6259..5bb33cc7e 100644 --- a/backend/app/api/v1/cronjob.go +++ b/backend/app/api/v1/cronjob.go @@ -10,7 +10,6 @@ import ( "github.com/gin-gonic/gin" ) -// Create cronjob // @Tags Cronjob // @Summary Create cronjob // @Description 创建计划任务 @@ -37,9 +36,8 @@ func (b *BaseApi) CreateCronjob(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Page cronjob // @Tags Cronjob -// @Summary Search cronjob list with page +// @Summary Page cronjobs // @Description 获取计划任务分页 // @Accept json // @Param request body dto.SearchWithPage true "request" @@ -65,9 +63,8 @@ func (b *BaseApi) SearchCronjob(c *gin.Context) { }) } -// Search job records // @Tags Cronjob -// @Summary Search job records +// @Summary Page job records // @Description 获取计划任务记录 // @Accept json // @Param request body dto.SearchRecord true "request" @@ -97,7 +94,6 @@ func (b *BaseApi) SearchJobRecords(c *gin.Context) { }) } -// Delete cronjob // @Tags Cronjob // @Summary Delete cronjob // @Description 删除计划任务 @@ -105,7 +101,7 @@ func (b *BaseApi) SearchJobRecords(c *gin.Context) { // @Param request body dto.BatchDeleteReq true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /cronjob/del [post] +// @Router /cronjobs/del [post] // @x-panel-log {"bodyKeys":["ids"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"ids","isList":true,"db":"cronjobs","output_colume":"name","output_value":"names"}],"formatZH":"删除计划任务 [names]","formatEN":"delete cronjob [names]"} func (b *BaseApi) DeleteCronjob(c *gin.Context) { var req dto.BatchDeleteReq @@ -125,7 +121,6 @@ func (b *BaseApi) DeleteCronjob(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update cronjob // @Tags Cronjob // @Summary Update cronjob // @Description 更新计划任务 @@ -133,7 +128,7 @@ func (b *BaseApi) DeleteCronjob(c *gin.Context) { // @Param request body dto.CronjobUpdate true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /cronjob/update [post] +// @Router /cronjobs/update [post] // @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"cronjobs","output_colume":"name","output_value":"name"}],"formatZH":"更新计划任务 [name]","formatEN":"update cronjob [name]"} func (b *BaseApi) UpdateCronjob(c *gin.Context) { var req dto.CronjobUpdate @@ -153,7 +148,6 @@ func (b *BaseApi) UpdateCronjob(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update cronjob status // @Tags Cronjob // @Summary Update cronjob status // @Description 更新计划任务状态 @@ -161,7 +155,7 @@ func (b *BaseApi) UpdateCronjob(c *gin.Context) { // @Param request body dto.CronjobUpdateStatus true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /cronjob/status [post] +// @Router /cronjobs/status [post] // @x-panel-log {"bodyKeys":["id","status"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"cronjobs","output_colume":"name","output_value":"name"}],"formatZH":"修改计划任务 [name] 状态为 [status]","formatEN":"change the status of cronjob [name] to [status]."} func (b *BaseApi) UpdateCronjobStatus(c *gin.Context) { var req dto.CronjobUpdateStatus @@ -181,15 +175,14 @@ func (b *BaseApi) UpdateCronjobStatus(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Download Cronjob records // @Tags Cronjob -// @Summary Download Cronjob records +// @Summary Download cronjob records // @Description 下载计划任务记录 // @Accept json // @Param request body dto.CronjobDownload true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /cronjob/download [post] +// @Router /cronjobs/download [post] // @x-panel-log {"bodyKeys":["recordID"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"recordID","isList":false,"db":"job_records","output_colume":"file","output_value":"file"}],"formatZH":"下载计划任务记录 [file]","formatEN":"download the cronjob record [file]"} func (b *BaseApi) TargetDownload(c *gin.Context) { var req dto.CronjobDownload @@ -210,7 +203,6 @@ func (b *BaseApi) TargetDownload(c *gin.Context) { c.File(filePath) } -// Handle cronjob once // @Tags Cronjob // @Summary Handle cronjob once // @Description 手动执行计划任务 @@ -218,7 +210,7 @@ func (b *BaseApi) TargetDownload(c *gin.Context) { // @Param request body dto.OperateByID true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /cronjob/handle [post] +// @Router /cronjobs/handle [post] // @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"cronjobs","output_colume":"name","output_value":"name"}],"formatZH":"手动执行计划任务 [name]","formatEN":"manually execute the cronjob [name]"} func (b *BaseApi) HandleOnce(c *gin.Context) { var req dto.OperateByID diff --git a/backend/app/api/v1/dashboard.go b/backend/app/api/v1/dashboard.go index c6103edc5..bd6501e53 100644 --- a/backend/app/api/v1/dashboard.go +++ b/backend/app/api/v1/dashboard.go @@ -8,7 +8,6 @@ import ( "github.com/gin-gonic/gin" ) -// Load dashboard base info // @Tags Dashboard // @Summary Load dashboard base info // @Description 获取首页基础数据 @@ -37,7 +36,6 @@ func (b *BaseApi) LoadDashboardBaseInfo(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load dashboard current info // @Tags Dashboard // @Summary Load dashboard current info // @Description 获取首页实时数据 diff --git a/backend/app/api/v1/database_mysql.go b/backend/app/api/v1/database_mysql.go index f158055b8..bf2b94e9d 100644 --- a/backend/app/api/v1/database_mysql.go +++ b/backend/app/api/v1/database_mysql.go @@ -10,7 +10,6 @@ import ( "github.com/gin-gonic/gin" ) -// Create mysql database // @Tags Database Mysql // @Summary Create mysql database // @Description 创建 mysql 数据库 @@ -37,7 +36,6 @@ func (b *BaseApi) CreateMysql(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update mysql database description // @Tags Database Mysql // @Summary Update mysql database description // @Description 更新 mysql 数据库库描述信息 @@ -64,7 +62,6 @@ func (b *BaseApi) UpdateMysqlDescription(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Change mysql password // @Tags Database Mysql // @Summary Change mysql password // @Description 修改 mysql 密码 @@ -91,7 +88,6 @@ func (b *BaseApi) ChangeMysqlPassword(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Change mysql access // @Tags Database Mysql // @Summary Change mysql access // @Description 修改 mysql 访问权限 @@ -118,7 +114,6 @@ func (b *BaseApi) ChangeMysqlAccess(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update mysql variables // @Tags Database Mysql // @Summary Update mysql variables // @Description mysql 性能调优 @@ -142,7 +137,6 @@ func (b *BaseApi) UpdateMysqlVariables(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update mysql conf by upload file // @Tags Database Mysql // @Summary Update mysql conf by upload file // @Description 上传替换 mysql 配置文件 @@ -171,9 +165,8 @@ func (b *BaseApi) UpdateMysqlConfByFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Page mysql database -// @Tags Cronjob -// @Summary Search mysql database list with page +// @Tags Database Mysql +// @Summary Page mysql databases // @Description 获取 mysql 数据库列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -199,9 +192,8 @@ func (b *BaseApi) SearchMysql(c *gin.Context) { }) } -// List mysql database -// @Tags Cronjob -// @Summary Search mysql database list +// @Tags Database Mysql +// @Summary List mysql database names // @Description 获取 mysql 数据库列表 // @Accept json // @Param request body dto.PageInfo true "request" @@ -218,7 +210,6 @@ func (b *BaseApi) ListDBName(c *gin.Context) { helper.SuccessWithData(c, list) } -// Backup mysql database // @Tags Database Mysql // @Summary Backup mysql database // @Description 备份 mysql 数据库 @@ -247,7 +238,6 @@ func (b *BaseApi) BackupMysql(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Recover mysql database by upload file // @Tags Database Mysql // @Summary Recover mysql database by upload file // @Description Mysql 数据库从上传文件恢复 @@ -276,7 +266,6 @@ func (b *BaseApi) RecoverMysqlByUpload(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Recover mysql database // @Tags Database Mysql // @Summary Recover mysql database // @Description Mysql 数据库恢复 @@ -305,7 +294,6 @@ func (b *BaseApi) RecoverMysql(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Check before delete mysql database // @Tags Database Mysql // @Summary Check before delete mysql database // @Description Mysql 数据库删除前检查 @@ -333,7 +321,6 @@ func (b *BaseApi) DeleteCheckMysql(c *gin.Context) { helper.SuccessWithData(c, apps) } -// Delete mysql database // @Tags Database Mysql // @Summary Delete mysql database // @Description 删除 mysql 数据库 @@ -364,7 +351,6 @@ func (b *BaseApi) DeleteMysql(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load mysql base info // @Tags Database Mysql // @Summary Load mysql base info // @Description 获取 mysql 基础信息 @@ -381,7 +367,6 @@ func (b *BaseApi) LoadBaseinfo(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load mysql remote access // @Tags Database Mysql // @Summary Load mysql remote access // @Description 获取 mysql 远程访问权限 @@ -398,7 +383,6 @@ func (b *BaseApi) LoadRemoteAccess(c *gin.Context) { helper.SuccessWithData(c, isRemote) } -// Load mysql status info // @Tags Database Mysql // @Summary Load mysql status info // @Description 获取 mysql 状态信息 @@ -415,7 +399,6 @@ func (b *BaseApi) LoadStatus(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load mysql variables info // @Tags Database Mysql // @Summary Load mysql variables info // @Description 获取 mysql 性能参数信息 diff --git a/backend/app/api/v1/database_redis.go b/backend/app/api/v1/database_redis.go index 681fa1a3d..3fdc59265 100644 --- a/backend/app/api/v1/database_redis.go +++ b/backend/app/api/v1/database_redis.go @@ -19,7 +19,6 @@ import ( "github.com/pkg/errors" ) -// Load redis status info // @Tags Database Redis // @Summary Load redis status info // @Description 获取 redis 状态信息 @@ -36,7 +35,6 @@ func (b *BaseApi) LoadRedisStatus(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load redis conf // @Tags Database Redis // @Summary Load redis conf // @Description 获取 redis 配置信息 @@ -53,7 +51,6 @@ func (b *BaseApi) LoadRedisConf(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load redis persistence conf // @Tags Database Redis // @Summary Load redis persistence conf // @Description 获取 redis 持久化配置 @@ -70,7 +67,6 @@ func (b *BaseApi) LoadPersistenceConf(c *gin.Context) { helper.SuccessWithData(c, data) } -// Update redis conf // @Tags Database Redis // @Summary Update redis conf // @Description 更新 redis 配置信息 @@ -97,7 +93,6 @@ func (b *BaseApi) UpdateRedisConf(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Change redis password // @Tags Database Redis // @Summary Change redis password // @Description 更新 redis 密码 @@ -124,7 +119,6 @@ func (b *BaseApi) ChangeRedisPassword(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update redis persistence conf // @Tags Database Redis // @Summary Update redis persistence conf // @Description 更新 redis 持久化配置 @@ -151,7 +145,6 @@ func (b *BaseApi) UpdateRedisPersistenceConf(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Backup redis // @Tags Database Redis // @Summary Backup redis // @Description 备份 redis 数据库 @@ -167,7 +160,6 @@ func (b *BaseApi) RedisBackup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Recover redis // @Tags Database Redis // @Summary Recover redis // @Description 恢复 redis 数据库 @@ -193,9 +185,8 @@ func (b *BaseApi) RedisRecover(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Search redis backup list // @Tags Database Redis -// @Summary Search redis backup list +// @Summary Page redis backups // @Description 获取 redis 备份记录分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -221,7 +212,6 @@ func (b *BaseApi) RedisBackupList(c *gin.Context) { }) } -// Update redis conf by file // @Tags Database Redis // @Summary Update redis conf by file // @Description 上传更新 redis 配置信息 diff --git a/backend/app/api/v1/docker.go b/backend/app/api/v1/docker.go index 04daced8d..bdcc6fd52 100644 --- a/backend/app/api/v1/docker.go +++ b/backend/app/api/v1/docker.go @@ -8,7 +8,6 @@ import ( "github.com/gin-gonic/gin" ) -// Load status // @Tags Container Docker // @Summary Load docker status // @Description 获取 docker 服务状态 @@ -21,7 +20,6 @@ func (b *BaseApi) LoadDockerStatus(c *gin.Context) { helper.SuccessWithData(c, status) } -// Load daemon.json // @Tags Container Docker // @Summary Load docker daemon.json // @Description 获取 docker 配置信息 @@ -34,7 +32,6 @@ func (b *BaseApi) LoadDaemonJson(c *gin.Context) { helper.SuccessWithData(c, conf) } -// Update daemon.json // @Tags Container Docker // @Summary Update docker daemon.json // @Description 修改 docker 配置信息 @@ -59,7 +56,6 @@ func (b *BaseApi) UpdateDaemonJson(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update daemon.json by upload file // @Tags Container Docker // @Summary Update docker daemon.json by upload file // @Description 上传替换 docker 配置文件 @@ -88,7 +84,6 @@ func (b *BaseApi) UpdateDaemonJsonByFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Operate docker // @Tags Container Docker // @Summary Operate docker // @Description Docker 操作 diff --git a/backend/app/api/v1/file.go b/backend/app/api/v1/file.go index 5b8d1f4d6..0f0b4effa 100644 --- a/backend/app/api/v1/file.go +++ b/backend/app/api/v1/file.go @@ -22,9 +22,8 @@ import ( "github.com/gorilla/websocket" ) -// List files // @Tags File -// @Summary Search file list +// @Summary List files // @Description 获取文件列表 // @Accept json // @Param request body request.FileOption true "request" @@ -45,7 +44,6 @@ func (b *BaseApi) ListFiles(c *gin.Context) { helper.SuccessWithData(c, files) } -// Load files tree // @Tags File // @Summary Load files tree // @Description 加载文件树 @@ -68,7 +66,6 @@ func (b *BaseApi) GetFileTree(c *gin.Context) { helper.SuccessWithData(c, tree) } -// Create file // @Tags File // @Summary Create file // @Description 创建文件/文件夹 @@ -92,7 +89,6 @@ func (b *BaseApi) CreateFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Delete file // @Tags File // @Summary Delete file // @Description 删除文件/文件夹 @@ -116,7 +112,6 @@ func (b *BaseApi) DeleteFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Batch delete file // @Tags File // @Summary Batch delete file // @Description 批量删除文件/文件夹 @@ -140,7 +135,6 @@ func (b *BaseApi) BatchDeleteFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Change file mode // @Tags File // @Summary Change file mode // @Description 修改文件权限 @@ -164,7 +158,6 @@ func (b *BaseApi) ChangeFileMode(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Compress file // @Tags File // @Summary Compress file // @Description 压缩文件 @@ -188,7 +181,6 @@ func (b *BaseApi) CompressFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Decompress file // @Tags File // @Summary Decompress file // @Description 解压文件 @@ -212,7 +204,6 @@ func (b *BaseApi) DeCompressFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load file content // @Tags File // @Summary Load file content // @Description 获取文件内容 @@ -236,7 +227,6 @@ func (b *BaseApi) GetContent(c *gin.Context) { helper.SuccessWithData(c, info) } -// Update file content // @Tags File // @Summary Update file content // @Description 更新文件内容 @@ -259,7 +249,6 @@ func (b *BaseApi) SaveContent(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Upload file // @Tags File // @Summary Upload file // @Description 上传文件 @@ -307,7 +296,6 @@ func (b *BaseApi) UploadFiles(c *gin.Context) { } } -// Change file name // @Tags File // @Summary Change file name // @Description 修改文件名称 @@ -330,7 +318,6 @@ func (b *BaseApi) ChangeFileName(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Wget file // @Tags File // @Summary Wget file // @Description 下载远端文件 @@ -356,7 +343,6 @@ func (b *BaseApi) WgetFile(c *gin.Context) { }) } -// Move file // @Tags File // @Summary Move file // @Description 移动文件 @@ -379,7 +365,6 @@ func (b *BaseApi) MoveFile(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Download file // @Tags File // @Summary Download file // @Description 下载文件 @@ -403,7 +388,6 @@ func (b *BaseApi) Download(c *gin.Context) { c.File(filePath) } -// Load file size // @Tags File // @Summary Load file size // @Description 获取文件夹大小 @@ -427,13 +411,12 @@ func (b *BaseApi) Size(c *gin.Context) { helper.SuccessWithData(c, res) } -// Read file // @Tags File // @Summary Read file // @Description 读取文件 // @Accept json // @Param request body dto.FilePath true "request" -// @Success 200 byte +// @Success 200 {string} content // @Security ApiKeyAuth // @Router /files/loadfile [post] // @x-panel-log {"bodyKeys":["path"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"读取文件 [path]","formatEN":"Read file [path]"} diff --git a/backend/app/api/v1/group.go b/backend/app/api/v1/group.go index 98c258ca8..8463d6287 100644 --- a/backend/app/api/v1/group.go +++ b/backend/app/api/v1/group.go @@ -8,7 +8,6 @@ import ( "github.com/gin-gonic/gin" ) -// Create group // @Tags System Group // @Summary Create group // @Description 创建系统组 @@ -35,7 +34,6 @@ func (b *BaseApi) CreateGroup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Delete group // @Tags System Group // @Summary Delete group // @Description 删除系统组 @@ -63,7 +61,6 @@ func (b *BaseApi) DeleteGroup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update group // @Tags System Group // @Summary Update group // @Description 更新系统组 @@ -91,9 +88,8 @@ func (b *BaseApi) UpdateGroup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Search group info // @Tags System Group -// @Summary Search group info +// @Summary Search group info by id // @Description 查询系统组 // @Accept json // @Param id path integer true "request" @@ -114,9 +110,8 @@ func (b *BaseApi) GetGroupInfo(c *gin.Context) { helper.SuccessWithData(c, group) } -// List group // @Tags System Group -// @Summary Search group list +// @Summary List groups // @Description 查询系统组 // @Accept json // @Param request body dto.GroupSearch true "request" diff --git a/backend/app/api/v1/host.go b/backend/app/api/v1/host.go index a2faead0e..623382c32 100644 --- a/backend/app/api/v1/host.go +++ b/backend/app/api/v1/host.go @@ -10,7 +10,6 @@ import ( "github.com/gin-gonic/gin" ) -// Create host // @Tags Host // @Summary Create host // @Description 创建主机 @@ -18,7 +17,7 @@ import ( // @Param request body dto.HostOperate true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /host [post] +// @Router /hosts [post] // @x-panel-log {"bodyKeys":["name","addr"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"创建主机 [name][addr]","formatEN":"create host [name][addr]"} func (b *BaseApi) CreateHost(c *gin.Context) { var req dto.HostOperate @@ -38,7 +37,6 @@ func (b *BaseApi) CreateHost(c *gin.Context) { helper.SuccessWithData(c, host) } -// Test host conn by info // @Tags Host // @Summary Test host conn by info // @Description 测试主机连接 @@ -46,7 +44,7 @@ func (b *BaseApi) CreateHost(c *gin.Context) { // @Param request body dto.HostConnTest true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /host/test/byinfo [post] +// @Router /hosts/test/byinfo [post] func (b *BaseApi) TestByInfo(c *gin.Context) { var req dto.HostConnTest if err := c.ShouldBindJSON(&req); err != nil { @@ -71,15 +69,14 @@ func (b *BaseApi) TestByInfo(c *gin.Context) { helper.SuccessWithData(c, true) } -// Test host conn by host id // @Tags Host // @Summary Test host conn by host id // @Description 测试主机连接 // @Accept json // @Param id path integer true "request" -// @Success 200 {boolean} +// @Success 200 {boolean} connStatus // @Security ApiKeyAuth -// @Router /host/test/byid/:id [post] +// @Router /hosts/test/byid/:id [post] func (b *BaseApi) TestByID(c *gin.Context) { id, err := helper.GetParamID(c) if err != nil { @@ -91,7 +88,6 @@ func (b *BaseApi) TestByID(c *gin.Context) { helper.SuccessWithData(c, connStatus) } -// Load host tree // @Tags Host // @Summary Load host tree // @Description 加载主机树 @@ -99,7 +95,7 @@ func (b *BaseApi) TestByID(c *gin.Context) { // @Param request body dto.SearchForTree true "request" // @Success 200 {anrry} dto.HostTree // @Security ApiKeyAuth -// @Router /host/search [post] +// @Router /hosts/search [post] func (b *BaseApi) HostTree(c *gin.Context) { var req dto.SearchForTree if err := c.ShouldBindJSON(&req); err != nil { @@ -116,7 +112,6 @@ func (b *BaseApi) HostTree(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load host info // @Tags Host // @Summary Load host info // @Description 加载主机信息 @@ -124,7 +119,7 @@ func (b *BaseApi) HostTree(c *gin.Context) { // @Param id path integer true "request" // @Success 200 {object} dto.HostInfo // @Security ApiKeyAuth -// @Router /host/:id [get] +// @Router /hosts/:id [get] func (b *BaseApi) GetHostInfo(c *gin.Context) { id, err := helper.GetParamID(c) if err != nil { @@ -144,7 +139,6 @@ func (b *BaseApi) GetHostInfo(c *gin.Context) { helper.SuccessWithData(c, hostDto) } -// Delete host // @Tags Host // @Summary Delete host // @Description 删除主机 @@ -152,7 +146,7 @@ func (b *BaseApi) GetHostInfo(c *gin.Context) { // @Param request body dto.OperateByID true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /host/del [post] +// @Router /hosts/del [post] // @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"hosts","output_colume":"addr","output_value":"addr"}],"formatZH":"删除主机 [addr]","formatEN":"delete host [addr]"} func (b *BaseApi) DeleteHost(c *gin.Context) { var req dto.OperateByID @@ -172,7 +166,6 @@ func (b *BaseApi) DeleteHost(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update host // @Tags Host // @Summary Update host // @Description 更新主机 @@ -180,7 +173,7 @@ func (b *BaseApi) DeleteHost(c *gin.Context) { // @Param request body dto.HostOperate true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /host/update [post] +// @Router /hosts/update [post] // @x-panel-log {"bodyKeys":["name","addr"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"更新主机信息 [name][addr]","formatEN":"update host [name][addr]"} func (b *BaseApi) UpdateHost(c *gin.Context) { var req dto.HostOperate diff --git a/backend/app/api/v1/image.go b/backend/app/api/v1/image.go index 659f35ad1..c4cd68579 100644 --- a/backend/app/api/v1/image.go +++ b/backend/app/api/v1/image.go @@ -8,9 +8,8 @@ import ( "github.com/gin-gonic/gin" ) -// Page image // @Tags Container Image -// @Summary Search image list with page +// @Summary Page images // @Description 获取镜像列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -41,9 +40,8 @@ func (b *BaseApi) SearchImage(c *gin.Context) { }) } -// List image // @Tags Container Image -// @Summary Search image list +// @Summary List images // @Description 获取镜像列表 // @Produce json // @Success 200 {anrry} dto.Options @@ -58,7 +56,6 @@ func (b *BaseApi) ListImage(c *gin.Context) { helper.SuccessWithData(c, list) } -// Build image // @Tags Container Image // @Summary Build image // @Description 构建镜像 @@ -88,7 +85,6 @@ func (b *BaseApi) ImageBuild(c *gin.Context) { helper.SuccessWithData(c, log) } -// Pull image // @Tags Container Image // @Summary Pull image // @Description 拉取镜像 @@ -118,7 +114,6 @@ func (b *BaseApi) ImagePull(c *gin.Context) { helper.SuccessWithData(c, logPath) } -// Push image // @Tags Container Image // @Summary Push image // @Description 推送镜像 @@ -148,7 +143,6 @@ func (b *BaseApi) ImagePush(c *gin.Context) { helper.SuccessWithData(c, logPath) } -// Delete image // @Tags Container Image // @Summary Delete image // @Description 删除镜像 @@ -177,7 +171,6 @@ func (b *BaseApi) ImageRemove(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Save image // @Tags Container Image // @Summary Save image // @Description 导出镜像 @@ -206,7 +199,6 @@ func (b *BaseApi) ImageSave(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Tag image // @Tags Container Image // @Summary Tag image // @Description Tag 镜像 @@ -235,7 +227,6 @@ func (b *BaseApi) ImageTag(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load image // @Tags Container Image // @Summary Load image // @Description 导入镜像 diff --git a/backend/app/api/v1/image_repo.go b/backend/app/api/v1/image_repo.go index 9cb8acf55..cbc1ad2a4 100644 --- a/backend/app/api/v1/image_repo.go +++ b/backend/app/api/v1/image_repo.go @@ -8,9 +8,8 @@ import ( "github.com/gin-gonic/gin" ) -// Page image repo // @Tags Container Image-repo -// @Summary Search image repo list with page +// @Summary Page image repos // @Description 获取镜像仓库列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -41,9 +40,8 @@ func (b *BaseApi) SearchRepo(c *gin.Context) { }) } -// List image repo // @Tags Container Image-repo -// @Summary Search image repo list +// @Summary List image repos // @Description 获取镜像仓库列表 // @Produce json // @Success 200 {anrry} dto.ImageRepoOption @@ -59,7 +57,6 @@ func (b *BaseApi) ListRepo(c *gin.Context) { helper.SuccessWithData(c, list) } -// Create image repo // @Tags Container Image-repo // @Summary Create image repo // @Description 创建镜像仓库 @@ -87,7 +84,6 @@ func (b *BaseApi) CreateRepo(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Delete image repo // @Tags Container Image-repo // @Summary Delete image repo // @Description 删除镜像仓库 @@ -116,7 +112,6 @@ func (b *BaseApi) DeleteRepo(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update image repo // @Tags Container Image-repo // @Summary Update image repo // @Description 更新镜像仓库 diff --git a/backend/app/api/v1/logs.go b/backend/app/api/v1/logs.go index ed515e436..82a9d5c85 100644 --- a/backend/app/api/v1/logs.go +++ b/backend/app/api/v1/logs.go @@ -8,12 +8,11 @@ import ( "github.com/gin-gonic/gin" ) -// Page login logs // @Tags Logs // @Summary Page login logs // @Description 获取系统登录日志列表分页 // @Accept json -// @Param request body request.PageInfo true "request" +// @Param request body dto.PageInfo true "request" // @Success 200 {object} dto.PageResult // @Security ApiKeyAuth // @Router /logs/login [post] @@ -36,12 +35,11 @@ func (b *BaseApi) GetLoginLogs(c *gin.Context) { }) } -// Page operation logs // @Tags Logs // @Summary Page operation logs // @Description 获取系统操作日志列表分页 // @Accept json -// @Param request body request.PageInfo true "request" +// @Param request body dto.PageInfo true "request" // @Success 200 {object} dto.PageResult // @Security ApiKeyAuth // @Router /logs/operation [post] @@ -64,7 +62,6 @@ func (b *BaseApi) GetOperationLogs(c *gin.Context) { }) } -// Clean operation logs // @Tags Logs // @Summary Clean operation logs // @Description 清空操作日志 diff --git a/backend/app/api/v1/nginx.go b/backend/app/api/v1/nginx.go index 854159142..ad8c23b5d 100644 --- a/backend/app/api/v1/nginx.go +++ b/backend/app/api/v1/nginx.go @@ -7,7 +7,6 @@ import ( "github.com/gin-gonic/gin" ) -// Load nginx conf // @Tags Nginx // @Summary Load nginx conf // @Description 获取 nginx 配置信息 @@ -23,12 +22,11 @@ func (b *BaseApi) GetNginx(c *gin.Context) { helper.SuccessWithData(c, fileInfo) } -// Load partial nginx conf // @Tags Nginx // @Summary Load partial nginx conf // @Description 获取部分 nginx 配置信息 // @Accept json -// @Param request body dto.NginxScopeReq true "request" +// @Param request body request.NginxScopeReq true "request" // @Success 200 {anrry} response.NginxParam // @Security ApiKeyAuth // @Router /nginx/scope [post] @@ -47,12 +45,11 @@ func (b *BaseApi) GetNginxConfigByScope(c *gin.Context) { helper.SuccessWithData(c, params) } -// Update nginx conf // @Tags Nginx // @Summary Update nginx conf // @Description 更新 nginx 配置信息 // @Accept json -// @Param request body dto.NginxConfigUpdate true "request" +// @Param request body request.NginxConfigUpdate true "request" // @Success 200 // @Security ApiKeyAuth // @Router /nginx/update [post] @@ -70,7 +67,6 @@ func (b *BaseApi) UpdateNginxConfigByScope(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load nginx status info // @Tags Nginx // @Summary Load nginx status info // @Description 获取 nginx 状态信息 @@ -86,12 +82,11 @@ func (b *BaseApi) GetNginxStatus(c *gin.Context) { helper.SuccessWithData(c, res) } -// Update nginx conf by upload file // @Tags Nginx // @Summary Update nginx conf by upload file // @Description 上传更新 nginx 配置文件 // @Accept json -// @Param request body dto.NginxConfigFileUpdate true "request" +// @Param request body request.NginxConfigFileUpdate true "request" // @Success 200 // @Security ApiKeyAuth // @Router /nginx/file [post] diff --git a/backend/app/api/v1/setting.go b/backend/app/api/v1/setting.go index 14aa7454a..09c029541 100644 --- a/backend/app/api/v1/setting.go +++ b/backend/app/api/v1/setting.go @@ -13,7 +13,6 @@ import ( "github.com/gin-gonic/gin" ) -// Load system setting info // @Tags System Setting // @Summary Load system setting info // @Description 加载系统配置信息 @@ -45,7 +44,6 @@ func (b *BaseApi) GetDaemonjson(c *gin.Context) { helper.SuccessWithData(c, value) } -// Update system setting // @Tags System Setting // @Summary Update system setting // @Description 更新系统配置 @@ -73,7 +71,6 @@ func (b *BaseApi) UpdateSetting(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update system password // @Tags System Setting // @Summary Update system password // @Description 更新系统登录密码 @@ -101,7 +98,6 @@ func (b *BaseApi) UpdatePassword(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Reset system password expired // @Tags System Setting // @Summary Reset system password expired // @Description 重置过期系统登录密码 @@ -129,7 +125,6 @@ func (b *BaseApi) HandlePasswordExpired(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Sync system time // @Tags System Setting // @Summary Sync system time // @Description 系统时间同步 @@ -153,7 +148,6 @@ func (b *BaseApi) SyncTime(c *gin.Context) { helper.SuccessWithData(c, ntime.Format("2006-01-02 15:04:05 MST -0700")) } -// Clean monitor datas // @Tags System Setting // @Summary Clean monitor datas // @Description 清空监控数据 @@ -178,7 +172,6 @@ func (b *BaseApi) CleanMonitor(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load mfa info // @Tags System Setting // @Summary Load mfa info // @Description 获取 mfa 信息 @@ -195,7 +188,6 @@ func (b *BaseApi) GetMFA(c *gin.Context) { helper.SuccessWithData(c, otp) } -// Bind mfa // @Tags System Setting // @Summary Bind mfa // @Description Mfa 绑定 diff --git a/backend/app/api/v1/website.go b/backend/app/api/v1/website.go index 209feddf0..0a19035b5 100644 --- a/backend/app/api/v1/website.go +++ b/backend/app/api/v1/website.go @@ -9,9 +9,8 @@ import ( "github.com/gin-gonic/gin" ) -// Page website // @Tags Website -// @Summary Search website with page +// @Summary Page websites // @Description 获取网站列表分页 // @Accept json // @Param request body request.WebsiteSearch true "request" @@ -35,9 +34,8 @@ func (b *BaseApi) PageWebsite(c *gin.Context) { }) } -// List website // @Tags Website -// @Summary Search website +// @Summary List websites // @Description 获取网站列表 // @Success 200 {anrry} response.WebsiteDTO // @Security ApiKeyAuth @@ -51,9 +49,8 @@ func (b *BaseApi) GetWebsites(c *gin.Context) { helper.SuccessWithData(c, websites) } -// List website name // @Tags Website -// @Summary Search website names +// @Summary List website names // @Description 获取网站列表 // @Success 200 {anrry} string // @Security ApiKeyAuth @@ -67,7 +64,6 @@ func (b *BaseApi) GetWebsiteOptions(c *gin.Context) { helper.SuccessWithData(c, websites) } -// Create website // @Tags Website // @Summary Create website // @Description 创建网站 @@ -91,7 +87,6 @@ func (b *BaseApi) CreateWebsite(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Operate website // @Tags Website // @Summary Operate website // @Description 操作网站 @@ -115,7 +110,6 @@ func (b *BaseApi) OpWebsite(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Backup website // @Tags Website // @Summary Backup website // @Description 备份网站 @@ -138,7 +132,6 @@ func (b *BaseApi) BackupWebsite(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Recover website by upload // @Tags Website // @Summary Recover website by upload // @Description 从上传恢复网站 @@ -166,7 +159,6 @@ func (b *BaseApi) RecoverWebsiteByUpload(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Recover website // @Tags Website // @Summary Recover website // @Description 从备份恢复网站 @@ -194,7 +186,6 @@ func (b *BaseApi) RecoverWebsite(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Delete website // @Tags Website // @Summary Delete website // @Description 删除网站 @@ -202,7 +193,7 @@ func (b *BaseApi) RecoverWebsite(c *gin.Context) { // @Param request body request.WebsiteDelete true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /websites/recover [post] +// @Router /websites/del [post] // @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"websites","output_colume":"primary_domain","output_value":"domain"}],"formatZH":"删除网站 [domain]","formatEN":"Delete website [domain]"} func (b *BaseApi) DeleteWebsite(c *gin.Context) { var req request.WebsiteDelete @@ -218,7 +209,6 @@ func (b *BaseApi) DeleteWebsite(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update website // @Tags Website // @Summary Update website // @Description 更新网站 @@ -241,7 +231,6 @@ func (b *BaseApi) UpdateWebsite(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Search website by id // @Tags Website // @Summary Search website by id // @Description 通过 id 查询网站 @@ -264,7 +253,6 @@ func (b *BaseApi) GetWebsite(c *gin.Context) { helper.SuccessWithData(c, website) } -// Search website nginx by id // @Tags Website Nginx // @Summary Search website nginx by id // @Description 通过 id 查询网站 nginx @@ -287,7 +275,6 @@ func (b *BaseApi) GetWebsiteNginx(c *gin.Context) { helper.SuccessWithData(c, fileInfo) } -// Search website domains by websiteId // @Tags Website Domain // @Summary Search website domains by websiteId // @Description 通过网站 id 查询域名 @@ -310,7 +297,6 @@ func (b *BaseApi) GetWebDomains(c *gin.Context) { helper.SuccessWithData(c, list) } -// Delete website domain // @Tags Website Domain // @Summary Delete website domain // @Description 删除网站域名 @@ -334,7 +320,6 @@ func (b *BaseApi) DeleteWebDomain(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Create website domain // @Tags Website Domain // @Summary Create website domain // @Description 创建网站域名 @@ -358,7 +343,6 @@ func (b *BaseApi) CreateWebDomain(c *gin.Context) { helper.SuccessWithData(c, domain) } -// Load nginx conf // @Tags Website Nginx // @Summary Load nginx conf // @Description 获取 nginx 配置 @@ -366,7 +350,7 @@ func (b *BaseApi) CreateWebDomain(c *gin.Context) { // @Param request body request.NginxScopeReq true "request" // @Success 200 {object} response.WebsiteNginxConfig // @Security ApiKeyAuth -// @Router /websites/config [get] +// @Router /websites/config [post] func (b *BaseApi) GetNginxConfig(c *gin.Context) { var req request.NginxScopeReq if err := c.ShouldBindJSON(&req); err != nil { @@ -381,7 +365,6 @@ func (b *BaseApi) GetNginxConfig(c *gin.Context) { helper.SuccessWithData(c, config) } -// Update nginx conf // @Tags Website Nginx // @Summary Update nginx conf // @Description 更新 nginx 配置 @@ -404,7 +387,6 @@ func (b *BaseApi) UpdateNginxConfig(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Load https conf // @Tags Website HTTPS // @Summary Load https conf // @Description 获取 https 配置 @@ -412,7 +394,7 @@ func (b *BaseApi) UpdateNginxConfig(c *gin.Context) { // @Param id path integer true "request" // @Success 200 {object} response.WebsiteHTTPS // @Security ApiKeyAuth -// @Router /websites/:id/https [post] +// @Router /websites/:id/https [get] func (b *BaseApi) GetHTTPSConfig(c *gin.Context) { id, err := helper.GetParamID(c) if err != nil { @@ -427,13 +409,12 @@ func (b *BaseApi) GetHTTPSConfig(c *gin.Context) { helper.SuccessWithData(c, res) } -// Update https conf // @Tags Website HTTPS // @Summary Update https conf // @Description 更新 https 配置 // @Accept json // @Param request body request.WebsiteHTTPSOp true "request" -// @Success 200 {object} request.WebsiteHTTPS +// @Success 200 {object} response.WebsiteHTTPS // @Security ApiKeyAuth // @Router /websites/:id/https [post] // @x-panel-log {"bodyKeys":["websiteId"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"websiteId","isList":false,"db":"websites","output_colume":"primary_domain","output_value":"domain"}],"formatZH":"更新网站 [domain] https 配置","formatEN":"Update website https [domain] conf"} @@ -454,7 +435,6 @@ func (b *BaseApi) UpdateHTTPSConfig(c *gin.Context) { helper.SuccessWithData(c, res) } -// Check before create website // @Tags Website // @Summary Check before create website // @Description 网站创建前检查 @@ -477,13 +457,12 @@ func (b *BaseApi) CreateWebsiteCheck(c *gin.Context) { helper.SuccessWithData(c, data) } -// Load websit waf conf // @Tags Website WAF // @Summary Load websit waf conf // @Description 获取网站 waf 配置 // @Accept json // @Param request body request.WebsiteWafReq true "request" -// @Success 200 {object} request.WebsiteWafConfig +// @Success 200 {object} response.WebsiteWafConfig // @Security ApiKeyAuth // @Router /websites/waf/config [post] func (b *BaseApi) GetWebsiteWafConfig(c *gin.Context) { @@ -500,7 +479,6 @@ func (b *BaseApi) GetWebsiteWafConfig(c *gin.Context) { helper.SuccessWithData(c, data) } -// Update website waf conf // @Tags Website WAF // @Summary Update website waf conf // @Description 更新 网站 waf 配置 @@ -523,7 +501,6 @@ func (b *BaseApi) UpdateWebsiteWafConfig(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update website nginx conf // @Tags Website Nginx // @Summary Update website nginx conf // @Description 更新 网站 nginx 配置 @@ -546,7 +523,6 @@ func (b *BaseApi) UpdateWebsiteNginxConfig(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Operate website log // @Tags Website // @Summary Operate website log // @Description 操作网站日志 @@ -570,7 +546,6 @@ func (b *BaseApi) OpWebsiteLog(c *gin.Context) { helper.SuccessWithData(c, res) } -// Change default server // @Tags Website // @Summary Change default server // @Description 操作网站日志 diff --git a/backend/app/api/v1/website_acme_account.go b/backend/app/api/v1/website_acme_account.go index aea7a4a27..bd0c801d7 100644 --- a/backend/app/api/v1/website_acme_account.go +++ b/backend/app/api/v1/website_acme_account.go @@ -8,9 +8,8 @@ import ( "github.com/gin-gonic/gin" ) -// Page website acme account // @Tags Website Acme -// @Summary Search website acme account with page +// @Summary Page website acme accounts // @Description 获取网站 acme 列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -34,7 +33,6 @@ func (b *BaseApi) PageWebsiteAcmeAccount(c *gin.Context) { }) } -// Create website acme account // @Tags Website Acme // @Summary Create website acme account // @Description 创建网站 acme @@ -58,7 +56,6 @@ func (b *BaseApi) CreateWebsiteAcmeAccount(c *gin.Context) { helper.SuccessWithData(c, res) } -// Delete website acme account // @Tags Website Acme // @Summary Delete website acme account // @Description 删除网站 acme diff --git a/backend/app/api/v1/website_dns_account.go b/backend/app/api/v1/website_dns_account.go index 0063fea9a..b6a843f1f 100644 --- a/backend/app/api/v1/website_dns_account.go +++ b/backend/app/api/v1/website_dns_account.go @@ -8,9 +8,8 @@ import ( "github.com/gin-gonic/gin" ) -// Page website dns account // @Tags Website DNS -// @Summary Search website dns account with page +// @Summary Page website dns accounts // @Description 获取网站 dns 列表分页 // @Accept json // @Param request body dto.PageInfo true "request" @@ -34,7 +33,6 @@ func (b *BaseApi) PageWebsiteDnsAccount(c *gin.Context) { }) } -// Create website dns account // @Tags Website DNS // @Summary Create website dns account // @Description 创建网站 dns @@ -57,7 +55,6 @@ func (b *BaseApi) CreateWebsiteDnsAccount(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update website dns account // @Tags Website DNS // @Summary Update website dns account // @Description 更新网站 dns @@ -80,7 +77,6 @@ func (b *BaseApi) UpdateWebsiteDnsAccount(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Delete website dns account // @Tags Website DNS // @Summary Delete website dns account // @Description 删除网站 dns diff --git a/backend/app/api/v1/website_group.go b/backend/app/api/v1/website_group.go index 1be63578b..92d3bbdf2 100644 --- a/backend/app/api/v1/website_group.go +++ b/backend/app/api/v1/website_group.go @@ -7,9 +7,8 @@ import ( "github.com/gin-gonic/gin" ) -// List website group // @Tags Website Group -// @Summary List website group +// @Summary List website groups // @Description 获取网站组 // @Success 200 {anrry} model.WebsiteGroup // @Security ApiKeyAuth @@ -23,7 +22,6 @@ func (b *BaseApi) GetWebGroups(c *gin.Context) { helper.SuccessWithData(c, list) } -// Create website group // @Tags Website Group // @Summary Create website group // @Description 创建网站组 @@ -46,7 +44,6 @@ func (b *BaseApi) CreateWebGroup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Update website group // @Tags Website Group // @Summary Update website group // @Description 更新网站组 @@ -69,7 +66,6 @@ func (b *BaseApi) UpdateWebGroup(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Delete website group // @Tags Website Group // @Summary Delete website group // @Description 删除网站组 diff --git a/backend/app/api/v1/website_ssl.go b/backend/app/api/v1/website_ssl.go index a75b88c84..dde6e9a9b 100644 --- a/backend/app/api/v1/website_ssl.go +++ b/backend/app/api/v1/website_ssl.go @@ -10,9 +10,8 @@ import ( "github.com/gin-gonic/gin" ) -// Page website ssl // @Tags Website SSL -// @Summary Search website ssl with page +// @Summary Page website ssl // @Description 获取网站 ssl 列表分页 // @Accept json // @Param request body request.WebsiteSSLSearch true "request" @@ -45,7 +44,6 @@ func (b *BaseApi) PageWebsiteSSL(c *gin.Context) { } } -// Create website ssl // @Tags Website SSL // @Summary Create website ssl // @Description 创建网站 ssl @@ -69,7 +67,6 @@ func (b *BaseApi) CreateWebsiteSSL(c *gin.Context) { helper.SuccessWithData(c, res) } -// Reset website ssl // @Tags Website SSL // @Summary Reset website ssl // @Description 重置网站 ssl @@ -92,7 +89,6 @@ func (b *BaseApi) RenewWebsiteSSL(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Resolve website ssl // @Tags Website SSL // @Summary Resolve website ssl // @Description 解析网站 ssl @@ -115,7 +111,6 @@ func (b *BaseApi) GetDNSResolve(c *gin.Context) { helper.SuccessWithData(c, res) } -// Delete website ssl // @Tags Website SSL // @Summary Delete website ssl // @Description 删除网站 ssl @@ -138,7 +133,6 @@ func (b *BaseApi) DeleteWebsiteSSL(c *gin.Context) { helper.SuccessWithData(c, nil) } -// Search website ssl by website id // @Tags Website SSL // @Summary Search website ssl by website id // @Description 通过网站 id 查询 ssl @@ -161,7 +155,6 @@ func (b *BaseApi) GetWebsiteSSLByWebsiteId(c *gin.Context) { helper.SuccessWithData(c, websiteSSL) } -// Search website ssl by id // @Tags Website SSL // @Summary Search website ssl by id // @Description 通过 id 查询 ssl diff --git a/backend/middleware/operation.go b/backend/middleware/operation.go index f6e206364..00f622f51 100644 --- a/backend/middleware/operation.go +++ b/backend/middleware/operation.go @@ -13,7 +13,8 @@ import ( "github.com/1Panel-dev/1Panel/backend/app/service" "github.com/1Panel-dev/1Panel/backend/constant" "github.com/1Panel-dev/1Panel/backend/global" - "github.com/1Panel-dev/1Panel/cmd/server/operation" + "github.com/1Panel-dev/1Panel/backend/utils/copier" + "github.com/1Panel-dev/1Panel/cmd/server/docs" "github.com/gin-gonic/gin" ) @@ -28,25 +29,48 @@ func OperationLog() gin.HandlerFunc { record := model.OperationLog{ Group: group, IP: c.ClientIP(), - Method: c.Request.Method, - Path: c.Request.URL.Path, + Method: strings.ToLower(c.Request.Method), + Path: strings.ReplaceAll(c.Request.URL.Path, "/api/v1", ""), UserAgent: c.Request.UserAgent(), } var ( - operationDics []operationJson - operationDic operationJson + swagger swaggerJson + operationDic operationJson ) - if err := json.Unmarshal(operation.OperationJosn, &operationDics); err != nil { + if err := json.Unmarshal(docs.SwaggerJson, &swagger); err != nil { c.Next() return } - for _, dic := range operationDics { - if dic.API == record.Path && dic.Method == record.Method { - operationDic = dic - break - } + path, hasPath := swagger.Paths[record.Path] + if !hasPath { + c.Next() + return } - if len(operationDic.API) == 0 { + methodMap, isMethodMap := path.(map[string]interface{}) + if !isMethodMap { + c.Next() + return + } + dataMap, hasPost := methodMap["post"] + if !hasPost { + c.Next() + return + } + data, isDataMap := dataMap.(map[string]interface{}) + if !isDataMap { + c.Next() + return + } + xlog, hasXlog := data["x-panel-log"] + if !hasXlog { + c.Next() + return + } + if err := copier.Copy(&operationDic, xlog); err != nil { + c.Next() + return + } + if len(operationDic.FormatZH) == 0 { c.Next() return } @@ -124,6 +148,10 @@ func OperationLog() gin.HandlerFunc { } } +type swaggerJson struct { + Paths map[string]interface{} `json:"paths"` +} + type operationJson struct { API string `json:"api"` Method string `json:"method"` diff --git a/backend/router/ro_website.go b/backend/router/ro_website.go index 36edce8c3..52eef1b57 100644 --- a/backend/router/ro_website.go +++ b/backend/router/ro_website.go @@ -28,6 +28,7 @@ func (a *WebsiteRouter) InitWebsiteRouter(Router *gin.RouterGroup) { groupRouter.POST("/backup", baseApi.BackupWebsite) groupRouter.POST("/recover", baseApi.RecoverWebsite) groupRouter.POST("/recover/byupload", baseApi.RecoverWebsiteByUpload) + groupRouter.POST("/default/server", baseApi.ChangeDefaultServer) groupRouter.GET("/domains/:websiteId", baseApi.GetWebDomains) groupRouter.POST("/domains/del", baseApi.DeleteWebDomain) @@ -36,11 +37,12 @@ func (a *WebsiteRouter) InitWebsiteRouter(Router *gin.RouterGroup) { groupRouter.GET("/:id/nginx", baseApi.GetWebsiteNginx) groupRouter.POST("/config", baseApi.GetNginxConfig) groupRouter.POST("/config/update", baseApi.UpdateNginxConfig) + groupRouter.POST("/nginx/update", baseApi.UpdateWebsiteNginxConfig) + groupRouter.GET("/:id/https", baseApi.GetHTTPSConfig) groupRouter.POST("/:id/https", baseApi.UpdateHTTPSConfig) + groupRouter.POST("/waf/config", baseApi.GetWebsiteWafConfig) groupRouter.POST("/waf/update", baseApi.UpdateWebsiteWafConfig) - groupRouter.POST("/nginx/update", baseApi.UpdateWebsiteNginxConfig) - groupRouter.POST("/default/server", baseApi.ChangeDefaultServer) } } diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 5edc8e48d..a62f534da 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -28,6 +28,142 @@ var doc = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/apps/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 获取应用信息", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app by id", + "parameters": [ + { + "type": "integer", + "description": "app id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppDTO" + } + } + } + } + }, + "/apps/detail/:appId/:version": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 获取应用详情", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app detail by id", + "parameters": [ + { + "type": "integer", + "description": "app id", + "name": "appId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app 版本", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppDetailDTO" + } + } + } + } + }, + "/apps/install": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "安装应用", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Install app", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppInstallCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.AppInstall" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "app_installs", + "input_colume": "name", + "input_value": "name", + "isList": false, + "output_colume": "app_id", + "output_value": "appId" + }, + { + "db": "apps", + "info": "appId", + "isList": false, + "output_colume": "key", + "output_value": "appKey" + } + ], + "bodyKeys": [ + "name" + ], + "formatEN": "Install app [appKey]-[name]", + "formatZH": "安装应用 [appKey]-[name]", + "paramKeys": [] + } + } + }, "/apps/installed": { "post": { "security": [ @@ -42,7 +178,7 @@ var doc = `{ "tags": [ "App" ], - "summary": "Search app list installed", + "summary": "List app installed", "parameters": [ { "description": "request", @@ -61,6 +197,469 @@ var doc = `{ } } }, + "/apps/installed/:appInstallId/versions": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 install id 获取应用更新版本", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app update version by install id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "appInstallId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/apps/installed/backups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询已安装备份列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Page installed backups", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppBackupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/apps/installed/backups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除应用备份记录", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Delete app backup record", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppBackupDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "app_install_backups", + "input_colume": "id", + "input_value": "ids", + "isList": true, + "output_colume": "name", + "output_value": "names" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "Deleting an Application Backup [names]", + "formatZH": "删除应用备份 [names]", + "paramKeys": [] + } + } + }, + "/apps/installed/check/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "检查应用安装情况", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Check app installed", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppInstalledCheck" + } + } + } + } + }, + "/apps/installed/conf/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 key 获取应用默认配置", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search default config by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/apps/installed/delete/check/:appInstallId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除前检查", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Check before delete", + "parameters": [ + { + "type": "integer", + "description": "App install id", + "name": "appInstallId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/apps/installed/loadpassword/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取应用密码", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app password by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/apps/installed/loadport/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取应用端口", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app port by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "integer" + } + } + } + } + }, + "/apps/installed/op": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作已安装应用", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Operate installed app", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppInstalledOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "app_installs", + "input_colume": "id", + "input_value": "installId", + "isList": false, + "output_colume": "app_id", + "output_value": "appId" + }, + { + "db": "app_installs", + "input_colume": "id", + "input_value": "installId", + "isList": false, + "output_colume": "name", + "output_value": "appName" + }, + { + "db": "apps", + "input_colume": "id", + "input_value": "appId", + "isList": false, + "output_colume": "key", + "output_value": "appKey" + } + ], + "bodyKeys": [ + "installId", + "operate" + ], + "formatEN": "[appKey] App [appName] [operate]", + "formatZH": "[appKey] 应用 [appName] [operate]", + "paramKeys": [] + } + } + }, + "/apps/installed/params/:appInstallId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 install id 获取应用参数", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search params by appInstallId", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "appInstallId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppParam" + } + } + } + } + }, + "/apps/installed/port/change": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改应用端口", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Change app port", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.PortUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "key", + "name", + "port" + ], + "formatEN": "Application port update [key]-[name] =\u003e [port]", + "formatZH": "应用端口修改 [key]-[name] =\u003e [port]", + "paramKeys": [] + } + } + }, + "/apps/installed/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步已安装应用列表", + "tags": [ + "App" + ], + "summary": "Sync app installed", + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "Sync the list of installed apps", + "formatZH": "同步已安装应用列表", + "paramKeys": [] + } + } + }, "/apps/search": { "post": { "security": [ @@ -75,7 +674,7 @@ var doc = `{ "tags": [ "App" ], - "summary": "Search app list", + "summary": "List apps", "parameters": [ { "description": "request", @@ -94,6 +693,209 @@ var doc = `{ } } }, + "/apps/services/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 key 获取应用 service", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app service by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/apps/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步应用列表", + "tags": [ + "App" + ], + "summary": "Sync app list", + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "App store synchronization", + "formatZH": "应用商店同步", + "paramKeys": [] + } + } + }, + "/auth/captcha": { + "get": { + "description": "加载验证码", + "tags": [ + "Auth" + ], + "summary": "Load captcha", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.CaptchaResponse" + } + } + } + } + }, + "/auth/init": { + "post": { + "description": "初始化用户", + "consumes": [ + "application/json" + ], + "tags": [ + "Auth" + ], + "summary": "Init user", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.InitUser" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/auth/login": { + "post": { + "description": "用户登录", + "consumes": [ + "application/json" + ], + "tags": [ + "Auth" + ], + "summary": "User login", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.Login" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.UserLoginInfo" + } + } + } + } + }, + "/auth/logout": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "用户登出", + "tags": [ + "Auth" + ], + "summary": "User logout", + "responses": { + "200": { + "description": "" + } + } + } + }, + "/auth/mfalogin": { + "post": { + "description": "用户 mfa 登录", + "consumes": [ + "application/json" + ], + "tags": [ + "Auth" + ], + "summary": "User login with mfa", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.MFALogin" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.UserLoginInfo" + } + } + } + } + }, + "/auth/status": { + "get": { + "description": "获取系统安全登录状态", + "tags": [ + "Auth" + ], + "summary": "Load safety status", + "responses": { + "200": { + "description": "" + }, + "402": { + "description": "" + } + } + } + }, "/backups": { "post": { "security": [ @@ -295,7 +1097,7 @@ var doc = `{ "tags": [ "Backup Account" ], - "summary": "Search backup records with page", + "summary": "Page backup records", "parameters": [ { "description": "request", @@ -315,6 +1117,26 @@ var doc = `{ } }, "/backups/search": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取备份账号列表", + "tags": [ + "Backup Account" + ], + "summary": "List backup accounts", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + }, "post": { "security": [ { @@ -328,7 +1150,7 @@ var doc = `{ "tags": [ "Backup Account" ], - "summary": "List bucket", + "summary": "List buckets", "parameters": [ { "description": "request", @@ -351,26 +1173,6 @@ var doc = `{ } }, "/backups/update": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "获取备份账号列表", - "tags": [ - "Backup Account" - ], - "summary": "Search backup account", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "anrry" - } - } - } - }, "post": { "security": [ { @@ -423,7 +1225,7 @@ var doc = `{ "tags": [ "Command" ], - "summary": "Search command", + "summary": "List commands", "responses": { "200": { "description": "OK", @@ -439,14 +1241,14 @@ var doc = `{ "ApiKeyAuth": [] } ], - "description": "获取快速命令列表分页", + "description": "创建快速命令", "consumes": [ "application/json" ], "tags": [ "Command" ], - "summary": "Search command with page", + "summary": "Create command", "parameters": [ { "description": "request", @@ -454,17 +1256,24 @@ var doc = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/dto.SearchWithPage" + "$ref": "#/definitions/dto.CommandOperate" } } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } + "description": "" } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "command" + ], + "formatEN": "create quick command [name][command]", + "formatZH": "创建快捷命令 [name][command]", + "paramKeys": [] } } }, @@ -519,6 +1328,42 @@ var doc = `{ } } }, + "/commands/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取快速命令列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Command" + ], + "summary": "Page commands", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, "/commands/update": { "post": { "security": [ @@ -703,7 +1548,7 @@ var doc = `{ "tags": [ "Container Compose" ], - "summary": "Search compose list with page", + "summary": "Page composes", "parameters": [ { "description": "request", @@ -953,7 +1798,7 @@ var doc = `{ "tags": [ "Container Image" ], - "summary": "Search image list", + "summary": "List images", "responses": { "200": { "description": "OK", @@ -1265,7 +2110,7 @@ var doc = `{ "tags": [ "Container Image" ], - "summary": "Search image list with page", + "summary": "Page images", "parameters": [ { "description": "request", @@ -1476,7 +2321,7 @@ var doc = `{ "tags": [ "Container Network" ], - "summary": "Search network list with page", + "summary": "Page networks", "parameters": [ { "description": "request", @@ -1556,7 +2401,7 @@ var doc = `{ "tags": [ "Container Image-repo" ], - "summary": "Search image repo list", + "summary": "List image repos", "responses": { "200": { "description": "OK", @@ -1681,7 +2526,7 @@ var doc = `{ "tags": [ "Container Image-repo" ], - "summary": "Search image repo list with page", + "summary": "Page image repos", "parameters": [ { "description": "request", @@ -1774,7 +2619,7 @@ var doc = `{ "tags": [ "Container" ], - "summary": "Search container list with page", + "summary": "Page containers", "parameters": [ { "description": "request", @@ -1877,7 +2722,7 @@ var doc = `{ "tags": [ "Container Compose-template" ], - "summary": "Search compose template list", + "summary": "List compose templates", "responses": { "200": { "description": "OK", @@ -1900,7 +2745,7 @@ var doc = `{ "tags": [ "Container Compose-template" ], - "summary": "Create Compose template", + "summary": "Create compose template", "parameters": [ { "description": "request", @@ -1996,7 +2841,7 @@ var doc = `{ "tags": [ "Container Compose-template" ], - "summary": "Search compose template list with page", + "summary": "Page compose templates", "parameters": [ { "description": "request", @@ -2170,7 +3015,7 @@ var doc = `{ "tags": [ "Container Volume" ], - "summary": "Search volume list", + "summary": "List volumes", "parameters": [ { "description": "request", @@ -2207,7 +3052,7 @@ var doc = `{ "tags": [ "Container Volume" ], - "summary": "Search volume list with page", + "summary": "Page volumes", "parameters": [ { "description": "request", @@ -2229,7 +3074,50 @@ var doc = `{ } } }, - "/cronjob/del": { + "/cronjobs": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建计划任务", + "consumes": [ + "application/json" + ], + "tags": [ + "Cronjob" + ], + "summary": "Create cronjob", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CronjobCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "type", + "name" + ], + "formatEN": "create cronjob [type][name]", + "formatZH": "创建计划任务 [type][name]", + "paramKeys": [] + } + } + }, + "/cronjobs/del": { "post": { "security": [ { @@ -2280,7 +3168,7 @@ var doc = `{ } } }, - "/cronjob/download": { + "/cronjobs/download": { "post": { "security": [ { @@ -2294,7 +3182,7 @@ var doc = `{ "tags": [ "Cronjob" ], - "summary": "Download Cronjob records", + "summary": "Download cronjob records", "parameters": [ { "description": "request", @@ -2331,7 +3219,7 @@ var doc = `{ } } }, - "/cronjob/handle": { + "/cronjobs/handle": { "post": { "security": [ { @@ -2382,7 +3270,79 @@ var doc = `{ } } }, - "/cronjob/status": { + "/cronjobs/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取计划任务分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Cronjob" + ], + "summary": "Page cronjobs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/cronjobs/search/records": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取计划任务记录", + "consumes": [ + "application/json" + ], + "tags": [ + "Cronjob" + ], + "summary": "Page job records", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchRecord" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/cronjobs/status": { "post": { "security": [ { @@ -2434,7 +3394,7 @@ var doc = `{ } } }, - "/cronjob/update": { + "/cronjobs/update": { "post": { "security": [ { @@ -2485,116 +3445,83 @@ var doc = `{ } } }, - "/cronjobs": { - "post": { + "/dashboard/base/:ioOption/:netOption": { + "get": { "security": [ { "ApiKeyAuth": [] } ], - "description": "创建计划任务", + "description": "获取首页基础数据", "consumes": [ "application/json" ], "tags": [ - "Cronjob" + "Dashboard" ], - "summary": "Create cronjob", + "summary": "Load dashboard base info", "parameters": [ { + "type": "string", "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CronjobCreate" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "type", - "name" - ], - "formatEN": "create cronjob [type][name]", - "formatZH": "创建计划任务 [type][name]", - "paramKeys": [] - } - } - }, - "/cronjobs/search": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "获取计划任务分页", - "consumes": [ - "application/json" - ], - "tags": [ - "Cronjob" - ], - "summary": "Search cronjob list with page", - "parameters": [ + "name": "ioOption", + "in": "path", + "required": true + }, { + "type": "string", "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchWithPage" - } + "name": "netOption", + "in": "path", + "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/dto.PageResult" + "$ref": "#/definitions/dto.DashboardBase" } } } } }, - "/cronjobs/search/records": { - "post": { + "/dashboard/current/:ioOption/:netOption": { + "get": { "security": [ { "ApiKeyAuth": [] } ], - "description": "获取计划任务记录", + "description": "获取首页实时数据", "consumes": [ "application/json" ], "tags": [ - "Cronjob" + "Dashboard" ], - "summary": "Search job records", + "summary": "Load dashboard current info", "parameters": [ { + "type": "string", "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchRecord" - } + "name": "ioOption", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "request", + "name": "netOption", + "in": "path", + "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/dto.PageResult" + "$ref": "#/definitions/dto.DashboardCurrent" } } } @@ -3000,9 +3927,9 @@ var doc = `{ "application/json" ], "tags": [ - "Cronjob" + "Database Mysql" ], - "summary": "Search mysql database list", + "summary": "List mysql database names", "parameters": [ { "description": "request", @@ -3153,7 +4080,7 @@ var doc = `{ "tags": [ "Database Redis" ], - "summary": "Search redis backup list", + "summary": "Page redis backups", "parameters": [ { "description": "request", @@ -3446,7 +4373,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "type": "bool" + "type": "boolean" } } } @@ -3464,9 +4391,9 @@ var doc = `{ "application/json" ], "tags": [ - "Cronjob" + "Database Mysql" ], - "summary": "Search mysql database list with page", + "summary": "Page mysql databases", "parameters": [ { "description": "request", @@ -3571,6 +4498,3560 @@ var doc = `{ "paramKeys": [] } } + }, + "/files": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建文件/文件夹", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Create file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Create dir or file [path]", + "formatZH": "创建文件/文件夹 [path]", + "paramKeys": [] + } + } + }, + "/files/batch/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "批量删除文件/文件夹", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Batch delete file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileBatchDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "paths" + ], + "formatEN": "Batch delete dir or file [paths]", + "formatZH": "批量删除文件/文件夹 [paths]", + "paramKeys": [] + } + } + }, + "/files/compress": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "压缩文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Compress file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileCompress" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Compress file [name]", + "formatZH": "压缩文件 [name]", + "paramKeys": [] + } + } + }, + "/files/content": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取文件内容", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Load file content", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileOption" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Load file content [path]", + "formatZH": "获取文件内容 [path]", + "paramKeys": [] + } + } + }, + "/files/decompress": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "解压文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Decompress file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileDeCompress" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Decompress file [path]", + "formatZH": "解压 [path]", + "paramKeys": [] + } + } + }, + "/files/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除文件/文件夹", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Delete file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Delete dir or file [path]", + "formatZH": "删除文件/文件夹 [path]", + "paramKeys": [] + } + } + }, + "/files/download": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "下载文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Download file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileDownload" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Download file [name]", + "formatZH": "下载文件 [name]", + "paramKeys": [] + } + } + }, + "/files/loadfile": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "读取文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Read file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.FilePath" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Read file [path]", + "formatZH": "读取文件 [path]", + "paramKeys": [] + } + } + }, + "/files/mode": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改文件权限", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Change file mode", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path", + "mode" + ], + "formatEN": "Change mode [paths] =\u003e [mode]", + "formatZH": "修改权限 [paths] =\u003e [mode]", + "paramKeys": [] + } + } + }, + "/files/move": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "移动文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Move file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileMove" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "oldPaths", + "newPath" + ], + "formatEN": "Move [oldPaths] =\u003e [newPath]", + "formatZH": "移动文件 [oldPaths] =\u003e [newPath]", + "paramKeys": [] + } + } + }, + "/files/rename": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改文件名称", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Change file name", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileRename" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "oldName", + "newName" + ], + "formatEN": "Rename [oldName] =\u003e [newName]", + "formatZH": "重命名 [oldName] =\u003e [newName]", + "paramKeys": [] + } + } + }, + "/files/save": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新文件内容", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Update file content", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileEdit" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Update file content [path]", + "formatZH": "更新文件内容 [path]", + "paramKeys": [] + } + } + }, + "/files/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取文件列表", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "List files", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileOption" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + } + } + }, + "/files/size": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取文件夹大小", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Load file size", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.DirSizeReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Load file size [path]", + "formatZH": "获取文件夹大小 [path]", + "paramKeys": [] + } + } + }, + "/files/tree": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载文件树", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Load files tree", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileOption" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/files/upload": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "上传文件", + "tags": [ + "File" + ], + "summary": "Upload file", + "parameters": [ + { + "type": "file", + "description": "request", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Upload file [path]", + "formatZH": "上传文件 [path]", + "paramKeys": [] + } + } + }, + "/files/wget": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "下载远端文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Wget file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileWget" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "url", + "path", + "name" + ], + "formatEN": "Download url =\u003e [path]/[name]", + "formatZH": "下载 url =\u003e [path]/[name]", + "paramKeys": [] + } + } + }, + "/groups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Create group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "create group [name][type]", + "formatZH": "创建组 [name][type]", + "paramKeys": [] + } + } + }, + "/groups/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Search group info by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.GroupInfo" + } + } + } + } + }, + "/groups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Delete group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete group [name]", + "formatZH": "删除组 [name]", + "paramKeys": [] + } + } + }, + "/groups/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "List groups", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/groups/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Update group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "update group [name][type]", + "formatZH": "更新组 [name][type]", + "paramKeys": [] + } + } + }, + "/hosts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Create host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "create host [name][addr]", + "formatZH": "创建主机 [name][addr]", + "paramKeys": [] + } + } + }, + "/hosts/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载主机信息", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Load host info", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.HostInfo" + } + } + } + } + }, + "/hosts/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Delete host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "hosts", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "addr", + "output_value": "addr" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete host [addr]", + "formatZH": "删除主机 [addr]", + "paramKeys": [] + } + } + }, + "/hosts/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载主机树", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Load host tree", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchForTree" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/hosts/test/byid/:id": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "测试主机连接", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Test host conn by host id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + } + } + } + }, + "/hosts/test/byinfo": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "测试主机连接", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Test host conn by info", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostConnTest" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/hosts/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Update host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "update host [name][addr]", + "formatZH": "更新主机信息 [name][addr]", + "paramKeys": [] + } + } + }, + "/logs/clean": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "清空操作日志", + "consumes": [ + "application/json" + ], + "tags": [ + "Logs" + ], + "summary": "Clean operation logs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CleanLog" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "logType" + ], + "formatEN": "Clean the [logType] log information", + "formatZH": "清空 [logType] 日志信息", + "paramKeys": [] + } + } + }, + "/logs/login": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取系统登录日志列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Logs" + ], + "summary": "Page login logs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/logs/operation": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取系统操作日志列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Logs" + ], + "summary": "Page operation logs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/nginx": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 nginx 配置信息", + "tags": [ + "Nginx" + ], + "summary": "Load nginx conf", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + } + } + }, + "/nginx/file": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "上传更新 nginx 配置文件", + "consumes": [ + "application/json" + ], + "tags": [ + "Nginx" + ], + "summary": "Update nginx conf by upload file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxConfigFileUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "Update nginx conf", + "formatZH": "更新 nginx 配置", + "paramKeys": [] + } + } + }, + "/nginx/scope": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取部分 nginx 配置信息", + "consumes": [ + "application/json" + ], + "tags": [ + "Nginx" + ], + "summary": "Load partial nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxScopeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/nginx/status": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 nginx 状态信息", + "tags": [ + "Nginx" + ], + "summary": "Load nginx status info", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.NginxStatus" + } + } + } + } + }, + "/nginx/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 nginx 配置信息", + "consumes": [ + "application/json" + ], + "tags": [ + "Nginx" + ], + "summary": "Update nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Update nginx conf [domain]", + "formatZH": "更新 nginx 配置 [domain]", + "paramKeys": [] + } + } + }, + "/settings/daemonjson": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载 docker 配置路径", + "tags": [ + "System Setting" + ], + "summary": "Load daemon.json path", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/settings/expired/handle": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "重置过期系统登录密码", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Reset system password expired", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PasswordUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "reset an expired Password", + "formatZH": "重置过期密码", + "paramKeys": [] + } + } + }, + "/settings/mfa": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 mfa 信息", + "tags": [ + "System Setting" + ], + "summary": "Load mfa info", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/mfa.Otp" + } + } + } + } + }, + "/settings/mfa/bind": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Mfa 绑定", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Bind mfa", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.MfaCredential" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "bind mfa", + "formatZH": "mfa 绑定", + "paramKeys": [] + } + } + }, + "/settings/monitor/clean": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "清空监控数据", + "tags": [ + "System Setting" + ], + "summary": "Clean monitor datas", + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "clean monitor datas", + "formatZH": "清空监控数据", + "paramKeys": [] + } + } + }, + "/settings/password/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统登录密码", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Update system password", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PasswordUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "update system password", + "formatZH": "修改系统密码", + "paramKeys": [] + } + } + }, + "/settings/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载系统配置信息", + "tags": [ + "System Setting" + ], + "summary": "Load system setting info", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.SettingInfo" + } + } + } + } + }, + "/settings/time/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "系统时间同步", + "tags": [ + "System Setting" + ], + "summary": "Sync system time", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "sync system time", + "formatZH": "系统时间同步", + "paramKeys": [] + } + } + }, + "/settings/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统配置", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Update system setting", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SettingUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "key", + "value" + ], + "formatEN": "update system setting [key] =\u003e [value]", + "formatZH": "修改系统配置 [key] =\u003e [value]", + "paramKeys": [] + } + } + }, + "/websites": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Create website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "primaryDomain" + ], + "formatEN": "Create website [primaryDomain]", + "formatZH": "创建网站 [primaryDomain]", + "paramKeys": [] + } + } + }, + "/websites/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 查询网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Search website by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteDTO" + } + } + } + } + }, + "/websites/:id/https": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 https 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website HTTPS" + ], + "summary": "Load https conf", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteHTTPS" + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 https 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website HTTPS" + ], + "summary": "Update https conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteHTTPSOp" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteHTTPS" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Update website https [domain] conf", + "formatZH": "更新网站 [domain] https 配置", + "paramKeys": [] + } + } + }, + "/websites/:id/nginx": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 查询网站 nginx", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Search website nginx by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + } + } + }, + "/websites/acme": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站 acme", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Acme" + ], + "summary": "Create website acme account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteAcmeAccountCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteAcmeAccountDTO" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "email" + ], + "formatEN": "Create website acme [email]", + "formatZH": "创建网站 acme [email]", + "paramKeys": [] + } + } + }, + "/websites/acme/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站 acme", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Acme" + ], + "summary": "Delete website acme account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_acme_accounts", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "email", + "output_value": "email" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website acme [email]", + "formatZH": "删除网站 acme [email]", + "paramKeys": [] + } + } + }, + "/websites/acme/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 acme 列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Acme" + ], + "summary": "Page website acme accounts", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/websites/backup": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "备份网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Backup website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Backup website [domain]", + "formatZH": "备份网站 [domain]", + "paramKeys": [] + } + } + }, + "/websites/check": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "网站创建前检查", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Check before create website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteInstallCheckReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/config": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 nginx 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Load nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxScopeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteNginxConfig" + } + } + } + } + }, + "/websites/config/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 nginx 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Update nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Nginx conf update [domain]", + "formatZH": "nginx 配置修改 [domain]", + "paramKeys": [] + } + } + }, + "/websites/default/server": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作网站日志", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Change default server", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDefaultUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id", + "operate" + ], + "formatEN": "Change default server =\u003e [domain]", + "formatZH": "修改默认 server =\u003e [domain]", + "paramKeys": [] + } + } + }, + "/websites/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Delete website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website [domain]", + "formatZH": "删除网站 [domain]", + "paramKeys": [] + } + } + }, + "/websites/dns": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站 dns", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Create website dns account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDnsAccountCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Create website dns [name]", + "formatZH": "创建网站 dns [name]", + "paramKeys": [] + } + } + }, + "/websites/dns/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站 dns", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Delete website dns account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_dns_accounts", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website dns [name]", + "formatZH": "删除网站 dns [name]", + "paramKeys": [] + } + } + }, + "/websites/dns/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 dns 列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Page website dns accounts", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/websites/dns/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站 dns", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Update website dns account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDnsAccountUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Update website dns [name]", + "formatZH": "更新网站 dns [name]", + "paramKeys": [] + } + } + }, + "/websites/domains": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站域名", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Domain" + ], + "summary": "Create website domain", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDomainCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.WebsiteDomain" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "domain" + ], + "formatEN": "Create domain [domain]", + "formatZH": "创建域名 [domain]", + "paramKeys": [] + } + } + }, + "/websites/domains/:websiteId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过网站 id 查询域名", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Domain" + ], + "summary": "Search website domains by websiteId", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "websiteId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/domains/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站域名", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Domain" + ], + "summary": "Delete website domain", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDomainDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_domains", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete domain [domain]", + "formatZH": "删除域名 [domain]", + "paramKeys": [] + } + } + }, + "/websites/groups": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站组", + "tags": [ + "Website Group" + ], + "summary": "List website groups", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站组", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Group" + ], + "summary": "Create website group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteGroupCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Create website groups [name]", + "formatZH": "创建网站组 [name]", + "paramKeys": [] + } + } + }, + "/websites/groups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站组", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Group" + ], + "summary": "Delete website group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website group [name]", + "formatZH": "删除网站组 [name]", + "paramKeys": [] + } + } + }, + "/websites/groups/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站组", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Group" + ], + "summary": "Update website group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteGroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Update website groups [name]", + "formatZH": "更新网站组 [name]", + "paramKeys": [] + } + } + }, + "/websites/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站列表", + "tags": [ + "Website" + ], + "summary": "List websites", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/log": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作网站日志", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Operate website log", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLogReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteLog" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id", + "operate" + ], + "formatEN": "[domain][operate] logs", + "formatZH": "[domain][operate] 日志", + "paramKeys": [] + } + } + }, + "/websites/nginx/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 网站 nginx 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Update website nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteNginxUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "[domain] Nginx conf update", + "formatZH": "[domain] Nginx 配置修改", + "paramKeys": [] + } + } + }, + "/websites/operate": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Operate website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteOp" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id", + "operate" + ], + "formatEN": "[operate] website [domain]", + "formatZH": "[operate] 网站 [domain]", + "paramKeys": [] + } + } + }, + "/websites/options": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站列表", + "tags": [ + "Website" + ], + "summary": "List website names", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/recover": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "从备份恢复网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Recover website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteRecover" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "websiteName", + "backupName" + ], + "formatEN": "[websiteName] recover from backups [backupName]", + "formatZH": "[websiteName] 从备份恢复 [backupName]", + "paramKeys": [] + } + } + }, + "/websites/recover/byupload": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "从上传恢复网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Recover website by upload", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteRecoverByFile" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "websiteName", + "fileDir", + "fileName" + ], + "formatEN": "[websiteName] recover from uploads [fileDir]/[fileName]", + "formatZH": "[websiteName] 从上传恢复 [fileDir]/[fileName]", + "paramKeys": [] + } + } + }, + "/websites/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Page websites", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/websites/ssl": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Create website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSSLCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/request.WebsiteSSLCreate" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "primaryDomain" + ], + "formatEN": "Create website ssl [primaryDomain]", + "formatZH": "创建网站 ssl [primaryDomain]", + "paramKeys": [] + } + } + }, + "/websites/ssl/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 查询 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Search website ssl by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/websites/ssl/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Delete website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_ssls", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete ssl [domain]", + "formatZH": "删除 ssl [domain]", + "paramKeys": [] + } + } + }, + "/websites/ssl/renew": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "重置网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Reset website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSSLRenew" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_ssls", + "input_colume": "id", + "input_value": "SSLId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "SSLId" + ], + "formatEN": "Renew ssl [domain]", + "formatZH": "重置 ssl [domain]", + "paramKeys": [] + } + } + }, + "/websites/ssl/resolve": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "解析网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Resolve website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDNSReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/ssl/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 ssl 列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Page website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSSLSearch" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/websites/ssl/website/:websiteId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过网站 id 查询 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Search website ssl by website id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "websiteId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/websites/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "primaryDomain" + ], + "formatEN": "Update website [primaryDomain]", + "formatZH": "更新网站 [primaryDomain]", + "paramKeys": [] + } + } + }, + "/websites/waf/config": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 waf 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website WAF" + ], + "summary": "Load websit waf conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteWafReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteWafConfig" + } + } + } + } + }, + "/websites/waf/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 网站 waf 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website WAF" + ], + "summary": "Update website waf conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteWafUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "WAF conf update [domain]", + "formatZH": "WAF 配置修改 [domain]", + "paramKeys": [] + } + } } }, "definitions": { @@ -3644,6 +8125,17 @@ var doc = `{ } } }, + "dto.CaptchaResponse": { + "type": "object", + "properties": { + "captchaID": { + "type": "string" + }, + "imagePath": { + "type": "string" + } + } + }, "dto.ChangeDBInfo": { "type": "object", "required": [ @@ -3658,6 +8150,21 @@ var doc = `{ } } }, + "dto.CleanLog": { + "type": "object", + "required": [ + "logType" + ], + "properties": { + "logType": { + "type": "string", + "enum": [ + "login", + "operation" + ] + } + } + }, "dto.CommandInfo": { "type": "object", "properties": { @@ -4139,6 +8646,175 @@ var doc = `{ } } }, + "dto.DashboardBase": { + "type": "object", + "properties": { + "appInstalldNumber": { + "type": "integer" + }, + "cpuCores": { + "type": "integer" + }, + "cpuLogicalCores": { + "type": "integer" + }, + "cpuModelName": { + "type": "string" + }, + "cronjobNumber": { + "type": "integer" + }, + "currentInfo": { + "$ref": "#/definitions/dto.DashboardCurrent" + }, + "databaseNumber": { + "type": "integer" + }, + "dateeaseID": { + "type": "integer" + }, + "haloID": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "jumpserverID": { + "type": "integer" + }, + "kernelArch": { + "type": "string" + }, + "kernelVersion": { + "type": "string" + }, + "kubeoperatorID": { + "type": "integer" + }, + "kubepiID": { + "type": "integer" + }, + "metersphereID": { + "type": "integer" + }, + "os": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "platformFamily": { + "type": "string" + }, + "platformVersion": { + "type": "string" + }, + "virtualizationSystem": { + "type": "string" + }, + "websiteNumber": { + "type": "integer" + } + } + }, + "dto.DashboardCurrent": { + "type": "object", + "properties": { + "MemoryUsedPercent": { + "type": "number" + }, + "cpuPercent": { + "type": "array", + "items": { + "type": "number" + } + }, + "cpuTotal": { + "type": "integer" + }, + "cpuUsed": { + "type": "number" + }, + "cpuUsedPercent": { + "type": "number" + }, + "free": { + "type": "integer" + }, + "inodesFree": { + "type": "integer" + }, + "inodesTotal": { + "type": "integer" + }, + "inodesUsed": { + "type": "integer" + }, + "inodesUsedPercent": { + "type": "number" + }, + "ioCount": { + "type": "integer" + }, + "ioReadBytes": { + "type": "integer" + }, + "ioTime": { + "type": "integer" + }, + "ioWriteBytes": { + "type": "integer" + }, + "load1": { + "type": "number" + }, + "load15": { + "type": "number" + }, + "load5": { + "type": "number" + }, + "loadUsagePercent": { + "type": "number" + }, + "memoryAvailable": { + "type": "integer" + }, + "memoryTotal": { + "type": "integer" + }, + "memoryUsed": { + "type": "integer" + }, + "netBytesRecv": { + "type": "integer" + }, + "netBytesSent": { + "type": "integer" + }, + "procs": { + "type": "integer" + }, + "shotTime": { + "type": "string" + }, + "timeSinceUptime": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "uptime": { + "type": "integer" + }, + "used": { + "type": "integer" + }, + "usedPercent": { + "type": "number" + } + } + }, "dto.DockerOperation": { "type": "object", "required": [ @@ -4181,6 +8857,17 @@ var doc = `{ } } }, + "dto.FilePath": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + } + }, "dto.ForBuckets": { "type": "object", "required": [ @@ -4203,6 +8890,162 @@ var doc = `{ } } }, + "dto.GroupInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "dto.GroupOperate": { + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "dto.GroupSearch": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string" + } + } + }, + "dto.HostConnTest": { + "type": "object", + "required": [ + "addr", + "port", + "user" + ], + "properties": { + "addr": { + "type": "string" + }, + "authMode": { + "type": "string", + "enum": [ + "password", + "key" + ] + }, + "password": { + "type": "string" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1 + }, + "privateKey": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, + "dto.HostInfo": { + "type": "object", + "properties": { + "addr": { + "type": "string" + }, + "authMode": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "groupBelong": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + }, + "dto.HostOperate": { + "type": "object", + "required": [ + "addr", + "groupBelong", + "port", + "user" + ], + "properties": { + "addr": { + "type": "string" + }, + "authMode": { + "type": "string", + "enum": [ + "password", + "key" + ] + }, + "description": { + "type": "string" + }, + "groupBelong": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1 + }, + "privateKey": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, "dto.ImageBuild": { "type": "object", "required": [ @@ -4375,6 +9218,21 @@ var doc = `{ } } }, + "dto.InitUser": { + "type": "object", + "required": [ + "name", + "password" + ], + "properties": { + "name": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, "dto.InspectReq": { "type": "object", "properties": { @@ -4386,6 +9244,66 @@ var doc = `{ } } }, + "dto.Login": { + "type": "object", + "required": [ + "name", + "password" + ], + "properties": { + "authMethod": { + "type": "string" + }, + "captcha": { + "type": "string" + }, + "captchaID": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "dto.MFALogin": { + "type": "object", + "required": [ + "name", + "password", + "secret" + ], + "properties": { + "authMethod": { + "type": "string" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, + "dto.MfaCredential": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, "dto.MysqlConfUpdateByFile": { "type": "object", "required": [ @@ -4730,6 +9648,21 @@ var doc = `{ } } }, + "dto.PasswordUpdate": { + "type": "object", + "required": [ + "newPassword", + "oldPassword" + ], + "properties": { + "newPassword": { + "type": "string" + }, + "oldPassword": { + "type": "string" + } + } + }, "dto.PortHelper": { "type": "object", "properties": { @@ -4919,6 +9852,14 @@ var doc = `{ } } }, + "dto.SearchForTree": { + "type": "object", + "properties": { + "info": { + "type": "string" + } + } + }, "dto.SearchRecord": { "type": "object", "required": [ @@ -4965,6 +9906,85 @@ var doc = `{ } } }, + "dto.SettingInfo": { + "type": "object", + "properties": { + "complexityVerification": { + "type": "string" + }, + "dingVars": { + "type": "string" + }, + "email": { + "type": "string" + }, + "emailVars": { + "type": "string" + }, + "expirationDays": { + "type": "string" + }, + "expirationTime": { + "type": "string" + }, + "language": { + "type": "string" + }, + "localTime": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "mfaSecret": { + "type": "string" + }, + "mfaStatus": { + "type": "string" + }, + "monitorStatus": { + "type": "string" + }, + "monitorStoreDays": { + "type": "string" + }, + "panelName": { + "type": "string" + }, + "securityEntrance": { + "type": "string" + }, + "serverPort": { + "type": "string" + }, + "sessionTimeout": { + "type": "string" + }, + "theme": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "weChatVars": { + "type": "string" + } + } + }, + "dto.SettingUpdate": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, "dto.UploadRecover": { "type": "object", "required": [ @@ -4986,6 +10006,23 @@ var doc = `{ } } }, + "dto.UserLoginInfo": { + "type": "object", + "properties": { + "mfaSecret": { + "type": "string" + }, + "mfaStatus": { + "type": "string" + }, + "name": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, "dto.VolumeCreat": { "type": "object", "properties": { @@ -5023,6 +10060,494 @@ var doc = `{ } } }, + "files.FileInfo": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "group": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, + "isHidden": { + "type": "boolean" + }, + "isSymlink": { + "type": "boolean" + }, + "itemTotal": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/files.FileInfo" + } + }, + "linkPath": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "modTime": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, + "mfa.Otp": { + "type": "object", + "properties": { + "qrImage": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, + "model.App": { + "type": "object", + "properties": { + "author": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "crossVersionUpdate": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "required": { + "type": "string" + }, + "shortDesc": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.AppInstall": { + "type": "object", + "properties": { + "app": { + "$ref": "#/definitions/model.App" + }, + "appDetailId": { + "type": "integer" + }, + "appId": { + "type": "integer" + }, + "backups": { + "type": "array", + "items": { + "$ref": "#/definitions/model.AppInstallBackup" + } + }, + "containerName": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dockerCompose": { + "type": "string" + }, + "env": { + "type": "string" + }, + "httpPort": { + "type": "integer" + }, + "httpsPort": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "name": { + "type": "string" + }, + "param": { + "type": "string" + }, + "serviceName": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "model.AppInstallBackup": { + "type": "object", + "properties": { + "app_detail_id": { + "type": "integer" + }, + "app_install_id": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "param": { + "type": "string" + }, + "path": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.Tag": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.Website": { + "type": "object", + "properties": { + "accessLog": { + "type": "boolean" + }, + "alias": { + "type": "string" + }, + "appInstallId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "defaultServer": { + "type": "boolean" + }, + "domains": { + "type": "array", + "items": { + "$ref": "#/definitions/model.WebsiteDomain" + } + }, + "errorLog": { + "type": "boolean" + }, + "expireDate": { + "type": "string" + }, + "httpConfig": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "primaryDomain": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "proxy": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "webSiteGroupId": { + "type": "integer" + }, + "webSiteSSL": { + "$ref": "#/definitions/model.WebsiteSSL" + }, + "webSiteSSLId": { + "type": "integer" + } + } + }, + "model.WebsiteAcmeAccount": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "model.WebsiteDomain": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "port": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "model.WebsiteSSL": { + "type": "object", + "properties": { + "acmeAccount": { + "$ref": "#/definitions/model.WebsiteAcmeAccount" + }, + "acmeAccountId": { + "type": "integer" + }, + "autoRenew": { + "type": "boolean" + }, + "certURL": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "dnsAccountId": { + "type": "integer" + }, + "domains": { + "type": "string" + }, + "expireDate": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "organization": { + "type": "string" + }, + "pem": { + "type": "string" + }, + "primaryDomain": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "websites": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Website" + } + } + } + }, + "request.AppBackupDelete": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.AppBackupSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "appInstallID": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + }, + "request.AppInstallCreate": { + "type": "object", + "required": [ + "appDetailId", + "name" + ], + "properties": { + "appDetailId": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + }, + "services": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "request.AppInstalledOperate": { + "type": "object", + "required": [ + "installId", + "operate" + ], + "properties": { + "backupId": { + "type": "integer" + }, + "deleteBackup": { + "type": "boolean" + }, + "detailId": { + "type": "integer" + }, + "forceDelete": { + "type": "boolean" + }, + "installId": { + "type": "integer" + }, + "operate": { + "type": "string" + } + } + }, "request.AppInstalledSearch": { "type": "object", "required": [ @@ -5070,6 +10595,1239 @@ var doc = `{ "type": "string" } } + }, + "request.DirSizeReq": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + } + }, + "request.FileBatchDelete": { + "type": "object", + "required": [ + "paths" + ], + "properties": { + "isDir": { + "type": "boolean" + }, + "paths": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "request.FileCompress": { + "type": "object", + "required": [ + "dst", + "files", + "name", + "type" + ], + "properties": { + "dst": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "replace": { + "type": "boolean" + }, + "type": { + "type": "string" + } + } + }, + "request.FileCreate": { + "type": "object", + "required": [ + "mode", + "path" + ], + "properties": { + "content": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, + "isLink": { + "type": "boolean" + }, + "isSymlink": { + "type": "boolean" + }, + "linkPath": { + "type": "string" + }, + "mode": { + "type": "integer" + }, + "path": { + "type": "string" + } + } + }, + "request.FileDeCompress": { + "type": "object", + "required": [ + "dst", + "path", + "type" + ], + "properties": { + "dst": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.FileDelete": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "isDir": { + "type": "boolean" + }, + "path": { + "type": "string" + } + } + }, + "request.FileDownload": { + "type": "object", + "required": [ + "name", + "paths", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "paths": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + } + } + }, + "request.FileEdit": { + "type": "object", + "required": [ + "content", + "path" + ], + "properties": { + "content": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "request.FileMove": { + "type": "object", + "required": [ + "newPath", + "oldPaths", + "type" + ], + "properties": { + "newPath": { + "type": "string" + }, + "oldPaths": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + } + } + }, + "request.FileOption": { + "type": "object", + "properties": { + "dir": { + "type": "boolean" + }, + "expand": { + "type": "boolean" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "search": { + "type": "string" + }, + "showHidden": { + "type": "boolean" + } + } + }, + "request.FileRename": { + "type": "object", + "required": [ + "newName", + "oldName" + ], + "properties": { + "newName": { + "type": "string" + }, + "oldName": { + "type": "string" + } + } + }, + "request.FileWget": { + "type": "object", + "required": [ + "name", + "path", + "url" + ], + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "request.NewAppInstall": { + "type": "object", + "properties": { + "appDetailID": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + } + } + }, + "request.NginxConfigFileUpdate": { + "type": "object", + "required": [ + "backup", + "content", + "filePath" + ], + "properties": { + "backup": { + "type": "boolean" + }, + "content": { + "type": "string" + }, + "filePath": { + "type": "string" + } + } + }, + "request.NginxConfigUpdate": { + "type": "object", + "required": [ + "websiteId" + ], + "properties": { + "operate": { + "type": "string" + }, + "params": {}, + "scope": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.NginxScopeReq": { + "type": "object", + "required": [ + "scope" + ], + "properties": { + "scope": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.PortUpdate": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "port": { + "type": "integer" + } + } + }, + "request.WebsiteAcmeAccountCreate": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string" + } + } + }, + "request.WebsiteCreate": { + "type": "object", + "required": [ + "alias", + "primaryDomain", + "type", + "webSiteGroupID" + ], + "properties": { + "alias": { + "type": "string" + }, + "appID": { + "type": "integer" + }, + "appInstall": { + "$ref": "#/definitions/request.NewAppInstall" + }, + "appInstallID": { + "type": "integer" + }, + "appType": { + "type": "string", + "enum": [ + "new", + "installed" + ] + }, + "otherDomains": { + "type": "string" + }, + "primaryDomain": { + "type": "string" + }, + "proxy": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "type": { + "type": "string" + }, + "webSiteGroupID": { + "type": "integer" + } + } + }, + "request.WebsiteDNSReq": { + "type": "object", + "required": [ + "acmeAccountId", + "domains" + ], + "properties": { + "acmeAccountId": { + "type": "integer" + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "request.WebsiteDefaultUpdate": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.WebsiteDelete": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "deleteApp": { + "type": "boolean" + }, + "deleteBackup": { + "type": "boolean" + }, + "forceDelete": { + "type": "boolean" + }, + "id": { + "type": "integer" + } + } + }, + "request.WebsiteDnsAccountCreate": { + "type": "object", + "required": [ + "authorization", + "name", + "type" + ], + "properties": { + "authorization": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.WebsiteDnsAccountUpdate": { + "type": "object", + "required": [ + "authorization", + "id", + "name", + "type" + ], + "properties": { + "authorization": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.WebsiteDomainCreate": { + "type": "object", + "required": [ + "domain", + "port", + "websiteId" + ], + "properties": { + "domain": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.WebsiteDomainDelete": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.WebsiteGroupCreate": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "request.WebsiteGroupUpdate": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "default": { + "type": "boolean" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "request.WebsiteHTTPSOp": { + "type": "object", + "required": [ + "enable", + "websiteId" + ], + "properties": { + "HttpConfig": { + "type": "string", + "enum": [ + "HTTPSOnly", + "HTTPAlso", + "HTTPToHTTPS" + ] + }, + "SSLProtocol": { + "type": "array", + "items": { + "type": "string" + } + }, + "algorithm": { + "type": "string" + }, + "certificate": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "privateKey": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "existed", + "auto", + "manual" + ] + }, + "websiteId": { + "type": "integer" + }, + "websiteSSLId": { + "type": "integer" + } + } + }, + "request.WebsiteInstallCheckReq": { + "type": "object", + "required": [ + "InstallIds" + ], + "properties": { + "InstallIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.WebsiteLogReq": { + "type": "object", + "required": [ + "id", + "logType", + "operate" + ], + "properties": { + "id": { + "type": "integer" + }, + "logType": { + "type": "string" + }, + "operate": { + "type": "string" + } + } + }, + "request.WebsiteNginxUpdate": { + "type": "object", + "required": [ + "content", + "id" + ], + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "integer" + } + } + }, + "request.WebsiteOp": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + }, + "operate": { + "type": "string" + } + } + }, + "request.WebsiteRecover": { + "type": "object", + "required": [ + "backupName", + "type", + "websiteName" + ], + "properties": { + "backupName": { + "type": "string" + }, + "type": { + "type": "string" + }, + "websiteName": { + "type": "string" + } + } + }, + "request.WebsiteRecoverByFile": { + "type": "object", + "required": [ + "fileDir", + "fileName", + "type", + "websiteName" + ], + "properties": { + "fileDir": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "type": { + "type": "string" + }, + "websiteName": { + "type": "string" + } + } + }, + "request.WebsiteResourceReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.WebsiteSSLCreate": { + "type": "object", + "required": [ + "acmeAccountId", + "autoRenew", + "primaryDomain", + "provider" + ], + "properties": { + "acmeAccountId": { + "type": "integer" + }, + "autoRenew": { + "type": "boolean" + }, + "dnsAccountId": { + "type": "integer" + }, + "otherDomains": { + "type": "string" + }, + "primaryDomain": { + "type": "string" + }, + "provider": { + "type": "string" + } + } + }, + "request.WebsiteSSLRenew": { + "type": "object", + "required": [ + "SSLId" + ], + "properties": { + "SSLId": { + "type": "integer" + } + } + }, + "request.WebsiteSSLSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + }, + "request.WebsiteSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "name": { + "type": "string" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "websiteGroupId": { + "type": "integer" + } + } + }, + "request.WebsiteUpdate": { + "type": "object", + "required": [ + "id", + "primaryDomain", + "webSiteGroupID" + ], + "properties": { + "expireDate": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "primaryDomain": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "webSiteGroupID": { + "type": "integer" + } + } + }, + "request.WebsiteWafReq": { + "type": "object", + "required": [ + "key", + "rule", + "websiteId" + ], + "properties": { + "key": { + "type": "string" + }, + "rule": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.WebsiteWafUpdate": { + "type": "object", + "required": [ + "enable", + "key", + "websiteId" + ], + "properties": { + "enable": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "response.AppDTO": { + "type": "object", + "properties": { + "author": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "crossVersionUpdate": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "required": { + "type": "string" + }, + "shortDesc": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Tag" + } + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "response.AppDetailDTO": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "id": { + "type": "integer" + }, + "lastVersion": { + "type": "string" + }, + "params": {}, + "readme": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "response.AppInstalledCheck": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "appInstallId": { + "type": "integer" + }, + "containerName": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "installPath": { + "type": "string" + }, + "isExist": { + "type": "boolean" + }, + "lastBackupAt": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "response.AppParam": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": {} + } + }, + "response.FileInfo": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "group": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, + "isHidden": { + "type": "boolean" + }, + "isSymlink": { + "type": "boolean" + }, + "itemTotal": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/files.FileInfo" + } + }, + "linkPath": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "modTime": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, + "response.NginxParam": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "response.NginxStatus": { + "type": "object", + "properties": { + "accepts": { + "type": "string" + }, + "active": { + "type": "string" + }, + "handled": { + "type": "string" + }, + "reading": { + "type": "string" + }, + "requests": { + "type": "string" + }, + "waiting": { + "type": "string" + }, + "writing": { + "type": "string" + } + } + }, + "response.WebsiteAcmeAccountDTO": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "response.WebsiteDTO": { + "type": "object", + "properties": { + "accessLog": { + "type": "boolean" + }, + "accessLogPath": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "appInstallId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "defaultServer": { + "type": "boolean" + }, + "domains": { + "type": "array", + "items": { + "$ref": "#/definitions/model.WebsiteDomain" + } + }, + "errorLog": { + "type": "boolean" + }, + "errorLogPath": { + "type": "string" + }, + "expireDate": { + "type": "string" + }, + "httpConfig": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "primaryDomain": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "proxy": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sitePath": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "webSiteGroupId": { + "type": "integer" + }, + "webSiteSSL": { + "$ref": "#/definitions/model.WebsiteSSL" + }, + "webSiteSSLId": { + "type": "integer" + } + } + }, + "response.WebsiteHTTPS": { + "type": "object", + "properties": { + "SSL": { + "$ref": "#/definitions/model.WebsiteSSL" + }, + "SSLProtocol": { + "type": "array", + "items": { + "type": "string" + } + }, + "algorithm": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "httpConfig": { + "type": "string" + } + } + }, + "response.WebsiteLog": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "enable": { + "type": "boolean" + } + } + }, + "response.WebsiteNginxConfig": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/response.NginxParam" + } + } + } + }, + "response.WebsiteWafConfig": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "filePath": { + "type": "string" + } + } } } }` diff --git a/cmd/server/docs/swagger.go b/cmd/server/docs/swagger.go new file mode 100644 index 000000000..b0022e43c --- /dev/null +++ b/cmd/server/docs/swagger.go @@ -0,0 +1,6 @@ +package docs + +import _ "embed" + +//go:embed swagger.json +var SwaggerJson []byte diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index 387032bb3..4d6882b61 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -14,6 +14,142 @@ "host": "localhost", "basePath": "/api/v1", "paths": { + "/apps/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 获取应用信息", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app by id", + "parameters": [ + { + "type": "integer", + "description": "app id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppDTO" + } + } + } + } + }, + "/apps/detail/:appId/:version": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 获取应用详情", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app detail by id", + "parameters": [ + { + "type": "integer", + "description": "app id", + "name": "appId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app 版本", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppDetailDTO" + } + } + } + } + }, + "/apps/install": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "安装应用", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Install app", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppInstallCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.AppInstall" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "app_installs", + "input_colume": "name", + "input_value": "name", + "isList": false, + "output_colume": "app_id", + "output_value": "appId" + }, + { + "db": "apps", + "info": "appId", + "isList": false, + "output_colume": "key", + "output_value": "appKey" + } + ], + "bodyKeys": [ + "name" + ], + "formatEN": "Install app [appKey]-[name]", + "formatZH": "安装应用 [appKey]-[name]", + "paramKeys": [] + } + } + }, "/apps/installed": { "post": { "security": [ @@ -28,7 +164,7 @@ "tags": [ "App" ], - "summary": "Search app list installed", + "summary": "List app installed", "parameters": [ { "description": "request", @@ -47,6 +183,469 @@ } } }, + "/apps/installed/:appInstallId/versions": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 install id 获取应用更新版本", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app update version by install id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "appInstallId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/apps/installed/backups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询已安装备份列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Page installed backups", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppBackupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/apps/installed/backups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除应用备份记录", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Delete app backup record", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppBackupDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "app_install_backups", + "input_colume": "id", + "input_value": "ids", + "isList": true, + "output_colume": "name", + "output_value": "names" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "Deleting an Application Backup [names]", + "formatZH": "删除应用备份 [names]", + "paramKeys": [] + } + } + }, + "/apps/installed/check/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "检查应用安装情况", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Check app installed", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppInstalledCheck" + } + } + } + } + }, + "/apps/installed/conf/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 key 获取应用默认配置", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search default config by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/apps/installed/delete/check/:appInstallId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除前检查", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Check before delete", + "parameters": [ + { + "type": "integer", + "description": "App install id", + "name": "appInstallId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/apps/installed/loadpassword/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取应用密码", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app password by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/apps/installed/loadport/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取应用端口", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app port by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "integer" + } + } + } + } + }, + "/apps/installed/op": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作已安装应用", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Operate installed app", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppInstalledOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "app_installs", + "input_colume": "id", + "input_value": "installId", + "isList": false, + "output_colume": "app_id", + "output_value": "appId" + }, + { + "db": "app_installs", + "input_colume": "id", + "input_value": "installId", + "isList": false, + "output_colume": "name", + "output_value": "appName" + }, + { + "db": "apps", + "input_colume": "id", + "input_value": "appId", + "isList": false, + "output_colume": "key", + "output_value": "appKey" + } + ], + "bodyKeys": [ + "installId", + "operate" + ], + "formatEN": "[appKey] App [appName] [operate]", + "formatZH": "[appKey] 应用 [appName] [operate]", + "paramKeys": [] + } + } + }, + "/apps/installed/params/:appInstallId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 install id 获取应用参数", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search params by appInstallId", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "appInstallId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppParam" + } + } + } + } + }, + "/apps/installed/port/change": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改应用端口", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Change app port", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.PortUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "key", + "name", + "port" + ], + "formatEN": "Application port update [key]-[name] =\u003e [port]", + "formatZH": "应用端口修改 [key]-[name] =\u003e [port]", + "paramKeys": [] + } + } + }, + "/apps/installed/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步已安装应用列表", + "tags": [ + "App" + ], + "summary": "Sync app installed", + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "Sync the list of installed apps", + "formatZH": "同步已安装应用列表", + "paramKeys": [] + } + } + }, "/apps/search": { "post": { "security": [ @@ -61,7 +660,7 @@ "tags": [ "App" ], - "summary": "Search app list", + "summary": "List apps", "parameters": [ { "description": "request", @@ -80,6 +679,209 @@ } } }, + "/apps/services/:key": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 key 获取应用 service", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app service by key", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "key", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/apps/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步应用列表", + "tags": [ + "App" + ], + "summary": "Sync app list", + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "App store synchronization", + "formatZH": "应用商店同步", + "paramKeys": [] + } + } + }, + "/auth/captcha": { + "get": { + "description": "加载验证码", + "tags": [ + "Auth" + ], + "summary": "Load captcha", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.CaptchaResponse" + } + } + } + } + }, + "/auth/init": { + "post": { + "description": "初始化用户", + "consumes": [ + "application/json" + ], + "tags": [ + "Auth" + ], + "summary": "Init user", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.InitUser" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/auth/login": { + "post": { + "description": "用户登录", + "consumes": [ + "application/json" + ], + "tags": [ + "Auth" + ], + "summary": "User login", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.Login" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.UserLoginInfo" + } + } + } + } + }, + "/auth/logout": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "用户登出", + "tags": [ + "Auth" + ], + "summary": "User logout", + "responses": { + "200": { + "description": "" + } + } + } + }, + "/auth/mfalogin": { + "post": { + "description": "用户 mfa 登录", + "consumes": [ + "application/json" + ], + "tags": [ + "Auth" + ], + "summary": "User login with mfa", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.MFALogin" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.UserLoginInfo" + } + } + } + } + }, + "/auth/status": { + "get": { + "description": "获取系统安全登录状态", + "tags": [ + "Auth" + ], + "summary": "Load safety status", + "responses": { + "200": { + "description": "" + }, + "402": { + "description": "" + } + } + } + }, "/backups": { "post": { "security": [ @@ -281,7 +1083,7 @@ "tags": [ "Backup Account" ], - "summary": "Search backup records with page", + "summary": "Page backup records", "parameters": [ { "description": "request", @@ -301,6 +1103,26 @@ } }, "/backups/search": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取备份账号列表", + "tags": [ + "Backup Account" + ], + "summary": "List backup accounts", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + }, "post": { "security": [ { @@ -314,7 +1136,7 @@ "tags": [ "Backup Account" ], - "summary": "List bucket", + "summary": "List buckets", "parameters": [ { "description": "request", @@ -337,26 +1159,6 @@ } }, "/backups/update": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "获取备份账号列表", - "tags": [ - "Backup Account" - ], - "summary": "Search backup account", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "anrry" - } - } - } - }, "post": { "security": [ { @@ -409,7 +1211,7 @@ "tags": [ "Command" ], - "summary": "Search command", + "summary": "List commands", "responses": { "200": { "description": "OK", @@ -425,14 +1227,14 @@ "ApiKeyAuth": [] } ], - "description": "获取快速命令列表分页", + "description": "创建快速命令", "consumes": [ "application/json" ], "tags": [ "Command" ], - "summary": "Search command with page", + "summary": "Create command", "parameters": [ { "description": "request", @@ -440,17 +1242,24 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/dto.SearchWithPage" + "$ref": "#/definitions/dto.CommandOperate" } } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } + "description": "" } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "command" + ], + "formatEN": "create quick command [name][command]", + "formatZH": "创建快捷命令 [name][command]", + "paramKeys": [] } } }, @@ -505,6 +1314,42 @@ } } }, + "/commands/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取快速命令列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Command" + ], + "summary": "Page commands", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, "/commands/update": { "post": { "security": [ @@ -689,7 +1534,7 @@ "tags": [ "Container Compose" ], - "summary": "Search compose list with page", + "summary": "Page composes", "parameters": [ { "description": "request", @@ -939,7 +1784,7 @@ "tags": [ "Container Image" ], - "summary": "Search image list", + "summary": "List images", "responses": { "200": { "description": "OK", @@ -1251,7 +2096,7 @@ "tags": [ "Container Image" ], - "summary": "Search image list with page", + "summary": "Page images", "parameters": [ { "description": "request", @@ -1462,7 +2307,7 @@ "tags": [ "Container Network" ], - "summary": "Search network list with page", + "summary": "Page networks", "parameters": [ { "description": "request", @@ -1542,7 +2387,7 @@ "tags": [ "Container Image-repo" ], - "summary": "Search image repo list", + "summary": "List image repos", "responses": { "200": { "description": "OK", @@ -1667,7 +2512,7 @@ "tags": [ "Container Image-repo" ], - "summary": "Search image repo list with page", + "summary": "Page image repos", "parameters": [ { "description": "request", @@ -1760,7 +2605,7 @@ "tags": [ "Container" ], - "summary": "Search container list with page", + "summary": "Page containers", "parameters": [ { "description": "request", @@ -1863,7 +2708,7 @@ "tags": [ "Container Compose-template" ], - "summary": "Search compose template list", + "summary": "List compose templates", "responses": { "200": { "description": "OK", @@ -1886,7 +2731,7 @@ "tags": [ "Container Compose-template" ], - "summary": "Create Compose template", + "summary": "Create compose template", "parameters": [ { "description": "request", @@ -1982,7 +2827,7 @@ "tags": [ "Container Compose-template" ], - "summary": "Search compose template list with page", + "summary": "Page compose templates", "parameters": [ { "description": "request", @@ -2156,7 +3001,7 @@ "tags": [ "Container Volume" ], - "summary": "Search volume list", + "summary": "List volumes", "parameters": [ { "description": "request", @@ -2193,7 +3038,7 @@ "tags": [ "Container Volume" ], - "summary": "Search volume list with page", + "summary": "Page volumes", "parameters": [ { "description": "request", @@ -2215,7 +3060,50 @@ } } }, - "/cronjob/del": { + "/cronjobs": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建计划任务", + "consumes": [ + "application/json" + ], + "tags": [ + "Cronjob" + ], + "summary": "Create cronjob", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CronjobCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "type", + "name" + ], + "formatEN": "create cronjob [type][name]", + "formatZH": "创建计划任务 [type][name]", + "paramKeys": [] + } + } + }, + "/cronjobs/del": { "post": { "security": [ { @@ -2266,7 +3154,7 @@ } } }, - "/cronjob/download": { + "/cronjobs/download": { "post": { "security": [ { @@ -2280,7 +3168,7 @@ "tags": [ "Cronjob" ], - "summary": "Download Cronjob records", + "summary": "Download cronjob records", "parameters": [ { "description": "request", @@ -2317,7 +3205,7 @@ } } }, - "/cronjob/handle": { + "/cronjobs/handle": { "post": { "security": [ { @@ -2368,7 +3256,79 @@ } } }, - "/cronjob/status": { + "/cronjobs/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取计划任务分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Cronjob" + ], + "summary": "Page cronjobs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/cronjobs/search/records": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取计划任务记录", + "consumes": [ + "application/json" + ], + "tags": [ + "Cronjob" + ], + "summary": "Page job records", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchRecord" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/cronjobs/status": { "post": { "security": [ { @@ -2420,7 +3380,7 @@ } } }, - "/cronjob/update": { + "/cronjobs/update": { "post": { "security": [ { @@ -2471,116 +3431,83 @@ } } }, - "/cronjobs": { - "post": { + "/dashboard/base/:ioOption/:netOption": { + "get": { "security": [ { "ApiKeyAuth": [] } ], - "description": "创建计划任务", + "description": "获取首页基础数据", "consumes": [ "application/json" ], "tags": [ - "Cronjob" + "Dashboard" ], - "summary": "Create cronjob", + "summary": "Load dashboard base info", "parameters": [ { + "type": "string", "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CronjobCreate" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "type", - "name" - ], - "formatEN": "create cronjob [type][name]", - "formatZH": "创建计划任务 [type][name]", - "paramKeys": [] - } - } - }, - "/cronjobs/search": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "获取计划任务分页", - "consumes": [ - "application/json" - ], - "tags": [ - "Cronjob" - ], - "summary": "Search cronjob list with page", - "parameters": [ + "name": "ioOption", + "in": "path", + "required": true + }, { + "type": "string", "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchWithPage" - } + "name": "netOption", + "in": "path", + "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/dto.PageResult" + "$ref": "#/definitions/dto.DashboardBase" } } } } }, - "/cronjobs/search/records": { - "post": { + "/dashboard/current/:ioOption/:netOption": { + "get": { "security": [ { "ApiKeyAuth": [] } ], - "description": "获取计划任务记录", + "description": "获取首页实时数据", "consumes": [ "application/json" ], "tags": [ - "Cronjob" + "Dashboard" ], - "summary": "Search job records", + "summary": "Load dashboard current info", "parameters": [ { + "type": "string", "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchRecord" - } + "name": "ioOption", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "request", + "name": "netOption", + "in": "path", + "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/dto.PageResult" + "$ref": "#/definitions/dto.DashboardCurrent" } } } @@ -2986,9 +3913,9 @@ "application/json" ], "tags": [ - "Cronjob" + "Database Mysql" ], - "summary": "Search mysql database list", + "summary": "List mysql database names", "parameters": [ { "description": "request", @@ -3139,7 +4066,7 @@ "tags": [ "Database Redis" ], - "summary": "Search redis backup list", + "summary": "Page redis backups", "parameters": [ { "description": "request", @@ -3432,7 +4359,7 @@ "200": { "description": "OK", "schema": { - "type": "bool" + "type": "boolean" } } } @@ -3450,9 +4377,9 @@ "application/json" ], "tags": [ - "Cronjob" + "Database Mysql" ], - "summary": "Search mysql database list with page", + "summary": "Page mysql databases", "parameters": [ { "description": "request", @@ -3557,6 +4484,3560 @@ "paramKeys": [] } } + }, + "/files": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建文件/文件夹", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Create file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Create dir or file [path]", + "formatZH": "创建文件/文件夹 [path]", + "paramKeys": [] + } + } + }, + "/files/batch/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "批量删除文件/文件夹", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Batch delete file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileBatchDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "paths" + ], + "formatEN": "Batch delete dir or file [paths]", + "formatZH": "批量删除文件/文件夹 [paths]", + "paramKeys": [] + } + } + }, + "/files/compress": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "压缩文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Compress file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileCompress" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Compress file [name]", + "formatZH": "压缩文件 [name]", + "paramKeys": [] + } + } + }, + "/files/content": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取文件内容", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Load file content", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileOption" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Load file content [path]", + "formatZH": "获取文件内容 [path]", + "paramKeys": [] + } + } + }, + "/files/decompress": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "解压文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Decompress file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileDeCompress" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Decompress file [path]", + "formatZH": "解压 [path]", + "paramKeys": [] + } + } + }, + "/files/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除文件/文件夹", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Delete file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Delete dir or file [path]", + "formatZH": "删除文件/文件夹 [path]", + "paramKeys": [] + } + } + }, + "/files/download": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "下载文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Download file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileDownload" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Download file [name]", + "formatZH": "下载文件 [name]", + "paramKeys": [] + } + } + }, + "/files/loadfile": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "读取文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Read file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.FilePath" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Read file [path]", + "formatZH": "读取文件 [path]", + "paramKeys": [] + } + } + }, + "/files/mode": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改文件权限", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Change file mode", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path", + "mode" + ], + "formatEN": "Change mode [paths] =\u003e [mode]", + "formatZH": "修改权限 [paths] =\u003e [mode]", + "paramKeys": [] + } + } + }, + "/files/move": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "移动文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Move file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileMove" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "oldPaths", + "newPath" + ], + "formatEN": "Move [oldPaths] =\u003e [newPath]", + "formatZH": "移动文件 [oldPaths] =\u003e [newPath]", + "paramKeys": [] + } + } + }, + "/files/rename": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改文件名称", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Change file name", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileRename" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "oldName", + "newName" + ], + "formatEN": "Rename [oldName] =\u003e [newName]", + "formatZH": "重命名 [oldName] =\u003e [newName]", + "paramKeys": [] + } + } + }, + "/files/save": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新文件内容", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Update file content", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileEdit" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Update file content [path]", + "formatZH": "更新文件内容 [path]", + "paramKeys": [] + } + } + }, + "/files/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取文件列表", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "List files", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileOption" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + } + } + }, + "/files/size": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取文件夹大小", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Load file size", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.DirSizeReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Load file size [path]", + "formatZH": "获取文件夹大小 [path]", + "paramKeys": [] + } + } + }, + "/files/tree": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载文件树", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Load files tree", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileOption" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/files/upload": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "上传文件", + "tags": [ + "File" + ], + "summary": "Upload file", + "parameters": [ + { + "type": "file", + "description": "request", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "path" + ], + "formatEN": "Upload file [path]", + "formatZH": "上传文件 [path]", + "paramKeys": [] + } + } + }, + "/files/wget": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "下载远端文件", + "consumes": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Wget file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileWget" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "url", + "path", + "name" + ], + "formatEN": "Download url =\u003e [path]/[name]", + "formatZH": "下载 url =\u003e [path]/[name]", + "paramKeys": [] + } + } + }, + "/groups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Create group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "create group [name][type]", + "formatZH": "创建组 [name][type]", + "paramKeys": [] + } + } + }, + "/groups/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Search group info by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.GroupInfo" + } + } + } + } + }, + "/groups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Delete group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete group [name]", + "formatZH": "删除组 [name]", + "paramKeys": [] + } + } + }, + "/groups/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "List groups", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/groups/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Update group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "update group [name][type]", + "formatZH": "更新组 [name][type]", + "paramKeys": [] + } + } + }, + "/hosts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Create host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "create host [name][addr]", + "formatZH": "创建主机 [name][addr]", + "paramKeys": [] + } + } + }, + "/hosts/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载主机信息", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Load host info", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.HostInfo" + } + } + } + } + }, + "/hosts/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Delete host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "hosts", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "addr", + "output_value": "addr" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete host [addr]", + "formatZH": "删除主机 [addr]", + "paramKeys": [] + } + } + }, + "/hosts/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载主机树", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Load host tree", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchForTree" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/hosts/test/byid/:id": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "测试主机连接", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Test host conn by host id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + } + } + } + }, + "/hosts/test/byinfo": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "测试主机连接", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Test host conn by info", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostConnTest" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/hosts/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Update host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "update host [name][addr]", + "formatZH": "更新主机信息 [name][addr]", + "paramKeys": [] + } + } + }, + "/logs/clean": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "清空操作日志", + "consumes": [ + "application/json" + ], + "tags": [ + "Logs" + ], + "summary": "Clean operation logs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CleanLog" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "logType" + ], + "formatEN": "Clean the [logType] log information", + "formatZH": "清空 [logType] 日志信息", + "paramKeys": [] + } + } + }, + "/logs/login": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取系统登录日志列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Logs" + ], + "summary": "Page login logs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/logs/operation": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取系统操作日志列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Logs" + ], + "summary": "Page operation logs", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/nginx": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 nginx 配置信息", + "tags": [ + "Nginx" + ], + "summary": "Load nginx conf", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + } + } + }, + "/nginx/file": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "上传更新 nginx 配置文件", + "consumes": [ + "application/json" + ], + "tags": [ + "Nginx" + ], + "summary": "Update nginx conf by upload file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxConfigFileUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "Update nginx conf", + "formatZH": "更新 nginx 配置", + "paramKeys": [] + } + } + }, + "/nginx/scope": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取部分 nginx 配置信息", + "consumes": [ + "application/json" + ], + "tags": [ + "Nginx" + ], + "summary": "Load partial nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxScopeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/nginx/status": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 nginx 状态信息", + "tags": [ + "Nginx" + ], + "summary": "Load nginx status info", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.NginxStatus" + } + } + } + } + }, + "/nginx/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 nginx 配置信息", + "consumes": [ + "application/json" + ], + "tags": [ + "Nginx" + ], + "summary": "Update nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Update nginx conf [domain]", + "formatZH": "更新 nginx 配置 [domain]", + "paramKeys": [] + } + } + }, + "/settings/daemonjson": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载 docker 配置路径", + "tags": [ + "System Setting" + ], + "summary": "Load daemon.json path", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/settings/expired/handle": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "重置过期系统登录密码", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Reset system password expired", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PasswordUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "reset an expired Password", + "formatZH": "重置过期密码", + "paramKeys": [] + } + } + }, + "/settings/mfa": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 mfa 信息", + "tags": [ + "System Setting" + ], + "summary": "Load mfa info", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/mfa.Otp" + } + } + } + } + }, + "/settings/mfa/bind": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Mfa 绑定", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Bind mfa", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.MfaCredential" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "bind mfa", + "formatZH": "mfa 绑定", + "paramKeys": [] + } + } + }, + "/settings/monitor/clean": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "清空监控数据", + "tags": [ + "System Setting" + ], + "summary": "Clean monitor datas", + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "clean monitor datas", + "formatZH": "清空监控数据", + "paramKeys": [] + } + } + }, + "/settings/password/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统登录密码", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Update system password", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PasswordUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "update system password", + "formatZH": "修改系统密码", + "paramKeys": [] + } + } + }, + "/settings/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "加载系统配置信息", + "tags": [ + "System Setting" + ], + "summary": "Load system setting info", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.SettingInfo" + } + } + } + } + }, + "/settings/time/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "系统时间同步", + "tags": [ + "System Setting" + ], + "summary": "Sync system time", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [], + "formatEN": "sync system time", + "formatZH": "系统时间同步", + "paramKeys": [] + } + } + }, + "/settings/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统配置", + "consumes": [ + "application/json" + ], + "tags": [ + "System Setting" + ], + "summary": "Update system setting", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SettingUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "key", + "value" + ], + "formatEN": "update system setting [key] =\u003e [value]", + "formatZH": "修改系统配置 [key] =\u003e [value]", + "paramKeys": [] + } + } + }, + "/websites": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Create website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "primaryDomain" + ], + "formatEN": "Create website [primaryDomain]", + "formatZH": "创建网站 [primaryDomain]", + "paramKeys": [] + } + } + }, + "/websites/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 查询网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Search website by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteDTO" + } + } + } + } + }, + "/websites/:id/https": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 https 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website HTTPS" + ], + "summary": "Load https conf", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteHTTPS" + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 https 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website HTTPS" + ], + "summary": "Update https conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteHTTPSOp" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteHTTPS" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Update website https [domain] conf", + "formatZH": "更新网站 [domain] https 配置", + "paramKeys": [] + } + } + }, + "/websites/:id/nginx": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 查询网站 nginx", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Search website nginx by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.FileInfo" + } + } + } + } + }, + "/websites/acme": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站 acme", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Acme" + ], + "summary": "Create website acme account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteAcmeAccountCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteAcmeAccountDTO" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "email" + ], + "formatEN": "Create website acme [email]", + "formatZH": "创建网站 acme [email]", + "paramKeys": [] + } + } + }, + "/websites/acme/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站 acme", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Acme" + ], + "summary": "Delete website acme account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_acme_accounts", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "email", + "output_value": "email" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website acme [email]", + "formatZH": "删除网站 acme [email]", + "paramKeys": [] + } + } + }, + "/websites/acme/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 acme 列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Acme" + ], + "summary": "Page website acme accounts", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/websites/backup": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "备份网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Backup website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Backup website [domain]", + "formatZH": "备份网站 [domain]", + "paramKeys": [] + } + } + }, + "/websites/check": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "网站创建前检查", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Check before create website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteInstallCheckReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/config": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取 nginx 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Load nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxScopeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteNginxConfig" + } + } + } + } + }, + "/websites/config/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 nginx 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Update nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Nginx conf update [domain]", + "formatZH": "nginx 配置修改 [domain]", + "paramKeys": [] + } + } + }, + "/websites/default/server": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作网站日志", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Change default server", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDefaultUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id", + "operate" + ], + "formatEN": "Change default server =\u003e [domain]", + "formatZH": "修改默认 server =\u003e [domain]", + "paramKeys": [] + } + } + }, + "/websites/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Delete website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website [domain]", + "formatZH": "删除网站 [domain]", + "paramKeys": [] + } + } + }, + "/websites/dns": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站 dns", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Create website dns account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDnsAccountCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Create website dns [name]", + "formatZH": "创建网站 dns [name]", + "paramKeys": [] + } + } + }, + "/websites/dns/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站 dns", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Delete website dns account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_dns_accounts", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website dns [name]", + "formatZH": "删除网站 dns [name]", + "paramKeys": [] + } + } + }, + "/websites/dns/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 dns 列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Page website dns accounts", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/websites/dns/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站 dns", + "consumes": [ + "application/json" + ], + "tags": [ + "Website DNS" + ], + "summary": "Update website dns account", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDnsAccountUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Update website dns [name]", + "formatZH": "更新网站 dns [name]", + "paramKeys": [] + } + } + }, + "/websites/domains": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站域名", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Domain" + ], + "summary": "Create website domain", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDomainCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.WebsiteDomain" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "domain" + ], + "formatEN": "Create domain [domain]", + "formatZH": "创建域名 [domain]", + "paramKeys": [] + } + } + }, + "/websites/domains/:websiteId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过网站 id 查询域名", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Domain" + ], + "summary": "Search website domains by websiteId", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "websiteId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/domains/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站域名", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Domain" + ], + "summary": "Delete website domain", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDomainDelete" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_domains", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete domain [domain]", + "formatZH": "删除域名 [domain]", + "paramKeys": [] + } + } + }, + "/websites/groups": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站组", + "tags": [ + "Website Group" + ], + "summary": "List website groups", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站组", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Group" + ], + "summary": "Create website group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteGroupCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Create website groups [name]", + "formatZH": "创建网站组 [name]", + "paramKeys": [] + } + } + }, + "/websites/groups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站组", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Group" + ], + "summary": "Delete website group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website group [name]", + "formatZH": "删除网站组 [name]", + "paramKeys": [] + } + } + }, + "/websites/groups/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站组", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Group" + ], + "summary": "Update website group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteGroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Update website groups [name]", + "formatZH": "更新网站组 [name]", + "paramKeys": [] + } + } + }, + "/websites/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站列表", + "tags": [ + "Website" + ], + "summary": "List websites", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/log": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作网站日志", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Operate website log", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLogReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteLog" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id", + "operate" + ], + "formatEN": "[domain][operate] logs", + "formatZH": "[domain][operate] 日志", + "paramKeys": [] + } + } + }, + "/websites/nginx/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 网站 nginx 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website Nginx" + ], + "summary": "Update website nginx conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteNginxUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "[domain] Nginx conf update", + "formatZH": "[domain] Nginx 配置修改", + "paramKeys": [] + } + } + }, + "/websites/operate": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "操作网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Operate website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteOp" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id", + "operate" + ], + "formatEN": "[operate] website [domain]", + "formatZH": "[operate] 网站 [domain]", + "paramKeys": [] + } + } + }, + "/websites/options": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站列表", + "tags": [ + "Website" + ], + "summary": "List website names", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/recover": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "从备份恢复网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Recover website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteRecover" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "websiteName", + "backupName" + ], + "formatEN": "[websiteName] recover from backups [backupName]", + "formatZH": "[websiteName] 从备份恢复 [backupName]", + "paramKeys": [] + } + } + }, + "/websites/recover/byupload": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "从上传恢复网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Recover website by upload", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteRecoverByFile" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "websiteName", + "fileDir", + "fileName" + ], + "formatEN": "[websiteName] recover from uploads [fileDir]/[fileName]", + "formatZH": "[websiteName] 从上传恢复 [fileDir]/[fileName]", + "paramKeys": [] + } + } + }, + "/websites/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Page websites", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + } + } + }, + "/websites/ssl": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Create website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSSLCreate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/request.WebsiteSSLCreate" + } + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "primaryDomain" + ], + "formatEN": "Create website ssl [primaryDomain]", + "formatZH": "创建网站 ssl [primaryDomain]", + "paramKeys": [] + } + } + }, + "/websites/ssl/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 id 查询 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Search website ssl by id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/websites/ssl/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Delete website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteResourceReq" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_ssls", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete ssl [domain]", + "formatZH": "删除 ssl [domain]", + "paramKeys": [] + } + } + }, + "/websites/ssl/renew": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "重置网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Reset website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSSLRenew" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "website_ssls", + "input_colume": "id", + "input_value": "SSLId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "SSLId" + ], + "formatEN": "Renew ssl [domain]", + "formatZH": "重置 ssl [domain]", + "paramKeys": [] + } + } + }, + "/websites/ssl/resolve": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "解析网站 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Resolve website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteDNSReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/websites/ssl/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 ssl 列表分页", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Page website ssl", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteSSLSearch" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/websites/ssl/website/:websiteId": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过网站 id 查询 ssl", + "consumes": [ + "application/json" + ], + "tags": [ + "Website SSL" + ], + "summary": "Search website ssl by website id", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "websiteId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/websites/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update website", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "primaryDomain" + ], + "formatEN": "Update website [primaryDomain]", + "formatZH": "更新网站 [primaryDomain]", + "paramKeys": [] + } + } + }, + "/websites/waf/config": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 waf 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website WAF" + ], + "summary": "Load websit waf conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteWafReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteWafConfig" + } + } + } + } + }, + "/websites/waf/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 网站 waf 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website WAF" + ], + "summary": "Update website waf conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteWafUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteId", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "WAF conf update [domain]", + "formatZH": "WAF 配置修改 [domain]", + "paramKeys": [] + } + } } }, "definitions": { @@ -3630,6 +8111,17 @@ } } }, + "dto.CaptchaResponse": { + "type": "object", + "properties": { + "captchaID": { + "type": "string" + }, + "imagePath": { + "type": "string" + } + } + }, "dto.ChangeDBInfo": { "type": "object", "required": [ @@ -3644,6 +8136,21 @@ } } }, + "dto.CleanLog": { + "type": "object", + "required": [ + "logType" + ], + "properties": { + "logType": { + "type": "string", + "enum": [ + "login", + "operation" + ] + } + } + }, "dto.CommandInfo": { "type": "object", "properties": { @@ -4125,6 +8632,175 @@ } } }, + "dto.DashboardBase": { + "type": "object", + "properties": { + "appInstalldNumber": { + "type": "integer" + }, + "cpuCores": { + "type": "integer" + }, + "cpuLogicalCores": { + "type": "integer" + }, + "cpuModelName": { + "type": "string" + }, + "cronjobNumber": { + "type": "integer" + }, + "currentInfo": { + "$ref": "#/definitions/dto.DashboardCurrent" + }, + "databaseNumber": { + "type": "integer" + }, + "dateeaseID": { + "type": "integer" + }, + "haloID": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "jumpserverID": { + "type": "integer" + }, + "kernelArch": { + "type": "string" + }, + "kernelVersion": { + "type": "string" + }, + "kubeoperatorID": { + "type": "integer" + }, + "kubepiID": { + "type": "integer" + }, + "metersphereID": { + "type": "integer" + }, + "os": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "platformFamily": { + "type": "string" + }, + "platformVersion": { + "type": "string" + }, + "virtualizationSystem": { + "type": "string" + }, + "websiteNumber": { + "type": "integer" + } + } + }, + "dto.DashboardCurrent": { + "type": "object", + "properties": { + "MemoryUsedPercent": { + "type": "number" + }, + "cpuPercent": { + "type": "array", + "items": { + "type": "number" + } + }, + "cpuTotal": { + "type": "integer" + }, + "cpuUsed": { + "type": "number" + }, + "cpuUsedPercent": { + "type": "number" + }, + "free": { + "type": "integer" + }, + "inodesFree": { + "type": "integer" + }, + "inodesTotal": { + "type": "integer" + }, + "inodesUsed": { + "type": "integer" + }, + "inodesUsedPercent": { + "type": "number" + }, + "ioCount": { + "type": "integer" + }, + "ioReadBytes": { + "type": "integer" + }, + "ioTime": { + "type": "integer" + }, + "ioWriteBytes": { + "type": "integer" + }, + "load1": { + "type": "number" + }, + "load15": { + "type": "number" + }, + "load5": { + "type": "number" + }, + "loadUsagePercent": { + "type": "number" + }, + "memoryAvailable": { + "type": "integer" + }, + "memoryTotal": { + "type": "integer" + }, + "memoryUsed": { + "type": "integer" + }, + "netBytesRecv": { + "type": "integer" + }, + "netBytesSent": { + "type": "integer" + }, + "procs": { + "type": "integer" + }, + "shotTime": { + "type": "string" + }, + "timeSinceUptime": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "uptime": { + "type": "integer" + }, + "used": { + "type": "integer" + }, + "usedPercent": { + "type": "number" + } + } + }, "dto.DockerOperation": { "type": "object", "required": [ @@ -4167,6 +8843,17 @@ } } }, + "dto.FilePath": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + } + }, "dto.ForBuckets": { "type": "object", "required": [ @@ -4189,6 +8876,162 @@ } } }, + "dto.GroupInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "dto.GroupOperate": { + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "dto.GroupSearch": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string" + } + } + }, + "dto.HostConnTest": { + "type": "object", + "required": [ + "addr", + "port", + "user" + ], + "properties": { + "addr": { + "type": "string" + }, + "authMode": { + "type": "string", + "enum": [ + "password", + "key" + ] + }, + "password": { + "type": "string" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1 + }, + "privateKey": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, + "dto.HostInfo": { + "type": "object", + "properties": { + "addr": { + "type": "string" + }, + "authMode": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "groupBelong": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + }, + "dto.HostOperate": { + "type": "object", + "required": [ + "addr", + "groupBelong", + "port", + "user" + ], + "properties": { + "addr": { + "type": "string" + }, + "authMode": { + "type": "string", + "enum": [ + "password", + "key" + ] + }, + "description": { + "type": "string" + }, + "groupBelong": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1 + }, + "privateKey": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, "dto.ImageBuild": { "type": "object", "required": [ @@ -4361,6 +9204,21 @@ } } }, + "dto.InitUser": { + "type": "object", + "required": [ + "name", + "password" + ], + "properties": { + "name": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, "dto.InspectReq": { "type": "object", "properties": { @@ -4372,6 +9230,66 @@ } } }, + "dto.Login": { + "type": "object", + "required": [ + "name", + "password" + ], + "properties": { + "authMethod": { + "type": "string" + }, + "captcha": { + "type": "string" + }, + "captchaID": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "dto.MFALogin": { + "type": "object", + "required": [ + "name", + "password", + "secret" + ], + "properties": { + "authMethod": { + "type": "string" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, + "dto.MfaCredential": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, "dto.MysqlConfUpdateByFile": { "type": "object", "required": [ @@ -4716,6 +9634,21 @@ } } }, + "dto.PasswordUpdate": { + "type": "object", + "required": [ + "newPassword", + "oldPassword" + ], + "properties": { + "newPassword": { + "type": "string" + }, + "oldPassword": { + "type": "string" + } + } + }, "dto.PortHelper": { "type": "object", "properties": { @@ -4905,6 +9838,14 @@ } } }, + "dto.SearchForTree": { + "type": "object", + "properties": { + "info": { + "type": "string" + } + } + }, "dto.SearchRecord": { "type": "object", "required": [ @@ -4951,6 +9892,85 @@ } } }, + "dto.SettingInfo": { + "type": "object", + "properties": { + "complexityVerification": { + "type": "string" + }, + "dingVars": { + "type": "string" + }, + "email": { + "type": "string" + }, + "emailVars": { + "type": "string" + }, + "expirationDays": { + "type": "string" + }, + "expirationTime": { + "type": "string" + }, + "language": { + "type": "string" + }, + "localTime": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "mfaSecret": { + "type": "string" + }, + "mfaStatus": { + "type": "string" + }, + "monitorStatus": { + "type": "string" + }, + "monitorStoreDays": { + "type": "string" + }, + "panelName": { + "type": "string" + }, + "securityEntrance": { + "type": "string" + }, + "serverPort": { + "type": "string" + }, + "sessionTimeout": { + "type": "string" + }, + "theme": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "weChatVars": { + "type": "string" + } + } + }, + "dto.SettingUpdate": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, "dto.UploadRecover": { "type": "object", "required": [ @@ -4972,6 +9992,23 @@ } } }, + "dto.UserLoginInfo": { + "type": "object", + "properties": { + "mfaSecret": { + "type": "string" + }, + "mfaStatus": { + "type": "string" + }, + "name": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, "dto.VolumeCreat": { "type": "object", "properties": { @@ -5009,6 +10046,494 @@ } } }, + "files.FileInfo": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "group": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, + "isHidden": { + "type": "boolean" + }, + "isSymlink": { + "type": "boolean" + }, + "itemTotal": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/files.FileInfo" + } + }, + "linkPath": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "modTime": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, + "mfa.Otp": { + "type": "object", + "properties": { + "qrImage": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, + "model.App": { + "type": "object", + "properties": { + "author": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "crossVersionUpdate": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "required": { + "type": "string" + }, + "shortDesc": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.AppInstall": { + "type": "object", + "properties": { + "app": { + "$ref": "#/definitions/model.App" + }, + "appDetailId": { + "type": "integer" + }, + "appId": { + "type": "integer" + }, + "backups": { + "type": "array", + "items": { + "$ref": "#/definitions/model.AppInstallBackup" + } + }, + "containerName": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dockerCompose": { + "type": "string" + }, + "env": { + "type": "string" + }, + "httpPort": { + "type": "integer" + }, + "httpsPort": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "name": { + "type": "string" + }, + "param": { + "type": "string" + }, + "serviceName": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "model.AppInstallBackup": { + "type": "object", + "properties": { + "app_detail_id": { + "type": "integer" + }, + "app_install_id": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "param": { + "type": "string" + }, + "path": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.Tag": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.Website": { + "type": "object", + "properties": { + "accessLog": { + "type": "boolean" + }, + "alias": { + "type": "string" + }, + "appInstallId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "defaultServer": { + "type": "boolean" + }, + "domains": { + "type": "array", + "items": { + "$ref": "#/definitions/model.WebsiteDomain" + } + }, + "errorLog": { + "type": "boolean" + }, + "expireDate": { + "type": "string" + }, + "httpConfig": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "primaryDomain": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "proxy": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "webSiteGroupId": { + "type": "integer" + }, + "webSiteSSL": { + "$ref": "#/definitions/model.WebsiteSSL" + }, + "webSiteSSLId": { + "type": "integer" + } + } + }, + "model.WebsiteAcmeAccount": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "model.WebsiteDomain": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "port": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "model.WebsiteSSL": { + "type": "object", + "properties": { + "acmeAccount": { + "$ref": "#/definitions/model.WebsiteAcmeAccount" + }, + "acmeAccountId": { + "type": "integer" + }, + "autoRenew": { + "type": "boolean" + }, + "certURL": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "dnsAccountId": { + "type": "integer" + }, + "domains": { + "type": "string" + }, + "expireDate": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "organization": { + "type": "string" + }, + "pem": { + "type": "string" + }, + "primaryDomain": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "websites": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Website" + } + } + } + }, + "request.AppBackupDelete": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.AppBackupSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "appInstallID": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + }, + "request.AppInstallCreate": { + "type": "object", + "required": [ + "appDetailId", + "name" + ], + "properties": { + "appDetailId": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + }, + "services": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "request.AppInstalledOperate": { + "type": "object", + "required": [ + "installId", + "operate" + ], + "properties": { + "backupId": { + "type": "integer" + }, + "deleteBackup": { + "type": "boolean" + }, + "detailId": { + "type": "integer" + }, + "forceDelete": { + "type": "boolean" + }, + "installId": { + "type": "integer" + }, + "operate": { + "type": "string" + } + } + }, "request.AppInstalledSearch": { "type": "object", "required": [ @@ -5056,6 +10581,1239 @@ "type": "string" } } + }, + "request.DirSizeReq": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + } + }, + "request.FileBatchDelete": { + "type": "object", + "required": [ + "paths" + ], + "properties": { + "isDir": { + "type": "boolean" + }, + "paths": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "request.FileCompress": { + "type": "object", + "required": [ + "dst", + "files", + "name", + "type" + ], + "properties": { + "dst": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "replace": { + "type": "boolean" + }, + "type": { + "type": "string" + } + } + }, + "request.FileCreate": { + "type": "object", + "required": [ + "mode", + "path" + ], + "properties": { + "content": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, + "isLink": { + "type": "boolean" + }, + "isSymlink": { + "type": "boolean" + }, + "linkPath": { + "type": "string" + }, + "mode": { + "type": "integer" + }, + "path": { + "type": "string" + } + } + }, + "request.FileDeCompress": { + "type": "object", + "required": [ + "dst", + "path", + "type" + ], + "properties": { + "dst": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.FileDelete": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "isDir": { + "type": "boolean" + }, + "path": { + "type": "string" + } + } + }, + "request.FileDownload": { + "type": "object", + "required": [ + "name", + "paths", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "paths": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + } + } + }, + "request.FileEdit": { + "type": "object", + "required": [ + "content", + "path" + ], + "properties": { + "content": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "request.FileMove": { + "type": "object", + "required": [ + "newPath", + "oldPaths", + "type" + ], + "properties": { + "newPath": { + "type": "string" + }, + "oldPaths": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + } + } + }, + "request.FileOption": { + "type": "object", + "properties": { + "dir": { + "type": "boolean" + }, + "expand": { + "type": "boolean" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "search": { + "type": "string" + }, + "showHidden": { + "type": "boolean" + } + } + }, + "request.FileRename": { + "type": "object", + "required": [ + "newName", + "oldName" + ], + "properties": { + "newName": { + "type": "string" + }, + "oldName": { + "type": "string" + } + } + }, + "request.FileWget": { + "type": "object", + "required": [ + "name", + "path", + "url" + ], + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "request.NewAppInstall": { + "type": "object", + "properties": { + "appDetailID": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + } + } + }, + "request.NginxConfigFileUpdate": { + "type": "object", + "required": [ + "backup", + "content", + "filePath" + ], + "properties": { + "backup": { + "type": "boolean" + }, + "content": { + "type": "string" + }, + "filePath": { + "type": "string" + } + } + }, + "request.NginxConfigUpdate": { + "type": "object", + "required": [ + "websiteId" + ], + "properties": { + "operate": { + "type": "string" + }, + "params": {}, + "scope": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.NginxScopeReq": { + "type": "object", + "required": [ + "scope" + ], + "properties": { + "scope": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.PortUpdate": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "port": { + "type": "integer" + } + } + }, + "request.WebsiteAcmeAccountCreate": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string" + } + } + }, + "request.WebsiteCreate": { + "type": "object", + "required": [ + "alias", + "primaryDomain", + "type", + "webSiteGroupID" + ], + "properties": { + "alias": { + "type": "string" + }, + "appID": { + "type": "integer" + }, + "appInstall": { + "$ref": "#/definitions/request.NewAppInstall" + }, + "appInstallID": { + "type": "integer" + }, + "appType": { + "type": "string", + "enum": [ + "new", + "installed" + ] + }, + "otherDomains": { + "type": "string" + }, + "primaryDomain": { + "type": "string" + }, + "proxy": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "type": { + "type": "string" + }, + "webSiteGroupID": { + "type": "integer" + } + } + }, + "request.WebsiteDNSReq": { + "type": "object", + "required": [ + "acmeAccountId", + "domains" + ], + "properties": { + "acmeAccountId": { + "type": "integer" + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "request.WebsiteDefaultUpdate": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.WebsiteDelete": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "deleteApp": { + "type": "boolean" + }, + "deleteBackup": { + "type": "boolean" + }, + "forceDelete": { + "type": "boolean" + }, + "id": { + "type": "integer" + } + } + }, + "request.WebsiteDnsAccountCreate": { + "type": "object", + "required": [ + "authorization", + "name", + "type" + ], + "properties": { + "authorization": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.WebsiteDnsAccountUpdate": { + "type": "object", + "required": [ + "authorization", + "id", + "name", + "type" + ], + "properties": { + "authorization": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.WebsiteDomainCreate": { + "type": "object", + "required": [ + "domain", + "port", + "websiteId" + ], + "properties": { + "domain": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.WebsiteDomainDelete": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.WebsiteGroupCreate": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "request.WebsiteGroupUpdate": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "default": { + "type": "boolean" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "request.WebsiteHTTPSOp": { + "type": "object", + "required": [ + "enable", + "websiteId" + ], + "properties": { + "HttpConfig": { + "type": "string", + "enum": [ + "HTTPSOnly", + "HTTPAlso", + "HTTPToHTTPS" + ] + }, + "SSLProtocol": { + "type": "array", + "items": { + "type": "string" + } + }, + "algorithm": { + "type": "string" + }, + "certificate": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "privateKey": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "existed", + "auto", + "manual" + ] + }, + "websiteId": { + "type": "integer" + }, + "websiteSSLId": { + "type": "integer" + } + } + }, + "request.WebsiteInstallCheckReq": { + "type": "object", + "required": [ + "InstallIds" + ], + "properties": { + "InstallIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.WebsiteLogReq": { + "type": "object", + "required": [ + "id", + "logType", + "operate" + ], + "properties": { + "id": { + "type": "integer" + }, + "logType": { + "type": "string" + }, + "operate": { + "type": "string" + } + } + }, + "request.WebsiteNginxUpdate": { + "type": "object", + "required": [ + "content", + "id" + ], + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "integer" + } + } + }, + "request.WebsiteOp": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + }, + "operate": { + "type": "string" + } + } + }, + "request.WebsiteRecover": { + "type": "object", + "required": [ + "backupName", + "type", + "websiteName" + ], + "properties": { + "backupName": { + "type": "string" + }, + "type": { + "type": "string" + }, + "websiteName": { + "type": "string" + } + } + }, + "request.WebsiteRecoverByFile": { + "type": "object", + "required": [ + "fileDir", + "fileName", + "type", + "websiteName" + ], + "properties": { + "fileDir": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "type": { + "type": "string" + }, + "websiteName": { + "type": "string" + } + } + }, + "request.WebsiteResourceReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.WebsiteSSLCreate": { + "type": "object", + "required": [ + "acmeAccountId", + "autoRenew", + "primaryDomain", + "provider" + ], + "properties": { + "acmeAccountId": { + "type": "integer" + }, + "autoRenew": { + "type": "boolean" + }, + "dnsAccountId": { + "type": "integer" + }, + "otherDomains": { + "type": "string" + }, + "primaryDomain": { + "type": "string" + }, + "provider": { + "type": "string" + } + } + }, + "request.WebsiteSSLRenew": { + "type": "object", + "required": [ + "SSLId" + ], + "properties": { + "SSLId": { + "type": "integer" + } + } + }, + "request.WebsiteSSLSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + }, + "request.WebsiteSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "name": { + "type": "string" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "websiteGroupId": { + "type": "integer" + } + } + }, + "request.WebsiteUpdate": { + "type": "object", + "required": [ + "id", + "primaryDomain", + "webSiteGroupID" + ], + "properties": { + "expireDate": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "primaryDomain": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "webSiteGroupID": { + "type": "integer" + } + } + }, + "request.WebsiteWafReq": { + "type": "object", + "required": [ + "key", + "rule", + "websiteId" + ], + "properties": { + "key": { + "type": "string" + }, + "rule": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "request.WebsiteWafUpdate": { + "type": "object", + "required": [ + "enable", + "key", + "websiteId" + ], + "properties": { + "enable": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "websiteId": { + "type": "integer" + } + } + }, + "response.AppDTO": { + "type": "object", + "properties": { + "author": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "crossVersionUpdate": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "required": { + "type": "string" + }, + "shortDesc": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Tag" + } + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "response.AppDetailDTO": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "id": { + "type": "integer" + }, + "lastVersion": { + "type": "string" + }, + "params": {}, + "readme": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "response.AppInstalledCheck": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "appInstallId": { + "type": "integer" + }, + "containerName": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "installPath": { + "type": "string" + }, + "isExist": { + "type": "boolean" + }, + "lastBackupAt": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "response.AppParam": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": {} + } + }, + "response.FileInfo": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "group": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, + "isHidden": { + "type": "boolean" + }, + "isSymlink": { + "type": "boolean" + }, + "itemTotal": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/files.FileInfo" + } + }, + "linkPath": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "modTime": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "user": { + "type": "string" + } + } + }, + "response.NginxParam": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "response.NginxStatus": { + "type": "object", + "properties": { + "accepts": { + "type": "string" + }, + "active": { + "type": "string" + }, + "handled": { + "type": "string" + }, + "reading": { + "type": "string" + }, + "requests": { + "type": "string" + }, + "waiting": { + "type": "string" + }, + "writing": { + "type": "string" + } + } + }, + "response.WebsiteAcmeAccountDTO": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "response.WebsiteDTO": { + "type": "object", + "properties": { + "accessLog": { + "type": "boolean" + }, + "accessLogPath": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "appInstallId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "defaultServer": { + "type": "boolean" + }, + "domains": { + "type": "array", + "items": { + "$ref": "#/definitions/model.WebsiteDomain" + } + }, + "errorLog": { + "type": "boolean" + }, + "errorLogPath": { + "type": "string" + }, + "expireDate": { + "type": "string" + }, + "httpConfig": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "primaryDomain": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "proxy": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sitePath": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "webSiteGroupId": { + "type": "integer" + }, + "webSiteSSL": { + "$ref": "#/definitions/model.WebsiteSSL" + }, + "webSiteSSLId": { + "type": "integer" + } + } + }, + "response.WebsiteHTTPS": { + "type": "object", + "properties": { + "SSL": { + "$ref": "#/definitions/model.WebsiteSSL" + }, + "SSLProtocol": { + "type": "array", + "items": { + "type": "string" + } + }, + "algorithm": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "httpConfig": { + "type": "string" + } + } + }, + "response.WebsiteLog": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "enable": { + "type": "boolean" + } + } + }, + "response.WebsiteNginxConfig": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/response.NginxParam" + } + } + } + }, + "response.WebsiteWafConfig": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "filePath": { + "type": "string" + } + } } } } \ No newline at end of file diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 1bd2ab316..a4808b9d0 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -46,6 +46,13 @@ definitions: required: - ids type: object + dto.CaptchaResponse: + properties: + captchaID: + type: string + imagePath: + type: string + type: object dto.ChangeDBInfo: properties: id: @@ -55,6 +62,16 @@ definitions: required: - value type: object + dto.CleanLog: + properties: + logType: + enum: + - login + - operation + type: string + required: + - logType + type: object dto.CommandInfo: properties: command: @@ -384,6 +401,118 @@ definitions: required: - path type: object + dto.DashboardBase: + properties: + appInstalldNumber: + type: integer + cpuCores: + type: integer + cpuLogicalCores: + type: integer + cpuModelName: + type: string + cronjobNumber: + type: integer + currentInfo: + $ref: '#/definitions/dto.DashboardCurrent' + databaseNumber: + type: integer + dateeaseID: + type: integer + haloID: + type: integer + hostname: + type: string + jumpserverID: + type: integer + kernelArch: + type: string + kernelVersion: + type: string + kubeoperatorID: + type: integer + kubepiID: + type: integer + metersphereID: + type: integer + os: + type: string + platform: + type: string + platformFamily: + type: string + platformVersion: + type: string + virtualizationSystem: + type: string + websiteNumber: + type: integer + type: object + dto.DashboardCurrent: + properties: + MemoryUsedPercent: + type: number + cpuPercent: + items: + type: number + type: array + cpuTotal: + type: integer + cpuUsed: + type: number + cpuUsedPercent: + type: number + free: + type: integer + inodesFree: + type: integer + inodesTotal: + type: integer + inodesUsed: + type: integer + inodesUsedPercent: + type: number + ioCount: + type: integer + ioReadBytes: + type: integer + ioTime: + type: integer + ioWriteBytes: + type: integer + load1: + type: number + load5: + type: number + load15: + type: number + loadUsagePercent: + type: number + memoryAvailable: + type: integer + memoryTotal: + type: integer + memoryUsed: + type: integer + netBytesRecv: + type: integer + netBytesSent: + type: integer + procs: + type: integer + shotTime: + type: string + timeSinceUptime: + type: string + total: + type: integer + uptime: + type: integer + used: + type: integer + usedPercent: + type: number + type: object dto.DockerOperation: properties: operation: @@ -414,6 +543,13 @@ definitions: - fileName - source type: object + dto.FilePath: + properties: + path: + type: string + required: + - path + type: object dto.ForBuckets: properties: accessKey: @@ -429,6 +565,112 @@ definitions: - type - vars type: object + dto.GroupInfo: + properties: + id: + type: integer + name: + type: string + type: + type: string + type: object + dto.GroupOperate: + properties: + id: + type: integer + name: + type: string + type: + type: string + required: + - name + - type + type: object + dto.GroupSearch: + properties: + type: + type: string + required: + - type + type: object + dto.HostConnTest: + properties: + addr: + type: string + authMode: + enum: + - password + - key + type: string + password: + type: string + port: + maximum: 65535 + minimum: 1 + type: integer + privateKey: + type: string + user: + type: string + required: + - addr + - port + - user + type: object + dto.HostInfo: + properties: + addr: + type: string + authMode: + type: string + createdAt: + type: string + description: + type: string + groupBelong: + type: string + id: + type: integer + name: + type: string + port: + type: integer + user: + type: string + type: object + dto.HostOperate: + properties: + addr: + type: string + authMode: + enum: + - password + - key + type: string + description: + type: string + groupBelong: + type: string + id: + type: integer + name: + type: string + password: + type: string + port: + maximum: 65535 + minimum: 1 + type: integer + privateKey: + type: string + user: + type: string + required: + - addr + - groupBelong + - port + - user + type: object dto.ImageBuild: properties: dockerfile: @@ -543,6 +785,16 @@ definitions: - sourceID - targetName type: object + dto.InitUser: + properties: + name: + type: string + password: + type: string + required: + - name + - password + type: object dto.InspectReq: properties: id: @@ -550,6 +802,46 @@ definitions: type: type: string type: object + dto.Login: + properties: + authMethod: + type: string + captcha: + type: string + captchaID: + type: string + name: + type: string + password: + type: string + required: + - name + - password + type: object + dto.MFALogin: + properties: + authMethod: + type: string + code: + type: string + name: + type: string + password: + type: string + secret: + type: string + required: + - name + - password + - secret + type: object + dto.MfaCredential: + properties: + code: + type: string + secret: + type: string + type: object dto.MysqlConfUpdateByFile: properties: file: @@ -779,6 +1071,16 @@ definitions: total: type: integer type: object + dto.PasswordUpdate: + properties: + newPassword: + type: string + oldPassword: + type: string + required: + - newPassword + - oldPassword + type: object dto.PortHelper: properties: containerPort: @@ -904,6 +1206,11 @@ definitions: used_memory_rss: type: string type: object + dto.SearchForTree: + properties: + info: + type: string + type: object dto.SearchRecord: properties: cronjobID: @@ -935,6 +1242,58 @@ definitions: - page - pageSize type: object + dto.SettingInfo: + properties: + complexityVerification: + type: string + dingVars: + type: string + email: + type: string + emailVars: + type: string + expirationDays: + type: string + expirationTime: + type: string + language: + type: string + localTime: + type: string + messageType: + type: string + mfaSecret: + type: string + mfaStatus: + type: string + monitorStatus: + type: string + monitorStoreDays: + type: string + panelName: + type: string + securityEntrance: + type: string + serverPort: + type: string + sessionTimeout: + type: string + theme: + type: string + userName: + type: string + weChatVars: + type: string + type: object + dto.SettingUpdate: + properties: + key: + type: string + value: + type: string + required: + - key + type: object dto.UploadRecover: properties: dbName: @@ -949,6 +1308,17 @@ definitions: - dbName - mysqlName type: object + dto.UserLoginInfo: + properties: + mfaSecret: + type: string + mfaStatus: + type: string + name: + type: string + token: + type: string + type: object dto.VolumeCreat: properties: driver: @@ -973,6 +1343,328 @@ definitions: sourceDir: type: string type: object + files.FileInfo: + properties: + content: + type: string + extension: + type: string + group: + type: string + isDir: + type: boolean + isHidden: + type: boolean + isSymlink: + type: boolean + itemTotal: + type: integer + items: + items: + $ref: '#/definitions/files.FileInfo' + type: array + linkPath: + type: string + mimeType: + type: string + modTime: + type: string + mode: + type: string + name: + type: string + path: + type: string + size: + type: integer + type: + type: string + updateTime: + type: string + user: + type: string + type: object + mfa.Otp: + properties: + qrImage: + type: string + secret: + type: string + type: object + model.App: + properties: + author: + type: string + createdAt: + type: string + crossVersionUpdate: + type: boolean + icon: + type: string + id: + type: integer + key: + type: string + limit: + type: integer + name: + type: string + required: + type: string + shortDesc: + type: string + source: + type: string + status: + type: string + type: + type: string + updatedAt: + type: string + type: object + model.AppInstall: + properties: + app: + $ref: '#/definitions/model.App' + appDetailId: + type: integer + appId: + type: integer + backups: + items: + $ref: '#/definitions/model.AppInstallBackup' + type: array + containerName: + type: string + createdAt: + type: string + description: + type: string + dockerCompose: + type: string + env: + type: string + httpPort: + type: integer + httpsPort: + type: integer + id: + type: integer + message: + type: string + name: + type: string + param: + type: string + serviceName: + type: string + status: + type: string + updatedAt: + type: string + version: + type: string + type: object + model.AppInstallBackup: + properties: + app_detail_id: + type: integer + app_install_id: + type: integer + createdAt: + type: string + id: + type: integer + name: + type: string + param: + type: string + path: + type: string + updatedAt: + type: string + type: object + model.Tag: + properties: + createdAt: + type: string + id: + type: integer + key: + type: string + name: + type: string + updatedAt: + type: string + type: object + model.Website: + properties: + accessLog: + type: boolean + alias: + type: string + appInstallId: + type: integer + createdAt: + type: string + defaultServer: + type: boolean + domains: + items: + $ref: '#/definitions/model.WebsiteDomain' + type: array + errorLog: + type: boolean + expireDate: + type: string + httpConfig: + type: string + id: + type: integer + primaryDomain: + type: string + protocol: + type: string + proxy: + type: string + remark: + type: string + status: + type: string + type: + type: string + updatedAt: + type: string + webSiteGroupId: + type: integer + webSiteSSL: + $ref: '#/definitions/model.WebsiteSSL' + webSiteSSLId: + type: integer + type: object + model.WebsiteAcmeAccount: + properties: + createdAt: + type: string + email: + type: string + id: + type: integer + updatedAt: + type: string + url: + type: string + type: object + model.WebsiteDomain: + properties: + createdAt: + type: string + domain: + type: string + id: + type: integer + port: + type: integer + updatedAt: + type: string + websiteId: + type: integer + type: object + model.WebsiteSSL: + properties: + acmeAccount: + $ref: '#/definitions/model.WebsiteAcmeAccount' + acmeAccountId: + type: integer + autoRenew: + type: boolean + certURL: + type: string + createdAt: + type: string + dnsAccountId: + type: integer + domains: + type: string + expireDate: + type: string + id: + type: integer + organization: + type: string + pem: + type: string + primaryDomain: + type: string + privateKey: + type: string + provider: + type: string + startDate: + type: string + type: + type: string + updatedAt: + type: string + websites: + items: + $ref: '#/definitions/model.Website' + type: array + type: object + request.AppBackupDelete: + properties: + ids: + items: + type: integer + type: array + type: object + request.AppBackupSearch: + properties: + appInstallID: + type: integer + page: + type: integer + pageSize: + type: integer + required: + - page + - pageSize + type: object + request.AppInstallCreate: + properties: + appDetailId: + type: integer + name: + type: string + params: + additionalProperties: true + type: object + services: + additionalProperties: + type: string + type: object + required: + - appDetailId + - name + type: object + request.AppInstalledOperate: + properties: + backupId: + type: integer + deleteBackup: + type: boolean + detailId: + type: integer + forceDelete: + type: boolean + installId: + type: integer + operate: + type: string + required: + - installId + - operate + type: object request.AppInstalledSearch: properties: name: @@ -1005,6 +1697,828 @@ definitions: - page - pageSize type: object + request.DirSizeReq: + properties: + path: + type: string + required: + - path + type: object + request.FileBatchDelete: + properties: + isDir: + type: boolean + paths: + items: + type: string + type: array + required: + - paths + type: object + request.FileCompress: + properties: + dst: + type: string + files: + items: + type: string + type: array + name: + type: string + replace: + type: boolean + type: + type: string + required: + - dst + - files + - name + - type + type: object + request.FileCreate: + properties: + content: + type: string + isDir: + type: boolean + isLink: + type: boolean + isSymlink: + type: boolean + linkPath: + type: string + mode: + type: integer + path: + type: string + required: + - mode + - path + type: object + request.FileDeCompress: + properties: + dst: + type: string + path: + type: string + type: + type: string + required: + - dst + - path + - type + type: object + request.FileDelete: + properties: + isDir: + type: boolean + path: + type: string + required: + - path + type: object + request.FileDownload: + properties: + name: + type: string + paths: + items: + type: string + type: array + type: + type: string + required: + - name + - paths + - type + type: object + request.FileEdit: + properties: + content: + type: string + path: + type: string + required: + - content + - path + type: object + request.FileMove: + properties: + newPath: + type: string + oldPaths: + items: + type: string + type: array + type: + type: string + required: + - newPath + - oldPaths + - type + type: object + request.FileOption: + properties: + dir: + type: boolean + expand: + type: boolean + page: + type: integer + pageSize: + type: integer + path: + type: string + search: + type: string + showHidden: + type: boolean + type: object + request.FileRename: + properties: + newName: + type: string + oldName: + type: string + required: + - newName + - oldName + type: object + request.FileWget: + properties: + name: + type: string + path: + type: string + url: + type: string + required: + - name + - path + - url + type: object + request.NewAppInstall: + properties: + appDetailID: + type: integer + name: + type: string + params: + additionalProperties: true + type: object + type: object + request.NginxConfigFileUpdate: + properties: + backup: + type: boolean + content: + type: string + filePath: + type: string + required: + - backup + - content + - filePath + type: object + request.NginxConfigUpdate: + properties: + operate: + type: string + params: {} + scope: + type: string + websiteId: + type: integer + required: + - websiteId + type: object + request.NginxScopeReq: + properties: + scope: + type: string + websiteId: + type: integer + required: + - scope + type: object + request.PortUpdate: + properties: + key: + type: string + name: + type: string + port: + type: integer + type: object + request.WebsiteAcmeAccountCreate: + properties: + email: + type: string + required: + - email + type: object + request.WebsiteCreate: + properties: + alias: + type: string + appID: + type: integer + appInstall: + $ref: '#/definitions/request.NewAppInstall' + appInstallID: + type: integer + appType: + enum: + - new + - installed + type: string + otherDomains: + type: string + primaryDomain: + type: string + proxy: + type: string + remark: + type: string + type: + type: string + webSiteGroupID: + type: integer + required: + - alias + - primaryDomain + - type + - webSiteGroupID + type: object + request.WebsiteDNSReq: + properties: + acmeAccountId: + type: integer + domains: + items: + type: string + type: array + required: + - acmeAccountId + - domains + type: object + request.WebsiteDefaultUpdate: + properties: + id: + type: integer + required: + - id + type: object + request.WebsiteDelete: + properties: + deleteApp: + type: boolean + deleteBackup: + type: boolean + forceDelete: + type: boolean + id: + type: integer + required: + - id + type: object + request.WebsiteDnsAccountCreate: + properties: + authorization: + additionalProperties: + type: string + type: object + name: + type: string + type: + type: string + required: + - authorization + - name + - type + type: object + request.WebsiteDnsAccountUpdate: + properties: + authorization: + additionalProperties: + type: string + type: object + id: + type: integer + name: + type: string + type: + type: string + required: + - authorization + - id + - name + - type + type: object + request.WebsiteDomainCreate: + properties: + domain: + type: string + port: + type: integer + websiteId: + type: integer + required: + - domain + - port + - websiteId + type: object + request.WebsiteDomainDelete: + properties: + id: + type: integer + required: + - id + type: object + request.WebsiteGroupCreate: + properties: + name: + type: string + required: + - name + type: object + request.WebsiteGroupUpdate: + properties: + default: + type: boolean + id: + type: integer + name: + type: string + required: + - id + type: object + request.WebsiteHTTPSOp: + properties: + HttpConfig: + enum: + - HTTPSOnly + - HTTPAlso + - HTTPToHTTPS + type: string + SSLProtocol: + items: + type: string + type: array + algorithm: + type: string + certificate: + type: string + enable: + type: boolean + privateKey: + type: string + type: + enum: + - existed + - auto + - manual + type: string + websiteId: + type: integer + websiteSSLId: + type: integer + required: + - enable + - websiteId + type: object + request.WebsiteInstallCheckReq: + properties: + InstallIds: + items: + type: integer + type: array + required: + - InstallIds + type: object + request.WebsiteLogReq: + properties: + id: + type: integer + logType: + type: string + operate: + type: string + required: + - id + - logType + - operate + type: object + request.WebsiteNginxUpdate: + properties: + content: + type: string + id: + type: integer + required: + - content + - id + type: object + request.WebsiteOp: + properties: + id: + type: integer + operate: + type: string + required: + - id + type: object + request.WebsiteRecover: + properties: + backupName: + type: string + type: + type: string + websiteName: + type: string + required: + - backupName + - type + - websiteName + type: object + request.WebsiteRecoverByFile: + properties: + fileDir: + type: string + fileName: + type: string + type: + type: string + websiteName: + type: string + required: + - fileDir + - fileName + - type + - websiteName + type: object + request.WebsiteResourceReq: + properties: + id: + type: integer + required: + - id + type: object + request.WebsiteSSLCreate: + properties: + acmeAccountId: + type: integer + autoRenew: + type: boolean + dnsAccountId: + type: integer + otherDomains: + type: string + primaryDomain: + type: string + provider: + type: string + required: + - acmeAccountId + - autoRenew + - primaryDomain + - provider + type: object + request.WebsiteSSLRenew: + properties: + SSLId: + type: integer + required: + - SSLId + type: object + request.WebsiteSSLSearch: + properties: + page: + type: integer + pageSize: + type: integer + required: + - page + - pageSize + type: object + request.WebsiteSearch: + properties: + name: + type: string + page: + type: integer + pageSize: + type: integer + websiteGroupId: + type: integer + required: + - page + - pageSize + type: object + request.WebsiteUpdate: + properties: + expireDate: + type: string + id: + type: integer + primaryDomain: + type: string + remark: + type: string + webSiteGroupID: + type: integer + required: + - id + - primaryDomain + - webSiteGroupID + type: object + request.WebsiteWafReq: + properties: + key: + type: string + rule: + type: string + websiteId: + type: integer + required: + - key + - rule + - websiteId + type: object + request.WebsiteWafUpdate: + properties: + enable: + type: boolean + key: + type: string + websiteId: + type: integer + required: + - enable + - key + - websiteId + type: object + response.AppDTO: + properties: + author: + type: string + createdAt: + type: string + crossVersionUpdate: + type: boolean + icon: + type: string + id: + type: integer + key: + type: string + limit: + type: integer + name: + type: string + required: + type: string + shortDesc: + type: string + source: + type: string + status: + type: string + tags: + items: + $ref: '#/definitions/model.Tag' + type: array + type: + type: string + updatedAt: + type: string + versions: + items: + type: string + type: array + type: object + response.AppDetailDTO: + properties: + appId: + type: integer + createdAt: + type: string + enable: + type: boolean + id: + type: integer + lastVersion: + type: string + params: {} + readme: + type: string + status: + type: string + updatedAt: + type: string + version: + type: string + type: object + response.AppInstalledCheck: + properties: + app: + type: string + appInstallId: + type: integer + containerName: + type: string + createdAt: + type: string + installPath: + type: string + isExist: + type: boolean + lastBackupAt: + type: string + name: + type: string + status: + type: string + version: + type: string + type: object + response.AppParam: + properties: + label: + type: string + value: {} + type: object + response.FileInfo: + properties: + content: + type: string + extension: + type: string + group: + type: string + isDir: + type: boolean + isHidden: + type: boolean + isSymlink: + type: boolean + itemTotal: + type: integer + items: + items: + $ref: '#/definitions/files.FileInfo' + type: array + linkPath: + type: string + mimeType: + type: string + modTime: + type: string + mode: + type: string + name: + type: string + path: + type: string + size: + type: integer + type: + type: string + updateTime: + type: string + user: + type: string + type: object + response.NginxParam: + properties: + name: + type: string + params: + items: + type: string + type: array + type: object + response.NginxStatus: + properties: + accepts: + type: string + active: + type: string + handled: + type: string + reading: + type: string + requests: + type: string + waiting: + type: string + writing: + type: string + type: object + response.WebsiteAcmeAccountDTO: + properties: + createdAt: + type: string + email: + type: string + id: + type: integer + updatedAt: + type: string + url: + type: string + type: object + response.WebsiteDTO: + properties: + accessLog: + type: boolean + accessLogPath: + type: string + alias: + type: string + appInstallId: + type: integer + createdAt: + type: string + defaultServer: + type: boolean + domains: + items: + $ref: '#/definitions/model.WebsiteDomain' + type: array + errorLog: + type: boolean + errorLogPath: + type: string + expireDate: + type: string + httpConfig: + type: string + id: + type: integer + primaryDomain: + type: string + protocol: + type: string + proxy: + type: string + remark: + type: string + sitePath: + type: string + status: + type: string + type: + type: string + updatedAt: + type: string + webSiteGroupId: + type: integer + webSiteSSL: + $ref: '#/definitions/model.WebsiteSSL' + webSiteSSLId: + type: integer + type: object + response.WebsiteHTTPS: + properties: + SSL: + $ref: '#/definitions/model.WebsiteSSL' + SSLProtocol: + items: + type: string + type: array + algorithm: + type: string + enable: + type: boolean + httpConfig: + type: string + type: object + response.WebsiteLog: + properties: + content: + type: string + enable: + type: boolean + type: object + response.WebsiteNginxConfig: + properties: + enable: + type: boolean + params: + items: + $ref: '#/definitions/response.NginxParam' + type: array + type: object + response.WebsiteWafConfig: + properties: + content: + type: string + enable: + type: boolean + filePath: + type: string + type: object host: localhost info: contact: {} @@ -1016,6 +2530,93 @@ info: title: 1Panel version: "1.0" paths: + /apps/:id: + get: + consumes: + - application/json + description: 通过 id 获取应用信息 + parameters: + - description: app id + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.AppDTO' + security: + - ApiKeyAuth: [] + summary: Search app by id + tags: + - App + /apps/detail/:appId/:version: + get: + consumes: + - application/json + description: 通过 id 获取应用详情 + parameters: + - description: app id + in: path + name: appId + required: true + type: integer + - description: app 版本 + in: path + name: version + required: true + type: string + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.AppDetailDTO' + security: + - ApiKeyAuth: [] + summary: Search app detail by id + tags: + - App + /apps/install: + post: + consumes: + - application/json + description: 安装应用 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.AppInstallCreate' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/model.AppInstall' + security: + - ApiKeyAuth: [] + summary: Install app + tags: + - App + x-panel-log: + BeforeFuntions: + - db: app_installs + input_colume: name + input_value: name + isList: false + output_colume: app_id + output_value: appId + - db: apps + info: appId + isList: false + output_colume: key + output_value: appKey + bodyKeys: + - name + formatEN: Install app [appKey]-[name] + formatZH: 安装应用 [appKey]-[name] + paramKeys: [] /apps/installed: post: consumes: @@ -1033,9 +2634,303 @@ paths: description: "" security: - ApiKeyAuth: [] - summary: Search app list installed + summary: List app installed tags: - App + /apps/installed/:appInstallId/versions: + get: + consumes: + - application/json + description: 通过 install id 获取应用更新版本 + parameters: + - description: request + in: path + name: appInstallId + required: true + type: integer + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Search app update version by install id + tags: + - App + /apps/installed/backups: + post: + consumes: + - application/json + description: 查询已安装备份列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.AppBackupSearch' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page installed backups + tags: + - App + /apps/installed/backups/del: + post: + consumes: + - application/json + description: 删除应用备份记录 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.AppBackupDelete' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete app backup record + tags: + - App + x-panel-log: + BeforeFuntions: + - db: app_install_backups + input_colume: id + input_value: ids + isList: true + output_colume: name + output_value: names + bodyKeys: + - ids + formatEN: Deleting an Application Backup [names] + formatZH: 删除应用备份 [names] + paramKeys: [] + /apps/installed/check/:key: + get: + consumes: + - application/json + description: 检查应用安装情况 + parameters: + - description: request + in: path + name: key + required: true + type: string + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.AppInstalledCheck' + security: + - ApiKeyAuth: [] + summary: Check app installed + tags: + - App + /apps/installed/conf/:key: + get: + consumes: + - application/json + description: 通过 key 获取应用默认配置 + parameters: + - description: request + in: path + name: key + required: true + type: string + responses: + "200": + description: OK + schema: + type: string + security: + - ApiKeyAuth: [] + summary: Search default config by key + tags: + - App + /apps/installed/delete/check/:appInstallId: + get: + consumes: + - application/json + description: 删除前检查 + parameters: + - description: App install id + in: path + name: appInstallId + required: true + type: integer + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Check before delete + tags: + - App + /apps/installed/loadpassword/:key: + get: + consumes: + - application/json + description: 获取应用密码 + parameters: + - description: request + in: path + name: key + required: true + type: string + responses: + "200": + description: OK + schema: + type: string + security: + - ApiKeyAuth: [] + summary: Search app password by key + tags: + - App + /apps/installed/loadport/:key: + get: + consumes: + - application/json + description: 获取应用端口 + parameters: + - description: request + in: path + name: key + required: true + type: string + responses: + "200": + description: OK + schema: + type: integer + security: + - ApiKeyAuth: [] + summary: Search app port by key + tags: + - App + /apps/installed/op: + post: + consumes: + - application/json + description: 操作已安装应用 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.AppInstalledOperate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Operate installed app + tags: + - App + x-panel-log: + BeforeFuntions: + - db: app_installs + input_colume: id + input_value: installId + isList: false + output_colume: app_id + output_value: appId + - db: app_installs + input_colume: id + input_value: installId + isList: false + output_colume: name + output_value: appName + - db: apps + input_colume: id + input_value: appId + isList: false + output_colume: key + output_value: appKey + bodyKeys: + - installId + - operate + formatEN: '[appKey] App [appName] [operate]' + formatZH: '[appKey] 应用 [appName] [operate]' + paramKeys: [] + /apps/installed/params/:appInstallId: + get: + consumes: + - application/json + description: 通过 install id 获取应用参数 + parameters: + - description: request + in: path + name: appInstallId + required: true + type: string + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.AppParam' + security: + - ApiKeyAuth: [] + summary: Search params by appInstallId + tags: + - App + /apps/installed/port/change: + post: + consumes: + - application/json + description: 修改应用端口 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.PortUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Change app port + tags: + - App + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - key + - name + - port + formatEN: Application port update [key]-[name] => [port] + formatZH: 应用端口修改 [key]-[name] => [port] + paramKeys: [] + /apps/installed/sync: + post: + description: 同步已安装应用列表 + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Sync app installed + tags: + - App + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: Sync the list of installed apps + formatZH: 同步已安装应用列表 + paramKeys: [] /apps/search: post: consumes: @@ -1053,9 +2948,138 @@ paths: description: "" security: - ApiKeyAuth: [] - summary: Search app list + summary: List apps tags: - App + /apps/services/:key: + get: + consumes: + - application/json + description: 通过 key 获取应用 service + parameters: + - description: request + in: path + name: key + required: true + type: string + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Search app service by key + tags: + - App + /apps/sync: + post: + description: 同步应用列表 + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Sync app list + tags: + - App + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: App store synchronization + formatZH: 应用商店同步 + paramKeys: [] + /auth/captcha: + get: + description: 加载验证码 + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.CaptchaResponse' + summary: Load captcha + tags: + - Auth + /auth/init: + post: + consumes: + - application/json + description: 初始化用户 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.InitUser' + responses: + "200": + description: "" + summary: Init user + tags: + - Auth + /auth/login: + post: + consumes: + - application/json + description: 用户登录 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.Login' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.UserLoginInfo' + summary: User login + tags: + - Auth + /auth/logout: + post: + description: 用户登出 + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: User logout + tags: + - Auth + /auth/mfalogin: + post: + consumes: + - application/json + description: 用户 mfa 登录 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.MFALogin' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.UserLoginInfo' + summary: User login with mfa + tags: + - Auth + /auth/status: + get: + description: 获取系统安全登录状态 + responses: + "200": + description: "" + "402": + description: "" + summary: Load safety status + tags: + - Auth /backups: post: consumes: @@ -1194,10 +3218,22 @@ paths: description: "" security: - ApiKeyAuth: [] - summary: Search backup records with page + summary: Page backup records tags: - Backup Account /backups/search: + get: + description: 获取备份账号列表 + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: List backup accounts + tags: + - Backup Account post: consumes: - application/json @@ -1216,22 +3252,10 @@ paths: type: anrry security: - ApiKeyAuth: [] - summary: List bucket + summary: List buckets tags: - Backup Account /backups/update: - get: - description: 获取备份账号列表 - responses: - "200": - description: OK - schema: - type: anrry - security: - - ApiKeyAuth: [] - summary: Search backup account - tags: - - Backup Account post: consumes: - application/json @@ -1268,30 +3292,36 @@ paths: $ref: '#/definitions/dto.CommandInfo' security: - ApiKeyAuth: [] - summary: Search command + summary: List commands tags: - Command post: consumes: - application/json - description: 获取快速命令列表分页 + description: 创建快速命令 parameters: - description: request in: body name: request required: true schema: - $ref: '#/definitions/dto.SearchWithPage' + $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: OK - schema: - $ref: '#/definitions/dto.PageResult' + description: "" security: - ApiKeyAuth: [] - summary: Search command with page + summary: Create command tags: - Command + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - command + formatEN: create quick command [name][command] + formatZH: 创建快捷命令 [name][command] + paramKeys: [] /commands/del: post: consumes: @@ -1325,6 +3355,28 @@ paths: formatEN: delete quick command [names] formatZH: 删除快捷命令 [names] paramKeys: [] + /commands/search: + post: + consumes: + - application/json + description: 获取快速命令列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.SearchWithPage' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page commands + tags: + - Command /commands/update: post: consumes: @@ -1454,7 +3506,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search compose list with page + summary: Page composes tags: - Container Compose /containers/compose/update: @@ -1605,7 +3657,7 @@ paths: type: anrry security: - ApiKeyAuth: [] - summary: Search image list + summary: List images tags: - Container Image /containers/image/build: @@ -1814,7 +3866,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search image list with page + summary: Page images tags: - Container Image /containers/image/tag: @@ -1948,7 +4000,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search network list with page + summary: Page networks tags: - Container Network /containers/operate: @@ -1992,7 +4044,7 @@ paths: type: anrry security: - ApiKeyAuth: [] - summary: Search image repo list + summary: List image repos tags: - Container Image-repo post: @@ -2079,7 +4131,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search image repo list with page + summary: Page image repos tags: - Container Image-repo /containers/repo/update: @@ -2138,7 +4190,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search container list with page + summary: Page containers tags: - Container /containers/search/log: @@ -2194,7 +4246,7 @@ paths: type: anrry security: - ApiKeyAuth: [] - summary: Search compose template list + summary: List compose templates tags: - Container Compose-template post: @@ -2213,7 +4265,7 @@ paths: description: "" security: - ApiKeyAuth: [] - summary: Create Compose template + summary: Create compose template tags: - Container Compose-template x-panel-log: @@ -2277,7 +4329,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search compose template list with page + summary: Page compose templates tags: - Container Compose-template /containers/template/update: @@ -2388,7 +4440,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search volume list + summary: List volumes tags: - Container Volume post: @@ -2411,10 +4463,38 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search volume list with page + summary: Page volumes tags: - Container Volume - /cronjob/del: + /cronjobs: + post: + consumes: + - application/json + description: 创建计划任务 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.CronjobCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create cronjob + tags: + - Cronjob + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - type + - name + formatEN: create cronjob [type][name] + formatZH: 创建计划任务 [type][name] + paramKeys: [] + /cronjobs/del: post: consumes: - application/json @@ -2447,7 +4527,7 @@ paths: formatEN: delete cronjob [names] formatZH: 删除计划任务 [names] paramKeys: [] - /cronjob/download: + /cronjobs/download: post: consumes: - application/json @@ -2464,7 +4544,7 @@ paths: description: "" security: - ApiKeyAuth: [] - summary: Download Cronjob records + summary: Download cronjob records tags: - Cronjob x-panel-log: @@ -2480,7 +4560,7 @@ paths: formatEN: download the cronjob record [file] formatZH: 下载计划任务记录 [file] paramKeys: [] - /cronjob/handle: + /cronjobs/handle: post: consumes: - application/json @@ -2513,7 +4593,51 @@ paths: formatEN: manually execute the cronjob [name] formatZH: 手动执行计划任务 [name] paramKeys: [] - /cronjob/status: + /cronjobs/search: + post: + consumes: + - application/json + description: 获取计划任务分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.SearchWithPage' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page cronjobs + tags: + - Cronjob + /cronjobs/search/records: + post: + consumes: + - application/json + description: 获取计划任务记录 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.SearchRecord' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page job records + tags: + - Cronjob + /cronjobs/status: post: consumes: - application/json @@ -2547,7 +4671,7 @@ paths: formatEN: change the status of cronjob [name] to [status]. formatZH: 修改计划任务 [name] 状态为 [status] paramKeys: [] - /cronjob/update: + /cronjobs/update: post: consumes: - application/json @@ -2580,78 +4704,58 @@ paths: formatEN: update cronjob [name] formatZH: 更新计划任务 [name] paramKeys: [] - /cronjobs: - post: + /dashboard/base/:ioOption/:netOption: + get: consumes: - application/json - description: 创建计划任务 + description: 获取首页基础数据 parameters: - description: request - in: body - name: request + in: path + name: ioOption required: true - schema: - $ref: '#/definitions/dto.CronjobCreate' - responses: - "200": - description: "" - security: - - ApiKeyAuth: [] - summary: Create cronjob - tags: - - Cronjob - x-panel-log: - BeforeFuntions: [] - bodyKeys: - - type - - name - formatEN: create cronjob [type][name] - formatZH: 创建计划任务 [type][name] - paramKeys: [] - /cronjobs/search: - post: - consumes: - - application/json - description: 获取计划任务分页 - parameters: + type: string - description: request - in: body - name: request + in: path + name: netOption required: true - schema: - $ref: '#/definitions/dto.SearchWithPage' + type: string responses: "200": description: OK schema: - $ref: '#/definitions/dto.PageResult' + $ref: '#/definitions/dto.DashboardBase' security: - ApiKeyAuth: [] - summary: Search cronjob list with page + summary: Load dashboard base info tags: - - Cronjob - /cronjobs/search/records: - post: + - Dashboard + /dashboard/current/:ioOption/:netOption: + get: consumes: - application/json - description: 获取计划任务记录 + description: 获取首页实时数据 parameters: - description: request - in: body - name: request + in: path + name: ioOption required: true - schema: - $ref: '#/definitions/dto.SearchRecord' + type: string + - description: request + in: path + name: netOption + required: true + type: string responses: "200": description: OK schema: - $ref: '#/definitions/dto.PageResult' + $ref: '#/definitions/dto.DashboardCurrent' security: - ApiKeyAuth: [] - summary: Search job records + summary: Load dashboard current info tags: - - Cronjob + - Dashboard /databases: post: consumes: @@ -2920,9 +5024,9 @@ paths: type: anrry security: - ApiKeyAuth: [] - summary: Search mysql database list + summary: List mysql database names tags: - - Cronjob + - Database Mysql /databases/recover: post: consumes: @@ -3018,7 +5122,7 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search redis backup list + summary: Page redis backups tags: - Database Redis /databases/redis/conf: @@ -3190,7 +5294,7 @@ paths: "200": description: OK schema: - type: bool + type: boolean security: - ApiKeyAuth: [] summary: Load mysql remote access @@ -3215,9 +5319,9 @@ paths: $ref: '#/definitions/dto.PageResult' security: - ApiKeyAuth: [] - summary: Search mysql database list with page + summary: Page mysql databases tags: - - Cronjob + - Database Mysql /databases/status: get: description: 获取 mysql 状态信息 @@ -3270,4 +5374,2266 @@ paths: formatEN: adjust mysql database performance parameters formatZH: 调整 mysql 数据库性能参数 paramKeys: [] + /files: + post: + consumes: + - application/json + description: 创建文件/文件夹 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Create dir or file [path] + formatZH: 创建文件/文件夹 [path] + paramKeys: [] + /files/batch/del: + post: + consumes: + - application/json + description: 批量删除文件/文件夹 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileBatchDelete' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Batch delete file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - paths + formatEN: Batch delete dir or file [paths] + formatZH: 批量删除文件/文件夹 [paths] + paramKeys: [] + /files/compress: + post: + consumes: + - application/json + description: 压缩文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileCompress' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Compress file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Compress file [name] + formatZH: 压缩文件 [name] + paramKeys: [] + /files/content: + post: + consumes: + - application/json + description: 获取文件内容 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileOption' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.FileInfo' + security: + - ApiKeyAuth: [] + summary: Load file content + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Load file content [path] + formatZH: 获取文件内容 [path] + paramKeys: [] + /files/decompress: + post: + consumes: + - application/json + description: 解压文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileDeCompress' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Decompress file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Decompress file [path] + formatZH: 解压 [path] + paramKeys: [] + /files/del: + post: + consumes: + - application/json + description: 删除文件/文件夹 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileDelete' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Delete dir or file [path] + formatZH: 删除文件/文件夹 [path] + paramKeys: [] + /files/download: + post: + consumes: + - application/json + description: 下载文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileDownload' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Download file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Download file [name] + formatZH: 下载文件 [name] + paramKeys: [] + /files/loadfile: + post: + consumes: + - application/json + description: 读取文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.FilePath' + responses: + "200": + description: OK + schema: + type: string + security: + - ApiKeyAuth: [] + summary: Read file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Read file [path] + formatZH: 读取文件 [path] + paramKeys: [] + /files/mode: + post: + consumes: + - application/json + description: 修改文件权限 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Change file mode + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + - mode + formatEN: Change mode [paths] => [mode] + formatZH: 修改权限 [paths] => [mode] + paramKeys: [] + /files/move: + post: + consumes: + - application/json + description: 移动文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileMove' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Move file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - oldPaths + - newPath + formatEN: Move [oldPaths] => [newPath] + formatZH: 移动文件 [oldPaths] => [newPath] + paramKeys: [] + /files/rename: + post: + consumes: + - application/json + description: 修改文件名称 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileRename' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Change file name + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - oldName + - newName + formatEN: Rename [oldName] => [newName] + formatZH: 重命名 [oldName] => [newName] + paramKeys: [] + /files/save: + post: + consumes: + - application/json + description: 更新文件内容 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileEdit' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update file content + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Update file content [path] + formatZH: 更新文件内容 [path] + paramKeys: [] + /files/search: + post: + consumes: + - application/json + description: 获取文件列表 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileOption' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.FileInfo' + security: + - ApiKeyAuth: [] + summary: List files + tags: + - File + /files/size: + post: + consumes: + - application/json + description: 获取文件夹大小 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.DirSizeReq' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Load file size + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Load file size [path] + formatZH: 获取文件夹大小 [path] + paramKeys: [] + /files/tree: + post: + consumes: + - application/json + description: 加载文件树 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileOption' + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Load files tree + tags: + - File + /files/upload: + post: + description: 上传文件 + parameters: + - description: request + in: formData + name: file + required: true + type: file + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Upload file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - path + formatEN: Upload file [path] + formatZH: 上传文件 [path] + paramKeys: [] + /files/wget: + post: + consumes: + - application/json + description: 下载远端文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.FileWget' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Wget file + tags: + - File + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - url + - path + - name + formatEN: Download url => [path]/[name] + formatZH: 下载 url => [path]/[name] + paramKeys: [] + /groups: + post: + consumes: + - application/json + description: 创建系统组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.GroupOperate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create group + tags: + - System Group + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - type + formatEN: create group [name][type] + formatZH: 创建组 [name][type] + paramKeys: [] + /groups/:id: + get: + consumes: + - application/json + description: 查询系统组 + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.GroupInfo' + security: + - ApiKeyAuth: [] + summary: Search group info by id + tags: + - System Group + /groups/del: + post: + consumes: + - application/json + description: 删除系统组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.OperateByID' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete group + tags: + - System Group + x-panel-log: + BeforeFuntions: + - db: groups + input_colume: id + input_value: id + isList: false + output_colume: name + output_value: name + bodyKeys: + - id + formatEN: delete group [name] + formatZH: 删除组 [name] + paramKeys: [] + /groups/search: + post: + consumes: + - application/json + description: 查询系统组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.GroupSearch' + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: List groups + tags: + - System Group + /groups/update: + post: + consumes: + - application/json + description: 更新系统组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.GroupOperate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update group + tags: + - System Group + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - type + formatEN: update group [name][type] + formatZH: 更新组 [name][type] + paramKeys: [] + /hosts: + post: + consumes: + - application/json + description: 创建主机 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.HostOperate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create host + tags: + - Host + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - addr + formatEN: create host [name][addr] + formatZH: 创建主机 [name][addr] + paramKeys: [] + /hosts/:id: + get: + consumes: + - application/json + description: 加载主机信息 + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.HostInfo' + security: + - ApiKeyAuth: [] + summary: Load host info + tags: + - Host + /hosts/del: + post: + consumes: + - application/json + description: 删除主机 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.OperateByID' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete host + tags: + - Host + x-panel-log: + BeforeFuntions: + - db: hosts + input_colume: id + input_value: id + isList: false + output_colume: addr + output_value: addr + bodyKeys: + - id + formatEN: delete host [addr] + formatZH: 删除主机 [addr] + paramKeys: [] + /hosts/search: + post: + consumes: + - application/json + description: 加载主机树 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.SearchForTree' + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Load host tree + tags: + - Host + /hosts/test/byid/:id: + post: + consumes: + - application/json + description: 测试主机连接 + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + type: boolean + security: + - ApiKeyAuth: [] + summary: Test host conn by host id + tags: + - Host + /hosts/test/byinfo: + post: + consumes: + - application/json + description: 测试主机连接 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.HostConnTest' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Test host conn by info + tags: + - Host + /hosts/update: + post: + consumes: + - application/json + description: 更新主机 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.HostOperate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update host + tags: + - Host + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - addr + formatEN: update host [name][addr] + formatZH: 更新主机信息 [name][addr] + paramKeys: [] + /logs/clean: + post: + consumes: + - application/json + description: 清空操作日志 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.CleanLog' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Clean operation logs + tags: + - Logs + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - logType + formatEN: Clean the [logType] log information + formatZH: 清空 [logType] 日志信息 + paramKeys: [] + /logs/login: + post: + consumes: + - application/json + description: 获取系统登录日志列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.PageInfo' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page login logs + tags: + - Logs + /logs/operation: + post: + consumes: + - application/json + description: 获取系统操作日志列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.PageInfo' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page operation logs + tags: + - Logs + /nginx: + get: + description: 获取 nginx 配置信息 + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.FileInfo' + security: + - ApiKeyAuth: [] + summary: Load nginx conf + tags: + - Nginx + /nginx/file: + post: + consumes: + - application/json + description: 上传更新 nginx 配置文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.NginxConfigFileUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update nginx conf by upload file + tags: + - Nginx + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: Update nginx conf + formatZH: 更新 nginx 配置 + paramKeys: [] + /nginx/scope: + post: + consumes: + - application/json + description: 获取部分 nginx 配置信息 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.NginxScopeReq' + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Load partial nginx conf + tags: + - Nginx + /nginx/status: + get: + description: 获取 nginx 状态信息 + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.NginxStatus' + security: + - ApiKeyAuth: [] + summary: Load nginx status info + tags: + - Nginx + /nginx/update: + post: + consumes: + - application/json + description: 更新 nginx 配置信息 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.NginxConfigUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update nginx conf + tags: + - Nginx + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: websiteId + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - websiteId + formatEN: Update nginx conf [domain] + formatZH: 更新 nginx 配置 [domain] + paramKeys: [] + /settings/daemonjson: + get: + description: 加载 docker 配置路径 + responses: + "200": + description: OK + schema: + type: string + security: + - ApiKeyAuth: [] + summary: Load daemon.json path + tags: + - System Setting + /settings/expired/handle: + post: + consumes: + - application/json + description: 重置过期系统登录密码 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.PasswordUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Reset system password expired + tags: + - System Setting + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: reset an expired Password + formatZH: 重置过期密码 + paramKeys: [] + /settings/mfa: + get: + description: 获取 mfa 信息 + responses: + "200": + description: OK + schema: + $ref: '#/definitions/mfa.Otp' + security: + - ApiKeyAuth: [] + summary: Load mfa info + tags: + - System Setting + /settings/mfa/bind: + post: + consumes: + - application/json + description: Mfa 绑定 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.MfaCredential' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Bind mfa + tags: + - System Setting + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: bind mfa + formatZH: mfa 绑定 + paramKeys: [] + /settings/monitor/clean: + post: + description: 清空监控数据 + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Clean monitor datas + tags: + - System Setting + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: clean monitor datas + formatZH: 清空监控数据 + paramKeys: [] + /settings/password/update: + post: + consumes: + - application/json + description: 更新系统登录密码 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.PasswordUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update system password + tags: + - System Setting + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: update system password + formatZH: 修改系统密码 + paramKeys: [] + /settings/search: + post: + description: 加载系统配置信息 + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.SettingInfo' + security: + - ApiKeyAuth: [] + summary: Load system setting info + tags: + - System Setting + /settings/time/sync: + post: + description: 系统时间同步 + responses: + "200": + description: OK + schema: + type: string + security: + - ApiKeyAuth: [] + summary: Sync system time + tags: + - System Setting + x-panel-log: + BeforeFuntions: [] + bodyKeys: [] + formatEN: sync system time + formatZH: 系统时间同步 + paramKeys: [] + /settings/update: + post: + consumes: + - application/json + description: 更新系统配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.SettingUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update system setting + tags: + - System Setting + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - key + - value + formatEN: update system setting [key] => [value] + formatZH: 修改系统配置 [key] => [value] + paramKeys: [] + /websites: + post: + consumes: + - application/json + description: 创建网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create website + tags: + - Website + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - primaryDomain + formatEN: Create website [primaryDomain] + formatZH: 创建网站 [primaryDomain] + paramKeys: [] + /websites/:id: + get: + consumes: + - application/json + description: 通过 id 查询网站 + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteDTO' + security: + - ApiKeyAuth: [] + summary: Search website by id + tags: + - Website + /websites/:id/https: + get: + consumes: + - application/json + description: 获取 https 配置 + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteHTTPS' + security: + - ApiKeyAuth: [] + summary: Load https conf + tags: + - Website HTTPS + post: + consumes: + - application/json + description: 更新 https 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteHTTPSOp' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteHTTPS' + security: + - ApiKeyAuth: [] + summary: Update https conf + tags: + - Website HTTPS + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: websiteId + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - websiteId + formatEN: Update website https [domain] conf + formatZH: 更新网站 [domain] https 配置 + paramKeys: [] + /websites/:id/nginx: + get: + consumes: + - application/json + description: 通过 id 查询网站 nginx + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.FileInfo' + security: + - ApiKeyAuth: [] + summary: Search website nginx by id + tags: + - Website Nginx + /websites/acme: + post: + consumes: + - application/json + description: 创建网站 acme + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteAcmeAccountCreate' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteAcmeAccountDTO' + security: + - ApiKeyAuth: [] + summary: Create website acme account + tags: + - Website Acme + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - email + formatEN: Create website acme [email] + formatZH: 创建网站 acme [email] + paramKeys: [] + /websites/acme/del: + post: + consumes: + - application/json + description: 删除网站 acme + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteResourceReq' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete website acme account + tags: + - Website Acme + x-panel-log: + BeforeFuntions: + - db: website_acme_accounts + input_colume: id + input_value: id + isList: false + output_colume: email + output_value: email + bodyKeys: + - id + formatEN: Delete website acme [email] + formatZH: 删除网站 acme [email] + paramKeys: [] + /websites/acme/search: + post: + consumes: + - application/json + description: 获取网站 acme 列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.PageInfo' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page website acme accounts + tags: + - Website Acme + /websites/backup: + post: + consumes: + - application/json + description: 备份网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteResourceReq' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Backup website + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + formatEN: Backup website [domain] + formatZH: 备份网站 [domain] + paramKeys: [] + /websites/check: + post: + consumes: + - application/json + description: 网站创建前检查 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteInstallCheckReq' + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Check before create website + tags: + - Website + /websites/config: + post: + consumes: + - application/json + description: 获取 nginx 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.NginxScopeReq' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteNginxConfig' + security: + - ApiKeyAuth: [] + summary: Load nginx conf + tags: + - Website Nginx + /websites/config/update: + post: + consumes: + - application/json + description: 更新 nginx 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.NginxConfigUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update nginx conf + tags: + - Website Nginx + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: websiteId + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - websiteId + formatEN: Nginx conf update [domain] + formatZH: nginx 配置修改 [domain] + paramKeys: [] + /websites/default/server: + post: + consumes: + - application/json + description: 操作网站日志 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDefaultUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Change default server + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + - operate + formatEN: Change default server => [domain] + formatZH: 修改默认 server => [domain] + paramKeys: [] + /websites/del: + post: + consumes: + - application/json + description: 删除网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDelete' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete website + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + formatEN: Delete website [domain] + formatZH: 删除网站 [domain] + paramKeys: [] + /websites/dns: + post: + consumes: + - application/json + description: 创建网站 dns + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDnsAccountCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create website dns account + tags: + - Website DNS + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Create website dns [name] + formatZH: 创建网站 dns [name] + paramKeys: [] + /websites/dns/del: + post: + consumes: + - application/json + description: 删除网站 dns + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteResourceReq' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete website dns account + tags: + - Website DNS + x-panel-log: + BeforeFuntions: + - db: website_dns_accounts + input_colume: id + input_value: id + isList: false + output_colume: name + output_value: name + bodyKeys: + - id + formatEN: Delete website dns [name] + formatZH: 删除网站 dns [name] + paramKeys: [] + /websites/dns/search: + post: + consumes: + - application/json + description: 获取网站 dns 列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.PageInfo' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page website dns accounts + tags: + - Website DNS + /websites/dns/update: + post: + consumes: + - application/json + description: 更新网站 dns + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDnsAccountUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update website dns account + tags: + - Website DNS + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Update website dns [name] + formatZH: 更新网站 dns [name] + paramKeys: [] + /websites/domains: + post: + consumes: + - application/json + description: 创建网站域名 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDomainCreate' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/model.WebsiteDomain' + security: + - ApiKeyAuth: [] + summary: Create website domain + tags: + - Website Domain + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - domain + formatEN: Create domain [domain] + formatZH: 创建域名 [domain] + paramKeys: [] + /websites/domains/:websiteId: + get: + consumes: + - application/json + description: 通过网站 id 查询域名 + parameters: + - description: request + in: path + name: websiteId + required: true + type: integer + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Search website domains by websiteId + tags: + - Website Domain + /websites/domains/del: + post: + consumes: + - application/json + description: 删除网站域名 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDomainDelete' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete website domain + tags: + - Website Domain + x-panel-log: + BeforeFuntions: + - db: website_domains + input_colume: id + input_value: id + isList: false + output_colume: domain + output_value: domain + bodyKeys: + - id + formatEN: Delete domain [domain] + formatZH: 删除域名 [domain] + paramKeys: [] + /websites/groups: + get: + description: 获取网站组 + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: List website groups + tags: + - Website Group + post: + consumes: + - application/json + description: 创建网站组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteGroupCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create website group + tags: + - Website Group + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Create website groups [name] + formatZH: 创建网站组 [name] + paramKeys: [] + /websites/groups/del: + post: + consumes: + - application/json + description: 删除网站组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteResourceReq' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete website group + tags: + - Website Group + x-panel-log: + BeforeFuntions: + - db: website_groups + input_colume: id + input_value: id + isList: false + output_colume: name + output_value: name + bodyKeys: + - id + formatEN: Delete website group [name] + formatZH: 删除网站组 [name] + paramKeys: [] + /websites/groups/update: + post: + consumes: + - application/json + description: 更新网站组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteGroupUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update website group + tags: + - Website Group + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Update website groups [name] + formatZH: 更新网站组 [name] + paramKeys: [] + /websites/list: + get: + description: 获取网站列表 + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: List websites + tags: + - Website + /websites/log: + post: + consumes: + - application/json + description: 操作网站日志 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteLogReq' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteLog' + security: + - ApiKeyAuth: [] + summary: Operate website log + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + - operate + formatEN: '[domain][operate] logs' + formatZH: '[domain][operate] 日志' + paramKeys: [] + /websites/nginx/update: + post: + consumes: + - application/json + description: 更新 网站 nginx 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteNginxUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update website nginx conf + tags: + - Website Nginx + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + formatEN: '[domain] Nginx conf update' + formatZH: '[domain] Nginx 配置修改' + paramKeys: [] + /websites/operate: + post: + consumes: + - application/json + description: 操作网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteOp' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Operate website + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + - operate + formatEN: '[operate] website [domain]' + formatZH: '[operate] 网站 [domain]' + paramKeys: [] + /websites/options: + get: + description: 获取网站列表 + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: List website names + tags: + - Website + /websites/recover: + post: + consumes: + - application/json + description: 从备份恢复网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteRecover' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Recover website + tags: + - Website + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - websiteName + - backupName + formatEN: '[websiteName] recover from backups [backupName]' + formatZH: '[websiteName] 从备份恢复 [backupName]' + paramKeys: [] + /websites/recover/byupload: + post: + consumes: + - application/json + description: 从上传恢复网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteRecoverByFile' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Recover website by upload + tags: + - Website + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - websiteName + - fileDir + - fileName + formatEN: '[websiteName] recover from uploads [fileDir]/[fileName]' + formatZH: '[websiteName] 从上传恢复 [fileDir]/[fileName]' + paramKeys: [] + /websites/search: + post: + consumes: + - application/json + description: 获取网站列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteSearch' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dto.PageResult' + security: + - ApiKeyAuth: [] + summary: Page websites + tags: + - Website + /websites/ssl: + post: + consumes: + - application/json + description: 创建网站 ssl + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteSSLCreate' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/request.WebsiteSSLCreate' + security: + - ApiKeyAuth: [] + summary: Create website ssl + tags: + - Website SSL + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - primaryDomain + formatEN: Create website ssl [primaryDomain] + formatZH: 创建网站 ssl [primaryDomain] + paramKeys: [] + /websites/ssl/:id: + get: + consumes: + - application/json + description: 通过 id 查询 ssl + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Search website ssl by id + tags: + - Website SSL + /websites/ssl/del: + post: + consumes: + - application/json + description: 删除网站 ssl + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteResourceReq' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Delete website ssl + tags: + - Website SSL + x-panel-log: + BeforeFuntions: + - db: website_ssls + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + formatEN: Delete ssl [domain] + formatZH: 删除 ssl [domain] + paramKeys: [] + /websites/ssl/renew: + post: + consumes: + - application/json + description: 重置网站 ssl + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteSSLRenew' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Reset website ssl + tags: + - Website SSL + x-panel-log: + BeforeFuntions: + - db: website_ssls + input_colume: id + input_value: SSLId + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - SSLId + formatEN: Renew ssl [domain] + formatZH: 重置 ssl [domain] + paramKeys: [] + /websites/ssl/resolve: + post: + consumes: + - application/json + description: 解析网站 ssl + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteDNSReq' + responses: + "200": + description: OK + schema: + type: anrry + security: + - ApiKeyAuth: [] + summary: Resolve website ssl + tags: + - Website SSL + /websites/ssl/search: + post: + consumes: + - application/json + description: 获取网站 ssl 列表分页 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteSSLSearch' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Page website ssl + tags: + - Website SSL + /websites/ssl/website/:websiteId: + get: + consumes: + - application/json + description: 通过网站 id 查询 ssl + parameters: + - description: request + in: path + name: websiteId + required: true + type: integer + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Search website ssl by website id + tags: + - Website SSL + /websites/update: + post: + consumes: + - application/json + description: 更新网站 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update website + tags: + - Website + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - primaryDomain + formatEN: Update website [primaryDomain] + formatZH: 更新网站 [primaryDomain] + paramKeys: [] + /websites/waf/config: + post: + consumes: + - application/json + description: 获取网站 waf 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteWafReq' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.WebsiteWafConfig' + security: + - ApiKeyAuth: [] + summary: Load websit waf conf + tags: + - Website WAF + /websites/waf/update: + post: + consumes: + - application/json + description: 更新 网站 waf 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteWafUpdate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update website waf conf + tags: + - Website WAF + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: websiteId + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - websiteId + formatEN: WAF conf update [domain] + formatZH: WAF 配置修改 [domain] + paramKeys: [] swagger: "2.0" diff --git a/cmd/server/main.go b/cmd/server/main.go index a539df8a7..222ef6b54 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -17,7 +17,7 @@ import ( // @host localhost // @BasePath /api/v1 -//go:generate swag init -o ./docs -g main.go -d ../../backend/app -g ../../cmd/server/main.go +//go:generate swag init -o ./docs -g main.go -d ../../backend -g ../cmd/server/main.go func main() { if err := cmd.RootCmd.Execute(); err != nil { fmt.Fprintln(os.Stderr, err) diff --git a/cmd/server/operation/operation.go b/cmd/server/operation/operation.go deleted file mode 100644 index 933204dbf..000000000 --- a/cmd/server/operation/operation.go +++ /dev/null @@ -1,6 +0,0 @@ -package operation - -import _ "embed" - -//go:embed operation.json -var OperationJosn []byte diff --git a/cmd/server/operation/operation.json b/cmd/server/operation/operation.json deleted file mode 100644 index 5306a369e..000000000 --- a/cmd/server/operation/operation.json +++ /dev/null @@ -1,130 +0,0 @@ -[ - { - "api": "/api/v1/apps/sync", - "method": "POST", - "bodyKeys": [], - "paramKeys": [], - "BeforeFuntions": [], - "formatZH": "应用商店同步", - "formatEN": "App store synchronization" - }, - { - "api": "/api/v1/apps/install", - "method": "POST", - "bodyKeys": [ - "name" - ], - "paramKeys": [], - "BeforeFuntions": [ - { - "input_colume": "name", - "input_value": "name", - "isList": false, - "db": "app_installs", - "output_colume": "app_id", - "output_value": "appId" - }, - { - "info": "appId", - "isList": false, - "db": "apps", - "output_colume": "key", - "output_value": "appKey" - } - ], - "formatZH": "安装应用 [appKey]-[name]", - "formatEN": "Install app [appKey]-[name]" - }, - { - "api": "/api/v1/apps/installed/op", - "method": "POST", - "bodyKeys": [ - "installId", - "operate" - ], - "paramKeys": [], - "BeforeFuntions": [ - { - "input_colume": "id", - "input_value": "installId", - "isList": false, - "db": "app_installs", - "output_colume": "app_id", - "output_value": "appId" - }, - { - "input_colume": "id", - "input_value": "installId", - "isList": false, - "db": "app_installs", - "output_colume": "name", - "output_value": "appName" - }, - { - "input_colume": "id", - "input_value": "appId", - "isList": false, - "db": "apps", - "output_colume": "key", - "output_value": "appKey" - } - ], - "formatZH": "[appKey] 应用 [appName] [operate]", - "formatEN": "[appKey] App [appName] [operate]" - }, - { - "api": "/api/v1/apps/installed/sync", - "method": "POST", - "bodyKeys": [], - "paramKeys": [], - "BeforeFuntions": [], - "formatZH": "已安装应用同步", - "formatEN": "App installed synchronization" - }, - { - "api": "/api/v1/apps/installed/backups/del", - "method": "POST", - "bodyKeys": [ - "ids" - ], - "paramKeys": [], - "BeforeFuntions": [ - { - "input_colume": "id", - "input_value": "ids", - "isList": true, - "db": "app_install_backups", - "output_colume": "name", - "output_value": "names" - } - ], - "formatZH": "删除应用备份 [names]", - "formatEN": "Deleting an Application Backup [names]" - }, - { - "api": "/api/v1/apps/installed/port/change", - "method": "POST", - "bodyKeys": [ - "key", - "name", - "port" - ], - "paramKeys": [], - "BeforeFuntions": [], - "formatZH": "应用端口修改 [key]-[name] => [port]", - "formatEN": "Application port update [key]-[name] => [port]" - }, - { - "api": "/api/v1/apps/installed/port/change", - "method": "POST", - "bodyKeys": [ - "key", - "name", - "port" - ], - "paramKeys": [], - "BeforeFuntions": [], - "formatZH": "应用端口修改 [key]-[name] => [port]", - "formatEN": "Application port update [key]-[name] => [port]" - } -] \ No newline at end of file diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 9dd40614b..47ec3c281 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -603,6 +603,7 @@ export default { commands: 'Command', groups: 'System Group', backups: 'Backup Account', + logs: 'Panel Logs', settings: 'Panel Setting', cronjobs: 'Cronjob', databases: 'Database', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 9f2281547..0b5fc915b 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -617,6 +617,7 @@ export default { groups: '系统组', commands: '快捷命令', backups: '备份账号', + logs: '面板日志', settings: '面板设置', cronjobs: '计划任务', databases: '数据库',