2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 10:17:17 +08:00
Files
panel/docs/docs.go
2024-05-19 04:18:42 +08:00

4742 lines
146 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {
"name": "耗子科技",
"email": "i@haozi.net"
},
"license": {
"name": "GNU Affero General Public License v3"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/panel/cert/algorithms": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理支持的算法列表",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取算法列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/caProviders": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理支持的 CA 提供商",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取 CA 提供商",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/certs": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的证书列表",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取证书列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "添加证书到面板证书管理",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "添加证书",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.CertStore"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/certs/{id}": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的证书",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取证书",
"parameters": [
{
"type": "integer",
"description": "证书 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/models.Cert"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"BearerToken": []
}
],
"description": "更新面板证书管理的证书",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "更新证书",
"parameters": [
{
"type": "integer",
"description": "证书 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.CertUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "删除面板证书管理的证书",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "删除证书",
"parameters": [
{
"type": "integer",
"description": "证书 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/deploy": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "部署面板证书管理的证书",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "部署证书",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.CertDeploy"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/dns": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的 DNS 接口列表",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取 DNS 接口列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "添加 DNS 接口到面板证书管理",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "添加 DNS 接口",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.DNSStore"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/dns/{id}": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的 DNS 接口",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取 DNS 接口",
"parameters": [
{
"type": "integer",
"description": "DNS 接口 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/models.CertDNS"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"BearerToken": []
}
],
"description": "更新面板证书管理的 DNS 接口",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "更新 DNS 接口",
"parameters": [
{
"type": "integer",
"description": "DNS 接口 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.DNSUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "删除面板证书管理的 DNS 接口",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "删除 DNS 接口",
"parameters": [
{
"type": "integer",
"description": "DNS 接口 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/dnsProviders": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理支持的 DNS 提供商",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取 DNS 提供商",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/manualDNS": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "获取签发证书所需的 DNS 记录",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取手动 DNS 记录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Obtain"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/acme.DNSRecord"
}
}
}
}
]
}
}
}
}
},
"/panel/cert/obtain": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "签发面板证书管理的证书",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "签发证书",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Obtain"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/renew": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "续签面板证书管理的证书",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "续签证书",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Renew"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/users": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的 ACME 用户列表",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取用户列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "添加 ACME 用户到面板证书管理",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "添加 ACME 用户",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.UserStore"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/cert/users/{id}": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的 ACME 用户",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取 ACME 用户",
"parameters": [
{
"type": "integer",
"description": "用户 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/models.CertUser"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"BearerToken": []
}
],
"description": "更新面板证书管理的 ACME 用户",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "更新 ACME 用户",
"parameters": [
{
"type": "integer",
"description": "用户 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.UserUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "删除面板证书管理的 ACME 用户",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "删除 ACME 用户",
"parameters": [
{
"type": "integer",
"description": "用户 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/create": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "创建一个容器",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "创建容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.ContainerCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/exist": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "检查一个容器是否存在",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "检查容器是否存在",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/image/exist": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "检查一个镜像是否存在",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "检查镜像是否存在",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/image/inspect": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "查看一个镜像的详细信息",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "查看镜像",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/image/list": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取所有镜像列表",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "获取镜像列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/image/prune": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "清理无用的镜像",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "清理镜像",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/image/pull": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "拉取一个镜像",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "拉取镜像",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.ImagePull"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/image/remove": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "删除一个镜像",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "删除镜像",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/inspect": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "查看一个容器的详细信息",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "查看容器",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/kill": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "杀死一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "杀死容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/list": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取所有容器列表",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "获取容器列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/logs": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "查看一个容器的日志",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "查看容器日志",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/connect": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "连接一个容器到一个网络",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "连接容器到网络",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.NetworkConnectDisConnect"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/create": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "创建一个网络",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "创建网络",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.NetworkCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/disconnect": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "从一个网络断开一个容器",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "从网络断开容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.NetworkConnectDisConnect"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/exist": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "检查一个网络是否存在",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "检查网络是否存在",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/inspect": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "查看一个网络的详细信息",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "查看网络",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/list": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取所有网络列表",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "获取网络列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/prune": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "清理无用的网络",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "清理网络",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/network/remove": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "删除一个网络",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "删除网络",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/prune": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "清理无用的容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "清理容器",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/remove": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "删除一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "删除容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/rename": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "重命名一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "重命名容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.ContainerRename"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/restart": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "重启一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "重启容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/search": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "根据容器名称搜索容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "搜索容器",
"parameters": [
{
"type": "string",
"description": "容器名称",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/start": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "启动一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "启动容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/stats": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "查看一个容器的状态信息",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "查看容器状态",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/stop": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "停止一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "停止容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/unpause": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "取消暂停一个容器",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "取消暂停容器",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/volume/create": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "创建一个卷",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "创建卷",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.VolumeCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/volume/exist": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "检查一个卷是否存在",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "检查卷是否存在",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/volume/inspect": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "查看一个卷的详细信息",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "查看卷",
"parameters": [
{
"type": "string",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/volume/list": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取所有卷列表",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "获取卷列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/volume/prune": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "清理无用的卷",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "清理卷",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/container/volume/remove": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "删除一个卷",
"produces": [
"application/json"
],
"tags": [
"容器"
],
"summary": "删除卷",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_container.ID"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/archive": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "压缩文件/目录到给定路径",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "压缩文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Archive"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/content": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取给定路径的文件内容",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "获取文件内容",
"parameters": [
{
"type": "string",
"name": "path",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/copy": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "复制文件/目录到给定路径",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "复制文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Copy"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/create": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "创建文件/目录到给定路径",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "创建文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.NotExist"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/delete": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "删除给定路径的文件/目录",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "删除文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Exist"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/download": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "下载给定路径的文件",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "下载文件",
"parameters": [
{
"type": "string",
"name": "path",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/info": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取给定路径的文件/目录信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "获取文件/目录信息",
"parameters": [
{
"type": "string",
"name": "path",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/list": {
"get": {
"description": "获取给定路径的文件/目录列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "获取文件/目录列表",
"parameters": [
{
"type": "string",
"name": "path",
"in": "query"
},
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/move": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "移动文件/目录到给定路径,等效于重命名",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "移动文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Move"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/permission": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "修改给定路径的文件/目录权限",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "修改文件/目录权限",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Permission"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/remoteDownload": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "下载远程文件到给定路径",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "下载远程文件",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.NotExist"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/save": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "保存给定路径的文件内容",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "保存文件内容",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Save"
}
},
{
"description": "content",
"name": "content",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/search": {
"post": {
"description": "通过关键词搜索给定路径的文件/目录",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "搜索文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Search"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/unArchive": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "解压文件/目录到给定路径",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "解压文件/目录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.UnArchive"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/file/upload": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "上传文件到给定路径",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件管理"
],
"summary": "上传文件",
"parameters": [
{
"type": "file",
"description": "file",
"name": "file",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "path",
"name": "path",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/setting/list": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板设置列表",
"produces": [
"application/json"
],
"tags": [
"面板设置"
],
"summary": "设置列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/setting/update": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "更新面板设置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"面板设置"
],
"summary": "更新设置",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_setting.Update"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/user/info": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取当前登录用户信息",
"produces": [
"application/json"
],
"tags": [
"用户鉴权"
],
"summary": "用户信息",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/user/login": {
"post": {
"description": "通过用户名和密码获取访问令牌",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户鉴权"
],
"summary": "登录",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Login"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
},
"403": {
"description": "用户名或密码错误",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
},
"500": {
"description": "系统内部错误",
"schema": {
"$ref": "#/definitions/controllers.ErrorResponse"
}
}
}
}
},
"/panel/website/backupList": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取网站的备份列表",
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "获取备份列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/internal.BackupFile"
}
}
}
}
]
}
}
}
}
},
"/panel/website/defaultConfig": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取默认首页和停止页配置",
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "获取默认配置",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "保存默认首页和停止页配置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "保存默认配置",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/website/deleteBackup": {
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "删除网站的备份",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "删除备份",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.DeleteBackup"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/website/uploadBackup": {
"put": {
"security": [
{
"BearerToken": []
}
],
"description": "上传网站的备份",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "上传备份",
"parameters": [
{
"type": "file",
"description": "备份文件",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取网站管理的网站列表",
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "获取网站列表",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "添加网站到网站管理",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "添加网站",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Add"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}": {
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "删除网站管理的网站",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "删除网站",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/config": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取网站的配置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "获取配置",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/internal.PanelWebsite"
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "保存网站的配置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "保存配置",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.SaveConfig"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/createBackup": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "创建网站的备份",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "创建备份",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/log": {
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "清空网站的日志",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "清空日志",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/resetConfig": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "重置网站的配置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "重置配置",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/restoreBackup": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "还原网站的备份",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "还原备份",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/status": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "启用或停用网站",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "状态",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/panel/websites/{id}/updateRemark": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "更新网站的备注",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"网站管理"
],
"summary": "更新备注",
"parameters": [
{
"type": "integer",
"description": "网站 ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/config": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取 Rsync 配置",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "获取配置",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "更新 Rsync 配置",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "更新配置",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.UpdateConfig"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/modules": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "列出所有 Rsync 模块",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "列出模块",
"parameters": [
{
"type": "integer",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "添加 Rsync 模块",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "添加模块",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requests.Create"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/modules/{name}": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "更新 Rsync 模块",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "更新模块",
"parameters": [
{
"type": "string",
"description": "模块名称",
"name": "name",
"in": "path",
"required": true
},
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/panel_app_http_requests_plugins_rsync.Update"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerToken": []
}
],
"description": "删除 Rsync 模块",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "删除模块",
"parameters": [
{
"type": "string",
"description": "模块名称",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/restart": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "重启 Rsync 服务",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "重启服务",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/start": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "启动 Rsync 服务",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "启动服务",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/status": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取 Rsync 服务状态",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "服务状态",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/plugins/rsync/stop": {
"post": {
"security": [
{
"BearerToken": []
}
],
"description": "停止 Rsync 服务",
"produces": [
"application/json"
],
"tags": [
"插件-Rsync"
],
"summary": "停止服务",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.SuccessResponse"
}
}
}
}
},
"/swagger": {
"get": {
"description": "Swagger UI",
"tags": [
"Swagger"
],
"summary": "Swagger UI",
"responses": {
"200": {
"description": "OK"
},
"500": {
"description": "Internal Server Error"
}
}
}
}
},
"definitions": {
"acme.DNSParam": {
"type": "object",
"properties": {
"access_key": {
"type": "string"
},
"api_key": {
"type": "string"
},
"id": {
"type": "string"
},
"secret_key": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"acme.DNSRecord": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"controllers.ErrorResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"controllers.SuccessResponse": {
"type": "object",
"properties": {
"data": {},
"message": {
"type": "string"
}
}
},
"internal.BackupFile": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"size": {
"type": "string"
}
}
},
"internal.PanelWebsite": {
"type": "object",
"properties": {
"db": {
"type": "boolean"
},
"db_name": {
"type": "string"
},
"db_password": {
"type": "string"
},
"db_type": {
"type": "string"
},
"db_user": {
"type": "string"
},
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"php": {
"type": "string"
},
"ports": {
"type": "array",
"items": {
"type": "integer"
}
},
"remark": {
"type": "string"
},
"ssl": {
"type": "boolean"
},
"status": {
"type": "boolean"
}
}
},
"models.Cert": {
"type": "object",
"properties": {
"auto_renew": {
"description": "自动续签",
"type": "boolean"
},
"cert": {
"description": "证书内容",
"type": "string"
},
"cert_url": {
"description": "证书 URL (续签时使用)",
"type": "string"
},
"created_at": {
"type": "string"
},
"dns": {
"$ref": "#/definitions/models.CertDNS"
},
"dns_id": {
"description": "关联的 DNS ID",
"type": "integer"
},
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "integer"
},
"key": {
"description": "私钥内容",
"type": "string"
},
"type": {
"description": "证书类型 (P256, P384, 2048, 4096)",
"type": "string"
},
"updated_at": {
"type": "string"
},
"user": {
"$ref": "#/definitions/models.CertUser"
},
"user_id": {
"description": "关联的 ACME 用户 ID",
"type": "integer"
},
"website": {
"$ref": "#/definitions/models.Website"
},
"website_id": {
"description": "关联的网站 ID",
"type": "integer"
}
}
},
"models.CertDNS": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"dns_param": {
"$ref": "#/definitions/acme.DNSParam"
},
"id": {
"type": "integer"
},
"name": {
"description": "备注名称",
"type": "string"
},
"type": {
"description": "DNS 提供商 (dnspod, aliyun, cloudflare)",
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"models.CertUser": {
"type": "object",
"properties": {
"ca": {
"description": "CA 提供商 (letsencrypt, zerossl, sslcom, google, buypass)",
"type": "string"
},
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"hmac_encoded": {
"type": "string"
},
"id": {
"type": "integer"
},
"key_type": {
"type": "string"
},
"kid": {
"type": "string"
},
"private_key": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"models.Website": {
"type": "object",
"properties": {
"cert": {
"$ref": "#/definitions/models.Cert"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"php": {
"type": "integer"
},
"remark": {
"type": "string"
},
"ssl": {
"type": "boolean"
},
"status": {
"type": "boolean"
},
"updated_at": {
"type": "string"
}
}
},
"panel_app_http_requests_container.ID": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"panel_app_http_requests_plugins_rsync.Update": {
"type": "object",
"properties": {
"auth_user": {
"type": "string"
},
"comment": {
"type": "string"
},
"hosts_allow": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"secret": {
"type": "string"
}
}
},
"panel_app_http_requests_setting.Update": {
"type": "object",
"properties": {
"backup_path": {
"type": "string"
},
"email": {
"type": "string"
},
"entrance": {
"type": "string"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"port": {
"type": "integer"
},
"ssl": {
"type": "boolean"
},
"username": {
"type": "string"
},
"website_path": {
"type": "string"
}
}
},
"requests.Add": {
"type": "object",
"properties": {
"db": {
"type": "boolean"
},
"db_name": {
"type": "string"
},
"db_password": {
"type": "string"
},
"db_type": {
"type": "string"
},
"db_user": {
"type": "string"
},
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"php": {
"type": "string"
},
"ports": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"requests.Archive": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"paths": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"requests.CertDeploy": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"website_id": {
"type": "integer"
}
}
},
"requests.CertStore": {
"type": "object",
"properties": {
"auto_renew": {
"type": "boolean"
},
"dns_id": {
"type": "integer"
},
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"website_id": {
"type": "integer"
}
}
},
"requests.CertUpdate": {
"type": "object",
"properties": {
"auto_renew": {
"type": "boolean"
},
"dns_id": {
"type": "integer"
},
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "integer"
},
"type": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"website_id": {
"type": "integer"
}
}
},
"requests.ContainerCreate": {
"type": "object",
"properties": {
"auto_remove": {
"type": "boolean"
},
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"cpu_shares": {
"type": "integer"
},
"cpus": {
"type": "integer"
},
"entrypoint": {
"type": "array",
"items": {
"type": "string"
}
},
"env": {
"type": "array",
"items": {
"$ref": "#/definitions/types.KV"
}
},
"image": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/types.KV"
}
},
"memory": {
"type": "integer"
},
"name": {
"type": "string"
},
"network": {
"type": "string"
},
"open_stdin": {
"type": "boolean"
},
"ports": {
"type": "array",
"items": {
"$ref": "#/definitions/types.ContainerPort"
}
},
"privileged": {
"type": "boolean"
},
"publish_all_ports": {
"type": "boolean"
},
"restart_policy": {
"type": "string"
},
"tty": {
"type": "boolean"
},
"volumes": {
"type": "array",
"items": {
"$ref": "#/definitions/types.ContainerVolume"
}
}
}
},
"requests.ContainerRename": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"requests.Copy": {
"type": "object",
"properties": {
"new": {
"type": "string"
},
"old": {
"type": "string"
}
}
},
"requests.Create": {
"type": "object",
"properties": {
"auth_user": {
"type": "string"
},
"comment": {
"type": "string"
},
"hosts_allow": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"secret": {
"type": "string"
}
}
},
"requests.DNSStore": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/acme.DNSParam"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"requests.DNSUpdate": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/acme.DNSParam"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"requests.DeleteBackup": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"requests.Exist": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
}
},
"requests.ImagePull": {
"type": "object",
"properties": {
"auth": {
"type": "boolean"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"requests.Login": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"requests.Move": {
"type": "object",
"properties": {
"new": {
"type": "string"
},
"old": {
"type": "string"
}
}
},
"requests.NetworkConnectDisConnect": {
"type": "object",
"properties": {
"container": {
"type": "string"
},
"network": {
"type": "string"
}
}
},
"requests.NetworkCreate": {
"type": "object",
"properties": {
"driver": {
"type": "string"
},
"ipv4": {
"$ref": "#/definitions/types.ContainerNetwork"
},
"ipv6": {
"$ref": "#/definitions/types.ContainerNetwork"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/types.KV"
}
},
"name": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/types.KV"
}
}
}
},
"requests.NotExist": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
}
},
"requests.Obtain": {
"type": "object",
"properties": {
"id": {
"type": "integer"
}
}
},
"requests.Permission": {
"type": "object",
"properties": {
"group": {
"type": "string"
},
"mode": {
"type": "integer"
},
"owner": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"requests.Renew": {
"type": "object",
"properties": {
"id": {
"type": "integer"
}
}
},
"requests.Save": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"requests.SaveConfig": {
"type": "object",
"properties": {
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"hsts": {
"type": "boolean"
},
"http_redirect": {
"type": "boolean"
},
"id": {
"type": "integer"
},
"index": {
"type": "string"
},
"open_basedir": {
"type": "boolean"
},
"path": {
"type": "string"
},
"php": {
"type": "integer"
},
"ports": {
"type": "array",
"items": {
"type": "integer"
}
},
"raw": {
"type": "string"
},
"rewrite": {
"type": "string"
},
"root": {
"type": "string"
},
"ssl": {
"type": "boolean"
},
"ssl_certificate": {
"type": "string"
},
"ssl_certificate_key": {
"type": "string"
},
"waf": {
"type": "boolean"
},
"waf_cache": {
"type": "string"
},
"waf_cc_deny": {
"type": "string"
},
"waf_mode": {
"type": "string"
}
}
},
"requests.Search": {
"type": "object",
"properties": {
"keyword": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"requests.UnArchive": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"requests.UpdateConfig": {
"type": "object",
"properties": {
"config": {
"type": "string"
}
}
},
"requests.UserStore": {
"type": "object",
"properties": {
"ca": {
"type": "string"
},
"email": {
"type": "string"
},
"hmac_encoded": {
"type": "string"
},
"key_type": {
"type": "string"
},
"kid": {
"type": "string"
}
}
},
"requests.UserUpdate": {
"type": "object",
"properties": {
"ca": {
"type": "string"
},
"email": {
"type": "string"
},
"hmac_encoded": {
"type": "string"
},
"id": {
"type": "integer"
},
"key_type": {
"type": "string"
},
"kid": {
"type": "string"
}
}
},
"requests.VolumeCreate": {
"type": "object",
"properties": {
"driver": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/types.KV"
}
},
"name": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/types.KV"
}
}
}
},
"types.ContainerNetwork": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"gateway": {
"type": "string"
},
"ip_range": {
"type": "string"
},
"subnet": {
"type": "string"
}
}
},
"types.ContainerPort": {
"type": "object",
"properties": {
"container_end": {
"type": "integer"
},
"container_start": {
"type": "integer"
},
"host": {
"type": "string"
},
"host_end": {
"type": "integer"
},
"host_start": {
"type": "integer"
},
"protocol": {
"type": "string"
}
}
},
"types.ContainerVolume": {
"type": "object",
"properties": {
"container": {
"type": "string"
},
"host": {
"type": "string"
},
"mode": {
"type": "string"
}
}
},
"types.KV": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"BearerToken": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "2",
Host: "",
BasePath: "/api",
Schemes: []string{},
Title: "耗子 Linux 面板 API",
Description: "耗子 Linux 面板的 API 信息",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}