| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
- // This file was generated by swaggo/swag
- 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}}",
- "contact": {},
- "version": "{{.Version}}"
- },
- "host": "{{.Host}}",
- "basePath": "{{.BasePath}}",
- "paths": {
- "/Account/Login": {
- "post": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "账户服务"
- ],
- "summary": "账户登录",
- "parameters": [
- {
- "description": "登录入参",
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/request.LoginReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "返回包括用户信息,token,过期时间",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.Response"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/response.LoginRsp"
- },
- "msg": {
- "type": "string"
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- "definitions": {
- "request.LoginReq": {
- "type": "object",
- "required": [
- "clientType",
- "password",
- "userName"
- ],
- "properties": {
- "clientType": {
- "description": "客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果",
- "type": "integer"
- },
- "password": {
- "description": "密码",
- "type": "string"
- },
- "userName": {
- "description": "用户名,可以是LoginID/LoginCode/手机号码",
- "type": "string"
- }
- }
- },
- "response.LoginRsp": {
- "type": "object",
- "properties": {
- "expiresAt": {
- "description": "过期时间",
- "type": "integer"
- },
- "loginId": {
- "description": "登录ID",
- "type": "integer"
- },
- "token": {
- "description": "新服务Token",
- "type": "string"
- },
- "userId": {
- "description": "用户ID",
- "type": "integer"
- }
- }
- },
- "response.Response": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "data": {
- "type": "object"
- },
- "msg": {
- "type": "string"
- }
- }
- }
- },
- "securityDefinitions": {
- "ApiKeyAuth": {
- "type": "apiKey",
- "name": "x-token",
- "in": "header"
- }
- }
- }`
- 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: "0.0.1",
- Host: "",
- BasePath: "/",
- Schemes: []string{},
- Title: "Swagger Example API",
- Description: "新接入服务",
- }
- 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{})
- }
|