gofiber-study/docs/docs.go
2022-10-04 14:59:46 +08:00

376 lines
12 KiB
Go

// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Shikong",
"email": "919411476@qq.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/": {
"get": {
"description": "简单的 HelloWorld 示例",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"HelloWorld"
],
"summary": "HelloWorld",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "string"
}
}
}
]
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
},
"/error": {
"get": {
"description": "错误信息示例",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Error"
],
"summary": "错误处理",
"responses": {
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
},
"put": {
"description": "错误信息示例",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Error"
],
"summary": "错误处理",
"responses": {
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
},
"post": {
"description": "错误信息示例",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Error"
],
"summary": "错误处理",
"responses": {
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
},
"delete": {
"description": "错误信息示例",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Error"
],
"summary": "错误处理",
"responses": {
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
},
"patch": {
"description": "错误信息示例",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Error"
],
"summary": "错误处理",
"responses": {
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
},
"/routes": {
"get": {
"description": "获取所有路由信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Routes"
],
"summary": "获取所有路由",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/fiber.Route"
}
}
}
}
}
]
}
}
}
}
},
"/user/account": {
"get": {
"description": "根据 账号 获取用户信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "根据 账号 获取用户信息",
"parameters": [
{
"type": "string",
"description": "账号名称",
"name": "account",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/models.User"
}
}
}
]
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
}
},
"definitions": {
"errorx.CodeErrorResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {},
"msg": {
"type": "string",
"example": "OK"
}
}
},
"fiber.Route": {
"type": "object",
"properties": {
"method": {
"description": "Public fields",
"type": "string"
},
"name": {
"description": "Route's name",
"type": "string"
},
"params": {
"description": "Case sensitive param keys",
"type": "array",
"items": {
"type": "string"
}
},
"path": {
"description": "Original registered route path",
"type": "string"
}
}
},
"models.User": {
"type": "object",
"properties": {
"account": {
"type": "string"
},
"active": {
"type": "boolean"
},
"alias": {
"type": "string"
},
"contact": {
"type": "string"
},
"email": {
"type": "string"
},
"emailVerify": {
"type": "boolean"
},
"id": {
"type": "string"
},
"lastLoginTime": {
"type": "string"
},
"memo": {
"type": "string"
},
"registerTime": {
"type": "string"
},
"userName": {
"type": "string"
}
}
},
"response.Response": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {},
"msg": {
"type": "string",
"example": "OK"
}
}
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "GoFiber Study API",
Description: "基于 Fiber 框架的 swagger",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}