mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-09 08:02:26 +08:00
chore: rename blog->eiblog
This commit is contained in:
65
pkg/core/backup/docs/docs.go
Normal file
65
pkg/core/backup/docs/docs.go
Normal file
@@ -0,0 +1,65 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2021-04-29 11:12:59.387582 +0800 CST m=+0.016433684
|
||||
|
||||
package docs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/alecthomas/template"
|
||||
"github.com/swaggo/swag"
|
||||
)
|
||||
|
||||
var doc = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"title": "APP Demo API",
|
||||
"contact": {},
|
||||
"license": {},
|
||||
"version": "1.0"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "/api",
|
||||
"paths": {}
|
||||
}`
|
||||
|
||||
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{ Schemes: []string{}}
|
||||
|
||||
type s struct{}
|
||||
|
||||
func (s *s) ReadDoc() string {
|
||||
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 {
|
||||
return doc
|
||||
}
|
||||
|
||||
return tpl.String()
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(swag.Name, &s{})
|
||||
}
|
||||
13
pkg/core/backup/docs/swagger.json
Normal file
13
pkg/core/backup/docs/swagger.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"title": "APP Demo API",
|
||||
"contact": {},
|
||||
"license": {},
|
||||
"version": "1.0"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "/api",
|
||||
"paths": {}
|
||||
}
|
||||
10
pkg/core/backup/docs/swagger.yaml
Normal file
10
pkg/core/backup/docs/swagger.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
basePath: /api
|
||||
host: '{{.Host}}'
|
||||
info:
|
||||
contact: {}
|
||||
description: This is a sample server celler server.
|
||||
license: {}
|
||||
title: APP Demo API
|
||||
version: "1.0"
|
||||
paths: {}
|
||||
swagger: "2.0"
|
||||
Reference in New Issue
Block a user