1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 16:29:17 +08:00

feat: 增加 ssh 相关接口文档

This commit is contained in:
ssongliu 2023-05-18 13:56:08 +08:00 committed by zhengkunwang223
parent 2975cf6d5a
commit 8c4016792b
3 changed files with 1363 additions and 33 deletions

View File

@ -4396,15 +4396,6 @@ var doc = `{
"type": "string" "type": "string"
} }
} }
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"path"
],
"formatEN": "Read file [path]",
"formatZH": "读取文件 [path]",
"paramKeys": []
} }
} }
}, },
@ -5035,6 +5026,258 @@ var doc = `{
} }
} }
}, },
"/host/conffile/update": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "上传文件更新 SSH 配置",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Update host ssh setting by file",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SSHConf"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "update SSH conf",
"formatZH": "修改 SSH 配置文件",
"paramKeys": []
}
}
},
"/host/ssh/generate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "生成 ssh 密钥",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Generate host ssh secret",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.GenerateSSH"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "generate SSH secret",
"formatZH": "生成 SSH 密钥 ",
"paramKeys": []
}
}
},
"/host/ssh/logs": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "获取 ssh 登录日志",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Load host ssh logs",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SearchSSHLog"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SSHLog"
}
}
}
}
},
"/host/ssh/operate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "修改 SSH 服务状态",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Operate ssh",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.Operate"
}
}
],
"responses": {},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"operation"
],
"formatEN": "[operation] SSH",
"formatZH": "[operation] SSH ",
"paramKeys": []
}
}
},
"/host/ssh/search": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "加载 SSH 配置信息",
"tags": [
"SSH"
],
"summary": "Load host ssh setting info",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SSHInfo"
}
}
}
}
},
"/host/ssh/secret": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "获取 ssh 密钥",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Load host ssh secret",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.GenerateLoad"
}
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/host/ssh/update": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "更新 SSH 配置",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Update host ssh setting",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SettingUpdate"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"key",
"value"
],
"formatEN": "update SSH setting [key] =\u003e [value]",
"formatZH": "修改 SSH 配置 [key] =\u003e [value]",
"paramKeys": []
}
}
},
"/hosts": { "/hosts": {
"post": { "post": {
"security": [ "security": [
@ -9962,6 +10205,7 @@ var doc = `{
"dto.CommonRecover": { "dto.CommonRecover": {
"type": "object", "type": "object",
"required": [ "required": [
"source",
"type" "type"
], ],
"properties": { "properties": {
@ -9974,6 +10218,18 @@ var doc = `{
"name": { "name": {
"type": "string" "type": "string"
}, },
"source": {
"type": "string",
"enum": [
"OSS",
"S3",
"SFTP",
"MINIO",
"LOCAL",
"COS",
"KODO"
]
},
"type": { "type": {
"type": "string", "type": "string",
"enum": [ "enum": [
@ -10746,6 +11002,43 @@ var doc = `{
} }
} }
}, },
"dto.GenerateLoad": {
"type": "object",
"required": [
"encryptionMode"
],
"properties": {
"encryptionMode": {
"type": "string",
"enum": [
"rsa",
"ed25519",
"ecdsa",
"dsa"
]
}
}
},
"dto.GenerateSSH": {
"type": "object",
"required": [
"encryptionMode"
],
"properties": {
"encryptionMode": {
"type": "string",
"enum": [
"rsa",
"ed25519",
"ecdsa",
"dsa"
]
},
"password": {
"type": "string"
}
}
},
"dto.GroupCreate": { "dto.GroupCreate": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11413,6 +11706,17 @@ var doc = `{
} }
} }
}, },
"dto.Operate": {
"type": "object",
"required": [
"operation"
],
"properties": {
"operation": {
"type": "string"
}
}
},
"dto.OperateByID": { "dto.OperateByID": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11723,6 +12027,92 @@ var doc = `{
} }
} }
}, },
"dto.SSHConf": {
"type": "object",
"properties": {
"file": {
"type": "string"
}
}
},
"dto.SSHHistory": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"authMode": {
"type": "string"
},
"date": {
"type": "string"
},
"dateStr": {
"type": "string"
},
"isLocal": {
"type": "boolean"
},
"message": {
"type": "string"
},
"port": {
"type": "string"
},
"status": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"dto.SSHInfo": {
"type": "object",
"properties": {
"listenAddress": {
"type": "string"
},
"passwordAuthentication": {
"type": "string"
},
"permitRootLogin": {
"type": "string"
},
"port": {
"type": "string"
},
"pubkeyAuthentication": {
"type": "string"
},
"status": {
"type": "string"
},
"useDNS": {
"type": "string"
}
}
},
"dto.SSHLog": {
"type": "object",
"properties": {
"failedCount": {
"type": "integer"
},
"logs": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SSHHistory"
}
},
"successfulCount": {
"type": "integer"
},
"totalCount": {
"type": "integer"
}
}
},
"dto.SSLUpdate": { "dto.SSLUpdate": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11854,6 +12244,33 @@ var doc = `{
} }
} }
}, },
"dto.SearchSSHLog": {
"type": "object",
"required": [
"Status",
"page",
"pageSize"
],
"properties": {
"Status": {
"type": "string",
"enum": [
"Success",
"Failed",
"All"
]
},
"info": {
"type": "string"
},
"page": {
"type": "integer"
},
"pageSize": {
"type": "integer"
}
}
},
"dto.SearchWithPage": { "dto.SearchWithPage": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11875,6 +12292,9 @@ var doc = `{
"dto.SettingInfo": { "dto.SettingInfo": {
"type": "object", "type": "object",
"properties": { "properties": {
"appStoreLastModified": {
"type": "string"
},
"appStoreVersion": { "appStoreVersion": {
"type": "string" "type": "string"
}, },
@ -12209,12 +12629,18 @@ var doc = `{
"key": { "key": {
"type": "string" "type": "string"
}, },
"lastModified": {
"type": "integer"
},
"limit": { "limit": {
"type": "integer" "type": "integer"
}, },
"name": { "name": {
"type": "string" "type": "string"
}, },
"readMe": {
"type": "string"
},
"recommend": { "recommend": {
"type": "integer" "type": "integer"
}, },
@ -12233,6 +12659,12 @@ var doc = `{
"status": { "status": {
"type": "string" "type": "string"
}, },
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": { "type": {
"type": "string" "type": "string"
}, },
@ -12521,9 +12953,27 @@ var doc = `{
"name" "name"
], ],
"properties": { "properties": {
"advanced": {
"type": "boolean"
},
"allowPort": {
"type": "boolean"
},
"appDetailId": { "appDetailId": {
"type": "integer" "type": "integer"
}, },
"containerName": {
"type": "string"
},
"cpuQuota": {
"type": "number"
},
"memoryLimit": {
"type": "number"
},
"memoryUnit": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
@ -12609,9 +13059,27 @@ var doc = `{
"params" "params"
], ],
"properties": { "properties": {
"advanced": {
"type": "boolean"
},
"allowPort": {
"type": "boolean"
},
"containerName": {
"type": "string"
},
"cpuQuota": {
"type": "number"
},
"installId": { "installId": {
"type": "integer" "type": "integer"
}, },
"memoryLimit": {
"type": "number"
},
"memoryUnit": {
"type": "string"
},
"params": { "params": {
"type": "object", "type": "object",
"additionalProperties": true "additionalProperties": true
@ -12934,9 +13402,27 @@ var doc = `{
"request.NewAppInstall": { "request.NewAppInstall": {
"type": "object", "type": "object",
"properties": { "properties": {
"advanced": {
"type": "boolean"
},
"allowPort": {
"type": "boolean"
},
"appDetailID": { "appDetailID": {
"type": "integer" "type": "integer"
}, },
"containerName": {
"type": "string"
},
"cpuQuota": {
"type": "number"
},
"memoryLimit": {
"type": "number"
},
"memoryUnit": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
@ -13840,12 +14326,18 @@ var doc = `{
"key": { "key": {
"type": "string" "type": "string"
}, },
"lastModified": {
"type": "integer"
},
"limit": { "limit": {
"type": "integer" "type": "integer"
}, },
"name": { "name": {
"type": "string" "type": "string"
}, },
"readMe": {
"type": "string"
},
"recommend": { "recommend": {
"type": "integer" "type": "integer"
}, },
@ -13896,6 +14388,12 @@ var doc = `{
"createdAt": { "createdAt": {
"type": "string" "type": "string"
}, },
"downloadCallBackUrl": {
"type": "string"
},
"downloadUrl": {
"type": "string"
},
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
@ -13905,16 +14403,19 @@ var doc = `{
"image": { "image": {
"type": "string" "type": "string"
}, },
"lastModified": {
"type": "integer"
},
"lastVersion": { "lastVersion": {
"type": "string" "type": "string"
}, },
"params": {}, "params": {},
"readme": {
"type": "string"
},
"status": { "status": {
"type": "string" "type": "string"
}, },
"update": {
"type": "boolean"
},
"updatedAt": { "updatedAt": {
"type": "string" "type": "string"
}, },

View File

@ -4382,15 +4382,6 @@
"type": "string" "type": "string"
} }
} }
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"path"
],
"formatEN": "Read file [path]",
"formatZH": "读取文件 [path]",
"paramKeys": []
} }
} }
}, },
@ -5021,6 +5012,258 @@
} }
} }
}, },
"/host/conffile/update": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "上传文件更新 SSH 配置",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Update host ssh setting by file",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SSHConf"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "update SSH conf",
"formatZH": "修改 SSH 配置文件",
"paramKeys": []
}
}
},
"/host/ssh/generate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "生成 ssh 密钥",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Generate host ssh secret",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.GenerateSSH"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "generate SSH secret",
"formatZH": "生成 SSH 密钥 ",
"paramKeys": []
}
}
},
"/host/ssh/logs": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "获取 ssh 登录日志",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Load host ssh logs",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SearchSSHLog"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SSHLog"
}
}
}
}
},
"/host/ssh/operate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "修改 SSH 服务状态",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Operate ssh",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.Operate"
}
}
],
"responses": {},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"operation"
],
"formatEN": "[operation] SSH",
"formatZH": "[operation] SSH ",
"paramKeys": []
}
}
},
"/host/ssh/search": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "加载 SSH 配置信息",
"tags": [
"SSH"
],
"summary": "Load host ssh setting info",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SSHInfo"
}
}
}
}
},
"/host/ssh/secret": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "获取 ssh 密钥",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Load host ssh secret",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.GenerateLoad"
}
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/host/ssh/update": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "更新 SSH 配置",
"consumes": [
"application/json"
],
"tags": [
"SSH"
],
"summary": "Update host ssh setting",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SettingUpdate"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"key",
"value"
],
"formatEN": "update SSH setting [key] =\u003e [value]",
"formatZH": "修改 SSH 配置 [key] =\u003e [value]",
"paramKeys": []
}
}
},
"/hosts": { "/hosts": {
"post": { "post": {
"security": [ "security": [
@ -9948,6 +10191,7 @@
"dto.CommonRecover": { "dto.CommonRecover": {
"type": "object", "type": "object",
"required": [ "required": [
"source",
"type" "type"
], ],
"properties": { "properties": {
@ -9960,6 +10204,18 @@
"name": { "name": {
"type": "string" "type": "string"
}, },
"source": {
"type": "string",
"enum": [
"OSS",
"S3",
"SFTP",
"MINIO",
"LOCAL",
"COS",
"KODO"
]
},
"type": { "type": {
"type": "string", "type": "string",
"enum": [ "enum": [
@ -10732,6 +10988,43 @@
} }
} }
}, },
"dto.GenerateLoad": {
"type": "object",
"required": [
"encryptionMode"
],
"properties": {
"encryptionMode": {
"type": "string",
"enum": [
"rsa",
"ed25519",
"ecdsa",
"dsa"
]
}
}
},
"dto.GenerateSSH": {
"type": "object",
"required": [
"encryptionMode"
],
"properties": {
"encryptionMode": {
"type": "string",
"enum": [
"rsa",
"ed25519",
"ecdsa",
"dsa"
]
},
"password": {
"type": "string"
}
}
},
"dto.GroupCreate": { "dto.GroupCreate": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11399,6 +11692,17 @@
} }
} }
}, },
"dto.Operate": {
"type": "object",
"required": [
"operation"
],
"properties": {
"operation": {
"type": "string"
}
}
},
"dto.OperateByID": { "dto.OperateByID": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11709,6 +12013,92 @@
} }
} }
}, },
"dto.SSHConf": {
"type": "object",
"properties": {
"file": {
"type": "string"
}
}
},
"dto.SSHHistory": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"authMode": {
"type": "string"
},
"date": {
"type": "string"
},
"dateStr": {
"type": "string"
},
"isLocal": {
"type": "boolean"
},
"message": {
"type": "string"
},
"port": {
"type": "string"
},
"status": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"dto.SSHInfo": {
"type": "object",
"properties": {
"listenAddress": {
"type": "string"
},
"passwordAuthentication": {
"type": "string"
},
"permitRootLogin": {
"type": "string"
},
"port": {
"type": "string"
},
"pubkeyAuthentication": {
"type": "string"
},
"status": {
"type": "string"
},
"useDNS": {
"type": "string"
}
}
},
"dto.SSHLog": {
"type": "object",
"properties": {
"failedCount": {
"type": "integer"
},
"logs": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SSHHistory"
}
},
"successfulCount": {
"type": "integer"
},
"totalCount": {
"type": "integer"
}
}
},
"dto.SSLUpdate": { "dto.SSLUpdate": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11840,6 +12230,33 @@
} }
} }
}, },
"dto.SearchSSHLog": {
"type": "object",
"required": [
"Status",
"page",
"pageSize"
],
"properties": {
"Status": {
"type": "string",
"enum": [
"Success",
"Failed",
"All"
]
},
"info": {
"type": "string"
},
"page": {
"type": "integer"
},
"pageSize": {
"type": "integer"
}
}
},
"dto.SearchWithPage": { "dto.SearchWithPage": {
"type": "object", "type": "object",
"required": [ "required": [
@ -11861,6 +12278,9 @@
"dto.SettingInfo": { "dto.SettingInfo": {
"type": "object", "type": "object",
"properties": { "properties": {
"appStoreLastModified": {
"type": "string"
},
"appStoreVersion": { "appStoreVersion": {
"type": "string" "type": "string"
}, },
@ -12195,12 +12615,18 @@
"key": { "key": {
"type": "string" "type": "string"
}, },
"lastModified": {
"type": "integer"
},
"limit": { "limit": {
"type": "integer" "type": "integer"
}, },
"name": { "name": {
"type": "string" "type": "string"
}, },
"readMe": {
"type": "string"
},
"recommend": { "recommend": {
"type": "integer" "type": "integer"
}, },
@ -12219,6 +12645,12 @@
"status": { "status": {
"type": "string" "type": "string"
}, },
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": { "type": {
"type": "string" "type": "string"
}, },
@ -12507,9 +12939,27 @@
"name" "name"
], ],
"properties": { "properties": {
"advanced": {
"type": "boolean"
},
"allowPort": {
"type": "boolean"
},
"appDetailId": { "appDetailId": {
"type": "integer" "type": "integer"
}, },
"containerName": {
"type": "string"
},
"cpuQuota": {
"type": "number"
},
"memoryLimit": {
"type": "number"
},
"memoryUnit": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
@ -12595,9 +13045,27 @@
"params" "params"
], ],
"properties": { "properties": {
"advanced": {
"type": "boolean"
},
"allowPort": {
"type": "boolean"
},
"containerName": {
"type": "string"
},
"cpuQuota": {
"type": "number"
},
"installId": { "installId": {
"type": "integer" "type": "integer"
}, },
"memoryLimit": {
"type": "number"
},
"memoryUnit": {
"type": "string"
},
"params": { "params": {
"type": "object", "type": "object",
"additionalProperties": true "additionalProperties": true
@ -12920,9 +13388,27 @@
"request.NewAppInstall": { "request.NewAppInstall": {
"type": "object", "type": "object",
"properties": { "properties": {
"advanced": {
"type": "boolean"
},
"allowPort": {
"type": "boolean"
},
"appDetailID": { "appDetailID": {
"type": "integer" "type": "integer"
}, },
"containerName": {
"type": "string"
},
"cpuQuota": {
"type": "number"
},
"memoryLimit": {
"type": "number"
},
"memoryUnit": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
@ -13826,12 +14312,18 @@
"key": { "key": {
"type": "string" "type": "string"
}, },
"lastModified": {
"type": "integer"
},
"limit": { "limit": {
"type": "integer" "type": "integer"
}, },
"name": { "name": {
"type": "string" "type": "string"
}, },
"readMe": {
"type": "string"
},
"recommend": { "recommend": {
"type": "integer" "type": "integer"
}, },
@ -13882,6 +14374,12 @@
"createdAt": { "createdAt": {
"type": "string" "type": "string"
}, },
"downloadCallBackUrl": {
"type": "string"
},
"downloadUrl": {
"type": "string"
},
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
@ -13891,16 +14389,19 @@
"image": { "image": {
"type": "string" "type": "string"
}, },
"lastModified": {
"type": "integer"
},
"lastVersion": { "lastVersion": {
"type": "string" "type": "string"
}, },
"params": {}, "params": {},
"readme": {
"type": "string"
},
"status": { "status": {
"type": "string" "type": "string"
}, },
"update": {
"type": "boolean"
},
"updatedAt": { "updatedAt": {
"type": "string" "type": "string"
}, },

View File

@ -161,6 +161,16 @@ definitions:
type: string type: string
name: name:
type: string type: string
source:
enum:
- OSS
- S3
- SFTP
- MINIO
- LOCAL
- COS
- KODO
type: string
type: type:
enum: enum:
- app - app
@ -169,6 +179,7 @@ definitions:
- website - website
type: string type: string
required: required:
- source
- type - type
type: object type: object
dto.ComposeCreate: dto.ComposeCreate:
@ -684,6 +695,32 @@ definitions:
- type - type
- vars - vars
type: object type: object
dto.GenerateLoad:
properties:
encryptionMode:
enum:
- rsa
- ed25519
- ecdsa
- dsa
type: string
required:
- encryptionMode
type: object
dto.GenerateSSH:
properties:
encryptionMode:
enum:
- rsa
- ed25519
- ecdsa
- dsa
type: string
password:
type: string
required:
- encryptionMode
type: object
dto.GroupCreate: dto.GroupCreate:
properties: properties:
id: id:
@ -1129,6 +1166,13 @@ definitions:
subnet: subnet:
type: string type: string
type: object type: object
dto.Operate:
properties:
operation:
type: string
required:
- operation
type: object
dto.OperateByID: dto.OperateByID:
properties: properties:
id: id:
@ -1336,6 +1380,62 @@ definitions:
used_memory_rss: used_memory_rss:
type: string type: string
type: object type: object
dto.SSHConf:
properties:
file:
type: string
type: object
dto.SSHHistory:
properties:
address:
type: string
authMode:
type: string
date:
type: string
dateStr:
type: string
isLocal:
type: boolean
message:
type: string
port:
type: string
status:
type: string
user:
type: string
type: object
dto.SSHInfo:
properties:
listenAddress:
type: string
passwordAuthentication:
type: string
permitRootLogin:
type: string
port:
type: string
pubkeyAuthentication:
type: string
status:
type: string
useDNS:
type: string
type: object
dto.SSHLog:
properties:
failedCount:
type: integer
logs:
items:
$ref: '#/definitions/dto.SSHHistory'
type: array
successfulCount:
type: integer
totalCount:
type: integer
type: object
dto.SSLUpdate: dto.SSLUpdate:
properties: properties:
cert: cert:
@ -1423,6 +1523,25 @@ definitions:
- page - page
- pageSize - pageSize
type: object type: object
dto.SearchSSHLog:
properties:
Status:
enum:
- Success
- Failed
- All
type: string
info:
type: string
page:
type: integer
pageSize:
type: integer
required:
- Status
- page
- pageSize
type: object
dto.SearchWithPage: dto.SearchWithPage:
properties: properties:
info: info:
@ -1437,6 +1556,8 @@ definitions:
type: object type: object
dto.SettingInfo: dto.SettingInfo:
properties: properties:
appStoreLastModified:
type: string
appStoreVersion: appStoreVersion:
type: string type: string
complexityVerification: complexityVerification:
@ -1658,10 +1779,14 @@ definitions:
type: integer type: integer
key: key:
type: string type: string
lastModified:
type: integer
limit: limit:
type: integer type: integer
name: name:
type: string type: string
readMe:
type: string
recommend: recommend:
type: integer type: integer
required: required:
@ -1674,6 +1799,10 @@ definitions:
type: string type: string
status: status:
type: string type: string
tags:
items:
type: string
type: array
type: type:
type: string type: string
updatedAt: updatedAt:
@ -1861,8 +1990,20 @@ definitions:
type: object type: object
request.AppInstallCreate: request.AppInstallCreate:
properties: properties:
advanced:
type: boolean
allowPort:
type: boolean
appDetailId: appDetailId:
type: integer type: integer
containerName:
type: string
cpuQuota:
type: number
memoryLimit:
type: number
memoryUnit:
type: string
name: name:
type: string type: string
params: params:
@ -1920,8 +2061,20 @@ definitions:
type: object type: object
request.AppInstalledUpdate: request.AppInstalledUpdate:
properties: properties:
advanced:
type: boolean
allowPort:
type: boolean
containerName:
type: string
cpuQuota:
type: number
installId: installId:
type: integer type: integer
memoryLimit:
type: number
memoryUnit:
type: string
params: params:
additionalProperties: true additionalProperties: true
type: object type: object
@ -2141,8 +2294,20 @@ definitions:
type: object type: object
request.NewAppInstall: request.NewAppInstall:
properties: properties:
advanced:
type: boolean
allowPort:
type: boolean
appDetailID: appDetailID:
type: integer type: integer
containerName:
type: string
cpuQuota:
type: number
memoryLimit:
type: number
memoryUnit:
type: string
name: name:
type: string type: string
params: params:
@ -2752,10 +2917,14 @@ definitions:
type: integer type: integer
key: key:
type: string type: string
lastModified:
type: integer
limit: limit:
type: integer type: integer
name: name:
type: string type: string
readMe:
type: string
recommend: recommend:
type: integer type: integer
required: required:
@ -2789,19 +2958,25 @@ definitions:
type: integer type: integer
createdAt: createdAt:
type: string type: string
downloadCallBackUrl:
type: string
downloadUrl:
type: string
enable: enable:
type: boolean type: boolean
id: id:
type: integer type: integer
image: image:
type: string type: string
lastModified:
type: integer
lastVersion: lastVersion:
type: string type: string
params: {} params: {}
readme:
type: string
status: status:
type: string type: string
update:
type: boolean
updatedAt: updatedAt:
type: string type: string
version: version:
@ -5834,13 +6009,6 @@ paths:
summary: Read file summary: Read file
tags: tags:
- File - File
x-panel-log:
BeforeFuntions: []
bodyKeys:
- path
formatEN: Read file [path]
formatZH: 读取文件 [path]
paramKeys: []
/files/mode: /files/mode:
post: post:
consumes: consumes:
@ -6244,6 +6412,166 @@ paths:
formatEN: update group [name][type] formatEN: update group [name][type]
formatZH: 更新组 [name][type] formatZH: 更新组 [name][type]
paramKeys: [] paramKeys: []
/host/conffile/update:
post:
consumes:
- application/json
description: 上传文件更新 SSH 配置
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.SSHConf'
responses:
"200":
description: ""
security:
- ApiKeyAuth: []
summary: Update host ssh setting by file
tags:
- SSH
x-panel-log:
BeforeFuntions: []
bodyKeys: []
formatEN: update SSH conf
formatZH: 修改 SSH 配置文件
paramKeys: []
/host/ssh/generate:
post:
consumes:
- application/json
description: 生成 ssh 密钥
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.GenerateSSH'
responses:
"200":
description: ""
security:
- ApiKeyAuth: []
summary: Generate host ssh secret
tags:
- SSH
x-panel-log:
BeforeFuntions: []
bodyKeys: []
formatEN: generate SSH secret
formatZH: '生成 SSH 密钥 '
paramKeys: []
/host/ssh/logs:
post:
consumes:
- application/json
description: 获取 ssh 登录日志
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.SearchSSHLog'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.SSHLog'
security:
- ApiKeyAuth: []
summary: Load host ssh logs
tags:
- SSH
/host/ssh/operate:
post:
consumes:
- application/json
description: 修改 SSH 服务状态
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.Operate'
responses: {}
security:
- ApiKeyAuth: []
summary: Operate ssh
tags:
- SSH
x-panel-log:
BeforeFuntions: []
bodyKeys:
- operation
formatEN: '[operation] SSH'
formatZH: '[operation] SSH '
paramKeys: []
/host/ssh/search:
post:
description: 加载 SSH 配置信息
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.SSHInfo'
security:
- ApiKeyAuth: []
summary: Load host ssh setting info
tags:
- SSH
/host/ssh/secret:
post:
consumes:
- application/json
description: 获取 ssh 密钥
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.GenerateLoad'
responses:
"200":
description: ""
security:
- ApiKeyAuth: []
summary: Load host ssh secret
tags:
- SSH
/host/ssh/update:
post:
consumes:
- application/json
description: 更新 SSH 配置
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.SettingUpdate'
responses:
"200":
description: ""
security:
- ApiKeyAuth: []
summary: Update host ssh setting
tags:
- SSH
x-panel-log:
BeforeFuntions: []
bodyKeys:
- key
- value
formatEN: update SSH setting [key] => [value]
formatZH: 修改 SSH 配置 [key] => [value]
paramKeys: []
/hosts: /hosts:
post: post:
consumes: consumes: