docs.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  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. "contact": {},
  11. "version": "{{.Version}}"
  12. },
  13. "host": "{{.Host}}",
  14. "basePath": "{{.BasePath}}",
  15. "paths": {
  16. "/api-sa/v1/audio/batchDelete": {
  17. "post": {
  18. "produces": [
  19. "application/json"
  20. ],
  21. "tags": [
  22. "音频"
  23. ],
  24. "summary": "批量删除音频",
  25. "parameters": [
  26. {
  27. "description": "音频信息",
  28. "name": "object",
  29. "in": "body",
  30. "required": true,
  31. "schema": {
  32. "$ref": "#/definitions/request.BatchProcessAudio"
  33. }
  34. }
  35. ],
  36. "responses": {
  37. "200": {
  38. "description": "成功",
  39. "schema": {
  40. "$ref": "#/definitions/util.Response"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "/api-sa/v1/audio/batchProcess": {
  47. "post": {
  48. "produces": [
  49. "application/json"
  50. ],
  51. "tags": [
  52. "音频"
  53. ],
  54. "summary": "批量处理音频",
  55. "parameters": [
  56. {
  57. "description": "音频信息",
  58. "name": "object",
  59. "in": "body",
  60. "required": true,
  61. "schema": {
  62. "$ref": "#/definitions/request.BatchProcessAudio"
  63. }
  64. }
  65. ],
  66. "responses": {
  67. "200": {
  68. "description": "成功",
  69. "schema": {
  70. "$ref": "#/definitions/util.Response"
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "/api-sa/v1/audio/delete": {
  77. "post": {
  78. "produces": [
  79. "application/json"
  80. ],
  81. "tags": [
  82. "音频"
  83. ],
  84. "summary": "删除音频",
  85. "parameters": [
  86. {
  87. "description": "音频信息",
  88. "name": "object",
  89. "in": "body",
  90. "required": true,
  91. "schema": {
  92. "$ref": "#/definitions/request.ProcessAudio"
  93. }
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "成功",
  99. "schema": {
  100. "$ref": "#/definitions/util.Response"
  101. }
  102. }
  103. }
  104. }
  105. },
  106. "/api-sa/v1/audio/list": {
  107. "get": {
  108. "produces": [
  109. "application/json"
  110. ],
  111. "tags": [
  112. "音频"
  113. ],
  114. "summary": "音频分析检索",
  115. "parameters": [
  116. {
  117. "type": "string",
  118. "description": "司机号",
  119. "name": "driverNumber",
  120. "in": "query"
  121. },
  122. {
  123. "type": "string",
  124. "description": "关键字",
  125. "name": "keyword",
  126. "in": "query"
  127. },
  128. {
  129. "type": "string",
  130. "description": "机车号",
  131. "name": "locomotiveNumber",
  132. "in": "query"
  133. },
  134. {
  135. "type": "integer",
  136. "description": "页码",
  137. "name": "page",
  138. "in": "query"
  139. },
  140. {
  141. "type": "integer",
  142. "description": "每页大小",
  143. "name": "pageSize",
  144. "in": "query"
  145. },
  146. {
  147. "type": "string",
  148. "description": "车站号",
  149. "name": "stationNumber",
  150. "in": "query"
  151. },
  152. {
  153. "type": "string",
  154. "description": "车次",
  155. "name": "trainNumber",
  156. "in": "query"
  157. }
  158. ],
  159. "responses": {
  160. "200": {
  161. "description": "成功",
  162. "schema": {
  163. "allOf": [
  164. {
  165. "$ref": "#/definitions/util.ResponseList"
  166. },
  167. {
  168. "type": "object",
  169. "properties": {
  170. "data": {
  171. "type": "array",
  172. "items": {
  173. "$ref": "#/definitions/models.Audio"
  174. }
  175. }
  176. }
  177. }
  178. ]
  179. }
  180. }
  181. }
  182. }
  183. },
  184. "/api-sa/v1/audio/process": {
  185. "post": {
  186. "produces": [
  187. "application/json"
  188. ],
  189. "tags": [
  190. "音频"
  191. ],
  192. "summary": "处理音频",
  193. "parameters": [
  194. {
  195. "description": "音频信息",
  196. "name": "object",
  197. "in": "body",
  198. "required": true,
  199. "schema": {
  200. "$ref": "#/definitions/request.ProcessAudio"
  201. }
  202. }
  203. ],
  204. "responses": {
  205. "200": {
  206. "description": "成功",
  207. "schema": {
  208. "$ref": "#/definitions/util.Response"
  209. }
  210. }
  211. }
  212. }
  213. },
  214. "/api-sa/v1/audio/upload": {
  215. "post": {
  216. "produces": [
  217. "application/json"
  218. ],
  219. "tags": [
  220. "音频"
  221. ],
  222. "summary": "上传音频",
  223. "parameters": [
  224. {
  225. "type": "file",
  226. "description": "音频文件",
  227. "name": "file",
  228. "in": "formData",
  229. "required": true
  230. }
  231. ],
  232. "responses": {
  233. "200": {
  234. "description": "成功",
  235. "schema": {
  236. "$ref": "#/definitions/util.Response"
  237. }
  238. }
  239. }
  240. }
  241. }
  242. },
  243. "definitions": {
  244. "constvar.AudioStatus": {
  245. "type": "integer",
  246. "enum": [
  247. 0,
  248. 1,
  249. 2,
  250. 3,
  251. 4
  252. ],
  253. "x-enum-comments": {
  254. "AudioStatusFailed": "处理失败",
  255. "AudioStatusFinish": "处理完成",
  256. "AudioStatusProcessing": "处理中",
  257. "AudioStatusUploadOk": "上传成功 待处理",
  258. "AudioStatusUploading": "上传中"
  259. },
  260. "x-enum-varnames": [
  261. "AudioStatusUploading",
  262. "AudioStatusUploadOk",
  263. "AudioStatusProcessing",
  264. "AudioStatusFinish",
  265. "AudioStatusFailed"
  266. ]
  267. },
  268. "constvar.BoolType": {
  269. "type": "integer",
  270. "enum": [
  271. 1,
  272. 2
  273. ],
  274. "x-enum-comments": {
  275. "BoolTypeFalse": "false",
  276. "BoolTypeTrue": "true"
  277. },
  278. "x-enum-varnames": [
  279. "BoolTypeTrue",
  280. "BoolTypeFalse"
  281. ]
  282. },
  283. "gorm.DeletedAt": {
  284. "type": "object",
  285. "properties": {
  286. "time": {
  287. "type": "string"
  288. },
  289. "valid": {
  290. "description": "Valid is true if Time is not NULL",
  291. "type": "boolean"
  292. }
  293. }
  294. },
  295. "models.Audio": {
  296. "type": "object",
  297. "properties": {
  298. "audioStatus": {
  299. "description": "音频状态",
  300. "allOf": [
  301. {
  302. "$ref": "#/definitions/constvar.AudioStatus"
  303. }
  304. ]
  305. },
  306. "createdAt": {
  307. "type": "string"
  308. },
  309. "deletedAt": {
  310. "$ref": "#/definitions/gorm.DeletedAt"
  311. },
  312. "driverNumber": {
  313. "description": "司机号",
  314. "type": "string"
  315. },
  316. "id": {
  317. "type": "integer"
  318. },
  319. "isFollowed": {
  320. "description": "是否关注 1关注 2未关注",
  321. "allOf": [
  322. {
  323. "$ref": "#/definitions/constvar.BoolType"
  324. }
  325. ]
  326. },
  327. "locomotiveNumber": {
  328. "description": "机车号",
  329. "type": "string"
  330. },
  331. "name": {
  332. "description": "音频名称",
  333. "type": "string"
  334. },
  335. "occurrenceTime": {
  336. "type": "string"
  337. },
  338. "size": {
  339. "description": "音频大小",
  340. "type": "integer"
  341. },
  342. "stationNumber": {
  343. "description": "车站号",
  344. "type": "string"
  345. },
  346. "trainNumber": {
  347. "description": "车次",
  348. "type": "string"
  349. },
  350. "updatedAt": {
  351. "type": "string"
  352. }
  353. }
  354. },
  355. "request.BatchProcessAudio": {
  356. "type": "object",
  357. "required": [
  358. "ids"
  359. ],
  360. "properties": {
  361. "ids": {
  362. "type": "array",
  363. "items": {
  364. "type": "integer"
  365. }
  366. }
  367. }
  368. },
  369. "request.ProcessAudio": {
  370. "type": "object",
  371. "required": [
  372. "id"
  373. ],
  374. "properties": {
  375. "id": {
  376. "type": "integer"
  377. }
  378. }
  379. },
  380. "util.Response": {
  381. "type": "object",
  382. "properties": {
  383. "code": {
  384. "type": "integer"
  385. },
  386. "data": {},
  387. "msg": {
  388. "type": "string"
  389. }
  390. }
  391. },
  392. "util.ResponseList": {
  393. "type": "object",
  394. "properties": {
  395. "code": {
  396. "type": "integer"
  397. },
  398. "data": {},
  399. "msg": {
  400. "type": "string"
  401. },
  402. "page": {
  403. "type": "integer"
  404. },
  405. "pageSize": {
  406. "type": "integer"
  407. },
  408. "total": {
  409. "type": "integer"
  410. }
  411. }
  412. }
  413. }
  414. }`
  415. // SwaggerInfo holds exported Swagger Info so clients can modify it
  416. var SwaggerInfo = &swag.Spec{
  417. Version: "",
  418. Host: "",
  419. BasePath: "",
  420. Schemes: []string{},
  421. Title: "",
  422. Description: "",
  423. InfoInstanceName: "swagger",
  424. SwaggerTemplate: docTemplate,
  425. LeftDelim: "{{",
  426. RightDelim: "}}",
  427. }
  428. func init() {
  429. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  430. }