|
|
|
@ -1,17 +1,20 @@
|
|
|
|
|
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
|
|
|
// This file was generated by swaggo/swag at
|
|
|
|
|
// 2020-07-23 16:30:50.1490506 +0800 CST m=+0.137007801
|
|
|
|
|
// 2020-10-19 23:32:55.3852666 +0800 CST m=+0.208956401
|
|
|
|
|
|
|
|
|
|
package docs
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/alecthomas/template"
|
|
|
|
|
"github.com/swaggo/swag"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var doc = `{
|
|
|
|
|
"schemes": {{ marshal .Schemes }},
|
|
|
|
|
"swagger": "2.0",
|
|
|
|
|
"info": {
|
|
|
|
|
"description": "{{.Description}}",
|
|
|
|
@ -59,7 +62,6 @@ var doc = `{
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -109,7 +111,6 @@ var doc = `{
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -145,7 +146,6 @@ var doc = `{
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -181,7 +181,22 @@ var doc = `{
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/visitors_online": {
|
|
|
|
|
"get": {
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"summary": "获取在线访客列表接口",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -211,23 +226,39 @@ type swaggerInfo struct {
|
|
|
|
|
Version string
|
|
|
|
|
Host string
|
|
|
|
|
BasePath string
|
|
|
|
|
Schemes []string
|
|
|
|
|
Title string
|
|
|
|
|
Description string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
|
var SwaggerInfo swaggerInfo
|
|
|
|
|
var SwaggerInfo = swaggerInfo{
|
|
|
|
|
Version: "",
|
|
|
|
|
Host: "",
|
|
|
|
|
BasePath: "",
|
|
|
|
|
Schemes: []string{},
|
|
|
|
|
Title: "",
|
|
|
|
|
Description: "",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type s struct{}
|
|
|
|
|
|
|
|
|
|
func (s *s) ReadDoc() string {
|
|
|
|
|
t, err := template.New("swagger_info").Parse(doc)
|
|
|
|
|
sInfo := SwaggerInfo
|
|
|
|
|
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
|
|
|
|
|
|
|
|
|
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
|
|
|
|
"marshal": func(v interface{}) string {
|
|
|
|
|
a, _ := json.Marshal(v)
|
|
|
|
|
return string(a)
|
|
|
|
|
},
|
|
|
|
|
}).Parse(doc)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return doc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var tpl bytes.Buffer
|
|
|
|
|
if err := t.Execute(&tpl, SwaggerInfo); err != nil {
|
|
|
|
|
if err := t.Execute(&tpl, sInfo); err != nil {
|
|
|
|
|
return doc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|