docs.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Code generated by swaggo/swag. DO NOT EDIT.
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "termsOfService": "http://swagger.io/terms/",
  11. "contact": {},
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "{{.Version}}"
  17. },
  18. "host": "{{.Host}}",
  19. "basePath": "{{.BasePath}}",
  20. "paths": {
  21. "/user/login": {
  22. "post": {
  23. "tags": [
  24. "用户模块"
  25. ],
  26. "summary": "登录",
  27. "parameters": [
  28. {
  29. "type": "string",
  30. "description": "用户ID",
  31. "name": "uid",
  32. "in": "formData"
  33. }
  34. ],
  35. "responses": {
  36. "200": {
  37. "description": "code\",\"data\",\"token\"}",
  38. "schema": {
  39. "type": "string"
  40. }
  41. }
  42. }
  43. }
  44. },
  45. "/user/register": {
  46. "post": {
  47. "tags": [
  48. "用户模块"
  49. ],
  50. "summary": "创建用户",
  51. "parameters": [
  52. {
  53. "type": "string",
  54. "description": "用户ID",
  55. "name": "uid",
  56. "in": "formData"
  57. },
  58. {
  59. "type": "string",
  60. "description": "用户名",
  61. "name": "name",
  62. "in": "formData"
  63. },
  64. {
  65. "type": "string",
  66. "description": "头像",
  67. "name": "avatar",
  68. "in": "formData"
  69. }
  70. ],
  71. "responses": {
  72. "200": {
  73. "description": "code\",\"data\",\"message\"}",
  74. "schema": {
  75. "type": "string"
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }`
  83. // SwaggerInfo holds exported Swagger Info so clients can modify it
  84. var SwaggerInfo = &swag.Spec{
  85. Version: "1.0",
  86. Host: "127.0.0.1:8084",
  87. BasePath: "/WeChatTrading/trading-go",
  88. Schemes: []string{},
  89. Title: "二手交易",
  90. Description: "一个基于微信小程序的校园二手交易平台的api",
  91. InfoInstanceName: "swagger",
  92. SwaggerTemplate: docTemplate,
  93. LeftDelim: "{{",
  94. RightDelim: "}}",
  95. }
  96. func init() {
  97. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  98. }