docs.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "strings"
  8. "github.com/alecthomas/template"
  9. "github.com/swaggo/swag"
  10. )
  11. var doc = `{
  12. "schemes": {{ marshal .Schemes }},
  13. "swagger": "2.0",
  14. "info": {
  15. "description": "{{.Description}}",
  16. "title": "{{.Title}}",
  17. "contact": {},
  18. "license": {},
  19. "version": "{{.Version}}"
  20. },
  21. "host": "{{.Host}}",
  22. "basePath": "{{.BasePath}}",
  23. "paths": {
  24. "/api/v1/wx/applet/pay_callback": {
  25. "post": {
  26. "description": "微信小程序支付回调",
  27. "consumes": [
  28. "application/json"
  29. ],
  30. "produces": [
  31. "application/json"
  32. ],
  33. "tags": [
  34. "callback"
  35. ],
  36. "summary": "微信小程序支付回调"
  37. }
  38. },
  39. "/api/v1/wx/public": {
  40. "get": {
  41. "description": "微信公众号接入回调",
  42. "consumes": [
  43. "application/json"
  44. ],
  45. "produces": [
  46. "application/json"
  47. ],
  48. "tags": [
  49. "callback"
  50. ],
  51. "summary": "微信公众号接入回调"
  52. },
  53. "post": {
  54. "description": "微信公众号接收事件通知",
  55. "consumes": [
  56. "application/json"
  57. ],
  58. "produces": [
  59. "application/json"
  60. ],
  61. "tags": [
  62. "callback"
  63. ],
  64. "summary": "微信公众号接收事件通知"
  65. }
  66. },
  67. "/apis/v1/wx/applet/pay_callbackv3": {
  68. "post": {
  69. "description": "微信小程序支付回调",
  70. "consumes": [
  71. "application/json"
  72. ],
  73. "produces": [
  74. "application/json"
  75. ],
  76. "tags": [
  77. "callback"
  78. ],
  79. "summary": "微信小程序支付回调"
  80. }
  81. }
  82. }
  83. }`
  84. type swaggerInfo struct {
  85. Version string
  86. Host string
  87. BasePath string
  88. Schemes []string
  89. Title string
  90. Description string
  91. }
  92. // SwaggerInfo holds exported Swagger Info so clients can modify it
  93. var SwaggerInfo = swaggerInfo{
  94. Version: "1.1",
  95. Host: "",
  96. BasePath: "",
  97. Schemes: []string{},
  98. Title: "Project property-callback-gateway's APIs",
  99. Description: "This is a gateway server. On the page, you can go to do testing for every API.",
  100. }
  101. type s struct{}
  102. func (s *s) ReadDoc() string {
  103. sInfo := SwaggerInfo
  104. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  105. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  106. "marshal": func(v interface{}) string {
  107. a, _ := json.Marshal(v)
  108. return string(a)
  109. },
  110. }).Parse(doc)
  111. if err != nil {
  112. return doc
  113. }
  114. var tpl bytes.Buffer
  115. if err := t.Execute(&tpl, sInfo); err != nil {
  116. return doc
  117. }
  118. return tpl.String()
  119. }
  120. func init() {
  121. swag.Register(swag.Name, &s{})
  122. }