mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 14:57:16 +08:00
feat(证书管理): 补全更新和显示接口
This commit is contained in:
447
docs/docs.go
447
docs/docs.go
@@ -152,7 +152,7 @@ const docTemplate = `{
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.CertAdd"
|
||||
"$ref": "#/definitions/requests.CertStore"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -179,6 +179,118 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerToken": []
|
||||
}
|
||||
],
|
||||
"description": "更新面板证书管理的证书",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"证书"
|
||||
],
|
||||
"summary": "更新证书",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "证书 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "证书信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.CertUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
@@ -299,7 +411,7 @@ const docTemplate = `{
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.DNSAdd"
|
||||
"$ref": "#/definitions/requests.DNSStore"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -326,6 +438,118 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "DNS 接口信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.DNSUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
@@ -645,7 +869,7 @@ const docTemplate = `{
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.UserAdd"
|
||||
"$ref": "#/definitions/requests.UserStore"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -672,6 +896,118 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "用户信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.UserUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
@@ -765,6 +1101,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/swagger": {
|
||||
"get": {
|
||||
"description": "Swagger UI",
|
||||
"tags": [
|
||||
"Swagger"
|
||||
],
|
||||
"summary": "Swagger UI",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -907,6 +1260,10 @@ const docTemplate = `{
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "备注名称",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "DNS 提供商 (dnspod, aliyun, cloudflare)",
|
||||
"type": "string"
|
||||
@@ -958,6 +1315,9 @@ const docTemplate = `{
|
||||
"models.Website": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cert": {
|
||||
"$ref": "#/definitions/models.Cert"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -987,7 +1347,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.CertAdd": {
|
||||
"requests.CertStore": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"auto_renew": {
|
||||
@@ -1007,15 +1367,67 @@ const docTemplate = `{
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"website_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.DNSAdd": {
|
||||
"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"
|
||||
}
|
||||
@@ -1048,7 +1460,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.UserAdd": {
|
||||
"requests.UserStore": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ca": {
|
||||
@@ -1068,6 +1480,29 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.CertAdd"
|
||||
"$ref": "#/definitions/requests.CertStore"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -172,6 +172,118 @@
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerToken": []
|
||||
}
|
||||
],
|
||||
"description": "更新面板证书管理的证书",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"证书"
|
||||
],
|
||||
"summary": "更新证书",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "证书 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "证书信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.CertUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
@@ -292,7 +404,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.DNSAdd"
|
||||
"$ref": "#/definitions/requests.DNSStore"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -319,6 +431,118 @@
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "DNS 接口信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.DNSUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
@@ -638,7 +862,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.UserAdd"
|
||||
"$ref": "#/definitions/requests.UserStore"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -665,6 +889,118 @@
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "用户信息",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.UserUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "登录已过期",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "系统内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
@@ -758,6 +1094,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/swagger": {
|
||||
"get": {
|
||||
"description": "Swagger UI",
|
||||
"tags": [
|
||||
"Swagger"
|
||||
],
|
||||
"summary": "Swagger UI",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -900,6 +1253,10 @@
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "备注名称",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "DNS 提供商 (dnspod, aliyun, cloudflare)",
|
||||
"type": "string"
|
||||
@@ -951,6 +1308,9 @@
|
||||
"models.Website": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cert": {
|
||||
"$ref": "#/definitions/models.Cert"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -980,7 +1340,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.CertAdd": {
|
||||
"requests.CertStore": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"auto_renew": {
|
||||
@@ -1000,15 +1360,67 @@
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"website_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.DNSAdd": {
|
||||
"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"
|
||||
}
|
||||
@@ -1041,7 +1453,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.UserAdd": {
|
||||
"requests.UserStore": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ca": {
|
||||
@@ -1061,6 +1473,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -94,6 +94,9 @@ definitions:
|
||||
$ref: '#/definitions/acme.DNSParam'
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
description: 备注名称
|
||||
type: string
|
||||
type:
|
||||
description: DNS 提供商 (dnspod, aliyun, cloudflare)
|
||||
type: string
|
||||
@@ -128,6 +131,8 @@ definitions:
|
||||
type: object
|
||||
models.Website:
|
||||
properties:
|
||||
cert:
|
||||
$ref: '#/definitions/models.Cert'
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
@@ -147,7 +152,7 @@ definitions:
|
||||
updated_at:
|
||||
type: string
|
||||
type: object
|
||||
requests.CertAdd:
|
||||
requests.CertStore:
|
||||
properties:
|
||||
auto_renew:
|
||||
type: boolean
|
||||
@@ -161,11 +166,45 @@ definitions:
|
||||
type: string
|
||||
user_id:
|
||||
type: integer
|
||||
website_id:
|
||||
type: integer
|
||||
type: object
|
||||
requests.DNSAdd:
|
||||
requests.CertUpdate:
|
||||
properties:
|
||||
auto_renew:
|
||||
type: boolean
|
||||
dns_id:
|
||||
type: integer
|
||||
domains:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
id:
|
||||
type: integer
|
||||
type:
|
||||
type: string
|
||||
user_id:
|
||||
type: integer
|
||||
website_id:
|
||||
type: integer
|
||||
type: object
|
||||
requests.DNSStore:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/definitions/acme.DNSParam'
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
requests.DNSUpdate:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/definitions/acme.DNSParam'
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
@@ -186,7 +225,7 @@ definitions:
|
||||
id:
|
||||
type: integer
|
||||
type: object
|
||||
requests.UserAdd:
|
||||
requests.UserStore:
|
||||
properties:
|
||||
ca:
|
||||
type: string
|
||||
@@ -199,6 +238,21 @@ definitions:
|
||||
kid:
|
||||
type: string
|
||||
type: object
|
||||
requests.UserUpdate:
|
||||
properties:
|
||||
ca:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
hmac_encoded:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
key_type:
|
||||
type: string
|
||||
kid:
|
||||
type: string
|
||||
type: object
|
||||
responses.CertList:
|
||||
properties:
|
||||
items:
|
||||
@@ -301,7 +355,7 @@ paths:
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/requests.CertAdd'
|
||||
$ref: '#/definitions/requests.CertStore'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -353,6 +407,75 @@ paths:
|
||||
summary: 删除证书
|
||||
tags:
|
||||
- 证书
|
||||
get:
|
||||
description: 获取面板证书管理的证书
|
||||
parameters:
|
||||
- description: 证书 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/models.Cert'
|
||||
type: object
|
||||
"401":
|
||||
description: 登录已过期
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
"500":
|
||||
description: 系统内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取证书
|
||||
tags:
|
||||
- 证书
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 更新面板证书管理的证书
|
||||
parameters:
|
||||
- description: 证书 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 证书信息
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/requests.CertUpdate'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
"401":
|
||||
description: 登录已过期
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
"500":
|
||||
description: 系统内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 更新证书
|
||||
tags:
|
||||
- 证书
|
||||
/panel/cert/dns:
|
||||
get:
|
||||
description: 获取面板证书管理的 DNS 接口列表
|
||||
@@ -391,7 +514,7 @@ paths:
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/requests.DNSAdd'
|
||||
$ref: '#/definitions/requests.DNSStore'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -443,6 +566,75 @@ paths:
|
||||
summary: 删除 DNS 接口
|
||||
tags:
|
||||
- 证书
|
||||
get:
|
||||
description: 获取面板证书管理的 DNS 接口
|
||||
parameters:
|
||||
- description: DNS 接口 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/models.CertDNS'
|
||||
type: object
|
||||
"401":
|
||||
description: 登录已过期
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
"500":
|
||||
description: 系统内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取 DNS 接口
|
||||
tags:
|
||||
- 证书
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 更新面板证书管理的 DNS 接口
|
||||
parameters:
|
||||
- description: DNS 接口 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: DNS 接口信息
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/requests.DNSUpdate'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
"401":
|
||||
description: 登录已过期
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
"500":
|
||||
description: 系统内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 更新 DNS 接口
|
||||
tags:
|
||||
- 证书
|
||||
/panel/cert/dnsProviders:
|
||||
get:
|
||||
description: 获取面板证书管理支持的 DNS 提供商
|
||||
@@ -603,7 +795,7 @@ paths:
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/requests.UserAdd'
|
||||
$ref: '#/definitions/requests.UserStore'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -655,6 +847,75 @@ paths:
|
||||
summary: 删除 ACME 用户
|
||||
tags:
|
||||
- 证书
|
||||
get:
|
||||
description: 获取面板证书管理的 ACME 用户
|
||||
parameters:
|
||||
- description: 用户 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/models.CertUser'
|
||||
type: object
|
||||
"401":
|
||||
description: 登录已过期
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
"500":
|
||||
description: 系统内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取 ACME 用户
|
||||
tags:
|
||||
- 证书
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 更新面板证书管理的 ACME 用户
|
||||
parameters:
|
||||
- description: 用户 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 用户信息
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/requests.UserUpdate'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
"401":
|
||||
description: 登录已过期
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
"500":
|
||||
description: 系统内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.ErrorResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 更新 ACME 用户
|
||||
tags:
|
||||
- 证书
|
||||
/panel/user/login:
|
||||
post:
|
||||
consumes:
|
||||
@@ -685,6 +946,17 @@ paths:
|
||||
summary: 用户登录
|
||||
tags:
|
||||
- 用户
|
||||
/swagger:
|
||||
get:
|
||||
description: Swagger UI
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
summary: Swagger UI
|
||||
tags:
|
||||
- Swagger
|
||||
securityDefinitions:
|
||||
BearerToken:
|
||||
in: header
|
||||
|
||||
Reference in New Issue
Block a user