mirror of
https://github.com/acepanel/panel.git
synced 2026-02-06 16:21:03 +08:00
refactor: 移除返回定义
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
requests "panel/app/http/requests/cert"
|
||||
commonrequests "panel/app/http/requests/common"
|
||||
responses "panel/app/http/responses/cert"
|
||||
"panel/app/internal"
|
||||
"panel/app/internal/services"
|
||||
"panel/app/models"
|
||||
@@ -123,7 +122,7 @@ func (r *CertController) Algorithms(ctx http.Context) http.Response {
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Param data body commonrequests.Paginate true "request"
|
||||
// @Success 200 {object} SuccessResponse{data=responses.CertList}
|
||||
// @Success 200 {object} SuccessResponse
|
||||
// @Router /panel/cert/users [get]
|
||||
func (r *CertController) UserList(ctx http.Context) http.Response {
|
||||
var paginateRequest commonrequests.Paginate
|
||||
@@ -142,9 +141,9 @@ func (r *CertController) UserList(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
return Success(ctx, responses.UserList{
|
||||
Total: total,
|
||||
Items: users,
|
||||
return Success(ctx, http.Json{
|
||||
"total": total,
|
||||
"items": users,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -275,7 +274,7 @@ func (r *CertController) UserDestroy(ctx http.Context) http.Response {
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Param data body commonrequests.Paginate true "request"
|
||||
// @Success 200 {object} SuccessResponse{data=responses.DNSList}
|
||||
// @Success 200 {object} SuccessResponse
|
||||
// @Router /panel/cert/dns [get]
|
||||
func (r *CertController) DNSList(ctx http.Context) http.Response {
|
||||
var paginateRequest commonrequests.Paginate
|
||||
@@ -294,9 +293,9 @@ func (r *CertController) DNSList(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
return Success(ctx, responses.DNSList{
|
||||
Total: total,
|
||||
Items: dns,
|
||||
return Success(ctx, http.Json{
|
||||
"total": total,
|
||||
"items": dns,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -427,7 +426,7 @@ func (r *CertController) DNSDestroy(ctx http.Context) http.Response {
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Param data body commonrequests.Paginate true "request"
|
||||
// @Success 200 {object} SuccessResponse{data=responses.CertList}
|
||||
// @Success 200 {object} SuccessResponse
|
||||
// @Router /panel/cert/certs [get]
|
||||
func (r *CertController) CertList(ctx http.Context) http.Response {
|
||||
var paginateRequest commonrequests.Paginate
|
||||
@@ -446,9 +445,9 @@ func (r *CertController) CertList(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
return Success(ctx, responses.CertList{
|
||||
Total: total,
|
||||
Items: certs,
|
||||
return Success(ctx, http.Json{
|
||||
"total": total,
|
||||
"items": certs,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"github.com/spf13/cast"
|
||||
|
||||
requests "panel/app/http/requests/setting"
|
||||
responses "panel/app/http/responses/setting"
|
||||
"panel/app/internal"
|
||||
"panel/app/internal/services"
|
||||
"panel/app/models"
|
||||
@@ -30,7 +29,7 @@ func NewSettingController() *SettingController {
|
||||
// @Tags 面板设置
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Success 200 {object} SuccessResponse{data=responses.Settings}
|
||||
// @Success 200 {object} SuccessResponse
|
||||
// @Router /panel/setting/list [get]
|
||||
func (r *SettingController) List(ctx http.Context) http.Response {
|
||||
var settings []models.Setting
|
||||
@@ -42,12 +41,6 @@ func (r *SettingController) List(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
var result responses.Settings
|
||||
result.Name = r.setting.Get(models.SettingKeyName)
|
||||
result.Entrance = facades.Config().GetString("http.entrance")
|
||||
result.WebsitePath = r.setting.Get(models.SettingKeyWebsitePath)
|
||||
result.BackupPath = r.setting.Get(models.SettingKeyBackupPath)
|
||||
|
||||
var user models.User
|
||||
err = facades.Auth().User(ctx, &user)
|
||||
if err != nil {
|
||||
@@ -56,10 +49,8 @@ func (r *SettingController) List(ctx http.Context) http.Response {
|
||||
}).Info("获取用户信息失败")
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
result.Username = user.Username
|
||||
result.Email = user.Email
|
||||
|
||||
result.Port, err = tools.Exec(`cat /www/panel/panel.conf | grep APP_PORT | awk -F '=' '{print $2}' | tr -d '\n'`)
|
||||
port, err := tools.Exec(`cat /www/panel/panel.conf | grep APP_PORT | awk -F '=' '{print $2}' | tr -d '\n'`)
|
||||
if err != nil {
|
||||
facades.Log().Request(ctx.Request()).Tags("面板", "面板设置").With(map[string]any{
|
||||
"error": err.Error(),
|
||||
@@ -67,7 +58,16 @@ func (r *SettingController) List(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
return Success(ctx, result)
|
||||
return Success(ctx, http.Json{
|
||||
"name": r.setting.Get(models.SettingKeyName),
|
||||
"entrance": facades.Config().GetString("http.entrance"),
|
||||
"website_path": r.setting.Get(models.SettingKeyWebsitePath),
|
||||
"backup_path": r.setting.Get(models.SettingKeyBackupPath),
|
||||
"user_name": user.Username,
|
||||
"password": "",
|
||||
"email": user.Email,
|
||||
"port": port,
|
||||
})
|
||||
}
|
||||
|
||||
// Update
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"github.com/goravel/framework/facades"
|
||||
|
||||
"panel/app/http/requests/user"
|
||||
responses "panel/app/http/responses/user"
|
||||
"panel/app/models"
|
||||
)
|
||||
|
||||
@@ -81,7 +80,7 @@ func (r *UserController) Login(ctx http.Context) http.Response {
|
||||
// @Tags 用户鉴权
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Success 200 {object} SuccessResponse{data=responses.Info}
|
||||
// @Success 200 {object} SuccessResponse
|
||||
// @Router /panel/user/info [get]
|
||||
func (r *UserController) Info(ctx http.Context) http.Response {
|
||||
var user models.User
|
||||
@@ -93,10 +92,10 @@ func (r *UserController) Info(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
return Success(ctx, responses.Info{
|
||||
ID: user.ID,
|
||||
Role: []string{"admin"},
|
||||
Username: user.Username,
|
||||
Email: user.Email,
|
||||
return Success(ctx, http.Json{
|
||||
"id": user.ID,
|
||||
"role": []string{"admin"},
|
||||
"username": user.Username,
|
||||
"email": user.Email,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
commonrequests "panel/app/http/requests/common"
|
||||
requests "panel/app/http/requests/website"
|
||||
responses "panel/app/http/responses/website"
|
||||
"panel/app/internal"
|
||||
"panel/app/internal/services"
|
||||
"panel/app/models"
|
||||
@@ -39,7 +38,7 @@ func NewWebsiteController() *WebsiteController {
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Param data body commonrequests.Paginate true "request"
|
||||
// @Success 200 {object} SuccessResponse{data=responses.List}
|
||||
// @Success 200 {object} SuccessResponse
|
||||
// @Router /panel/websites [get]
|
||||
func (r *WebsiteController) List(ctx http.Context) http.Response {
|
||||
var paginateRequest commonrequests.Paginate
|
||||
@@ -56,9 +55,9 @@ func (r *WebsiteController) List(ctx http.Context) http.Response {
|
||||
return ErrorSystem(ctx)
|
||||
}
|
||||
|
||||
return Success(ctx, responses.List{
|
||||
Total: total,
|
||||
Items: websites,
|
||||
return Success(ctx, http.Json{
|
||||
"total": total,
|
||||
"items": websites,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -206,7 +205,7 @@ func (r *WebsiteController) SaveDefaultConfig(ctx http.Context) http.Response {
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Param id path int true "网站 ID"
|
||||
// @Success 200 {object} SuccessResponse{data=services.PanelWebsite}
|
||||
// @Success 200 {object} SuccessResponse{data=internal.PanelWebsite}
|
||||
// @Router /panel/websites/{id}/config [get]
|
||||
func (r *WebsiteController) GetConfig(ctx http.Context) http.Response {
|
||||
var idRequest requests.ID
|
||||
@@ -329,7 +328,7 @@ func (r *WebsiteController) UpdateRemark(ctx http.Context) http.Response {
|
||||
// @Produce json
|
||||
// @Security BearerToken
|
||||
// @Param data body commonrequests.Paginate true "request"
|
||||
// @Success 200 {object} SuccessResponse{data=[]services.BackupFile}
|
||||
// @Success 200 {object} SuccessResponse{data=[]internal.BackupFile}
|
||||
// @Router /panel/website/backupList [get]
|
||||
func (r *WebsiteController) BackupList(ctx http.Context) http.Response {
|
||||
var paginateRequest commonrequests.Paginate
|
||||
|
||||
@@ -28,7 +28,7 @@ func (r *Update) Rules(ctx http.Context) map[string]string {
|
||||
"website_path": "required|string:2,255",
|
||||
"entrance": `required|regex:^/(\w+)?$|not_in:/api`,
|
||||
"username": "required|string:2,20",
|
||||
"email": "required|email",
|
||||
"email": "email",
|
||||
"password": "string:8,255",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package responses
|
||||
|
||||
import "panel/app/models"
|
||||
|
||||
type CertList struct {
|
||||
Total int64 `json:"total"`
|
||||
Items []models.Cert `json:"items"`
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package responses
|
||||
|
||||
import "panel/app/models"
|
||||
|
||||
type DNSList struct {
|
||||
Total int64 `json:"total"`
|
||||
Items []models.CertDNS `json:"items"`
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package responses
|
||||
|
||||
import "panel/app/models"
|
||||
|
||||
type UserList struct {
|
||||
Total int64 `json:"total"`
|
||||
Items []models.CertUser `json:"items"`
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package responses
|
||||
|
||||
type Settings struct {
|
||||
Name string `json:"name"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Email string `json:"email"`
|
||||
Port string `json:"port"`
|
||||
Entrance string `json:"entrance"`
|
||||
WebsitePath string `json:"website_path"`
|
||||
BackupPath string `json:"backup_path"`
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package responses
|
||||
|
||||
type Info struct {
|
||||
ID uint `json:"id"`
|
||||
Role []string `json:"role"`
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package responses
|
||||
|
||||
import "panel/app/models"
|
||||
|
||||
type List struct {
|
||||
Total int64 `json:"total"`
|
||||
Items []models.Website `json:"items"`
|
||||
}
|
||||
301
docs/docs.go
301
docs/docs.go
@@ -101,19 +101,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.CertList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -311,19 +299,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.DNSList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -678,19 +654,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.CertList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1452,19 +1416,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.Settings"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1528,19 +1480,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.Info"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1632,7 +1572,7 @@ const docTemplate = `{
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/services.BackupFile"
|
||||
"$ref": "#/definitions/internal.BackupFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1829,19 +1769,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.List"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1960,7 +1888,7 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/services.PanelWebsite"
|
||||
"$ref": "#/definitions/internal.PanelWebsite"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2630,6 +2558,67 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "integer"
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"ssl": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Cert": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3230,158 +3219,6 @@ const docTemplate = `{
|
||||
"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": "integer"
|
||||
}
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"ssl": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
@@ -94,19 +94,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.CertList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,19 +292,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.DNSList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -671,19 +647,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.CertList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1445,19 +1409,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.Settings"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1521,19 +1473,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.Info"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1625,7 +1565,7 @@
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/services.BackupFile"
|
||||
"$ref": "#/definitions/internal.BackupFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1822,19 +1762,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.List"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/controllers.SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1953,7 +1881,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/services.PanelWebsite"
|
||||
"$ref": "#/definitions/internal.PanelWebsite"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2623,6 +2551,67 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "integer"
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"ssl": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Cert": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3223,158 +3212,6 @@
|
||||
"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": "integer"
|
||||
}
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"ssl": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
@@ -46,6 +46,46 @@ definitions:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
internal.BackupFile:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
size:
|
||||
type: string
|
||||
type: object
|
||||
internal.PanelWebsite:
|
||||
properties:
|
||||
db:
|
||||
type: boolean
|
||||
db_name:
|
||||
type: string
|
||||
db_password:
|
||||
type: string
|
||||
db_type:
|
||||
type: string
|
||||
db_user:
|
||||
type: string
|
||||
domains:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
php:
|
||||
type: integer
|
||||
ports:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
remark:
|
||||
type: string
|
||||
ssl:
|
||||
type: boolean
|
||||
status:
|
||||
type: boolean
|
||||
type: object
|
||||
models.Cert:
|
||||
properties:
|
||||
auto_renew:
|
||||
@@ -441,105 +481,6 @@ definitions:
|
||||
kid:
|
||||
type: string
|
||||
type: object
|
||||
responses.CertList:
|
||||
properties:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/models.Cert'
|
||||
type: array
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
responses.DNSList:
|
||||
properties:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/models.CertDNS'
|
||||
type: array
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
responses.Info:
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
role:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
responses.List:
|
||||
properties:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/models.Website'
|
||||
type: array
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
responses.Settings:
|
||||
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
|
||||
type: object
|
||||
services.BackupFile:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
size:
|
||||
type: string
|
||||
type: object
|
||||
services.PanelWebsite:
|
||||
properties:
|
||||
db:
|
||||
type: boolean
|
||||
db_name:
|
||||
type: string
|
||||
db_password:
|
||||
type: string
|
||||
db_type:
|
||||
type: string
|
||||
db_user:
|
||||
type: string
|
||||
domains:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
php:
|
||||
type: integer
|
||||
ports:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
remark:
|
||||
type: string
|
||||
ssl:
|
||||
type: boolean
|
||||
status:
|
||||
type: boolean
|
||||
type: object
|
||||
info:
|
||||
contact:
|
||||
email: i@haozi.net
|
||||
@@ -596,12 +537,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/responses.CertList'
|
||||
type: object
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取证书列表
|
||||
@@ -722,12 +658,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/responses.DNSList'
|
||||
type: object
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取 DNS 接口列表
|
||||
@@ -942,12 +873,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/responses.CertList'
|
||||
type: object
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取用户列表
|
||||
@@ -1416,12 +1342,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/responses.Settings'
|
||||
type: object
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 设置列表
|
||||
@@ -1460,12 +1381,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/responses.Info'
|
||||
type: object
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 用户信息
|
||||
@@ -1522,7 +1438,7 @@ paths:
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/services.BackupFile'
|
||||
$ref: '#/definitions/internal.BackupFile'
|
||||
type: array
|
||||
type: object
|
||||
security:
|
||||
@@ -1640,12 +1556,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/responses.List'
|
||||
type: object
|
||||
$ref: '#/definitions/controllers.SuccessResponse'
|
||||
security:
|
||||
- BearerToken: []
|
||||
summary: 获取网站列表
|
||||
@@ -1718,7 +1629,7 @@ paths:
|
||||
- $ref: '#/definitions/controllers.SuccessResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/services.PanelWebsite'
|
||||
$ref: '#/definitions/internal.PanelWebsite'
|
||||
type: object
|
||||
security:
|
||||
- BearerToken: []
|
||||
|
||||
Reference in New Issue
Block a user