diff --git a/backend/app/api/v1/app.go b/backend/app/api/v1/app.go index 90476030d..bbd2696ed 100644 --- a/backend/app/api/v1/app.go +++ b/backend/app/api/v1/app.go @@ -71,8 +71,8 @@ func (b *BaseApi) GetApp(c *gin.Context) { } // @Tags App -// @Summary Search app detail by id -// @Description 通过 id 获取应用详情 +// @Summary Search app detail by appid +// @Description 通过 appid 获取应用详情 // @Accept json // @Param appId path integer true "app id" // @Param version path string true "app 版本" @@ -97,13 +97,13 @@ func (b *BaseApi) GetAppDetail(c *gin.Context) { } // @Tags App -// @Summary Search app detail by id +// @Summary Get app detail by id // @Description 通过 id 获取应用详情 // @Accept json // @Param appId path integer true "id" // @Success 200 {object} response.AppDetailDTO // @Security ApiKeyAuth -// @Router /apps/detail/:id[get] +// @Router /apps/details/:id [get] func (b *BaseApi) GetAppDetailByID(c *gin.Context) { appDetailID, err := helper.GetIntParamByKey(c, "id") if err != nil { diff --git a/backend/app/api/v1/website.go b/backend/app/api/v1/website.go index 55a0a76cc..21133e192 100644 --- a/backend/app/api/v1/website.go +++ b/backend/app/api/v1/website.go @@ -498,3 +498,47 @@ func (b *BaseApi) ChangeDefaultServer(c *gin.Context) { } helper.SuccessWithData(c, nil) } + +// @Tags Website +// @Summary Load websit php conf +// @Description 获取网站 php 配置 +// @Accept json +// @Param id path integer true "request" +// @Success 200 {object} response.PHPConfig +// @Security ApiKeyAuth +// @Router /websites/php/config/:id [get] +func (b *BaseApi) GetWebsitePHPConfig(c *gin.Context) { + id, err := helper.GetParamID(c) + if err != nil { + helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInternalServer, nil) + return + } + data, err := websiteService.GetPHPConfig(id) + if err != nil { + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) + return + } + helper.SuccessWithData(c, data) +} + +// @Tags Website PHP +// @Summary Update website php conf +// @Description 更新 网站 PHP 配置 +// @Accept json +// @Param request body request.WebsitePHPConfigUpdate true "request" +// @Success 200 +// @Security ApiKeyAuth +// @Router /websites/php/update [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] PHP 配置修改","formatEN":"[domain] PHP conf update"} +func (b *BaseApi) UpdateWebsitePHPConfig(c *gin.Context) { + var req request.WebsitePHPConfigUpdate + if err := c.ShouldBindJSON(&req); err != nil { + helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err) + return + } + if err := websiteService.UpdatePHPConfig(req); err != nil { + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) + return + } + helper.SuccessWithData(c, nil) +} diff --git a/backend/app/dto/request/runtime.go b/backend/app/dto/request/runtime.go index 0ccb90bac..96b838453 100644 --- a/backend/app/dto/request/runtime.go +++ b/backend/app/dto/request/runtime.go @@ -4,8 +4,9 @@ import "github.com/1Panel-dev/1Panel/backend/app/dto" type RuntimeSearch struct { dto.PageInfo - Type string `json:"type"` - Name string `json:"name"` + Type string `json:"type"` + Name string `json:"name"` + Status string `json:"status"` } type RuntimeCreate struct { diff --git a/backend/app/dto/request/website.go b/backend/app/dto/request/website.go index 1c7eb8f8b..e3ae6de99 100644 --- a/backend/app/dto/request/website.go +++ b/backend/app/dto/request/website.go @@ -134,3 +134,8 @@ type WebsiteLogReq struct { type WebsiteDefaultUpdate struct { ID uint `json:"id" validate:"required"` } + +type WebsitePHPConfigUpdate struct { + ID uint `json:"id" validate:"required"` + Params map[string]string `json:"params" validate:"required"` +} diff --git a/backend/app/dto/response/website.go b/backend/app/dto/response/website.go index 206deea81..1f9f80d9d 100644 --- a/backend/app/dto/response/website.go +++ b/backend/app/dto/response/website.go @@ -42,3 +42,7 @@ type WebsiteLog struct { Enable bool `json:"enable"` Content string `json:"content"` } + +type PHPConfig struct { + Params map[string]string `json:"params"` +} diff --git a/backend/app/repo/app_install.go b/backend/app/repo/app_install.go index d036038b0..e5475c884 100644 --- a/backend/app/repo/app_install.go +++ b/backend/app/repo/app_install.go @@ -23,7 +23,7 @@ type IAppInstallRepo interface { ListBy(opts ...DBOption) ([]model.AppInstall, error) GetFirst(opts ...DBOption) (model.AppInstall, error) Create(ctx context.Context, install *model.AppInstall) error - Save(install *model.AppInstall) error + Save(ctx context.Context, install *model.AppInstall) error DeleteBy(opts ...DBOption) error Delete(ctx context.Context, install model.AppInstall) error Page(page, size int, opts ...DBOption) (int64, []model.AppInstall, error) @@ -110,8 +110,8 @@ func (a *AppInstallRepo) Create(ctx context.Context, install *model.AppInstall) return db.Create(&install).Error } -func (a *AppInstallRepo) Save(install *model.AppInstall) error { - return getDb().Save(&install).Error +func (a *AppInstallRepo) Save(ctx context.Context, install *model.AppInstall) error { + return getTx(ctx).Save(&install).Error } func (a *AppInstallRepo) DeleteBy(opts ...DBOption) error { diff --git a/backend/app/repo/runtime.go b/backend/app/repo/runtime.go index 4833f8ad8..59ed29e0c 100644 --- a/backend/app/repo/runtime.go +++ b/backend/app/repo/runtime.go @@ -13,6 +13,7 @@ type IRuntimeRepo interface { WithName(name string) DBOption WithImage(image string) DBOption WithNotId(id uint) DBOption + WithStatus(status string) DBOption Page(page, size int, opts ...DBOption) (int64, []model.Runtime, error) Create(ctx context.Context, runtime *model.Runtime) error Save(runtime *model.Runtime) error @@ -30,6 +31,12 @@ func (r *RuntimeRepo) WithName(name string) DBOption { } } +func (r *RuntimeRepo) WithStatus(status string) DBOption { + return func(g *gorm.DB) *gorm.DB { + return g.Where("status = ?", status) + } +} + func (r *RuntimeRepo) WithImage(image string) DBOption { return func(g *gorm.DB) *gorm.DB { return g.Where("image = ?", image) diff --git a/backend/app/repo/website.go b/backend/app/repo/website.go index ef4eb37eb..ef24838ef 100644 --- a/backend/app/repo/website.go +++ b/backend/app/repo/website.go @@ -17,6 +17,7 @@ type IWebsiteRepo interface { WithGroupID(groupId uint) DBOption WithDefaultServer() DBOption WithDomainLike(domain string) DBOption + WithRuntimeID(runtimeID uint) DBOption Page(page, size int, opts ...DBOption) (int64, []model.Website, error) List(opts ...DBOption) ([]model.Website, error) GetFirst(opts ...DBOption) (model.Website, error) @@ -40,6 +41,12 @@ func (w *WebsiteRepo) WithAppInstallId(appInstallId uint) DBOption { } } +func (w *WebsiteRepo) WithRuntimeID(runtimeID uint) DBOption { + return func(db *gorm.DB) *gorm.DB { + return db.Where("runtime_id = ?", runtimeID) + } +} + func (w *WebsiteRepo) WithDomain(domain string) DBOption { return func(db *gorm.DB) *gorm.DB { return db.Where("primary_domain = ?", domain) diff --git a/backend/app/service/app.go b/backend/app/service/app.go index bd3823e72..e8e5e63eb 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -316,7 +316,7 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) ( if err := upAppPre(app, appInstall); err != nil { return nil, err } - go upApp(appInstall.GetComposePath(), appInstall) + go upApp(ctx, appInstall.GetComposePath(), appInstall) go updateToolApp(appInstall) return &appInstall, nil } diff --git a/backend/app/service/app_install.go b/backend/app/service/app_install.go index 29e1c1a2c..753437241 100644 --- a/backend/app/service/app_install.go +++ b/backend/app/service/app_install.go @@ -260,7 +260,7 @@ func (a *AppInstallService) Update(req request.AppInstalledUpdate) error { if err := env.Write(oldEnvMaps, envPath); err != nil { return err } - _ = appInstallRepo.Save(&installed) + _ = appInstallRepo.Save(context.Background(), &installed) if err := rebuildApp(installed); err != nil { return err @@ -300,7 +300,7 @@ func (a *AppInstallService) SyncAll(systemInit bool) error { if systemInit { i.Status = constant.Error i.Message = "System restart causes application exception" - _ = appInstallRepo.Save(&i) + _ = appInstallRepo.Save(context.Background(), &i) } continue } @@ -569,15 +569,15 @@ func syncById(installId uint) error { if containerCount == 0 { appInstall.Status = constant.Error appInstall.Message = "container is not found" - return appInstallRepo.Save(&appInstall) + return appInstallRepo.Save(context.Background(), &appInstall) } if errCount == 0 && existedCount == 0 { appInstall.Status = constant.Running - return appInstallRepo.Save(&appInstall) + return appInstallRepo.Save(context.Background(), &appInstall) } if existedCount == normalCount { appInstall.Status = constant.Stopped - return appInstallRepo.Save(&appInstall) + return appInstallRepo.Save(context.Background(), &appInstall) } if errCount == normalCount { appInstall.Status = constant.Error @@ -602,7 +602,7 @@ func syncById(installId uint) error { errMsg.Write([]byte("\n")) } appInstall.Message = errMsg.String() - return appInstallRepo.Save(&appInstall) + return appInstallRepo.Save(context.Background(), &appInstall) } func updateInstallInfoInDB(appKey, appName, param string, isRestart bool, value interface{}) error { diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index 41cf51fce..076a70f1c 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -239,7 +239,7 @@ func updateInstall(installId uint, detailId uint) error { } return err } - return appInstallRepo.Save(&install) + return appInstallRepo.Save(context.Background(), &install) } func getContainerNames(install model.AppInstall) ([]string, error) { @@ -381,7 +381,7 @@ func upAppPre(app model.App, appInstall model.AppInstall) error { return nil } -func upApp(composeFilePath string, appInstall model.AppInstall) { +func upApp(ctx context.Context, composeFilePath string, appInstall model.AppInstall) { out, err := compose.Up(composeFilePath) if err != nil { if out != "" { @@ -390,10 +390,10 @@ func upApp(composeFilePath string, appInstall model.AppInstall) { appInstall.Message = err.Error() } appInstall.Status = constant.Error - _ = appInstallRepo.Save(&appInstall) + _ = appInstallRepo.Save(ctx, &appInstall) } else { appInstall.Status = constant.Running - _ = appInstallRepo.Save(&appInstall) + _ = appInstallRepo.Save(ctx, &appInstall) } } @@ -468,7 +468,7 @@ func handleErr(install model.AppInstall, err error, out string) error { reErr = errors.New(out) install.Status = constant.Error } - _ = appInstallRepo.Save(&install) + _ = appInstallRepo.Save(context.Background(), &install) return reErr } @@ -579,7 +579,7 @@ func updateToolApp(installed model.AppInstall) { return } toolInstall.Env = string(contentByte) - if err := appInstallRepo.Save(&toolInstall); err != nil { + if err := appInstallRepo.Save(context.Background(), &toolInstall); err != nil { global.LOG.Errorf("update tool app [%s] error : %s", toolInstall.Name, err.Error()) return } diff --git a/backend/app/service/backup_app.go b/backend/app/service/backup_app.go index aeed9f0c4..fc2a1cf5b 100644 --- a/backend/app/service/backup_app.go +++ b/backend/app/service/backup_app.go @@ -1,6 +1,7 @@ package service import ( + "context" "encoding/json" "fmt" "io/fs" @@ -192,7 +193,7 @@ func handleAppRecover(install *model.AppInstall, recoverFile string, isRollback } oldInstall.Status = constant.Running - if err := appInstallRepo.Save(install); err != nil { + if err := appInstallRepo.Save(context.Background(), install); err != nil { global.LOG.Errorf("save db app install failed, err: %v", err) return err } diff --git a/backend/app/service/runtime.go b/backend/app/service/runtime.go index 11cf2c4bf..3f572ae14 100644 --- a/backend/app/service/runtime.go +++ b/backend/app/service/runtime.go @@ -121,6 +121,9 @@ func (r *RuntimeService) Page(req request.RuntimeSearch) (int64, []response.Runt if req.Name != "" { opts = append(opts, commonRepo.WithLikeName(req.Name)) } + if req.Status != "" { + opts = append(opts, runtimeRepo.WithStatus(req.Status)) + } total, runtimes, err := runtimeRepo.Page(req.Page, req.PageSize, opts...) if err != nil { return 0, nil, err @@ -138,7 +141,10 @@ func (r *RuntimeService) Delete(id uint) error { if err != nil { return err } - //TODO 校验网站关联 + website, _ := websiteRepo.GetFirst(websiteRepo.WithRuntimeID(id)) + if website.ID > 0 { + return buserr.New(constant.ErrDelWithWebsite) + } //TODO 删除镜像 if runtime.Resource == constant.ResourceAppstore { runtimeDir := path.Join(constant.RuntimeDir, runtime.Type, runtime.Name) @@ -193,7 +199,11 @@ func (r *RuntimeService) Get(id uint) (*response.RuntimeRes, error) { appParam.Value = v if form.Type == "select" { if form.Multiple { - appParam.Value = strings.Split(v, ",") + if v == "" { + appParam.Value = []string{} + } else { + appParam.Value = strings.Split(v, ",") + } } else { for _, fv := range form.Values { if fv.Value == v { diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 3a22ea900..ddb997f13 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -1,10 +1,12 @@ package service import ( + "bufio" "context" "crypto/x509" "encoding/pem" "fmt" + "github.com/1Panel-dev/1Panel/backend/utils/common" "os" "path" "reflect" @@ -52,6 +54,8 @@ type IWebsiteService interface { UpdateNginxConfigFile(req request.WebsiteNginxUpdate) error OpWebsiteLog(req request.WebsiteLogReq) (*response.WebsiteLog, error) ChangeDefaultServer(id uint) error + GetPHPConfig(id uint) (*response.PHPConfig, error) + UpdatePHPConfig(req request.WebsitePHPConfigUpdate) error } func NewIWebsiteService() IWebsiteService { @@ -180,6 +184,9 @@ func (w WebsiteService) CreateWebsite(ctx context.Context, create request.Websit if err != nil { return err } + if common.ScanPort(create.Port) { + return buserr.WithDetail(constant.ErrPortInUsed, create.Port, nil) + } if runtime.Resource == constant.ResourceAppstore { var req request.AppInstallCreate reg, _ := regexp.Compile("[^a-z0-9_\\-]+") @@ -826,3 +833,86 @@ func (w WebsiteService) ChangeDefaultServer(id uint) error { } return nil } + +func (w WebsiteService) GetPHPConfig(id uint) (*response.PHPConfig, error) { + website, err := websiteRepo.GetFirst(commonRepo.WithByID(id)) + if err != nil { + return nil, err + } + appInstall, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID)) + if err != nil { + return nil, err + } + phpConfigPath := path.Join(appInstall.GetPath(), "conf", "php.ini") + fileOp := files.NewFileOp() + if !fileOp.Stat(phpConfigPath) { + return nil, buserr.WithDetail(constant.ErrFileCanNotRead, "php.ini", nil) + } + params := make(map[string]string) + configFile, err := fileOp.OpenFile(phpConfigPath) + if err != nil { + return nil, err + } + defer configFile.Close() + scanner := bufio.NewScanner(configFile) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if strings.HasPrefix(line, ";") { + continue + } + matches := regexp.MustCompile(`^\s*([a-z_]+)\s*=\s*(.*)$`).FindStringSubmatch(line) + if len(matches) == 3 { + params[matches[1]] = matches[2] + } + } + return &response.PHPConfig{Params: params}, nil +} + +func (w WebsiteService) UpdatePHPConfig(req request.WebsitePHPConfigUpdate) (err error) { + website, err := websiteRepo.GetFirst(commonRepo.WithByID(req.ID)) + if err != nil { + return err + } + appInstall, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID)) + if err != nil { + return err + } + phpConfigPath := path.Join(appInstall.GetPath(), "conf", "php.ini") + fileOp := files.NewFileOp() + if !fileOp.Stat(phpConfigPath) { + return buserr.WithDetail(constant.ErrFileCanNotRead, "php.ini", nil) + } + configFile, err := fileOp.OpenFile(phpConfigPath) + if err != nil { + return err + } + defer configFile.Close() + + contentBytes, err := fileOp.GetContent(phpConfigPath) + content := string(contentBytes) + lines := strings.Split(content, "\n") + for i, line := range lines { + if strings.HasPrefix(line, ";") { + continue + } + for key, value := range req.Params { + pattern := "^" + regexp.QuoteMeta(key) + "\\s*=\\s*.*$" + if matched, _ := regexp.MatchString(pattern, line); matched { + lines[i] = key + " = " + value + } + } + } + updatedContent := strings.Join(lines, "\n") + if err := fileOp.WriteFile(phpConfigPath, strings.NewReader(updatedContent), 0755); err != nil { + return err + } + appInstallReq := request.AppInstalledOperate{ + InstallId: appInstall.ID, + Operate: constant.Restart, + } + if err = NewIAppInstalledService().Operate(context.Background(), appInstallReq); err != nil { + _ = fileOp.WriteFile(phpConfigPath, strings.NewReader(string(contentBytes)), 0755) + return err + } + return nil +} diff --git a/backend/constant/errs.go b/backend/constant/errs.go index 44700ec25..dc8670b30 100644 --- a/backend/constant/errs.go +++ b/backend/constant/errs.go @@ -106,8 +106,9 @@ var ( // runtime var ( - ErrDirNotFound = "ErrDirNotFound" - ErrFileNotExist = "ErrFileNotExist" - ErrImageBuildErr = "ErrImageBuildErr" - ErrImageExist = "ErrImageExist" + ErrDirNotFound = "ErrDirNotFound" + ErrFileNotExist = "ErrFileNotExist" + ErrImageBuildErr = "ErrImageBuildErr" + ErrImageExist = "ErrImageExist" + ErrDelWithWebsite = "ErrDelWithWebsite" ) diff --git a/backend/i18n/lang/en.yaml b/backend/i18n/lang/en.yaml index 485499932..0c93a9b12 100644 --- a/backend/i18n/lang/en.yaml +++ b/backend/i18n/lang/en.yaml @@ -64,4 +64,5 @@ ErrObjectInUsed: "This object is in use and cannot be deleted" ErrDirNotFound: "The build folder does not exist! Please check file integrity!" ErrFileNotExist: "{{ .detail }} file does not exist! Please check source file integrity!" ErrImageBuildErr: "Image build failed" -ErrImageExist: "Image is already exist!" \ No newline at end of file +ErrImageExist: "Image is already exist!" +ErrDelWithWebsite: "The operating environment has been associated with a website and cannot be deleted" \ No newline at end of file diff --git a/backend/i18n/lang/zh.yaml b/backend/i18n/lang/zh.yaml index 99e84072c..85f49cb76 100644 --- a/backend/i18n/lang/zh.yaml +++ b/backend/i18n/lang/zh.yaml @@ -64,4 +64,5 @@ ErrObjectInUsed: "该对象正被使用,无法删除" ErrDirNotFound: "build 文件夹不存在!请检查文件完整性!" ErrFileNotExist: "{{ .detail }} 文件不存在!请检查源文件完整性!" ErrImageBuildErr: "镜像 build 失败" -ErrImageExist: "镜像已存在!" \ No newline at end of file +ErrImageExist: "镜像已存在!" +ErrDelWithWebsite: "运行环境已经关联网站,无法删除" \ No newline at end of file diff --git a/backend/router/ro_website.go b/backend/router/ro_website.go index f9a70ad2d..eb7b16c99 100644 --- a/backend/router/ro_website.go +++ b/backend/router/ro_website.go @@ -41,5 +41,8 @@ func (a *WebsiteRouter) InitWebsiteRouter(Router *gin.RouterGroup) { groupRouter.POST("/waf/config", baseApi.GetWebsiteWafConfig) groupRouter.POST("/waf/update", baseApi.UpdateWebsiteWafConfig) + + groupRouter.GET("/php/config/:id", baseApi.GetWebsitePHPConfig) + groupRouter.POST("/php/config", baseApi.UpdateWebsitePHPConfig) } } diff --git a/backend/utils/nginx/private.key b/backend/utils/nginx/private.key deleted file mode 100644 index 32f7366f7..000000000 --- a/backend/utils/nginx/private.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN privateKey----- -MIIEoAIBAAKCAQEAvZRFbJcXQSIyhfbl9ZiulTgwFUNsqO3YOZgpRa0T0dgbg6BO -0nnPvlcZvR8TcdDc1B/kplps3O9QkV2d8AzutYWOG/TkZ8ywVuwni1yWqfyy7msV -GyhAqNI2lE6AMY5QJ7/GXX7vuN2jwUWBKSjYTXhyyWOMXmeijI0j3FPCtCN6G9x6 -+oV0chtNTtDpz1lOw7g+b7cVqDD0MKMaFMl5EhbjSkw5E0GDPLIYRmctXRdFBTow -UcPxpMM0yuKksLROUccLRUIazHi+19HTlVx7sPYCTrFhh0N4xuPrv0pyfBUWInE0 -Yza2ESpym6AlQLzSpOQji9IKdh8uIAZyShpFgwIDAQABAoIBAAzkjYgiCmHSmo8D -yIXYWV8qkBKSIEyoyEC6eWwUpjlqMgzUlSe5QwiV0dlLyL2/z5TZimpJ0geAewE3 -1aripkVQDOcX04S/pepzawkORezPk7elLq1HIoaYrT+OyycTn53ka/Al1tXCtQVK -3crXzUYPf/b0PzKYZ7SZUKwGQkKP3QoHfFB+zVr0ZczHhWhdyk3rqNbblVR0OPJE -QCDQRqe7pS2wxs2Br3lNUnCqHqThtRu2sQK3UTBRP37AxrRd+gplB+QS+vPpgIFs -kVEoOdtuox7U5OOHj3WwhDosMLvXgK359g30olVL7ZTuLregFwhaidZcF4fI8A69 -MX0YyLkCgYEAy4MQNELXWFJpTwova/RFEnczdP34rtcg/Z5Zvwq6Th4SbbMrVudM -BGEUVUHQbV4unD6T722FtQhfLrQXxgrLlHu7KkcnkciQd6iZCStAAH+XpnVvlj6k -THvnJxN1H1b4kimsxTuc+/96BqkpkHnbb0KBbHPdz3rGKtWKfIYBRhcCgYEA7nlK -vAGnOdVFKa5MPkdWeuwym3bjjZXBQB7/aRucqt3URi9XTl4/EwxHGmGpzTTSmpCN -+SDg5+lGVtivyk6QiRuKvhB9uohj3C6krHKjZtJz+ydtzrSi6DcAGrsWdu1EsSXR -s1aLhetrrPmKpayzK6TsUzcW3yVdgIYXFhY3y3UCfzR3lbXjhaE/nebCuXcbgrNA -CAQhdfudeuPn7ztRiLabCiU+C+5bsz1tydAxJ4sKvPmLKJiRo+cIQYHI7FgicFnX -jGlZ7tmm25f933Z9sAJw4qgHnr0daT5Os0lfutJZmbwVAnXW6KIPO2Z8NjsJL4l/ -m95aANV80Zo5c3qnEa0CgYBvw8Ll6DRyo2Sdy0WKbq62P5rcR9UQF16R6bU0kq9T -WVHSbv+RCBSxnbB5ScpmFVqa/CK93s3pgufnbfi9bSLKT3Ev8NSsJp3+pJGjDLtO -RlX7IJiTJw+um5Bd9s7pf/wQtjPYxDfx1MsLL4zuZsk2LD5iJdB/VqjCwpVxUYpm -vQKBgFtmL0pSbd6433YwY+vR5sZ8uMSXqaS9imisW42fAj7v3W1Td0yi1WwNTNqr -zXQVMspNVBXf5fyzh8gAW4gzD7JLBsxA5sr4gPFpxwJTfbvrIR0K8jr+1yxviGAb -eJcEigsnUfhZrVEa1am+mRaumjkZBdS+xCClS7auY2raxQ5x ------END privateKey----- diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index bb57ee85a..6576b276d 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -1,17 +1,10 @@ -// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Package docs GENERATED BY SWAG; DO NOT EDIT // This file was generated by swaggo/swag package docs -import ( - "bytes" - "encoding/json" - "strings" - "text/template" +import "github.com/swaggo/swag" - "github.com/swaggo/swag" -) - -var doc = `{ +const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { @@ -76,12 +69,60 @@ var doc = `{ "summary": "Get app list update", "responses": { "200": { - "description": "" + "description": "OK" } } } }, - "/apps/detail/:appId/:version": { + "/apps/detail/:appId/:version/:type": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 appid 获取应用详情", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app detail by appid", + "parameters": [ + { + "type": "integer", + "description": "app id", + "name": "appId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app 版本", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app 类型", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppDetailDTO" + } + } + } + } + }, + "/apps/details/:id": { "get": { "security": [ { @@ -95,21 +136,14 @@ var doc = `{ "tags": [ "App" ], - "summary": "Search app detail by id", + "summary": "Get app detail by id", "parameters": [ { "type": "integer", - "description": "app id", + "description": "id", "name": "appId", "in": "path", "required": true - }, - { - "type": "string", - "description": "app 版本", - "name": "version", - "in": "path", - "required": true } ], "responses": { @@ -415,7 +449,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -517,7 +551,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -559,7 +593,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -603,7 +637,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -622,7 +656,7 @@ var doc = `{ "summary": "Sync app installed", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -662,7 +696,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -715,7 +749,7 @@ var doc = `{ "summary": "Sync app list", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -753,7 +787,7 @@ var doc = `{ "summary": "Check System isDemo", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -781,7 +815,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -831,7 +865,7 @@ var doc = `{ "summary": "User logout", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -876,7 +910,7 @@ var doc = `{ "summary": "Check is First login", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -909,7 +943,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -952,7 +986,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -994,7 +1028,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1073,7 +1107,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1115,7 +1149,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1207,7 +1241,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1247,7 +1281,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1287,7 +1321,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1424,7 +1458,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1577,7 +1611,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1619,7 +1653,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1702,7 +1736,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1790,7 +1824,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1832,7 +1866,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1913,7 +1947,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1983,7 +2017,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2028,7 +2062,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2121,7 +2155,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2157,7 +2191,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2337,7 +2371,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2379,7 +2413,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2469,7 +2503,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2520,7 +2554,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2562,7 +2596,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2680,7 +2714,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2723,7 +2757,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2774,7 +2808,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2825,7 +2859,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2948,7 +2982,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3000,7 +3034,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3133,7 +3167,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3197,7 +3231,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3248,7 +3282,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3299,7 +3333,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3339,7 +3373,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3426,7 +3460,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3572,7 +3606,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3612,7 +3646,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3652,7 +3686,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3714,7 +3748,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3878,7 +3912,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3918,7 +3952,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3960,7 +3994,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4002,7 +4036,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4039,7 +4073,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -4072,7 +4106,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4159,7 +4193,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4201,7 +4235,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4243,7 +4277,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4285,7 +4319,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4372,7 +4406,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4415,7 +4449,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4458,7 +4492,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4501,7 +4535,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4579,7 +4613,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4652,7 +4686,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4730,7 +4764,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4774,7 +4808,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4871,7 +4905,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4914,7 +4948,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5001,7 +5035,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5043,7 +5077,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5339,7 +5373,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5382,7 +5416,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5477,7 +5511,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5590,7 +5624,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5659,7 +5693,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5850,7 +5884,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5948,7 +5982,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5971,6 +6005,196 @@ var doc = `{ } } }, + "/runtimes": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Create runtime", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Create runtime [name]", + "formatZH": "创建运行环境 [name]", + "paramKeys": [] + } + } + }, + "/runtimes/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Get runtime", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/runtimes/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Delete runtime", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeDelete" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website [name]", + "formatZH": "删除网站 [name]", + "paramKeys": [] + } + } + }, + "/runtimes/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取运行环境列表", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "List runtimes", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeSearch" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/runtimes/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Update runtime", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Update runtime [name]", + "formatZH": "更新运行环境 [name]", + "paramKeys": [] + } + } + }, "/settings/backup": { "post": { "security": [ @@ -5999,7 +6223,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6041,7 +6265,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6085,7 +6309,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6136,7 +6360,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6187,7 +6411,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6230,7 +6454,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6263,7 +6487,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6308,7 +6532,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6445,7 +6669,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6509,7 +6733,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6571,7 +6795,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6597,7 +6821,7 @@ var doc = `{ "summary": "Clean monitor datas", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6637,7 +6861,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6677,7 +6901,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6727,7 +6951,7 @@ var doc = `{ "summary": "Load system available status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6760,7 +6984,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6803,7 +7027,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6854,7 +7078,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6906,7 +7130,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6949,7 +7173,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7000,7 +7224,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7116,7 +7340,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7159,7 +7383,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } }, @@ -7190,7 +7414,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7232,7 +7456,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7280,6 +7504,40 @@ var doc = `{ } } }, + "/websites/:id/config/:type": { + "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/:id/https": { "get": { "security": [ @@ -7366,40 +7624,6 @@ var doc = `{ } } }, - "/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": [ @@ -7473,7 +7697,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7632,7 +7856,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7683,7 +7907,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7735,7 +7959,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7786,7 +8010,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7828,7 +8052,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7915,7 +8139,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8036,7 +8260,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8164,7 +8388,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8215,7 +8439,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8261,6 +8485,91 @@ var doc = `{ } } }, + "/websites/php/config/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 php 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Load websit php conf", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.PHPConfig" + } + } + } + } + }, + "/websites/php/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 网站 PHP 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website PHP" + ], + "summary": "Update website php conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsitePHPConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "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] PHP conf update", + "formatZH": "[domain] PHP 配置修改", + "paramKeys": [] + } + } + }, "/websites/search": { "post": { "security": [ @@ -8368,7 +8677,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8401,7 +8710,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8452,7 +8761,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8539,7 +8848,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8572,7 +8881,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8621,7 +8930,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8654,7 +8963,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8732,7 +9041,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10390,6 +10699,21 @@ var doc = `{ } } }, + "dto.NginxKey": { + "type": "string", + "enum": [ + "index", + "limit-conn", + "ssl", + "http-per" + ], + "x-enum-varnames": [ + "Index", + "LimitConn", + "SSL", + "HttpPer" + ] + }, "dto.OperateByID": { "type": "object", "required": [ @@ -11298,6 +11622,9 @@ var doc = `{ "remark": { "type": "string" }, + "runtimeID": { + "type": "integer" + }, "status": { "type": "string" }, @@ -11859,7 +12186,7 @@ var doc = `{ }, "params": {}, "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -11873,7 +12200,7 @@ var doc = `{ ], "properties": { "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -11894,6 +12221,86 @@ var doc = `{ } } }, + "request.RuntimeCreate": { + "type": "object", + "properties": { + "appDetailId": { + "type": "integer" + }, + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + }, + "resource": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "request.RuntimeDelete": { + "type": "object", + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.RuntimeSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "name": { + "type": "string" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.RuntimeUpdate": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + }, + "version": { + "type": "string" + } + } + }, "request.SearchUploadWithPage": { "type": "object", "required": [ @@ -11955,15 +12362,24 @@ var doc = `{ "otherDomains": { "type": "string" }, + "port": { + "type": "integer" + }, "primaryDomain": { "type": "string" }, "proxy": { "type": "string" }, + "proxyType": { + "type": "string" + }, "remark": { "type": "string" }, + "runtimeID": { + "type": "integer" + }, "type": { "type": "string" }, @@ -12210,6 +12626,24 @@ var doc = `{ } } }, + "request.WebsitePHPConfigUpdate": { + "type": "object", + "required": [ + "id", + "params" + ], + "properties": { + "id": { + "type": "integer" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "request.WebsiteResourceReq": { "type": "object", "required": [ @@ -12458,6 +12892,9 @@ var doc = `{ "id": { "type": "integer" }, + "image": { + "type": "string" + }, "lastVersion": { "type": "string" }, @@ -12526,6 +12963,12 @@ var doc = `{ "labelZh": { "type": "string" }, + "multiple": { + "type": "boolean" + }, + "required": { + "type": "boolean" + }, "rule": { "type": "string" }, @@ -12641,6 +13084,17 @@ var doc = `{ } } }, + "response.PHPConfig": { + "type": "object", + "properties": { + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "response.WebsiteAcmeAccountDTO": { "type": "object", "properties": { @@ -12718,6 +13172,9 @@ var doc = `{ "remark": { "type": "string" }, + "runtimeID": { + "type": "integer" + }, "sitePath": { "type": "string" }, @@ -12806,56 +13263,18 @@ var doc = `{ } }` -type swaggerInfo struct { - Version string - Host string - BasePath string - Schemes []string - Title string - Description string -} - // SwaggerInfo holds exported Swagger Info so clients can modify it -var SwaggerInfo = swaggerInfo{ - Version: "1.0", - Host: "localhost", - BasePath: "/api/v1", - Schemes: []string{}, - Title: "1Panel", - Description: "开源Linux面板", -} - -type s struct{} - -func (s *s) ReadDoc() string { - sInfo := SwaggerInfo - sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) - - t, err := template.New("swagger_info").Funcs(template.FuncMap{ - "marshal": func(v interface{}) string { - a, _ := json.Marshal(v) - return string(a) - }, - "escape": func(v interface{}) string { - // escape tabs - str := strings.Replace(v.(string), "\t", "\\t", -1) - // replace " with \", and if that results in \\", replace that with \\\" - str = strings.Replace(str, "\"", "\\\"", -1) - return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1) - }, - }).Parse(doc) - if err != nil { - return doc - } - - var tpl bytes.Buffer - if err := t.Execute(&tpl, sInfo); err != nil { - return doc - } - - return tpl.String() +var SwaggerInfo = &swag.Spec{ + Version: "1.0", + Host: "localhost", + BasePath: "/api/v1", + Schemes: []string{}, + Title: "1Panel", + Description: "开源Linux面板", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, } func init() { - swag.Register("swagger", &s{}) + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) } diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index 7407089e4..f5e58cb7b 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -62,12 +62,60 @@ "summary": "Get app list update", "responses": { "200": { - "description": "" + "description": "OK" } } } }, - "/apps/detail/:appId/:version": { + "/apps/detail/:appId/:version/:type": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "通过 appid 获取应用详情", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Search app detail by appid", + "parameters": [ + { + "type": "integer", + "description": "app id", + "name": "appId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app 版本", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app 类型", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppDetailDTO" + } + } + } + } + }, + "/apps/details/:id": { "get": { "security": [ { @@ -81,21 +129,14 @@ "tags": [ "App" ], - "summary": "Search app detail by id", + "summary": "Get app detail by id", "parameters": [ { "type": "integer", - "description": "app id", + "description": "id", "name": "appId", "in": "path", "required": true - }, - { - "type": "string", - "description": "app 版本", - "name": "version", - "in": "path", - "required": true } ], "responses": { @@ -401,7 +442,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -503,7 +544,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -545,7 +586,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -589,7 +630,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -608,7 +649,7 @@ "summary": "Sync app installed", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -648,7 +689,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -701,7 +742,7 @@ "summary": "Sync app list", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -739,7 +780,7 @@ "summary": "Check System isDemo", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -767,7 +808,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -817,7 +858,7 @@ "summary": "User logout", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -862,7 +903,7 @@ "summary": "Check is First login", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -895,7 +936,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -938,7 +979,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -980,7 +1021,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1059,7 +1100,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1101,7 +1142,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1193,7 +1234,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1233,7 +1274,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1273,7 +1314,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1410,7 +1451,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1563,7 +1604,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1605,7 +1646,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1688,7 +1729,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1776,7 +1817,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1818,7 +1859,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1899,7 +1940,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1969,7 +2010,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2014,7 +2055,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2107,7 +2148,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2143,7 +2184,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2323,7 +2364,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2365,7 +2406,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2455,7 +2496,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2506,7 +2547,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2548,7 +2589,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2666,7 +2707,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2709,7 +2750,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2760,7 +2801,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2811,7 +2852,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2934,7 +2975,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2986,7 +3027,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3119,7 +3160,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3183,7 +3224,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3234,7 +3275,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3285,7 +3326,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3325,7 +3366,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3412,7 +3453,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3558,7 +3599,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3598,7 +3639,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3638,7 +3679,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3700,7 +3741,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3864,7 +3905,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3904,7 +3945,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3946,7 +3987,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3988,7 +4029,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4025,7 +4066,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -4058,7 +4099,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4145,7 +4186,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4187,7 +4228,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4229,7 +4270,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4271,7 +4312,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4358,7 +4399,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4401,7 +4442,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4444,7 +4485,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4487,7 +4528,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4565,7 +4606,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4638,7 +4679,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4716,7 +4757,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4760,7 +4801,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4857,7 +4898,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4900,7 +4941,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4987,7 +5028,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5029,7 +5070,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5325,7 +5366,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5368,7 +5409,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5463,7 +5504,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5576,7 +5617,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5645,7 +5686,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5836,7 +5877,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5934,7 +5975,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5957,6 +5998,196 @@ } } }, + "/runtimes": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Create runtime", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Create runtime [name]", + "formatZH": "创建运行环境 [name]", + "paramKeys": [] + } + } + }, + "/runtimes/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Get runtime", + "parameters": [ + { + "type": "string", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/runtimes/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Delete runtime", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeDelete" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "id" + ], + "formatEN": "Delete website [name]", + "formatZH": "删除网站 [name]", + "paramKeys": [] + } + } + }, + "/runtimes/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取运行环境列表", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "List runtimes", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeSearch" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/runtimes/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新运行环境", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Update runtime", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RuntimeUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "Update runtime [name]", + "formatZH": "更新运行环境 [name]", + "paramKeys": [] + } + } + }, "/settings/backup": { "post": { "security": [ @@ -5985,7 +6216,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6027,7 +6258,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6071,7 +6302,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6122,7 +6353,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6173,7 +6404,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6216,7 +6447,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6249,7 +6480,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6294,7 +6525,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6431,7 +6662,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6495,7 +6726,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6557,7 +6788,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6583,7 +6814,7 @@ "summary": "Clean monitor datas", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6623,7 +6854,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6663,7 +6894,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6713,7 +6944,7 @@ "summary": "Load system available status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6746,7 +6977,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6789,7 +7020,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6840,7 +7071,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6892,7 +7123,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6935,7 +7166,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6986,7 +7217,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7102,7 +7333,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7145,7 +7376,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } }, @@ -7176,7 +7407,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7218,7 +7449,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7266,6 +7497,40 @@ } } }, + "/websites/:id/config/:type": { + "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/:id/https": { "get": { "security": [ @@ -7352,40 +7617,6 @@ } } }, - "/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": [ @@ -7459,7 +7690,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7618,7 +7849,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7669,7 +7900,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7721,7 +7952,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7772,7 +8003,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7814,7 +8045,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7901,7 +8132,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8022,7 +8253,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8150,7 +8381,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8201,7 +8432,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8247,6 +8478,91 @@ } } }, + "/websites/php/config/:id": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取网站 php 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Load websit php conf", + "parameters": [ + { + "type": "integer", + "description": "request", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.PHPConfig" + } + } + } + } + }, + "/websites/php/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新 网站 PHP 配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website PHP" + ], + "summary": "Update website php conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsitePHPConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "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] PHP conf update", + "formatZH": "[domain] PHP 配置修改", + "paramKeys": [] + } + } + }, "/websites/search": { "post": { "security": [ @@ -8354,7 +8670,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8387,7 +8703,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8438,7 +8754,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8525,7 +8841,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8558,7 +8874,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8607,7 +8923,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8640,7 +8956,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8718,7 +9034,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10376,6 +10692,21 @@ } } }, + "dto.NginxKey": { + "type": "string", + "enum": [ + "index", + "limit-conn", + "ssl", + "http-per" + ], + "x-enum-varnames": [ + "Index", + "LimitConn", + "SSL", + "HttpPer" + ] + }, "dto.OperateByID": { "type": "object", "required": [ @@ -11284,6 +11615,9 @@ "remark": { "type": "string" }, + "runtimeID": { + "type": "integer" + }, "status": { "type": "string" }, @@ -11845,7 +12179,7 @@ }, "params": {}, "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -11859,7 +12193,7 @@ ], "properties": { "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -11880,6 +12214,86 @@ } } }, + "request.RuntimeCreate": { + "type": "object", + "properties": { + "appDetailId": { + "type": "integer" + }, + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + }, + "resource": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "request.RuntimeDelete": { + "type": "object", + "properties": { + "id": { + "type": "integer" + } + } + }, + "request.RuntimeSearch": { + "type": "object", + "required": [ + "page", + "pageSize" + ], + "properties": { + "name": { + "type": "string" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "request.RuntimeUpdate": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": true + }, + "version": { + "type": "string" + } + } + }, "request.SearchUploadWithPage": { "type": "object", "required": [ @@ -11941,15 +12355,24 @@ "otherDomains": { "type": "string" }, + "port": { + "type": "integer" + }, "primaryDomain": { "type": "string" }, "proxy": { "type": "string" }, + "proxyType": { + "type": "string" + }, "remark": { "type": "string" }, + "runtimeID": { + "type": "integer" + }, "type": { "type": "string" }, @@ -12196,6 +12619,24 @@ } } }, + "request.WebsitePHPConfigUpdate": { + "type": "object", + "required": [ + "id", + "params" + ], + "properties": { + "id": { + "type": "integer" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "request.WebsiteResourceReq": { "type": "object", "required": [ @@ -12444,6 +12885,9 @@ "id": { "type": "integer" }, + "image": { + "type": "string" + }, "lastVersion": { "type": "string" }, @@ -12512,6 +12956,12 @@ "labelZh": { "type": "string" }, + "multiple": { + "type": "boolean" + }, + "required": { + "type": "boolean" + }, "rule": { "type": "string" }, @@ -12627,6 +13077,17 @@ } } }, + "response.PHPConfig": { + "type": "object", + "properties": { + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "response.WebsiteAcmeAccountDTO": { "type": "object", "properties": { @@ -12704,6 +13165,9 @@ "remark": { "type": "string" }, + "runtimeID": { + "type": "integer" + }, "sitePath": { "type": "string" }, diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 3a5f3b98d..a0e8a2b49 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -1094,6 +1094,18 @@ definitions: subnet: type: string type: object + dto.NginxKey: + enum: + - index + - limit-conn + - ssl + - http-per + type: string + x-enum-varnames: + - Index + - LimitConn + - SSL + - HttpPer dto.OperateByID: properties: id: @@ -1695,6 +1707,8 @@ definitions: type: string remark: type: string + runtimeID: + type: integer status: type: string type: @@ -2068,7 +2082,7 @@ definitions: type: string params: {} scope: - type: string + $ref: '#/definitions/dto.NginxKey' websiteId: type: integer required: @@ -2077,7 +2091,7 @@ definitions: request.NginxScopeReq: properties: scope: - type: string + $ref: '#/definitions/dto.NginxKey' websiteId: type: integer required: @@ -2092,6 +2106,59 @@ definitions: port: type: integer type: object + request.RuntimeCreate: + properties: + appDetailId: + type: integer + image: + type: string + name: + type: string + params: + additionalProperties: true + type: object + resource: + type: string + type: + type: string + version: + type: string + type: object + request.RuntimeDelete: + properties: + id: + type: integer + type: object + request.RuntimeSearch: + properties: + name: + type: string + page: + type: integer + pageSize: + type: integer + status: + type: string + type: + type: string + required: + - page + - pageSize + type: object + request.RuntimeUpdate: + properties: + id: + type: integer + image: + type: string + name: + type: string + params: + additionalProperties: true + type: object + version: + type: string + type: object request.SearchUploadWithPage: properties: page: @@ -2129,12 +2196,18 @@ definitions: type: string otherDomains: type: string + port: + type: integer primaryDomain: type: string proxy: type: string + proxyType: + type: string remark: type: string + runtimeID: + type: integer type: type: string webSiteGroupID: @@ -2305,6 +2378,18 @@ definitions: required: - id type: object + request.WebsitePHPConfigUpdate: + properties: + id: + type: integer + params: + additionalProperties: + type: string + type: object + required: + - id + - params + type: object request.WebsiteResourceReq: properties: id: @@ -2471,6 +2556,8 @@ definitions: type: boolean id: type: integer + image: + type: string lastVersion: type: string params: {} @@ -2516,6 +2603,10 @@ definitions: type: string labelZh: type: string + multiple: + type: boolean + required: + type: boolean rule: type: string showValue: @@ -2592,6 +2683,13 @@ definitions: writing: type: string type: object + response.PHPConfig: + properties: + params: + additionalProperties: + type: string + type: object + type: object response.WebsiteAcmeAccountDTO: properties: createdAt: @@ -2643,6 +2741,8 @@ definitions: type: string remark: type: string + runtimeID: + type: integer sitePath: type: string status: @@ -2735,17 +2835,17 @@ paths: description: 获取应用更新版本 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get app list update tags: - App - /apps/detail/:appId/:version: + /apps/detail/:appId/:version/:type: get: consumes: - application/json - description: 通过 id 获取应用详情 + description: 通过 appid 获取应用详情 parameters: - description: app id in: path @@ -2757,6 +2857,11 @@ paths: name: version required: true type: string + - description: app 类型 + in: path + name: version + required: true + type: string responses: "200": description: OK @@ -2764,7 +2869,28 @@ paths: $ref: '#/definitions/response.AppDetailDTO' security: - ApiKeyAuth: [] - summary: Search app detail by id + summary: Search app detail by appid + tags: + - App + /apps/details/:id: + get: + consumes: + - application/json + description: 通过 id 获取应用详情 + parameters: + - description: id + in: path + name: appId + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.AppDetailDTO' + security: + - ApiKeyAuth: [] + summary: Get app detail by id tags: - App /apps/install: @@ -2947,7 +3073,7 @@ paths: $ref: '#/definitions/request.AppInstalledOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate installed app @@ -3014,7 +3140,7 @@ paths: $ref: '#/definitions/request.AppInstalledUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change app params @@ -3041,7 +3167,7 @@ paths: $ref: '#/definitions/request.PortUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change app port @@ -3070,7 +3196,7 @@ paths: $ref: '#/definitions/request.AppInstalledSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List app installed @@ -3081,7 +3207,7 @@ paths: description: 同步已安装应用列表 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Sync app installed @@ -3107,7 +3233,7 @@ paths: $ref: '#/definitions/request.AppSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List apps @@ -3139,7 +3265,7 @@ paths: description: 同步应用列表 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Sync app list @@ -3167,7 +3293,7 @@ paths: description: 判断是否为demo环境 responses: "200": - description: "" + description: OK summary: Check System isDemo tags: - Auth @@ -3185,7 +3311,7 @@ paths: $ref: '#/definitions/dto.InitUser' responses: "200": - description: "" + description: OK summary: Init user tags: - Auth @@ -3214,7 +3340,7 @@ paths: description: 用户登出 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: User logout @@ -3245,7 +3371,7 @@ paths: description: 判断是否为首次登录 responses: "200": - description: "" + description: OK summary: Check is First login tags: - Auth @@ -3263,7 +3389,7 @@ paths: $ref: '#/definitions/dto.ContainerCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create container @@ -3291,7 +3417,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create compose @@ -3318,7 +3444,7 @@ paths: $ref: '#/definitions/dto.ComposeOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate compose @@ -3368,7 +3494,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Test compose @@ -3395,7 +3521,7 @@ paths: $ref: '#/definitions/dto.ComposeUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update compose @@ -3452,7 +3578,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonConf' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update docker daemon.json @@ -3478,7 +3604,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update docker daemon.json by upload file @@ -3504,7 +3630,7 @@ paths: $ref: '#/definitions/dto.DockerOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate docker @@ -3590,7 +3716,7 @@ paths: $ref: '#/definitions/dto.ImageLoad' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load image @@ -3690,7 +3816,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete image @@ -3717,7 +3843,7 @@ paths: $ref: '#/definitions/dto.ImageSave' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Save image @@ -3770,7 +3896,7 @@ paths: $ref: '#/definitions/dto.ImageTag' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Tag image @@ -3826,7 +3952,7 @@ paths: $ref: '#/definitions/dto.NetworkCreat' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create network @@ -3853,7 +3979,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete network @@ -3904,7 +4030,7 @@ paths: $ref: '#/definitions/dto.ContainerOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate Container @@ -3949,7 +4075,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create image repo @@ -3978,7 +4104,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete image repo @@ -4037,7 +4163,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load repo status @@ -4059,7 +4185,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update image repo @@ -4171,7 +4297,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create compose template @@ -4198,7 +4324,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete compose template @@ -4255,7 +4381,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update compose template @@ -4288,7 +4414,7 @@ paths: $ref: '#/definitions/dto.VolumeCreat' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create volume @@ -4315,7 +4441,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete volume @@ -4389,7 +4515,7 @@ paths: $ref: '#/definitions/dto.CronjobCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create cronjob @@ -4417,7 +4543,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete cronjob @@ -4450,7 +4576,7 @@ paths: $ref: '#/definitions/dto.CronjobDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download cronjob records @@ -4483,7 +4609,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Handle cronjob once @@ -4560,7 +4686,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdateStatus' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update cronjob status @@ -4594,7 +4720,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update cronjob @@ -4679,7 +4805,7 @@ paths: $ref: '#/definitions/dto.MysqlDBCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create mysql database @@ -4719,7 +4845,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change mysql access @@ -4752,7 +4878,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change mysql password @@ -4785,7 +4911,7 @@ paths: $ref: '#/definitions/dto.MysqlConfUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql conf by upload file @@ -4811,7 +4937,7 @@ paths: $ref: '#/definitions/dto.MysqlDBDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete mysql database @@ -4866,7 +4992,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql database description @@ -4957,7 +5083,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis conf @@ -4983,7 +5109,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis conf by file @@ -5009,7 +5135,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change redis password @@ -5048,7 +5174,7 @@ paths: $ref: '#/definitions/dto.RedisConfPersistenceUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis persistence conf @@ -5148,7 +5274,7 @@ paths: $ref: '#/definitions/dto.MysqlVariablesUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql variables @@ -5174,7 +5300,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create file @@ -5201,7 +5327,7 @@ paths: $ref: '#/definitions/request.FileBatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Batch delete file @@ -5228,7 +5354,7 @@ paths: $ref: '#/definitions/request.FilePathCheck' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Check file exist @@ -5252,7 +5378,7 @@ paths: type: file responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: ChunkUpload file @@ -5272,7 +5398,7 @@ paths: $ref: '#/definitions/request.FileCompress' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Compress file @@ -5328,7 +5454,7 @@ paths: $ref: '#/definitions/request.FileDeCompress' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Decompress file @@ -5355,7 +5481,7 @@ paths: $ref: '#/definitions/request.FileDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete file @@ -5382,7 +5508,7 @@ paths: $ref: '#/definitions/request.FileDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download file @@ -5409,7 +5535,7 @@ paths: $ref: '#/definitions/dto.FilePath' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download file with path @@ -5465,7 +5591,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file mode @@ -5493,7 +5619,7 @@ paths: $ref: '#/definitions/request.FileMove' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Move file @@ -5521,7 +5647,7 @@ paths: $ref: '#/definitions/request.FileRename' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file name @@ -5549,7 +5675,7 @@ paths: $ref: '#/definitions/request.FileEdit' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update file content @@ -5598,7 +5724,7 @@ paths: $ref: '#/definitions/request.DirSizeReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load file size @@ -5644,7 +5770,7 @@ paths: type: file responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upload file @@ -5693,7 +5819,7 @@ paths: $ref: '#/definitions/request.FileWget' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Wget file @@ -5722,7 +5848,7 @@ paths: $ref: '#/definitions/dto.HostOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create host @@ -5783,7 +5909,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create command @@ -5811,7 +5937,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete command @@ -5866,7 +5992,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update command @@ -5893,7 +6019,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete host @@ -6078,7 +6204,7 @@ paths: $ref: '#/definitions/dto.GroupCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6106,7 +6232,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete group @@ -6167,7 +6293,7 @@ paths: $ref: '#/definitions/dto.GroupUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update group @@ -6238,7 +6364,7 @@ paths: $ref: '#/definitions/dto.HostConnTest' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Test host conn by info @@ -6280,7 +6406,7 @@ paths: $ref: '#/definitions/dto.ChangeHostGroup' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host group @@ -6400,7 +6526,7 @@ paths: $ref: '#/definitions/request.NginxConfigFileUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update OpenResty conf by upload file @@ -6461,7 +6587,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update OpenResty conf @@ -6480,6 +6606,126 @@ paths: formatEN: Update nginx conf [domain] formatZH: 更新 nginx 配置 [domain] paramKeys: [] + /runtimes: + post: + consumes: + - application/json + description: 创建运行环境 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.RuntimeCreate' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Create runtime + tags: + - Runtime + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Create runtime [name] + formatZH: 创建运行环境 [name] + paramKeys: [] + /runtimes/:id: + get: + consumes: + - application/json + description: 获取运行环境 + parameters: + - description: request + in: path + name: id + required: true + type: string + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Get runtime + tags: + - Runtime + /runtimes/del: + post: + consumes: + - application/json + description: 删除运行环境 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.RuntimeDelete' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Delete runtime + tags: + - Website + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - id + formatEN: Delete website [name] + formatZH: 删除网站 [name] + paramKeys: [] + /runtimes/search: + post: + consumes: + - application/json + description: 获取运行环境列表 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.RuntimeSearch' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: List runtimes + tags: + - Runtime + /runtimes/update: + post: + consumes: + - application/json + description: 更新运行环境 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.RuntimeUpdate' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Update runtime + tags: + - Runtime + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + formatEN: Update runtime [name] + formatZH: 更新运行环境 [name] + paramKeys: [] /settings/backup: post: consumes: @@ -6494,7 +6740,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create backup account @@ -6521,7 +6767,7 @@ paths: $ref: '#/definitions/dto.CommonBackup' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Backup system data @@ -6550,7 +6796,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete backup account @@ -6583,7 +6829,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete backup record @@ -6616,7 +6862,7 @@ paths: $ref: '#/definitions/dto.DownloadRecord' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download backup record @@ -6644,7 +6890,7 @@ paths: $ref: '#/definitions/dto.RecordSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Page backup records @@ -6664,7 +6910,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system data @@ -6694,7 +6940,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system data by upload @@ -6780,7 +7026,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update backup account @@ -6820,7 +7066,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Reset system password expired @@ -6859,7 +7105,7 @@ paths: $ref: '#/definitions/dto.MfaCredential' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Bind mfa @@ -6876,7 +7122,7 @@ paths: description: 清空监控数据 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Clean monitor datas @@ -6902,7 +7148,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system password @@ -6928,7 +7174,7 @@ paths: $ref: '#/definitions/dto.PortUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system port @@ -6959,7 +7205,7 @@ paths: description: 获取系统可用状态 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load system available status @@ -6979,7 +7225,7 @@ paths: $ref: '#/definitions/dto.SnapshotCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create system snapshot @@ -7007,7 +7253,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete system backup @@ -7040,7 +7286,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update snapshot description @@ -7074,7 +7320,7 @@ paths: $ref: '#/definitions/dto.SnapshotImport' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Import system snapshot @@ -7102,7 +7348,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system backup @@ -7135,7 +7381,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Rollback system backup @@ -7209,7 +7455,7 @@ paths: $ref: '#/definitions/dto.SettingUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system setting @@ -7237,7 +7483,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load release notes by version @@ -7256,7 +7502,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upgrade @@ -7283,7 +7529,7 @@ paths: $ref: '#/definitions/request.WebsiteCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create website @@ -7317,6 +7563,27 @@ paths: summary: Search website by id tags: - Website + /websites/:id/config/:type: + 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/:id/https: get: consumes: @@ -7372,27 +7639,6 @@ paths: 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: @@ -7436,7 +7682,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website acme account @@ -7535,7 +7781,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update nginx conf @@ -7568,7 +7814,7 @@ paths: $ref: '#/definitions/request.WebsiteDefaultUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change default server @@ -7602,7 +7848,7 @@ paths: $ref: '#/definitions/request.WebsiteDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website @@ -7635,7 +7881,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create website dns account @@ -7662,7 +7908,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website dns account @@ -7717,7 +7963,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website dns account @@ -7794,7 +8040,7 @@ paths: $ref: '#/definitions/request.WebsiteDomainDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website domain @@ -7876,7 +8122,7 @@ paths: $ref: '#/definitions/request.WebsiteNginxUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website nginx conf @@ -7909,7 +8155,7 @@ paths: $ref: '#/definitions/request.WebsiteOp' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate website @@ -7942,6 +8188,60 @@ paths: summary: List website names tags: - Website + /websites/php/config/:id: + get: + consumes: + - application/json + description: 获取网站 php 配置 + parameters: + - description: request + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.PHPConfig' + security: + - ApiKeyAuth: [] + summary: Load websit php conf + tags: + - Website + /websites/php/update: + post: + consumes: + - application/json + description: 更新 网站 PHP 配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsitePHPConfigUpdate' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Update website php conf + tags: + - Website PHP + 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] PHP conf update' + formatZH: '[domain] PHP 配置修改' + paramKeys: [] /websites/search: post: consumes: @@ -8006,7 +8306,7 @@ paths: type: integer responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Search website ssl by id @@ -8026,7 +8326,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website ssl @@ -8059,7 +8359,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLRenew' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Reset website ssl @@ -8114,7 +8414,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Page website ssl @@ -8134,7 +8434,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update ssl @@ -8166,7 +8466,7 @@ paths: type: integer responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Search website ssl by website id @@ -8186,7 +8486,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website @@ -8235,7 +8535,7 @@ paths: $ref: '#/definitions/request.WebsiteWafUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website waf conf diff --git a/frontend/src/api/interface/runtime.ts b/frontend/src/api/interface/runtime.ts index 85f6a7ce7..44e0e22e3 100644 --- a/frontend/src/api/interface/runtime.ts +++ b/frontend/src/api/interface/runtime.ts @@ -16,6 +16,7 @@ export namespace Runtime { export interface RuntimeReq extends ReqPage { name?: string; + status?: string; } export interface RuntimeDTO extends Runtime { diff --git a/frontend/src/api/interface/website.ts b/frontend/src/api/interface/website.ts index ae616c975..be734914c 100644 --- a/frontend/src/api/interface/website.ts +++ b/frontend/src/api/interface/website.ts @@ -261,4 +261,13 @@ export namespace Website { export interface DefaultServerUpdate { id: number; } + + export interface PHPConfig { + params: any; + } + + export interface PHPConfigUpdate { + id: number; + params: any; + } } diff --git a/frontend/src/api/modules/website.ts b/frontend/src/api/modules/website.ts index 3774165af..1ef906d43 100644 --- a/frontend/src/api/modules/website.ts +++ b/frontend/src/api/modules/website.ts @@ -158,3 +158,11 @@ export const UpdateNginxFile = (req: Website.NginxUpdate) => { export const ChangeDefaultServer = (req: Website.DefaultServerUpdate) => { return http.post(`/websites/default/server`, req); }; + +export const GetPHPConfig = (id: number) => { + return http.get(`/websites/php/config/${id}`); +}; + +export const UpdatePHPConfig = (req: Website.PHPConfigUpdate) => { + return http.post(`/websites/php/config/`, req); +}; diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 2bf0e457b..be9c7766a 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1141,6 +1141,25 @@ const message = { tcp: 'TCP/IP 网络', phpFPM: 'FPM 配置文件', phpConfig: 'PHP 配置文件', + updateConfig: '配置修改', + isOn: '开启', + isOff: '关闭', + }, + php: { + short_open_tag: '短标签支持', + max_execution_time: '最大脚本运行时间', + max_input_time: '最大输入时间', + memory_limit: ' 脚本内存限制', + post_max_size: 'POST数据最大尺寸', + file_uploads: '是否允许上传文件', + upload_max_filesize: '允许上传文件的最大尺寸', + max_file_uploads: '允许同时上传文件的最大数量', + default_socket_timeout: 'Socket超时时间', + error_reporting: '错误级别', + display_errors: '是否输出详细错误信息', + cgi_fix_pathinfo: '是否开启pathinfo', + date_timezone: '时区', + second: '秒', }, nginx: { serverNamesHashBucketSizeHelper: '服务器名字的hash表大小', diff --git a/frontend/src/views/website/website/config/index.vue b/frontend/src/views/website/website/config/index.vue index 729b0fe99..1a89c7334 100644 --- a/frontend/src/views/website/website/config/index.vue +++ b/frontend/src/views/website/website/config/index.vue @@ -30,12 +30,16 @@ {{ $t('website.source') }} + + PHP + @@ -48,9 +52,11 @@ import Basic from './basic/index.vue'; import Safety from './safety/index.vue'; import Resource from './resource/index.vue'; import Log from './log/index.vue'; +import PHP from './php/index.vue'; import router from '@/routers'; import WebsiteStatus from '@/views/website/website/status/index.vue'; import { GetWebsite } from '@/api/modules/website'; +import { GetRuntime } from '@/api/modules/runtime'; const props = defineProps({ id: { @@ -67,6 +73,7 @@ let id = ref(0); let index = ref('basic'); let website = ref({}); let loading = ref(false); +const configPHP = ref(false); watch(index, (curr, old) => { if (curr != old) { @@ -83,8 +90,14 @@ onMounted(() => { id.value = Number(props.id); loading.value = true; GetWebsite(id.value) - .then((res) => { + .then(async (res) => { website.value = res.data; + if (res.data.type === 'runtime') { + const runRes = await GetRuntime(res.data.runtimeID); + if (runRes.data.resource === 'appstore') { + configPHP.value = true; + } + } }) .finally(() => { loading.value = false; diff --git a/frontend/src/views/website/website/config/php/config/index.vue b/frontend/src/views/website/website/config/php/config/index.vue new file mode 100644 index 000000000..e78e45063 --- /dev/null +++ b/frontend/src/views/website/website/config/php/config/index.vue @@ -0,0 +1,199 @@ + + + diff --git a/frontend/src/views/website/website/config/php/index.vue b/frontend/src/views/website/website/config/php/index.vue new file mode 100644 index 000000000..3b66e1afc --- /dev/null +++ b/frontend/src/views/website/website/config/php/index.vue @@ -0,0 +1,44 @@ + + + diff --git a/frontend/src/views/website/website/create/index.vue b/frontend/src/views/website/website/create/index.vue index cde2eba5e..bf2d0d1e3 100644 --- a/frontend/src/views/website/website/create/index.vue +++ b/frontend/src/views/website/website/create/index.vue @@ -152,10 +152,14 @@
- + @@ -303,7 +307,8 @@ let staticPath = ref(''); let runtimeResource = ref('appstore'); const runtimeReq = ref({ page: 1, - pageSize: 20, + pageSize: 100, + status: 'normal', }); const runtimes = ref([]); @@ -400,7 +405,9 @@ const getRuntimes = async () => { const first = runtimes.value[0]; website.value.runtimeID = first.id; runtimeResource.value = first.resource; - getAppDetailByID(first.appDetailId); + if (first.type === 'appstore') { + getAppDetailByID(first.appDetailId); + } } } catch (error) {} }; diff --git a/go.mod b/go.mod index 592faf0a0..dd9541599 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/compose-spec/compose-go v1.13.2 github.com/creack/pty v1.1.18 github.com/dgraph-io/badger/v3 v3.2103.5 + github.com/docker/cli v23.0.1+incompatible github.com/docker/compose/v2 v2.17.2 github.com/docker/docker v23.0.1+incompatible github.com/docker/go-connections v0.4.0 @@ -41,6 +42,7 @@ require ( github.com/spf13/afero v1.9.2 github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.14.0 + github.com/subosito/gotenv v1.4.1 github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a github.com/swaggo/gin-swagger v1.5.3 github.com/swaggo/swag v1.8.4 @@ -91,7 +93,6 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1 // indirect github.com/docker/buildx v0.10.4 // indirect - github.com/docker/cli v23.0.1+incompatible // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect @@ -200,7 +201,6 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.2 // indirect - github.com/subosito/gotenv v1.4.1 // indirect github.com/therootcompany/xz v1.0.1 // indirect github.com/theupdateframework/notary v0.7.0 // indirect github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect diff --git a/go.sum b/go.sum index 86136f4af..915589ca5 100644 --- a/go.sum +++ b/go.sum @@ -678,8 +678,8 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/opencontainers/runc v1.1.4 h1:nRCz/8sKg6K6jgYAFLDlXzPeITBZJyX28DBVhWD+5dg= -github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= +github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=