diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 268784adc..b5deae4ed 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,7 +69,7 @@ var doc = `{ "summary": "Get app list update", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -456,7 +449,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -558,7 +551,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -600,7 +593,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -644,7 +637,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -663,7 +656,7 @@ var doc = `{ "summary": "Sync app installed", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -703,7 +696,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -756,7 +749,7 @@ var doc = `{ "summary": "Sync app list", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -794,7 +787,7 @@ var doc = `{ "summary": "Check System isDemo", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -822,7 +815,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -836,7 +829,7 @@ var doc = `{ "summary": "Check is First login", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -850,7 +843,7 @@ var doc = `{ "summary": "Load safety status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -900,7 +893,7 @@ var doc = `{ "summary": "User logout", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -964,7 +957,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1007,7 +1000,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1049,7 +1042,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1128,7 +1121,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1170,7 +1163,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1262,7 +1255,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1302,7 +1295,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1342,7 +1335,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1479,7 +1472,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1632,7 +1625,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1674,7 +1667,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1757,7 +1750,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1845,7 +1838,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1887,7 +1880,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1968,7 +1961,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2038,7 +2031,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2083,7 +2076,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2176,7 +2169,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2212,7 +2205,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2392,7 +2385,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2434,7 +2427,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2524,7 +2517,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2575,7 +2568,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2617,7 +2610,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2735,7 +2728,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2778,7 +2771,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2829,7 +2822,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2880,7 +2873,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2931,7 +2924,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3054,7 +3047,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3106,7 +3099,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3239,7 +3232,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3303,7 +3296,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3354,7 +3347,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3405,7 +3398,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3445,7 +3438,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3532,7 +3525,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3678,7 +3671,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3718,7 +3711,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3758,7 +3751,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3820,7 +3813,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3984,7 +3977,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4024,7 +4017,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4066,7 +4059,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4108,7 +4101,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4145,7 +4138,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -4178,7 +4171,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4265,7 +4258,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4307,7 +4300,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4349,7 +4342,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4391,7 +4384,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4478,7 +4471,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4521,7 +4514,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4564,7 +4557,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4607,7 +4600,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4685,7 +4678,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4758,7 +4751,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4836,7 +4829,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4880,7 +4873,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4923,7 +4916,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5018,7 +5011,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5061,7 +5054,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5158,7 +5151,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5201,7 +5194,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5288,7 +5281,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5330,7 +5323,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5403,7 +5396,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5481,7 +5474,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5560,7 +5553,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5593,7 +5586,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5696,7 +5689,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5765,7 +5758,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5808,7 +5801,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5999,7 +5992,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6097,7 +6090,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6148,7 +6141,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6188,7 +6181,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6221,7 +6214,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6263,7 +6256,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6296,7 +6289,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6338,7 +6331,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6380,7 +6373,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6424,7 +6417,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6475,7 +6468,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6526,7 +6519,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6569,7 +6562,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6602,7 +6595,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6647,7 +6640,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6784,7 +6777,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6848,7 +6841,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6888,7 +6881,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6950,7 +6943,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6976,7 +6969,7 @@ var doc = `{ "summary": "Clean monitor datas", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7016,7 +7009,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7056,7 +7049,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7106,7 +7099,7 @@ var doc = `{ "summary": "Load system available status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -7139,7 +7132,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7182,7 +7175,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7233,7 +7226,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7285,7 +7278,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7328,7 +7321,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7379,7 +7372,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7495,7 +7488,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7538,7 +7531,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } }, @@ -7569,7 +7562,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7611,7 +7604,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7852,7 +7845,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8011,7 +8004,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8062,7 +8055,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8114,7 +8107,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8165,7 +8158,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8216,7 +8209,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8267,7 +8260,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8309,7 +8302,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8396,7 +8389,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8517,7 +8510,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8645,7 +8638,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8696,7 +8689,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8770,7 +8763,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8855,7 +8848,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8878,6 +8871,141 @@ var doc = `{ } } }, + "/websites/proxies": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取反向代理配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Get proxy conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteProxyReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/websites/proxies/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改反向代理配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update proxy conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteProxyConfig" + } + } + ], + "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": "Update domain [domain] proxy config", + "formatZH": "修改网站 [domain] 反向代理配置 ", + "paramKeys": [] + } + } + }, + "/websites/proxy/file": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新反向代理文件", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update proxy file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxProxyUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteID", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteID" + ], + "formatEN": "Nginx conf proxy file update [domain]", + "formatZH": "更新反向代理文件 [domain]", + "paramKeys": [] + } + } + }, "/websites/rewrite": { "post": { "security": [ @@ -8906,7 +9034,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8939,7 +9067,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9069,7 +9197,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9102,7 +9230,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9153,7 +9281,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9240,7 +9368,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9273,7 +9401,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9322,7 +9450,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9355,7 +9483,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9433,7 +9561,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -11152,6 +11280,25 @@ var doc = `{ } } }, + "dto.NginxKey": { + "type": "string", + "enum": [ + "index", + "limit-conn", + "ssl", + "cache", + "http-per", + "proxy-cache" + ], + "x-enum-varnames": [ + "Index", + "LimitConn", + "SSL", + "CACHE", + "HttpPer", + "ProxyCache" + ] + }, "dto.OperateByID": { "type": "object", "required": [ @@ -12647,13 +12794,32 @@ var doc = `{ }, "params": {}, "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" } } }, + "request.NginxProxyUpdate": { + "type": "object", + "required": [ + "content", + "name", + "websiteID" + ], + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + } + }, "request.NginxRewriteReq": { "type": "object", "required": [ @@ -12695,7 +12861,7 @@ var doc = `{ ], "properties": { "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -13158,6 +13324,80 @@ var doc = `{ } } }, + "request.WebsiteProxyConfig": { + "type": "object", + "required": [ + "cache", + "cacheTime", + "cacheUnit", + "enable", + "id", + "match", + "modifier", + "name", + "operate", + "proxyHost", + "proxyPass" + ], + "properties": { + "cache": { + "type": "boolean" + }, + "cacheTime": { + "type": "integer" + }, + "cacheUnit": { + "type": "string" + }, + "content": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "filePath": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "match": { + "type": "string" + }, + "modifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "operate": { + "type": "string" + }, + "proxyHost": { + "type": "string" + }, + "proxyPass": { + "type": "string" + }, + "replaces": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "request.WebsiteProxyReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, "request.WebsiteResourceReq": { "type": "object", "required": [ @@ -13832,56 +14072,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 23238aa39..a2128a077 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -62,7 +62,7 @@ "summary": "Get app list update", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -442,7 +442,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -544,7 +544,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -586,7 +586,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -630,7 +630,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -649,7 +649,7 @@ "summary": "Sync app installed", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -689,7 +689,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -742,7 +742,7 @@ "summary": "Sync app list", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -780,7 +780,7 @@ "summary": "Check System isDemo", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -808,7 +808,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -822,7 +822,7 @@ "summary": "Check is First login", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -836,7 +836,7 @@ "summary": "Load safety status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -886,7 +886,7 @@ "summary": "User logout", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -950,7 +950,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -993,7 +993,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1035,7 +1035,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1114,7 +1114,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1156,7 +1156,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1248,7 +1248,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1288,7 +1288,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1328,7 +1328,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1465,7 +1465,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1618,7 +1618,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1660,7 +1660,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1743,7 +1743,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1831,7 +1831,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1873,7 +1873,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1954,7 +1954,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2024,7 +2024,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2069,7 +2069,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2162,7 +2162,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2198,7 +2198,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2378,7 +2378,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2420,7 +2420,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2510,7 +2510,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2561,7 +2561,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2603,7 +2603,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2721,7 +2721,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2764,7 +2764,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2815,7 +2815,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2866,7 +2866,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2917,7 +2917,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3040,7 +3040,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3092,7 +3092,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3225,7 +3225,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3289,7 +3289,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3340,7 +3340,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3391,7 +3391,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3431,7 +3431,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3518,7 +3518,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3664,7 +3664,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3704,7 +3704,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3744,7 +3744,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3806,7 +3806,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3970,7 +3970,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4010,7 +4010,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4052,7 +4052,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4094,7 +4094,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4131,7 +4131,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -4164,7 +4164,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4251,7 +4251,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4293,7 +4293,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4335,7 +4335,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4377,7 +4377,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4464,7 +4464,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4507,7 +4507,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4550,7 +4550,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4593,7 +4593,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4671,7 +4671,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4744,7 +4744,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4822,7 +4822,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4866,7 +4866,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4909,7 +4909,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5004,7 +5004,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5047,7 +5047,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5144,7 +5144,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5187,7 +5187,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5274,7 +5274,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5316,7 +5316,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5389,7 +5389,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5467,7 +5467,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5546,7 +5546,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5579,7 +5579,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5682,7 +5682,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5751,7 +5751,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5794,7 +5794,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5985,7 +5985,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6083,7 +6083,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6134,7 +6134,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6174,7 +6174,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6207,7 +6207,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6249,7 +6249,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6282,7 +6282,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6324,7 +6324,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6366,7 +6366,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6410,7 +6410,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6461,7 +6461,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6512,7 +6512,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6555,7 +6555,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6588,7 +6588,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6633,7 +6633,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6770,7 +6770,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6834,7 +6834,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6874,7 +6874,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6936,7 +6936,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6962,7 +6962,7 @@ "summary": "Clean monitor datas", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7002,7 +7002,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7042,7 +7042,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7092,7 +7092,7 @@ "summary": "Load system available status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -7125,7 +7125,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7168,7 +7168,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7219,7 +7219,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7271,7 +7271,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7314,7 +7314,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7365,7 +7365,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7481,7 +7481,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7524,7 +7524,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } }, @@ -7555,7 +7555,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7597,7 +7597,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7838,7 +7838,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7997,7 +7997,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8048,7 +8048,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8100,7 +8100,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8151,7 +8151,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8202,7 +8202,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8253,7 +8253,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8295,7 +8295,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8382,7 +8382,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8503,7 +8503,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8631,7 +8631,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8682,7 +8682,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8756,7 +8756,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8841,7 +8841,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8864,6 +8864,141 @@ } } }, + "/websites/proxies": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取反向代理配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Get proxy conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteProxyReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/websites/proxies/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "修改反向代理配置", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update proxy conf", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteProxyConfig" + } + } + ], + "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": "Update domain [domain] proxy config", + "formatZH": "修改网站 [domain] 反向代理配置 ", + "paramKeys": [] + } + } + }, + "/websites/proxy/file": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新反向代理文件", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update proxy file", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxProxyUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "websiteID", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteID" + ], + "formatEN": "Nginx conf proxy file update [domain]", + "formatZH": "更新反向代理文件 [domain]", + "paramKeys": [] + } + } + }, "/websites/rewrite": { "post": { "security": [ @@ -8892,7 +9027,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8925,7 +9060,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9055,7 +9190,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9088,7 +9223,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9139,7 +9274,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9226,7 +9361,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9259,7 +9394,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9308,7 +9443,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9341,7 +9476,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9419,7 +9554,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -11138,6 +11273,25 @@ } } }, + "dto.NginxKey": { + "type": "string", + "enum": [ + "index", + "limit-conn", + "ssl", + "cache", + "http-per", + "proxy-cache" + ], + "x-enum-varnames": [ + "Index", + "LimitConn", + "SSL", + "CACHE", + "HttpPer", + "ProxyCache" + ] + }, "dto.OperateByID": { "type": "object", "required": [ @@ -12633,13 +12787,32 @@ }, "params": {}, "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" } } }, + "request.NginxProxyUpdate": { + "type": "object", + "required": [ + "content", + "name", + "websiteID" + ], + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + } + }, "request.NginxRewriteReq": { "type": "object", "required": [ @@ -12681,7 +12854,7 @@ ], "properties": { "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -13144,6 +13317,80 @@ } } }, + "request.WebsiteProxyConfig": { + "type": "object", + "required": [ + "cache", + "cacheTime", + "cacheUnit", + "enable", + "id", + "match", + "modifier", + "name", + "operate", + "proxyHost", + "proxyPass" + ], + "properties": { + "cache": { + "type": "boolean" + }, + "cacheTime": { + "type": "integer" + }, + "cacheUnit": { + "type": "string" + }, + "content": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "filePath": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "match": { + "type": "string" + }, + "modifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "operate": { + "type": "string" + }, + "proxyHost": { + "type": "string" + }, + "proxyPass": { + "type": "string" + }, + "replaces": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "request.WebsiteProxyReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + } + } + }, "request.WebsiteResourceReq": { "type": "object", "required": [ diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 5ec58923b..1105a11dc 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -1135,6 +1135,22 @@ definitions: subnet: type: string type: object + dto.NginxKey: + enum: + - index + - limit-conn + - ssl + - cache + - http-per + - proxy-cache + type: string + x-enum-varnames: + - Index + - LimitConn + - SSL + - CACHE + - HttpPer + - ProxyCache dto.OperateByID: properties: id: @@ -2127,12 +2143,25 @@ definitions: type: string params: {} scope: - type: string + $ref: '#/definitions/dto.NginxKey' websiteId: type: integer required: - websiteId type: object + request.NginxProxyUpdate: + properties: + content: + type: string + name: + type: string + websiteID: + type: integer + required: + - content + - name + - websiteID + type: object request.NginxRewriteReq: properties: name: @@ -2159,7 +2188,7 @@ definitions: request.NginxScopeReq: properties: scope: - type: string + $ref: '#/definitions/dto.NginxKey' websiteId: type: integer required: @@ -2471,6 +2500,58 @@ definitions: - id - type type: object + request.WebsiteProxyConfig: + properties: + cache: + type: boolean + cacheTime: + type: integer + cacheUnit: + type: string + content: + type: string + enable: + type: boolean + filePath: + type: string + id: + type: integer + match: + type: string + modifier: + type: string + name: + type: string + operate: + type: string + proxyHost: + type: string + proxyPass: + type: string + replaces: + additionalProperties: + type: string + type: object + required: + - cache + - cacheTime + - cacheUnit + - enable + - id + - match + - modifier + - name + - operate + - proxyHost + - proxyPass + type: object + request.WebsiteProxyReq: + properties: + id: + type: integer + required: + - id + type: object request.WebsiteResourceReq: properties: id: @@ -2953,7 +3034,7 @@ paths: description: 获取应用更新版本 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get app list update @@ -3191,7 +3272,7 @@ paths: $ref: '#/definitions/request.AppInstalledOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate installed app @@ -3258,7 +3339,7 @@ paths: $ref: '#/definitions/request.AppInstalledUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change app params @@ -3285,7 +3366,7 @@ paths: $ref: '#/definitions/request.PortUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change app port @@ -3314,7 +3395,7 @@ paths: $ref: '#/definitions/request.AppInstalledSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List app installed @@ -3325,7 +3406,7 @@ paths: description: 同步已安装应用列表 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Sync app installed @@ -3351,7 +3432,7 @@ paths: $ref: '#/definitions/request.AppSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List apps @@ -3383,7 +3464,7 @@ paths: description: 同步应用列表 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Sync app list @@ -3411,7 +3492,7 @@ paths: description: 判断是否为demo环境 responses: "200": - description: "" + description: OK summary: Check System isDemo tags: - Auth @@ -3429,7 +3510,7 @@ paths: $ref: '#/definitions/dto.InitUser' responses: "200": - description: "" + description: OK summary: Init user tags: - Auth @@ -3438,7 +3519,7 @@ paths: description: 判断是否为首次登录 responses: "200": - description: "" + description: OK summary: Check is First login tags: - Auth @@ -3447,7 +3528,7 @@ paths: description: 获取系统安全登录状态 responses: "200": - description: "" + description: OK summary: Load safety status tags: - Auth @@ -3476,7 +3557,7 @@ paths: description: 用户登出 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: User logout @@ -3516,7 +3597,7 @@ paths: $ref: '#/definitions/dto.ContainerCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create container @@ -3544,7 +3625,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create compose @@ -3571,7 +3652,7 @@ paths: $ref: '#/definitions/dto.ComposeOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate compose @@ -3621,7 +3702,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Test compose @@ -3648,7 +3729,7 @@ paths: $ref: '#/definitions/dto.ComposeUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update compose @@ -3705,7 +3786,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonConf' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update docker daemon.json @@ -3731,7 +3812,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update docker daemon.json by upload file @@ -3757,7 +3838,7 @@ paths: $ref: '#/definitions/dto.DockerOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate docker @@ -3843,7 +3924,7 @@ paths: $ref: '#/definitions/dto.ImageLoad' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load image @@ -3943,7 +4024,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete image @@ -3970,7 +4051,7 @@ paths: $ref: '#/definitions/dto.ImageSave' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Save image @@ -4023,7 +4104,7 @@ paths: $ref: '#/definitions/dto.ImageTag' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Tag image @@ -4079,7 +4160,7 @@ paths: $ref: '#/definitions/dto.NetworkCreat' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create network @@ -4106,7 +4187,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete network @@ -4157,7 +4238,7 @@ paths: $ref: '#/definitions/dto.ContainerOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate Container @@ -4202,7 +4283,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create image repo @@ -4231,7 +4312,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete image repo @@ -4290,7 +4371,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load repo status @@ -4312,7 +4393,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update image repo @@ -4424,7 +4505,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create compose template @@ -4451,7 +4532,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete compose template @@ -4508,7 +4589,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update compose template @@ -4541,7 +4622,7 @@ paths: $ref: '#/definitions/dto.VolumeCreat' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create volume @@ -4568,7 +4649,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete volume @@ -4642,7 +4723,7 @@ paths: $ref: '#/definitions/dto.CronjobCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create cronjob @@ -4670,7 +4751,7 @@ paths: $ref: '#/definitions/dto.CronjobBatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete cronjob @@ -4703,7 +4784,7 @@ paths: $ref: '#/definitions/dto.CronjobDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download cronjob records @@ -4736,7 +4817,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Handle cronjob once @@ -4769,7 +4850,7 @@ paths: $ref: '#/definitions/dto.CronjobClean' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Clean job records @@ -4846,7 +4927,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdateStatus' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update cronjob status @@ -4880,7 +4961,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update cronjob @@ -4965,7 +5046,7 @@ paths: $ref: '#/definitions/dto.MysqlDBCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create mysql database @@ -5005,7 +5086,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change mysql access @@ -5038,7 +5119,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change mysql password @@ -5071,7 +5152,7 @@ paths: $ref: '#/definitions/dto.MysqlConfUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql conf by upload file @@ -5097,7 +5178,7 @@ paths: $ref: '#/definitions/dto.MysqlDBDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete mysql database @@ -5152,7 +5233,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql database description @@ -5243,7 +5324,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis conf @@ -5269,7 +5350,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis conf by file @@ -5295,7 +5376,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change redis password @@ -5334,7 +5415,7 @@ paths: $ref: '#/definitions/dto.RedisConfPersistenceUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis persistence conf @@ -5434,7 +5515,7 @@ paths: $ref: '#/definitions/dto.MysqlVariablesUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql variables @@ -5460,7 +5541,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create file @@ -5487,7 +5568,7 @@ paths: $ref: '#/definitions/request.FileBatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Batch delete file @@ -5514,7 +5595,7 @@ paths: $ref: '#/definitions/request.FilePathCheck' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Check file exist @@ -5538,7 +5619,7 @@ paths: type: file responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: ChunkUpload file @@ -5558,7 +5639,7 @@ paths: $ref: '#/definitions/request.FileCompress' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Compress file @@ -5614,7 +5695,7 @@ paths: $ref: '#/definitions/request.FileDeCompress' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Decompress file @@ -5641,7 +5722,7 @@ paths: $ref: '#/definitions/request.FileDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete file @@ -5668,7 +5749,7 @@ paths: $ref: '#/definitions/request.FileDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download file @@ -5695,7 +5776,7 @@ paths: $ref: '#/definitions/dto.FilePath' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download file with path @@ -5751,7 +5832,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file mode @@ -5779,7 +5860,7 @@ paths: $ref: '#/definitions/request.FileMove' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Move file @@ -5807,7 +5888,7 @@ paths: $ref: '#/definitions/request.FileRename' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file name @@ -5835,7 +5916,7 @@ paths: $ref: '#/definitions/request.FileEdit' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update file content @@ -5884,7 +5965,7 @@ paths: $ref: '#/definitions/request.DirSizeReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load file size @@ -5930,7 +6011,7 @@ paths: type: file responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upload file @@ -5979,7 +6060,7 @@ paths: $ref: '#/definitions/request.FileWget' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Wget file @@ -6008,7 +6089,7 @@ paths: $ref: '#/definitions/dto.GroupCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6036,7 +6117,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete group @@ -6097,7 +6178,7 @@ paths: $ref: '#/definitions/dto.GroupUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update group @@ -6125,7 +6206,7 @@ paths: $ref: '#/definitions/dto.HostOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create host @@ -6186,7 +6267,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create command @@ -6214,7 +6295,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete command @@ -6269,7 +6350,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update command @@ -6296,7 +6377,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete host @@ -6342,7 +6423,7 @@ paths: $ref: '#/definitions/dto.BatchRuleOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6391,7 +6472,7 @@ paths: $ref: '#/definitions/dto.PortRuleOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6441,7 +6522,7 @@ paths: $ref: '#/definitions/dto.AddrRuleUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6461,7 +6542,7 @@ paths: $ref: '#/definitions/dto.PortRuleUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6524,7 +6605,7 @@ paths: $ref: '#/definitions/dto.HostConnTest' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Test host conn by info @@ -6566,7 +6647,7 @@ paths: $ref: '#/definitions/dto.HostOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host @@ -6594,7 +6675,7 @@ paths: $ref: '#/definitions/dto.ChangeHostGroup' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host group @@ -6714,7 +6795,7 @@ paths: $ref: '#/definitions/request.NginxConfigFileUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update OpenResty conf by upload file @@ -6775,7 +6856,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update OpenResty conf @@ -6808,7 +6889,7 @@ paths: $ref: '#/definitions/request.RuntimeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create runtime @@ -6834,7 +6915,7 @@ paths: type: string responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get runtime @@ -6854,7 +6935,7 @@ paths: $ref: '#/definitions/request.RuntimeDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete runtime @@ -6881,7 +6962,7 @@ paths: $ref: '#/definitions/request.RuntimeSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List runtimes @@ -6901,7 +6982,7 @@ paths: $ref: '#/definitions/request.RuntimeUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update runtime @@ -6928,7 +7009,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create backup account @@ -6955,7 +7036,7 @@ paths: $ref: '#/definitions/dto.CommonBackup' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Backup system data @@ -6984,7 +7065,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete backup account @@ -7017,7 +7098,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete backup record @@ -7050,7 +7131,7 @@ paths: $ref: '#/definitions/dto.DownloadRecord' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download backup record @@ -7078,7 +7159,7 @@ paths: $ref: '#/definitions/dto.RecordSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Page backup records @@ -7098,7 +7179,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system data @@ -7128,7 +7209,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system data by upload @@ -7214,7 +7295,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update backup account @@ -7254,7 +7335,7 @@ paths: $ref: '#/definitions/dto.SettingUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system entrance @@ -7280,7 +7361,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Reset system password expired @@ -7319,7 +7400,7 @@ paths: $ref: '#/definitions/dto.MfaCredential' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Bind mfa @@ -7336,7 +7417,7 @@ paths: description: 清空监控数据 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Clean monitor datas @@ -7362,7 +7443,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system password @@ -7388,7 +7469,7 @@ paths: $ref: '#/definitions/dto.PortUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system port @@ -7419,7 +7500,7 @@ paths: description: 获取系统可用状态 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load system available status @@ -7439,7 +7520,7 @@ paths: $ref: '#/definitions/dto.SnapshotCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create system snapshot @@ -7467,7 +7548,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete system backup @@ -7500,7 +7581,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update snapshot description @@ -7534,7 +7615,7 @@ paths: $ref: '#/definitions/dto.SnapshotImport' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Import system snapshot @@ -7562,7 +7643,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system backup @@ -7595,7 +7676,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Rollback system backup @@ -7669,7 +7750,7 @@ paths: $ref: '#/definitions/dto.SettingUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system setting @@ -7697,7 +7778,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load release notes by version @@ -7716,7 +7797,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upgrade @@ -7743,7 +7824,7 @@ paths: $ref: '#/definitions/request.WebsiteCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create website @@ -7896,7 +7977,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website acme account @@ -7995,7 +8076,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update nginx conf @@ -8028,7 +8109,7 @@ paths: $ref: '#/definitions/request.WebsiteDefaultUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change default server @@ -8062,7 +8143,7 @@ paths: $ref: '#/definitions/request.WebsiteDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website @@ -8095,7 +8176,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdateDirPermission' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update Site Dir permission @@ -8128,7 +8209,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdateDir' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update Site Dir @@ -8161,7 +8242,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create website dns account @@ -8188,7 +8269,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website dns account @@ -8243,7 +8324,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website dns account @@ -8320,7 +8401,7 @@ paths: $ref: '#/definitions/request.WebsiteDomainDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website domain @@ -8402,7 +8483,7 @@ paths: $ref: '#/definitions/request.WebsiteNginxUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website nginx conf @@ -8435,7 +8516,7 @@ paths: $ref: '#/definitions/request.WebsiteOp' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate website @@ -8482,7 +8563,7 @@ paths: $ref: '#/definitions/request.WebsitePHPConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website php conf @@ -8536,7 +8617,7 @@ paths: $ref: '#/definitions/request.WebsitePHPFileUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update php conf @@ -8555,6 +8636,92 @@ paths: formatEN: Nginx conf update [domain] formatZH: php 配置修改 [domain] paramKeys: [] + /websites/proxies: + post: + consumes: + - application/json + description: 获取反向代理配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteProxyReq' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Get proxy conf + tags: + - Website + /websites/proxies/update: + post: + consumes: + - application/json + description: 修改反向代理配置 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteProxyConfig' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Update proxy conf + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + formatEN: Update domain [domain] proxy config + formatZH: '修改网站 [domain] 反向代理配置 ' + paramKeys: [] + /websites/proxy/file: + post: + consumes: + - application/json + description: 更新反向代理文件 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.NginxProxyUpdate' + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Update proxy file + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: websiteID + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - websiteID + formatEN: Nginx conf proxy file update [domain] + formatZH: 更新反向代理文件 [domain] + paramKeys: [] /websites/rewrite: post: consumes: @@ -8569,7 +8736,7 @@ paths: $ref: '#/definitions/request.NginxRewriteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get rewrite conf @@ -8589,7 +8756,7 @@ paths: $ref: '#/definitions/request.NginxRewriteUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update rewrite conf @@ -8672,7 +8839,7 @@ paths: type: integer responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Search website ssl by id @@ -8692,7 +8859,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website ssl @@ -8725,7 +8892,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLRenew' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Reset website ssl @@ -8780,7 +8947,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Page website ssl @@ -8800,7 +8967,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update ssl @@ -8832,7 +8999,7 @@ paths: type: integer responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Search website ssl by website id @@ -8852,7 +9019,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website @@ -8901,7 +9068,7 @@ paths: $ref: '#/definitions/request.WebsiteWafUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website waf conf