| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
- // This file was generated by swaggo/swag at
- // 2021-01-08 16:28:24.8381164 +0800 CST m=+0.073999901
- 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}}",
- "title": "{{.Title}}",
- "termsOfService": "http://swagger.io/terms/",
- "contact": {
- "name": "API Support",
- "url": "http://www.swagger.io/support",
- "email": "support@swagger.io"
- },
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- },
- "version": "{{.Version}}"
- },
- "host": "{{.Host}}",
- "basePath": "{{.BasePath}}",
- "paths": {
- "/Auth/SignUp": {
- "post": {
- "description": "用户添加",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Auth"
- ],
- "summary": "用户添加",
- "parameters": [
- {
- "type": "string",
- "description": "用户名",
- "name": "userCode",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "密码",
- "name": "password",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "邮箱",
- "name": "email",
- "in": "formData"
- },
- {
- "type": "string",
- "description": "手机号",
- "name": "phone",
- "in": "formData"
- },
- {
- "type": "string",
- "description": "姓名",
- "name": "name",
- "in": "formData"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseBase"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "controller.ResponseBase": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "memo": {
- "type": "string"
- }
- }
- }
- },
- "securityDefinitions": {
- "ApiKeyAuth": {
- "type": "apiKey",
- "name": "Authorization",
- "in": "header"
- },
- "BasicAuth": {
- "type": "basic"
- },
- "OAuth2AccessCode": {
- "type": "oauth2",
- "flow": "accessCode",
- "authorizationUrl": "https://example.com/oauth/authorize",
- "tokenUrl": "https://example.com/oauth/token",
- "scopes": {
- "admin": " Grants read and write access to administrative information"
- }
- },
- "OAuth2Application": {
- "type": "oauth2",
- "flow": "application",
- "tokenUrl": "https://example.com/oauth/token",
- "scopes": {
- "admin": " Grants read and write access to administrative information",
- "write": " Grants write access"
- }
- },
- "OAuth2Implicit": {
- "type": "oauth2",
- "flow": "implicit",
- "authorizationUrl": "https://example.com/oauth/authorize",
- "scopes": {
- "admin": " Grants read and write access to administrative information",
- "write": " Grants write access"
- }
- },
- "OAuth2Password": {
- "type": "oauth2",
- "flow": "password",
- "tokenUrl": "https://example.com/oauth/token",
- "scopes": {
- "admin": " Grants read and write access to administrative information",
- "read": " Grants read access",
- "write": " Grants write access"
- }
- }
- }
- }`
- 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{
- Version: "1.0",
- Host: "",
- BasePath: "/v1",
- Schemes: []string{},
- Title: "web框架",
- Description: "web框架 API 文档",
- }
- type s struct{}
- func (s *s) ReadDoc() string {
- 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, sInfo); err != nil {
- return doc
- }
- return tpl.String()
- }
- func init() {
- swag.Register(swag.Name, &s{})
- }
|