docs.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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. "termsOfService": "http://swagger.io/terms/",
  18. "contact": {
  19. "name": "API Support",
  20. "url": "http://www.swagger.io/support",
  21. "email": "support@swagger.io"
  22. },
  23. "license": {
  24. "name": "Apache 2.0",
  25. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  26. },
  27. "version": "{{.Version}}"
  28. },
  29. "host": "{{.Host}}",
  30. "basePath": "{{.BasePath}}",
  31. "paths": {
  32. "/Auth/GenVerifyPic": {
  33. "post": {
  34. "description": "获取验证图片和验证id",
  35. "consumes": [
  36. "application/x-www-form-urlencoded"
  37. ],
  38. "produces": [
  39. "application/json"
  40. ],
  41. "tags": [
  42. "Auth"
  43. ],
  44. "summary": "获取验证图片",
  45. "parameters": [
  46. {
  47. "type": "string",
  48. "description": "高",
  49. "name": "height",
  50. "in": "formData",
  51. "required": true
  52. },
  53. {
  54. "type": "string",
  55. "description": "宽",
  56. "name": "width",
  57. "in": "formData",
  58. "required": true
  59. },
  60. {
  61. "type": "string",
  62. "description": "噪点数量",
  63. "name": "noiseCount",
  64. "in": "formData",
  65. "required": true
  66. },
  67. {
  68. "type": "string",
  69. "description": "验证码字数",
  70. "name": "length",
  71. "in": "formData",
  72. "required": true
  73. },
  74. {
  75. "type": "string",
  76. "description": "验证码取值范围 比如 1234567890 或者 abcdef等",
  77. "name": "source",
  78. "in": "formData",
  79. "required": true
  80. }
  81. ],
  82. "responses": {
  83. "200": {
  84. "description": "OK",
  85. "schema": {
  86. "$ref": "#/definitions/controller.ResponseVerifyPic"
  87. }
  88. }
  89. }
  90. }
  91. },
  92. "/Auth/GetPhoneVFCode": {
  93. "post": {
  94. "description": "手机获取验证码",
  95. "consumes": [
  96. "application/x-www-form-urlencoded"
  97. ],
  98. "produces": [
  99. "application/json"
  100. ],
  101. "tags": [
  102. "Auth"
  103. ],
  104. "summary": "手机获取验证码",
  105. "parameters": [
  106. {
  107. "type": "string",
  108. "description": "手机号",
  109. "name": "phone",
  110. "in": "formData",
  111. "required": true
  112. },
  113. {
  114. "type": "integer",
  115. "description": "验证码类型 1:登录",
  116. "name": "codeType",
  117. "in": "formData",
  118. "required": true
  119. }
  120. ],
  121. "responses": {
  122. "200": {
  123. "description": "OK",
  124. "schema": {
  125. "$ref": "#/definitions/controller.ResponseBase"
  126. }
  127. }
  128. }
  129. }
  130. },
  131. "/Auth/PhoneSignIn": {
  132. "post": {
  133. "description": "手机验证码登录",
  134. "consumes": [
  135. "application/x-www-form-urlencoded"
  136. ],
  137. "produces": [
  138. "application/json"
  139. ],
  140. "tags": [
  141. "Auth"
  142. ],
  143. "summary": "手机验证码登录",
  144. "parameters": [
  145. {
  146. "type": "string",
  147. "description": "手机号",
  148. "name": "phone",
  149. "in": "formData",
  150. "required": true
  151. },
  152. {
  153. "type": "integer",
  154. "description": "验证码",
  155. "name": "smsCode",
  156. "in": "formData",
  157. "required": true
  158. }
  159. ],
  160. "responses": {
  161. "200": {
  162. "description": "OK",
  163. "schema": {
  164. "$ref": "#/definitions/controller.ResponseBase"
  165. }
  166. }
  167. }
  168. }
  169. },
  170. "/HrSensors/HrSensorsUpdate": {
  171. "post": {
  172. "description": "心率带信息查询和更新",
  173. "consumes": [
  174. "application/x-www-form-urlencoded"
  175. ],
  176. "produces": [
  177. "application/json"
  178. ],
  179. "tags": [
  180. "HrSensors"
  181. ],
  182. "summary": "心率带信息查询和更新",
  183. "parameters": [
  184. {
  185. "type": "string",
  186. "description": "Token",
  187. "name": "token",
  188. "in": "formData",
  189. "required": true
  190. },
  191. {
  192. "type": "string",
  193. "description": "心率带编号",
  194. "name": "sn",
  195. "in": "formData",
  196. "required": true
  197. }
  198. ],
  199. "responses": {
  200. "200": {
  201. "description": "OK",
  202. "schema": {
  203. "$ref": "#/definitions/controller.ResponseBase"
  204. }
  205. }
  206. }
  207. }
  208. },
  209. "/User/GetDuInfoAndUserInfoByUserMd5": {
  210. "post": {
  211. "description": "查询用户当前显示单元和对应身体信息",
  212. "consumes": [
  213. "application/x-www-form-urlencoded"
  214. ],
  215. "produces": [
  216. "application/json"
  217. ],
  218. "tags": [
  219. "User"
  220. ],
  221. "summary": "查询用户是否正在上课接口",
  222. "parameters": [
  223. {
  224. "type": "string",
  225. "description": "Token",
  226. "name": "token",
  227. "in": "formData",
  228. "required": true
  229. }
  230. ],
  231. "responses": {
  232. "200": {
  233. "description": "OK",
  234. "schema": {
  235. "$ref": "#/definitions/controller.ResponseBase"
  236. }
  237. }
  238. }
  239. }
  240. },
  241. "/User/UserSelfQuery": {
  242. "post": {
  243. "description": "会员自身信息查询",
  244. "consumes": [
  245. "application/x-www-form-urlencoded"
  246. ],
  247. "produces": [
  248. "application/json"
  249. ],
  250. "tags": [
  251. "User"
  252. ],
  253. "summary": "会员自身信息查询",
  254. "parameters": [
  255. {
  256. "type": "string",
  257. "description": "Token",
  258. "name": "token",
  259. "in": "formData",
  260. "required": true
  261. }
  262. ],
  263. "responses": {
  264. "200": {
  265. "description": "OK",
  266. "schema": {
  267. "$ref": "#/definitions/controller.ResponseBase"
  268. }
  269. }
  270. }
  271. }
  272. }
  273. },
  274. "definitions": {
  275. "controller.ResponseBase": {
  276. "type": "object",
  277. "properties": {
  278. "code": {
  279. "type": "integer"
  280. },
  281. "memo": {
  282. "type": "string"
  283. }
  284. }
  285. },
  286. "controller.ResponseVerifyPic": {
  287. "type": "object",
  288. "properties": {
  289. "id": {
  290. "type": "string"
  291. },
  292. "pic": {
  293. "type": "string"
  294. }
  295. }
  296. }
  297. },
  298. "securityDefinitions": {
  299. "ApiKeyAuth": {
  300. "type": "apiKey",
  301. "name": "Authorization",
  302. "in": "header"
  303. },
  304. "BasicAuth": {
  305. "type": "basic"
  306. },
  307. "OAuth2AccessCode": {
  308. "type": "oauth2",
  309. "flow": "accessCode",
  310. "authorizationUrl": "https://example.com/oauth/authorize",
  311. "tokenUrl": "https://example.com/oauth/token",
  312. "scopes": {
  313. "admin": " Grants read and write access to administrative information"
  314. }
  315. },
  316. "OAuth2Application": {
  317. "type": "oauth2",
  318. "flow": "application",
  319. "tokenUrl": "https://example.com/oauth/token",
  320. "scopes": {
  321. "admin": " Grants read and write access to administrative information",
  322. "write": " Grants write access"
  323. }
  324. },
  325. "OAuth2Implicit": {
  326. "type": "oauth2",
  327. "flow": "implicit",
  328. "authorizationUrl": "https://example.com/oauth/authorize",
  329. "scopes": {
  330. "admin": " Grants read and write access to administrative information",
  331. "write": " Grants write access"
  332. }
  333. },
  334. "OAuth2Password": {
  335. "type": "oauth2",
  336. "flow": "password",
  337. "tokenUrl": "https://example.com/oauth/token",
  338. "scopes": {
  339. "admin": " Grants read and write access to administrative information",
  340. "read": " Grants read access",
  341. "write": " Grants write access"
  342. }
  343. }
  344. }
  345. }`
  346. type swaggerInfo struct {
  347. Version string
  348. Host string
  349. BasePath string
  350. Schemes []string
  351. Title string
  352. Description string
  353. }
  354. // SwaggerInfo holds exported Swagger Info so clients can modify it
  355. var SwaggerInfo = swaggerInfo{
  356. Version: "1.0",
  357. Host: "",
  358. BasePath: "/v1",
  359. Schemes: []string{},
  360. Title: "Video Course框架",
  361. Description: "Video Course框架 API 文档",
  362. }
  363. type s struct{}
  364. func (s *s) ReadDoc() string {
  365. sInfo := SwaggerInfo
  366. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  367. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  368. "marshal": func(v interface{}) string {
  369. a, _ := json.Marshal(v)
  370. return string(a)
  371. },
  372. }).Parse(doc)
  373. if err != nil {
  374. return doc
  375. }
  376. var tpl bytes.Buffer
  377. if err := t.Execute(&tpl, sInfo); err != nil {
  378. return doc
  379. }
  380. return tpl.String()
  381. }
  382. func init() {
  383. swag.Register(swag.Name, &s{})
  384. }