docs.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  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. "delete": {
  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. "delete": {
  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/trainInfoList": {
  257. "get": {
  258. "produces": [
  259. "application/json"
  260. ],
  261. "tags": [
  262. "音频"
  263. ],
  264. "summary": "获取火车信息",
  265. "parameters": [
  266. {
  267. "enum": [
  268. 1,
  269. 2,
  270. 3
  271. ],
  272. "type": "integer",
  273. "x-enum-comments": {
  274. "ClassLocomotive": "机车",
  275. "ClassStation": "车站",
  276. "ClassTrain": "车次"
  277. },
  278. "x-enum-varnames": [
  279. "ClassLocomotive",
  280. "ClassTrain",
  281. "ClassStation"
  282. ],
  283. "description": "信息分类 1机车2车次3车站",
  284. "name": "class",
  285. "in": "query"
  286. },
  287. {
  288. "type": "integer",
  289. "description": "页码",
  290. "name": "page",
  291. "in": "query"
  292. },
  293. {
  294. "type": "integer",
  295. "description": "每页大小",
  296. "name": "pageSize",
  297. "in": "query"
  298. },
  299. {
  300. "type": "integer",
  301. "description": "上级id",
  302. "name": "parentID",
  303. "in": "query"
  304. }
  305. ],
  306. "responses": {
  307. "200": {
  308. "description": "成功",
  309. "schema": {
  310. "allOf": [
  311. {
  312. "$ref": "#/definitions/util.ResponseList"
  313. },
  314. {
  315. "type": "object",
  316. "properties": {
  317. "data": {
  318. "type": "array",
  319. "items": {
  320. "$ref": "#/definitions/models.TrainInfo"
  321. }
  322. }
  323. }
  324. }
  325. ]
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/api-sa/v1/audio/upload": {
  332. "post": {
  333. "produces": [
  334. "application/json"
  335. ],
  336. "tags": [
  337. "音频"
  338. ],
  339. "summary": "上传音频",
  340. "parameters": [
  341. {
  342. "type": "file",
  343. "description": "音频文件",
  344. "name": "file",
  345. "in": "formData",
  346. "required": true
  347. }
  348. ],
  349. "responses": {
  350. "200": {
  351. "description": "成功",
  352. "schema": {
  353. "$ref": "#/definitions/util.Response"
  354. }
  355. }
  356. }
  357. }
  358. },
  359. "/api-sa/v1/text/add": {
  360. "post": {
  361. "produces": [
  362. "application/json"
  363. ],
  364. "tags": [
  365. "文字库"
  366. ],
  367. "summary": "新增文字",
  368. "parameters": [
  369. {
  370. "description": "参数",
  371. "name": "object",
  372. "in": "body",
  373. "required": true,
  374. "schema": {
  375. "$ref": "#/definitions/request.AddTextReq"
  376. }
  377. }
  378. ],
  379. "responses": {
  380. "200": {
  381. "description": "成功",
  382. "schema": {
  383. "$ref": "#/definitions/util.Response"
  384. }
  385. }
  386. }
  387. }
  388. },
  389. "/api-sa/v1/text/list": {
  390. "get": {
  391. "produces": [
  392. "application/json"
  393. ],
  394. "tags": [
  395. "文字库"
  396. ],
  397. "summary": "文字库列表",
  398. "parameters": [
  399. {
  400. "type": "string",
  401. "description": "关键字",
  402. "name": "keyword",
  403. "in": "query"
  404. },
  405. {
  406. "type": "integer",
  407. "description": "页码",
  408. "name": "page",
  409. "in": "query"
  410. },
  411. {
  412. "type": "integer",
  413. "description": "每页大小",
  414. "name": "pageSize",
  415. "in": "query"
  416. }
  417. ],
  418. "responses": {
  419. "200": {
  420. "description": "成功",
  421. "schema": {
  422. "allOf": [
  423. {
  424. "$ref": "#/definitions/util.ResponseList"
  425. },
  426. {
  427. "type": "object",
  428. "properties": {
  429. "data": {
  430. "type": "array",
  431. "items": {
  432. "$ref": "#/definitions/models.Text"
  433. }
  434. }
  435. }
  436. }
  437. ]
  438. }
  439. }
  440. }
  441. }
  442. }
  443. },
  444. "definitions": {
  445. "constvar.AudioStatus": {
  446. "type": "integer",
  447. "enum": [
  448. 0,
  449. 1,
  450. 2,
  451. 3,
  452. 4
  453. ],
  454. "x-enum-comments": {
  455. "AudioStatusFailed": "处理失败",
  456. "AudioStatusFinish": "处理完成",
  457. "AudioStatusProcessing": "处理中",
  458. "AudioStatusUploadOk": "上传成功 待处理",
  459. "AudioStatusUploading": "上传中"
  460. },
  461. "x-enum-varnames": [
  462. "AudioStatusUploading",
  463. "AudioStatusUploadOk",
  464. "AudioStatusProcessing",
  465. "AudioStatusFinish",
  466. "AudioStatusFailed"
  467. ]
  468. },
  469. "constvar.BoolType": {
  470. "type": "integer",
  471. "enum": [
  472. 1,
  473. 2
  474. ],
  475. "x-enum-comments": {
  476. "BoolTypeFalse": "false",
  477. "BoolTypeTrue": "true"
  478. },
  479. "x-enum-varnames": [
  480. "BoolTypeTrue",
  481. "BoolTypeFalse"
  482. ]
  483. },
  484. "constvar.Class": {
  485. "type": "integer",
  486. "enum": [
  487. 1,
  488. 2,
  489. 3
  490. ],
  491. "x-enum-comments": {
  492. "ClassLocomotive": "机车",
  493. "ClassStation": "车站",
  494. "ClassTrain": "车次"
  495. },
  496. "x-enum-varnames": [
  497. "ClassLocomotive",
  498. "ClassTrain",
  499. "ClassStation"
  500. ]
  501. },
  502. "gorm.DeletedAt": {
  503. "type": "object",
  504. "properties": {
  505. "time": {
  506. "type": "string"
  507. },
  508. "valid": {
  509. "description": "Valid is true if Time is not NULL",
  510. "type": "boolean"
  511. }
  512. }
  513. },
  514. "models.Audio": {
  515. "type": "object",
  516. "properties": {
  517. "audioStatus": {
  518. "description": "音频状态",
  519. "allOf": [
  520. {
  521. "$ref": "#/definitions/constvar.AudioStatus"
  522. }
  523. ]
  524. },
  525. "createdAt": {
  526. "type": "string"
  527. },
  528. "deletedAt": {
  529. "$ref": "#/definitions/gorm.DeletedAt"
  530. },
  531. "driverNumber": {
  532. "description": "司机号",
  533. "type": "string"
  534. },
  535. "id": {
  536. "type": "integer"
  537. },
  538. "isFollowed": {
  539. "description": "是否关注 1关注 2未关注",
  540. "allOf": [
  541. {
  542. "$ref": "#/definitions/constvar.BoolType"
  543. }
  544. ]
  545. },
  546. "locomotiveNumber": {
  547. "description": "机车号",
  548. "type": "string"
  549. },
  550. "name": {
  551. "description": "音频名称",
  552. "type": "string"
  553. },
  554. "occurrenceTime": {
  555. "type": "string"
  556. },
  557. "score": {
  558. "description": "置信度",
  559. "type": "number"
  560. },
  561. "size": {
  562. "description": "音频大小",
  563. "type": "integer"
  564. },
  565. "station": {
  566. "description": "车站",
  567. "type": "string"
  568. },
  569. "trainNumber": {
  570. "description": "车次",
  571. "type": "string"
  572. },
  573. "updatedAt": {
  574. "type": "string"
  575. }
  576. }
  577. },
  578. "models.Text": {
  579. "type": "object",
  580. "properties": {
  581. "content": {
  582. "description": "音频名称",
  583. "type": "string"
  584. },
  585. "createdAt": {
  586. "type": "string"
  587. },
  588. "deletedAt": {
  589. "$ref": "#/definitions/gorm.DeletedAt"
  590. },
  591. "id": {
  592. "type": "integer"
  593. },
  594. "locomotiveNumber": {
  595. "description": "机车号",
  596. "type": "string"
  597. },
  598. "updatedAt": {
  599. "type": "string"
  600. }
  601. }
  602. },
  603. "models.TrainInfo": {
  604. "type": "object",
  605. "properties": {
  606. "class": {
  607. "description": "分类",
  608. "allOf": [
  609. {
  610. "$ref": "#/definitions/constvar.Class"
  611. }
  612. ]
  613. },
  614. "createdAt": {
  615. "type": "string"
  616. },
  617. "deletedAt": {
  618. "$ref": "#/definitions/gorm.DeletedAt"
  619. },
  620. "id": {
  621. "type": "integer"
  622. },
  623. "name": {
  624. "description": "名称",
  625. "type": "string"
  626. },
  627. "parentID": {
  628. "description": "上级id",
  629. "type": "integer"
  630. },
  631. "updatedAt": {
  632. "type": "string"
  633. }
  634. }
  635. },
  636. "request.AddTextReq": {
  637. "type": "object",
  638. "required": [
  639. "content",
  640. "locomotiveNumber"
  641. ],
  642. "properties": {
  643. "content": {
  644. "description": "音频名称",
  645. "type": "string"
  646. },
  647. "locomotiveNumber": {
  648. "description": "机车号",
  649. "type": "string"
  650. }
  651. }
  652. },
  653. "request.BatchProcessAudio": {
  654. "type": "object",
  655. "required": [
  656. "ids"
  657. ],
  658. "properties": {
  659. "ids": {
  660. "type": "array",
  661. "items": {
  662. "type": "integer"
  663. }
  664. }
  665. }
  666. },
  667. "request.FollowReq": {
  668. "type": "object",
  669. "required": [
  670. "id"
  671. ],
  672. "properties": {
  673. "id": {
  674. "type": "integer"
  675. }
  676. }
  677. },
  678. "request.ProcessAudio": {
  679. "type": "object",
  680. "required": [
  681. "id"
  682. ],
  683. "properties": {
  684. "id": {
  685. "type": "integer"
  686. }
  687. }
  688. },
  689. "response.FollowResp": {
  690. "type": "object",
  691. "properties": {
  692. "followStatus": {
  693. "$ref": "#/definitions/constvar.BoolType"
  694. }
  695. }
  696. },
  697. "util.Response": {
  698. "type": "object",
  699. "properties": {
  700. "code": {
  701. "type": "integer"
  702. },
  703. "data": {},
  704. "msg": {
  705. "type": "string"
  706. }
  707. }
  708. },
  709. "util.ResponseList": {
  710. "type": "object",
  711. "properties": {
  712. "code": {
  713. "type": "integer"
  714. },
  715. "data": {},
  716. "msg": {
  717. "type": "string"
  718. },
  719. "page": {
  720. "type": "integer"
  721. },
  722. "pageSize": {
  723. "type": "integer"
  724. },
  725. "total": {
  726. "type": "integer"
  727. }
  728. }
  729. }
  730. }
  731. }`
  732. // SwaggerInfo holds exported Swagger Info so clients can modify it
  733. var SwaggerInfo = &swag.Spec{
  734. Version: "",
  735. Host: "",
  736. BasePath: "",
  737. Schemes: []string{},
  738. Title: "",
  739. Description: "",
  740. InfoInstanceName: "swagger",
  741. SwaggerTemplate: docTemplate,
  742. LeftDelim: "{{",
  743. RightDelim: "}}",
  744. }
  745. func init() {
  746. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  747. }