2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 20:57:19 +08:00
Files
panel/docs/docs.go
2023-11-18 18:05:32 +08:00

2378 lines
74 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": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/commonrequests.Paginate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.CertList"
}
}
}
]
}
}
}
},
"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/dns": {
"get": {
"security": [
{
"BearerToken": []
}
],
"description": "获取面板证书管理的 DNS 接口列表",
"produces": [
"application/json"
],
"tags": [
"证书管理"
],
"summary": "获取 DNS 接口列表",
"parameters": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/commonrequests.Paginate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.DNSList"
}
}
}
]
}
}
}
},
"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": "object",
"additionalProperties": {
"$ref": "#/definitions/acme.Resolve"
}
}
}
}
]
}
}
}
}
},
"/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": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/commonrequests.Paginate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.CertList"
}
}
}
]
}
}
}
},
"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/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"
}
}
}
]
}
}
}
}
},
"/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/requests.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": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.Info"
}
}
}
]
}
}
}
}
},
"/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": "获取备份列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/services.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": {
"post": {
"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": [
{
"description": "request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/commonrequests.Paginate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controllers.SuccessResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/responses.List"
}
}
}
]
}
}
}
},
"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/services.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"
}
}
}
}
},
"/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"
},
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"secret_key": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"acme.Resolve": {
"type": "object",
"properties": {
"err": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"commonrequests.Paginate": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"page": {
"type": "integer"
}
}
},
"controllers.ErrorResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
},
"controllers.SuccessResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"data": {},
"message": {
"type": "string"
}
}
},
"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"
}
}
},
"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": "integer"
},
"ports": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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.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.Login": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"requests.Obtain": {
"type": "object",
"properties": {
"id": {
"type": "integer"
}
}
},
"requests.Renew": {
"type": "object",
"properties": {
"id": {
"type": "integer"
}
}
},
"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": "string"
}
},
"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.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": {
"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"
}
}
},
"responses.CertList": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Cert"
}
},
"total": {
"type": "integer"
}
}
},
"responses.DNSList": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/models.CertDNS"
}
},
"total": {
"type": "integer"
}
}
},
"responses.Info": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"role": {
"type": "array",
"items": {
"type": "string"
}
},
"username": {
"type": "string"
}
}
},
"responses.List": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Website"
}
},
"total": {
"type": "integer"
}
}
},
"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"
}
}
},
"services.BackupFile": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"size": {
"type": "string"
}
}
},
"services.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": "integer"
},
"ports": {
"type": "array",
"items": {
"type": "string"
}
},
"remark": {
"type": "string"
},
"ssl": {
"type": "boolean"
},
"status": {
"type": "boolean"
}
}
}
},
"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)
}