docs.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. // Package docs GENERATED BY SWAG; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import "github.com/swaggo/swag"
  5. const docTemplate = `{
  6. "schemes": {{ marshal .Schemes }},
  7. "swagger": "2.0",
  8. "info": {
  9. "description": "{{escape .Description}}",
  10. "title": "{{.Title}}",
  11. "contact": {},
  12. "version": "{{.Version}}"
  13. },
  14. "host": "{{.Host}}",
  15. "basePath": "{{.BasePath}}",
  16. "paths": {
  17. "/Account/Login": {
  18. "post": {
  19. "consumes": [
  20. "application/json"
  21. ],
  22. "produces": [
  23. "application/json"
  24. ],
  25. "tags": [
  26. "账户服务"
  27. ],
  28. "summary": "账户登录",
  29. "parameters": [
  30. {
  31. "description": "登录入参",
  32. "name": "data",
  33. "in": "body",
  34. "required": true,
  35. "schema": {
  36. "$ref": "#/definitions/request.LoginReq"
  37. }
  38. }
  39. ],
  40. "responses": {
  41. "200": {
  42. "description": "返回包括用户信息,token,过期时间",
  43. "schema": {
  44. "allOf": [
  45. {
  46. "$ref": "#/definitions/response.Response"
  47. },
  48. {
  49. "type": "object",
  50. "properties": {
  51. "data": {
  52. "$ref": "#/definitions/response.LoginRsp"
  53. },
  54. "msg": {
  55. "type": "string"
  56. }
  57. }
  58. }
  59. ]
  60. }
  61. }
  62. }
  63. }
  64. }
  65. },
  66. "definitions": {
  67. "request.LoginReq": {
  68. "type": "object",
  69. "required": [
  70. "clientType",
  71. "password",
  72. "userName"
  73. ],
  74. "properties": {
  75. "clientType": {
  76. "description": "客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果",
  77. "type": "integer"
  78. },
  79. "password": {
  80. "description": "密码",
  81. "type": "string"
  82. },
  83. "userName": {
  84. "description": "用户名,可以是LoginID/LoginCode/手机号码",
  85. "type": "string"
  86. }
  87. }
  88. },
  89. "response.LoginRsp": {
  90. "type": "object",
  91. "properties": {
  92. "expiresAt": {
  93. "description": "过期时间",
  94. "type": "integer"
  95. },
  96. "loginId": {
  97. "description": "登录ID",
  98. "type": "integer"
  99. },
  100. "token": {
  101. "description": "新服务Token",
  102. "type": "string"
  103. },
  104. "userId": {
  105. "description": "用户ID",
  106. "type": "integer"
  107. }
  108. }
  109. },
  110. "response.Response": {
  111. "type": "object",
  112. "properties": {
  113. "code": {
  114. "type": "integer"
  115. },
  116. "data": {},
  117. "msg": {
  118. "type": "string"
  119. }
  120. }
  121. }
  122. },
  123. "securityDefinitions": {
  124. "ApiKeyAuth": {
  125. "type": "apiKey",
  126. "name": "x-token",
  127. "in": "header"
  128. }
  129. }
  130. }`
  131. // SwaggerInfo holds exported Swagger Info so clients can modify it
  132. var SwaggerInfo = &swag.Spec{
  133. Version: "0.0.1",
  134. Host: "",
  135. BasePath: "",
  136. Schemes: []string{},
  137. Title: "Swagger Example API",
  138. Description: "新接入服务",
  139. InfoInstanceName: "swagger",
  140. SwaggerTemplate: docTemplate,
  141. }
  142. func init() {
  143. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  144. }