docs.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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/follow": {
  107. "post": {
  108. "produces": [
  109. "application/json"
  110. ],
  111. "tags": [
  112. "音频"
  113. ],
  114. "summary": "关注/取消关注",
  115. "parameters": [
  116. {
  117. "description": "参数",
  118. "name": "object",
  119. "in": "body",
  120. "required": true,
  121. "schema": {
  122. "$ref": "#/definitions/request.FollowReq"
  123. }
  124. }
  125. ],
  126. "responses": {
  127. "200": {
  128. "description": "成功",
  129. "schema": {
  130. "allOf": [
  131. {
  132. "$ref": "#/definitions/util.Response"
  133. },
  134. {
  135. "type": "object",
  136. "properties": {
  137. "data": {
  138. "$ref": "#/definitions/response.FollowResp"
  139. }
  140. }
  141. }
  142. ]
  143. }
  144. }
  145. }
  146. }
  147. },
  148. "/api-sa/v1/audio/list": {
  149. "get": {
  150. "produces": [
  151. "application/json"
  152. ],
  153. "tags": [
  154. "音频"
  155. ],
  156. "summary": "音频分析检索",
  157. "parameters": [
  158. {
  159. "type": "string",
  160. "description": "司机号",
  161. "name": "driverNumber",
  162. "in": "query"
  163. },
  164. {
  165. "type": "string",
  166. "description": "关键字",
  167. "name": "keyword",
  168. "in": "query"
  169. },
  170. {
  171. "type": "string",
  172. "description": "机车号",
  173. "name": "locomotiveNumber",
  174. "in": "query"
  175. },
  176. {
  177. "type": "integer",
  178. "description": "页码",
  179. "name": "page",
  180. "in": "query"
  181. },
  182. {
  183. "type": "integer",
  184. "description": "每页大小",
  185. "name": "pageSize",
  186. "in": "query"
  187. },
  188. {
  189. "type": "string",
  190. "description": "车站号",
  191. "name": "stationNumber",
  192. "in": "query"
  193. },
  194. {
  195. "type": "string",
  196. "description": "车次",
  197. "name": "trainNumber",
  198. "in": "query"
  199. }
  200. ],
  201. "responses": {
  202. "200": {
  203. "description": "成功",
  204. "schema": {
  205. "allOf": [
  206. {
  207. "$ref": "#/definitions/util.ResponseList"
  208. },
  209. {
  210. "type": "object",
  211. "properties": {
  212. "data": {
  213. "type": "array",
  214. "items": {
  215. "$ref": "#/definitions/models.Audio"
  216. }
  217. }
  218. }
  219. }
  220. ]
  221. }
  222. }
  223. }
  224. }
  225. },
  226. "/api-sa/v1/audio/process": {
  227. "post": {
  228. "produces": [
  229. "application/json"
  230. ],
  231. "tags": [
  232. "音频"
  233. ],
  234. "summary": "处理音频",
  235. "parameters": [
  236. {
  237. "description": "参数",
  238. "name": "object",
  239. "in": "body",
  240. "required": true,
  241. "schema": {
  242. "$ref": "#/definitions/request.ProcessAudio"
  243. }
  244. }
  245. ],
  246. "responses": {
  247. "200": {
  248. "description": "成功",
  249. "schema": {
  250. "$ref": "#/definitions/util.Response"
  251. }
  252. }
  253. }
  254. }
  255. },
  256. "/api-sa/v1/audio/upload": {
  257. "post": {
  258. "produces": [
  259. "application/json"
  260. ],
  261. "tags": [
  262. "音频"
  263. ],
  264. "summary": "上传音频",
  265. "parameters": [
  266. {
  267. "type": "file",
  268. "description": "音频文件",
  269. "name": "file",
  270. "in": "formData",
  271. "required": true
  272. }
  273. ],
  274. "responses": {
  275. "200": {
  276. "description": "成功",
  277. "schema": {
  278. "$ref": "#/definitions/util.Response"
  279. }
  280. }
  281. }
  282. }
  283. }
  284. },
  285. "definitions": {
  286. "constvar.AudioStatus": {
  287. "type": "integer",
  288. "enum": [
  289. 0,
  290. 1,
  291. 2,
  292. 3,
  293. 4
  294. ],
  295. "x-enum-comments": {
  296. "AudioStatusFailed": "处理失败",
  297. "AudioStatusFinish": "处理完成",
  298. "AudioStatusProcessing": "处理中",
  299. "AudioStatusUploadOk": "上传成功 待处理",
  300. "AudioStatusUploading": "上传中"
  301. },
  302. "x-enum-varnames": [
  303. "AudioStatusUploading",
  304. "AudioStatusUploadOk",
  305. "AudioStatusProcessing",
  306. "AudioStatusFinish",
  307. "AudioStatusFailed"
  308. ]
  309. },
  310. "constvar.BoolType": {
  311. "type": "integer",
  312. "enum": [
  313. 1,
  314. 2
  315. ],
  316. "x-enum-comments": {
  317. "BoolTypeFalse": "false",
  318. "BoolTypeTrue": "true"
  319. },
  320. "x-enum-varnames": [
  321. "BoolTypeTrue",
  322. "BoolTypeFalse"
  323. ]
  324. },
  325. "gorm.DeletedAt": {
  326. "type": "object",
  327. "properties": {
  328. "time": {
  329. "type": "string"
  330. },
  331. "valid": {
  332. "description": "Valid is true if Time is not NULL",
  333. "type": "boolean"
  334. }
  335. }
  336. },
  337. "models.Audio": {
  338. "type": "object",
  339. "properties": {
  340. "audioStatus": {
  341. "description": "音频状态",
  342. "allOf": [
  343. {
  344. "$ref": "#/definitions/constvar.AudioStatus"
  345. }
  346. ]
  347. },
  348. "createdAt": {
  349. "type": "string"
  350. },
  351. "deletedAt": {
  352. "$ref": "#/definitions/gorm.DeletedAt"
  353. },
  354. "driverNumber": {
  355. "description": "司机号",
  356. "type": "string"
  357. },
  358. "id": {
  359. "type": "integer"
  360. },
  361. "isFollowed": {
  362. "description": "是否关注 1关注 2未关注",
  363. "allOf": [
  364. {
  365. "$ref": "#/definitions/constvar.BoolType"
  366. }
  367. ]
  368. },
  369. "locomotiveNumber": {
  370. "description": "机车号",
  371. "type": "string"
  372. },
  373. "name": {
  374. "description": "音频名称",
  375. "type": "string"
  376. },
  377. "occurrenceTime": {
  378. "type": "string"
  379. },
  380. "score": {
  381. "description": "置信度",
  382. "type": "number"
  383. },
  384. "size": {
  385. "description": "音频大小",
  386. "type": "integer"
  387. },
  388. "stationNumber": {
  389. "description": "车站号",
  390. "type": "string"
  391. },
  392. "trainNumber": {
  393. "description": "车次",
  394. "type": "string"
  395. },
  396. "updatedAt": {
  397. "type": "string"
  398. }
  399. }
  400. },
  401. "request.BatchProcessAudio": {
  402. "type": "object",
  403. "required": [
  404. "ids"
  405. ],
  406. "properties": {
  407. "ids": {
  408. "type": "array",
  409. "items": {
  410. "type": "integer"
  411. }
  412. }
  413. }
  414. },
  415. "request.FollowReq": {
  416. "type": "object",
  417. "required": [
  418. "id"
  419. ],
  420. "properties": {
  421. "id": {
  422. "type": "integer"
  423. }
  424. }
  425. },
  426. "request.ProcessAudio": {
  427. "type": "object",
  428. "required": [
  429. "id"
  430. ],
  431. "properties": {
  432. "id": {
  433. "type": "integer"
  434. }
  435. }
  436. },
  437. "response.FollowResp": {
  438. "type": "object",
  439. "properties": {
  440. "followStatus": {
  441. "$ref": "#/definitions/constvar.BoolType"
  442. }
  443. }
  444. },
  445. "util.Response": {
  446. "type": "object",
  447. "properties": {
  448. "code": {
  449. "type": "integer"
  450. },
  451. "data": {},
  452. "msg": {
  453. "type": "string"
  454. }
  455. }
  456. },
  457. "util.ResponseList": {
  458. "type": "object",
  459. "properties": {
  460. "code": {
  461. "type": "integer"
  462. },
  463. "data": {},
  464. "msg": {
  465. "type": "string"
  466. },
  467. "page": {
  468. "type": "integer"
  469. },
  470. "pageSize": {
  471. "type": "integer"
  472. },
  473. "total": {
  474. "type": "integer"
  475. }
  476. }
  477. }
  478. }
  479. }`
  480. // SwaggerInfo holds exported Swagger Info so clients can modify it
  481. var SwaggerInfo = &swag.Spec{
  482. Version: "",
  483. Host: "",
  484. BasePath: "",
  485. Schemes: []string{},
  486. Title: "",
  487. Description: "",
  488. InfoInstanceName: "swagger",
  489. SwaggerTemplate: docTemplate,
  490. LeftDelim: "{{",
  491. RightDelim: "}}",
  492. }
  493. func init() {
  494. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  495. }