docs.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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": "picCode",
  110. "in": "formData"
  111. },
  112. {
  113. "type": "string",
  114. "description": "手机号",
  115. "name": "phone",
  116. "in": "formData",
  117. "required": true
  118. },
  119. {
  120. "type": "integer",
  121. "description": "验证码类型 1:登录",
  122. "name": "codeType",
  123. "in": "formData",
  124. "required": true
  125. }
  126. ],
  127. "responses": {
  128. "200": {
  129. "description": "OK",
  130. "schema": {
  131. "$ref": "#/definitions/controller.ResponseBase"
  132. }
  133. }
  134. }
  135. }
  136. },
  137. "/Auth/PhoneSignIn": {
  138. "post": {
  139. "description": "手机验证码登录",
  140. "consumes": [
  141. "application/x-www-form-urlencoded"
  142. ],
  143. "produces": [
  144. "application/json"
  145. ],
  146. "tags": [
  147. "Auth"
  148. ],
  149. "summary": "手机验证码登录",
  150. "parameters": [
  151. {
  152. "type": "string",
  153. "description": "手机号",
  154. "name": "phone",
  155. "in": "formData",
  156. "required": true
  157. },
  158. {
  159. "type": "integer",
  160. "description": "验证码",
  161. "name": "smsCode",
  162. "in": "formData",
  163. "required": true
  164. }
  165. ],
  166. "responses": {
  167. "200": {
  168. "description": "OK",
  169. "schema": {
  170. "$ref": "#/definitions/controller.ResponseBase"
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "/HrSensors/HrSensorsUpdate": {
  177. "post": {
  178. "description": "心率带信息查询和更新",
  179. "consumes": [
  180. "application/x-www-form-urlencoded"
  181. ],
  182. "produces": [
  183. "application/json"
  184. ],
  185. "tags": [
  186. "HrSensors"
  187. ],
  188. "summary": "心率带信息查询和更新",
  189. "parameters": [
  190. {
  191. "type": "string",
  192. "description": "Token",
  193. "name": "token",
  194. "in": "formData",
  195. "required": true
  196. },
  197. {
  198. "type": "string",
  199. "description": "心率带编号",
  200. "name": "sn",
  201. "in": "formData",
  202. "required": true
  203. }
  204. ],
  205. "responses": {
  206. "200": {
  207. "description": "OK",
  208. "schema": {
  209. "$ref": "#/definitions/controller.ResponseBase"
  210. }
  211. }
  212. }
  213. }
  214. },
  215. "/User/GetDuInfoAndUserInfoByUserMd5": {
  216. "post": {
  217. "description": "查询用户当前显示单元和对应身体信息",
  218. "consumes": [
  219. "application/x-www-form-urlencoded"
  220. ],
  221. "produces": [
  222. "application/json"
  223. ],
  224. "tags": [
  225. "User"
  226. ],
  227. "summary": "查询用户是否正在上课接口",
  228. "parameters": [
  229. {
  230. "type": "string",
  231. "description": "Token",
  232. "name": "token",
  233. "in": "formData",
  234. "required": true
  235. }
  236. ],
  237. "responses": {
  238. "200": {
  239. "description": "OK",
  240. "schema": {
  241. "$ref": "#/definitions/controller.ResponseBase"
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "/User/UserSelfQuery": {
  248. "post": {
  249. "description": "会员自身信息查询",
  250. "consumes": [
  251. "application/x-www-form-urlencoded"
  252. ],
  253. "produces": [
  254. "application/json"
  255. ],
  256. "tags": [
  257. "User"
  258. ],
  259. "summary": "会员自身信息查询",
  260. "parameters": [
  261. {
  262. "type": "string",
  263. "description": "Token",
  264. "name": "token",
  265. "in": "formData",
  266. "required": true
  267. }
  268. ],
  269. "responses": {
  270. "200": {
  271. "description": "OK",
  272. "schema": {
  273. "$ref": "#/definitions/controller.ResponseBase"
  274. }
  275. }
  276. }
  277. }
  278. }
  279. },
  280. "definitions": {
  281. "controller.ResponseBase": {
  282. "type": "object",
  283. "properties": {
  284. "code": {
  285. "type": "integer"
  286. },
  287. "memo": {
  288. "type": "string"
  289. }
  290. }
  291. },
  292. "controller.ResponseVerifyPic": {
  293. "type": "object",
  294. "properties": {
  295. "id": {
  296. "type": "string"
  297. },
  298. "pic": {
  299. "type": "string"
  300. }
  301. }
  302. }
  303. },
  304. "securityDefinitions": {
  305. "ApiKeyAuth": {
  306. "type": "apiKey",
  307. "name": "Authorization",
  308. "in": "header"
  309. },
  310. "BasicAuth": {
  311. "type": "basic"
  312. },
  313. "OAuth2AccessCode": {
  314. "type": "oauth2",
  315. "flow": "accessCode",
  316. "authorizationUrl": "https://example.com/oauth/authorize",
  317. "tokenUrl": "https://example.com/oauth/token",
  318. "scopes": {
  319. "admin": " Grants read and write access to administrative information"
  320. }
  321. },
  322. "OAuth2Application": {
  323. "type": "oauth2",
  324. "flow": "application",
  325. "tokenUrl": "https://example.com/oauth/token",
  326. "scopes": {
  327. "admin": " Grants read and write access to administrative information",
  328. "write": " Grants write access"
  329. }
  330. },
  331. "OAuth2Implicit": {
  332. "type": "oauth2",
  333. "flow": "implicit",
  334. "authorizationUrl": "https://example.com/oauth/authorize",
  335. "scopes": {
  336. "admin": " Grants read and write access to administrative information",
  337. "write": " Grants write access"
  338. }
  339. },
  340. "OAuth2Password": {
  341. "type": "oauth2",
  342. "flow": "password",
  343. "tokenUrl": "https://example.com/oauth/token",
  344. "scopes": {
  345. "admin": " Grants read and write access to administrative information",
  346. "read": " Grants read access",
  347. "write": " Grants write access"
  348. }
  349. }
  350. }
  351. }`
  352. type swaggerInfo struct {
  353. Version string
  354. Host string
  355. BasePath string
  356. Schemes []string
  357. Title string
  358. Description string
  359. }
  360. // SwaggerInfo holds exported Swagger Info so clients can modify it
  361. var SwaggerInfo = swaggerInfo{
  362. Version: "1.0",
  363. Host: "",
  364. BasePath: "/v1",
  365. Schemes: []string{},
  366. Title: "Video Course框架",
  367. Description: "Video Course框架 API 文档",
  368. }
  369. type s struct{}
  370. func (s *s) ReadDoc() string {
  371. sInfo := SwaggerInfo
  372. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  373. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  374. "marshal": func(v interface{}) string {
  375. a, _ := json.Marshal(v)
  376. return string(a)
  377. },
  378. }).Parse(doc)
  379. if err != nil {
  380. return doc
  381. }
  382. var tpl bytes.Buffer
  383. if err := t.Execute(&tpl, sInfo); err != nil {
  384. return doc
  385. }
  386. return tpl.String()
  387. }
  388. func init() {
  389. swag.Register(swag.Name, &s{})
  390. }