docs.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  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/info": {
  149. "get": {
  150. "produces": [
  151. "application/json"
  152. ],
  153. "tags": [
  154. "音频"
  155. ],
  156. "summary": "音频详情,含解析结果",
  157. "parameters": [
  158. {
  159. "type": "integer",
  160. "name": "id",
  161. "in": "query",
  162. "required": true
  163. }
  164. ],
  165. "responses": {
  166. "200": {
  167. "description": "成功",
  168. "schema": {
  169. "allOf": [
  170. {
  171. "$ref": "#/definitions/util.Response"
  172. },
  173. {
  174. "type": "object",
  175. "properties": {
  176. "data": {
  177. "$ref": "#/definitions/models.Audio"
  178. }
  179. }
  180. }
  181. ]
  182. }
  183. }
  184. }
  185. }
  186. },
  187. "/api-sa/v1/audio/list": {
  188. "get": {
  189. "produces": [
  190. "application/json"
  191. ],
  192. "tags": [
  193. "音频"
  194. ],
  195. "summary": "音频分析检索",
  196. "parameters": [
  197. {
  198. "type": "string",
  199. "description": "司机号",
  200. "name": "driverNumber",
  201. "in": "query"
  202. },
  203. {
  204. "type": "string",
  205. "description": "关键字",
  206. "name": "keyword",
  207. "in": "query"
  208. },
  209. {
  210. "type": "string",
  211. "description": "机车号",
  212. "name": "locomotiveNumber",
  213. "in": "query"
  214. },
  215. {
  216. "type": "integer",
  217. "description": "页码",
  218. "name": "page",
  219. "in": "query"
  220. },
  221. {
  222. "type": "integer",
  223. "description": "每页大小",
  224. "name": "pageSize",
  225. "in": "query"
  226. },
  227. {
  228. "type": "string",
  229. "description": "车站号",
  230. "name": "stationNumber",
  231. "in": "query"
  232. },
  233. {
  234. "type": "string",
  235. "description": "车次",
  236. "name": "trainNumber",
  237. "in": "query"
  238. }
  239. ],
  240. "responses": {
  241. "200": {
  242. "description": "成功",
  243. "schema": {
  244. "allOf": [
  245. {
  246. "$ref": "#/definitions/util.ResponseList"
  247. },
  248. {
  249. "type": "object",
  250. "properties": {
  251. "data": {
  252. "type": "array",
  253. "items": {
  254. "$ref": "#/definitions/models.Audio"
  255. }
  256. }
  257. }
  258. }
  259. ]
  260. }
  261. }
  262. }
  263. }
  264. },
  265. "/api-sa/v1/audio/process": {
  266. "post": {
  267. "produces": [
  268. "application/json"
  269. ],
  270. "tags": [
  271. "音频"
  272. ],
  273. "summary": "处理音频",
  274. "parameters": [
  275. {
  276. "description": "参数",
  277. "name": "object",
  278. "in": "body",
  279. "required": true,
  280. "schema": {
  281. "$ref": "#/definitions/request.ProcessAudio"
  282. }
  283. }
  284. ],
  285. "responses": {
  286. "200": {
  287. "description": "成功",
  288. "schema": {
  289. "$ref": "#/definitions/util.Response"
  290. }
  291. }
  292. }
  293. }
  294. },
  295. "/api-sa/v1/audio/trainInfoList": {
  296. "get": {
  297. "produces": [
  298. "application/json"
  299. ],
  300. "tags": [
  301. "音频"
  302. ],
  303. "summary": "获取火车信息",
  304. "parameters": [
  305. {
  306. "enum": [
  307. 1,
  308. 2,
  309. 3
  310. ],
  311. "type": "integer",
  312. "x-enum-comments": {
  313. "ClassLocomotive": "机车",
  314. "ClassStation": "车站",
  315. "ClassTrain": "车次"
  316. },
  317. "x-enum-varnames": [
  318. "ClassLocomotive",
  319. "ClassTrain",
  320. "ClassStation"
  321. ],
  322. "description": "信息分类 1机车2车次3车站",
  323. "name": "class",
  324. "in": "query"
  325. },
  326. {
  327. "type": "integer",
  328. "description": "页码",
  329. "name": "page",
  330. "in": "query"
  331. },
  332. {
  333. "type": "integer",
  334. "description": "每页大小",
  335. "name": "pageSize",
  336. "in": "query"
  337. },
  338. {
  339. "type": "integer",
  340. "description": "上级id",
  341. "name": "parentID",
  342. "in": "query"
  343. }
  344. ],
  345. "responses": {
  346. "200": {
  347. "description": "成功",
  348. "schema": {
  349. "allOf": [
  350. {
  351. "$ref": "#/definitions/util.ResponseList"
  352. },
  353. {
  354. "type": "object",
  355. "properties": {
  356. "data": {
  357. "type": "array",
  358. "items": {
  359. "$ref": "#/definitions/models.TrainInfo"
  360. }
  361. }
  362. }
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "/api-sa/v1/audio/upload": {
  371. "post": {
  372. "produces": [
  373. "application/json"
  374. ],
  375. "tags": [
  376. "音频"
  377. ],
  378. "summary": "上传音频",
  379. "parameters": [
  380. {
  381. "type": "file",
  382. "description": "音频文件",
  383. "name": "file",
  384. "in": "formData",
  385. "required": true
  386. }
  387. ],
  388. "responses": {
  389. "200": {
  390. "description": "成功",
  391. "schema": {
  392. "$ref": "#/definitions/util.Response"
  393. }
  394. }
  395. }
  396. }
  397. },
  398. "/api-sa/v1/text/add": {
  399. "post": {
  400. "produces": [
  401. "application/json"
  402. ],
  403. "tags": [
  404. "文字库"
  405. ],
  406. "summary": "新增文字",
  407. "parameters": [
  408. {
  409. "description": "参数",
  410. "name": "object",
  411. "in": "body",
  412. "required": true,
  413. "schema": {
  414. "$ref": "#/definitions/request.AddTextReq"
  415. }
  416. }
  417. ],
  418. "responses": {
  419. "200": {
  420. "description": "成功",
  421. "schema": {
  422. "$ref": "#/definitions/util.Response"
  423. }
  424. }
  425. }
  426. }
  427. },
  428. "/api-sa/v1/text/list": {
  429. "get": {
  430. "produces": [
  431. "application/json"
  432. ],
  433. "tags": [
  434. "文字库"
  435. ],
  436. "summary": "文字库列表",
  437. "parameters": [
  438. {
  439. "type": "string",
  440. "description": "关键字",
  441. "name": "keyword",
  442. "in": "query"
  443. },
  444. {
  445. "type": "integer",
  446. "description": "页码",
  447. "name": "page",
  448. "in": "query"
  449. },
  450. {
  451. "type": "integer",
  452. "description": "每页大小",
  453. "name": "pageSize",
  454. "in": "query"
  455. }
  456. ],
  457. "responses": {
  458. "200": {
  459. "description": "成功",
  460. "schema": {
  461. "allOf": [
  462. {
  463. "$ref": "#/definitions/util.ResponseList"
  464. },
  465. {
  466. "type": "object",
  467. "properties": {
  468. "data": {
  469. "type": "array",
  470. "items": {
  471. "$ref": "#/definitions/models.Word"
  472. }
  473. }
  474. }
  475. }
  476. ]
  477. }
  478. }
  479. }
  480. }
  481. }
  482. },
  483. "definitions": {
  484. "constvar.AudioStatus": {
  485. "type": "integer",
  486. "enum": [
  487. 0,
  488. 1,
  489. 2,
  490. 3,
  491. 4
  492. ],
  493. "x-enum-comments": {
  494. "AudioStatusFailed": "处理失败",
  495. "AudioStatusFinish": "处理完成",
  496. "AudioStatusProcessing": "处理中",
  497. "AudioStatusUploadOk": "上传成功 待处理",
  498. "AudioStatusUploading": "上传中"
  499. },
  500. "x-enum-varnames": [
  501. "AudioStatusUploading",
  502. "AudioStatusUploadOk",
  503. "AudioStatusProcessing",
  504. "AudioStatusFinish",
  505. "AudioStatusFailed"
  506. ]
  507. },
  508. "constvar.BoolType": {
  509. "type": "integer",
  510. "enum": [
  511. 1,
  512. 2
  513. ],
  514. "x-enum-comments": {
  515. "BoolTypeFalse": "false",
  516. "BoolTypeTrue": "true"
  517. },
  518. "x-enum-varnames": [
  519. "BoolTypeTrue",
  520. "BoolTypeFalse"
  521. ]
  522. },
  523. "constvar.Class": {
  524. "type": "integer",
  525. "enum": [
  526. 1,
  527. 2,
  528. 3
  529. ],
  530. "x-enum-comments": {
  531. "ClassLocomotive": "机车",
  532. "ClassStation": "车站",
  533. "ClassTrain": "车次"
  534. },
  535. "x-enum-varnames": [
  536. "ClassLocomotive",
  537. "ClassTrain",
  538. "ClassStation"
  539. ]
  540. },
  541. "gorm.DeletedAt": {
  542. "type": "object",
  543. "properties": {
  544. "time": {
  545. "type": "string"
  546. },
  547. "valid": {
  548. "description": "Valid is true if Time is not NULL",
  549. "type": "boolean"
  550. }
  551. }
  552. },
  553. "models.Audio": {
  554. "type": "object",
  555. "properties": {
  556. "audioStatus": {
  557. "description": "音频状态",
  558. "allOf": [
  559. {
  560. "$ref": "#/definitions/constvar.AudioStatus"
  561. }
  562. ]
  563. },
  564. "audioText": {
  565. "description": "解析出的文本",
  566. "type": "string"
  567. },
  568. "createdAt": {
  569. "type": "string"
  570. },
  571. "deletedAt": {
  572. "$ref": "#/definitions/gorm.DeletedAt"
  573. },
  574. "driverNumber": {
  575. "description": "司机号",
  576. "type": "string"
  577. },
  578. "id": {
  579. "type": "integer"
  580. },
  581. "isFollowed": {
  582. "description": "是否关注 1关注 2未关注",
  583. "allOf": [
  584. {
  585. "$ref": "#/definitions/constvar.BoolType"
  586. }
  587. ]
  588. },
  589. "locomotiveNumber": {
  590. "description": "机车号",
  591. "type": "string"
  592. },
  593. "name": {
  594. "description": "音频名称",
  595. "type": "string"
  596. },
  597. "occurrenceTime": {
  598. "type": "string"
  599. },
  600. "score": {
  601. "description": "置信度",
  602. "type": "number"
  603. },
  604. "size": {
  605. "description": "音频大小",
  606. "type": "integer"
  607. },
  608. "station": {
  609. "description": "车站",
  610. "type": "string"
  611. },
  612. "trainNumber": {
  613. "description": "车次",
  614. "type": "string"
  615. },
  616. "updatedAt": {
  617. "type": "string"
  618. },
  619. "words": {
  620. "description": "匹配到的文字数组",
  621. "type": "array",
  622. "items": {
  623. "type": "string"
  624. }
  625. }
  626. }
  627. },
  628. "models.TrainInfo": {
  629. "type": "object",
  630. "properties": {
  631. "class": {
  632. "description": "分类 1 机车 2车次 3 车站",
  633. "allOf": [
  634. {
  635. "$ref": "#/definitions/constvar.Class"
  636. }
  637. ]
  638. },
  639. "createdAt": {
  640. "type": "string"
  641. },
  642. "deletedAt": {
  643. "$ref": "#/definitions/gorm.DeletedAt"
  644. },
  645. "id": {
  646. "type": "integer"
  647. },
  648. "name": {
  649. "description": "名称",
  650. "type": "string"
  651. },
  652. "parentID": {
  653. "description": "上级id",
  654. "type": "integer"
  655. },
  656. "updatedAt": {
  657. "type": "string"
  658. }
  659. }
  660. },
  661. "models.Word": {
  662. "type": "object",
  663. "properties": {
  664. "content": {
  665. "description": "文字",
  666. "type": "string"
  667. },
  668. "createdAt": {
  669. "type": "string"
  670. },
  671. "deletedAt": {
  672. "$ref": "#/definitions/gorm.DeletedAt"
  673. },
  674. "id": {
  675. "type": "integer"
  676. },
  677. "locomotiveNumber": {
  678. "description": "机车号",
  679. "type": "string"
  680. },
  681. "updatedAt": {
  682. "type": "string"
  683. }
  684. }
  685. },
  686. "request.AddTextReq": {
  687. "type": "object",
  688. "required": [
  689. "content",
  690. "locomotiveNumber"
  691. ],
  692. "properties": {
  693. "content": {
  694. "description": "音频名称",
  695. "type": "string"
  696. },
  697. "locomotiveNumber": {
  698. "description": "机车号",
  699. "type": "string"
  700. }
  701. }
  702. },
  703. "request.BatchProcessAudio": {
  704. "type": "object",
  705. "required": [
  706. "ids"
  707. ],
  708. "properties": {
  709. "ids": {
  710. "type": "array",
  711. "items": {
  712. "type": "integer"
  713. }
  714. }
  715. }
  716. },
  717. "request.FollowReq": {
  718. "type": "object",
  719. "required": [
  720. "id"
  721. ],
  722. "properties": {
  723. "id": {
  724. "type": "integer"
  725. }
  726. }
  727. },
  728. "request.ProcessAudio": {
  729. "type": "object",
  730. "required": [
  731. "id"
  732. ],
  733. "properties": {
  734. "id": {
  735. "type": "integer"
  736. }
  737. }
  738. },
  739. "response.FollowResp": {
  740. "type": "object",
  741. "properties": {
  742. "followStatus": {
  743. "description": "1 已关注 2未关注",
  744. "allOf": [
  745. {
  746. "$ref": "#/definitions/constvar.BoolType"
  747. }
  748. ]
  749. }
  750. }
  751. },
  752. "util.Response": {
  753. "type": "object",
  754. "properties": {
  755. "code": {
  756. "type": "integer"
  757. },
  758. "data": {},
  759. "msg": {
  760. "type": "string"
  761. }
  762. }
  763. },
  764. "util.ResponseList": {
  765. "type": "object",
  766. "properties": {
  767. "code": {
  768. "type": "integer"
  769. },
  770. "data": {},
  771. "msg": {
  772. "type": "string"
  773. },
  774. "page": {
  775. "type": "integer"
  776. },
  777. "pageSize": {
  778. "type": "integer"
  779. },
  780. "total": {
  781. "type": "integer"
  782. }
  783. }
  784. }
  785. }
  786. }`
  787. // SwaggerInfo holds exported Swagger Info so clients can modify it
  788. var SwaggerInfo = &swag.Spec{
  789. Version: "",
  790. Host: "",
  791. BasePath: "",
  792. Schemes: []string{},
  793. Title: "",
  794. Description: "",
  795. InfoInstanceName: "swagger",
  796. SwaggerTemplate: docTemplate,
  797. LeftDelim: "{{",
  798. RightDelim: "}}",
  799. }
  800. func init() {
  801. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  802. }