2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-08 13:04:29 +08:00

feat: 规范部分控制器方法

This commit is contained in:
耗子
2023-11-08 02:01:28 +08:00
parent e032faeae0
commit d90423db4a
17 changed files with 939 additions and 221 deletions

View File

@@ -23,7 +23,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取算法列表",
"responses": {
@@ -54,7 +54,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取 CA 提供商",
"responses": {
@@ -85,7 +85,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取证书列表",
"responses": {
@@ -135,7 +135,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "添加证书",
"parameters": [
@@ -183,7 +183,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取证书",
"parameters": [
@@ -242,7 +242,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "更新证书",
"parameters": [
@@ -298,7 +298,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "删除证书",
"parameters": [
@@ -344,7 +344,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取 DNS 接口列表",
"responses": {
@@ -394,7 +394,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "添加 DNS 接口",
"parameters": [
@@ -442,7 +442,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取 DNS 接口",
"parameters": [
@@ -501,7 +501,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "更新 DNS 接口",
"parameters": [
@@ -557,7 +557,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "删除 DNS 接口",
"parameters": [
@@ -603,7 +603,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取 DNS 提供商",
"responses": {
@@ -637,7 +637,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取手动 DNS 记录",
"parameters": [
@@ -703,7 +703,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "签发证书",
"parameters": [
@@ -754,7 +754,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "续签证书",
"parameters": [
@@ -802,7 +802,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取用户列表",
"responses": {
@@ -852,7 +852,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "添加 ACME 用户",
"parameters": [
@@ -900,7 +900,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "获取 ACME 用户",
"parameters": [
@@ -959,7 +959,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "更新 ACME 用户",
"parameters": [
@@ -1015,7 +1015,7 @@
"application/json"
],
"tags": [
"证书"
"证书管理"
],
"summary": "删除 ACME 用户",
"parameters": [
@@ -1049,6 +1049,155 @@
}
}
},
"/panel/setting/list": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板设置列表",
"produces": [
"application/json"
],
"tags": [
"面板设置"
],
"summary": "设置列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.Settings"
}
}
}
]
}
},
"401": {
"description": "登录已过期",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
},
"500": {
"description": "系统内部错误",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
}
}
}
},
"/panel/setting/update": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "更新面板设置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"面板设置"
],
"summary": "更新设置",
"parameters": [
{
"description": "更新设置",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Update"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
},
"401": {
"description": "登录已过期",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
},
"500": {
"description": "系统内部错误",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
}
}
}
},
"/panel/user/info": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取当前登录用户信息",
"produces": [
"application/json"
],
"tags": [
"用户鉴权"
],
"summary": "用户信息",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.Info"
}
}
}
]
}
},
"401": {
"description": "登录已过期",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
},
"500": {
"description": "系统内部错误",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
}
}
}
},
"/panel/user/login": {
"post": {
"description": "通过用户名和密码获取访问令牌",
@@ -1059,9 +1208,9 @@
"application/json"
],
"tags": [
"用户"
"用户鉴权"
],
"summary": "用户登录",
"summary": "登录",
"parameters": [
{
"description": "登录信息",
@@ -1397,6 +1546,35 @@
}
}
},
"requests.Update": {
"type": "object",
"properties": {
"backup_path": {
"type": "string"
},
"email": {
"type": "string"
},
"entrance": {
"type": "string"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"port": {
"type": "integer"
},
"username": {
"type": "string"
},
"website_path": {
"type": "string"
}
}
},
"requests.UserStore": {
"type": "object",
"properties": {
@@ -1467,6 +1645,55 @@
"type": "integer"
}
}
},
"responses.Info": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"role": {
"type": "array",
"items": {
"type": "string"
}
},
"username": {
"type": "string"
}
}
},
"responses.Settings": {
"type": "object",
"properties": {
"backup_path": {
"type": "string"
},
"email": {
"type": "string"
},
"entrance": {
"type": "string"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"port": {
"type": "string"
},
"username": {
"type": "string"
},
"website_path": {
"type": "string"
}
}
}
},
"securityDefinitions": {