docs.go 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag at
  3. // 2019-09-27 10:56:45.7469034 +0800 CST m=+0.047123001
  4. package docs
  5. import (
  6. "bytes"
  7. "github.com/alecthomas/template"
  8. "github.com/swaggo/swag"
  9. )
  10. var doc = `{
  11. "swagger": "2.0",
  12. "info": {
  13. "description": "kptyun_service",
  14. "title": "科湃腾Go语言后台API",
  15. "contact": {
  16. "name": "朱红宾",
  17. "url": "https://www.dairyinfo.com.cn",
  18. "email": "kptzhu@163.com"
  19. },
  20. "license": {},
  21. "version": "1.1.2"
  22. },
  23. "basePath": "/",
  24. "paths": {
  25. "/auth": {
  26. "post": {
  27. "consumes": [
  28. "application/json"
  29. ],
  30. "produces": [
  31. "application/json"
  32. ],
  33. "tags": [
  34. "auth"
  35. ],
  36. "summary": "获取登录token 信息",
  37. "parameters": [
  38. {
  39. "type": "string",
  40. "description": "admin",
  41. "name": "username",
  42. "in": "formData",
  43. "required": true
  44. },
  45. {
  46. "type": "string",
  47. "description": "123456",
  48. "name": "password",
  49. "in": "formData",
  50. "required": true
  51. }
  52. ],
  53. "responses": {
  54. "200": {
  55. "description": "{ \"code\": 200e, \"data\": { \"token\": \"xxx\" }, \"msg\": \"ok\" }",
  56. "schema": {
  57. "type": "string"
  58. }
  59. },
  60. "400": {
  61. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  62. "schema": {
  63. "type": "string"
  64. }
  65. },
  66. "404": {
  67. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  68. "schema": {
  69. "type": "string"
  70. }
  71. }
  72. }
  73. }
  74. },
  75. "/authdata/GetRoleMenus": {
  76. "get": {
  77. "consumes": [
  78. "application/json"
  79. ],
  80. "produces": [
  81. "application/json"
  82. ],
  83. "tags": [
  84. "menu"
  85. ],
  86. "summary": "递归获取所有",
  87. "parameters": [
  88. {
  89. "type": "string",
  90. "description": "Ton",
  91. "name": "Ton",
  92. "in": "query",
  93. "required": true
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  99. "schema": {
  100. "type": "string"
  101. }
  102. }
  103. }
  104. }
  105. },
  106. "/authdata/menus": {
  107. "get": {
  108. "consumes": [
  109. "application/json"
  110. ],
  111. "produces": [
  112. "application/json"
  113. ],
  114. "tags": [
  115. "menu"
  116. ],
  117. "summary": "获取所有菜单",
  118. "parameters": [
  119. {
  120. "type": "string",
  121. "description": "Ton",
  122. "name": "Ton",
  123. "in": "query",
  124. "required": true
  125. }
  126. ],
  127. "responses": {
  128. "200": {
  129. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  130. "schema": {
  131. "type": "string"
  132. }
  133. }
  134. }
  135. },
  136. "post": {
  137. "consumes": [
  138. "application/json"
  139. ],
  140. "produces": [
  141. "application/json"
  142. ],
  143. "tags": [
  144. "menu"
  145. ],
  146. "summary": "增加菜单",
  147. "parameters": [
  148. {
  149. "type": "string",
  150. "description": "name",
  151. "name": "name",
  152. "in": "query",
  153. "required": true
  154. },
  155. {
  156. "type": "string",
  157. "description": "path",
  158. "name": "path",
  159. "in": "query",
  160. "required": true
  161. }
  162. ],
  163. "responses": {
  164. "200": {
  165. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  166. "schema": {
  167. "type": "string"
  168. }
  169. }
  170. }
  171. }
  172. },
  173. "/authdata/menus/": {
  174. "get": {
  175. "consumes": [
  176. "application/json"
  177. ],
  178. "produces": [
  179. "application/json"
  180. ],
  181. "tags": [
  182. "menu"
  183. ],
  184. "summary": "获取单个菜单",
  185. "parameters": [
  186. {
  187. "type": "string",
  188. "description": "id",
  189. "name": "id",
  190. "in": "path",
  191. "required": true
  192. }
  193. ],
  194. "responses": {
  195. "200": {
  196. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  197. "schema": {
  198. "type": "string"
  199. }
  200. }
  201. }
  202. },
  203. "put": {
  204. "consumes": [
  205. "application/json"
  206. ],
  207. "produces": [
  208. "application/json"
  209. ],
  210. "tags": [
  211. "menu"
  212. ],
  213. "summary": "更新菜单",
  214. "parameters": [
  215. {
  216. "type": "string",
  217. "description": "id",
  218. "name": "id",
  219. "in": "path",
  220. "required": true
  221. },
  222. {
  223. "type": "string",
  224. "description": "name",
  225. "name": "name",
  226. "in": "query",
  227. "required": true
  228. },
  229. {
  230. "type": "string",
  231. "description": "path",
  232. "name": "path",
  233. "in": "query",
  234. "required": true
  235. },
  236. {
  237. "type": "string",
  238. "description": "method",
  239. "name": "method",
  240. "in": "query",
  241. "required": true
  242. }
  243. ],
  244. "responses": {
  245. "200": {
  246. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  247. "schema": {
  248. "type": "string"
  249. }
  250. }
  251. }
  252. },
  253. "delete": {
  254. "consumes": [
  255. "application/json"
  256. ],
  257. "produces": [
  258. "application/json"
  259. ],
  260. "tags": [
  261. "menu"
  262. ],
  263. "summary": "删除菜单",
  264. "parameters": [
  265. {
  266. "type": "string",
  267. "description": "id",
  268. "name": "id",
  269. "in": "path",
  270. "required": true
  271. }
  272. ],
  273. "responses": {
  274. "200": {
  275. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  276. "schema": {
  277. "type": "string"
  278. }
  279. }
  280. }
  281. }
  282. },
  283. "/authdata/roles": {
  284. "get": {
  285. "consumes": [
  286. "application/json"
  287. ],
  288. "produces": [
  289. "application/json"
  290. ],
  291. "tags": [
  292. "role"
  293. ],
  294. "summary": "获取所有角色",
  295. "responses": {
  296. "200": {
  297. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  298. "schema": {
  299. "type": "string"
  300. }
  301. }
  302. }
  303. },
  304. "post": {
  305. "consumes": [
  306. "application/json"
  307. ],
  308. "produces": [
  309. "application/json"
  310. ],
  311. "tags": [
  312. "role"
  313. ],
  314. "summary": "增加角色",
  315. "parameters": [
  316. {
  317. "type": "string",
  318. "description": "name",
  319. "name": "name",
  320. "in": "query",
  321. "required": true
  322. },
  323. {
  324. "type": "string",
  325. "description": "menu_id",
  326. "name": "menu_id",
  327. "in": "query",
  328. "required": true
  329. }
  330. ],
  331. "responses": {
  332. "200": {
  333. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  334. "schema": {
  335. "type": "string"
  336. }
  337. }
  338. }
  339. }
  340. },
  341. "/authdata/roles/": {
  342. "get": {
  343. "consumes": [
  344. "application/json"
  345. ],
  346. "produces": [
  347. "application/json"
  348. ],
  349. "tags": [
  350. "role"
  351. ],
  352. "summary": "获取单个角色",
  353. "parameters": [
  354. {
  355. "type": "string",
  356. "description": "id",
  357. "name": "id",
  358. "in": "path",
  359. "required": true
  360. }
  361. ],
  362. "responses": {
  363. "200": {
  364. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  365. "schema": {
  366. "type": "string"
  367. }
  368. }
  369. }
  370. },
  371. "put": {
  372. "consumes": [
  373. "application/json"
  374. ],
  375. "produces": [
  376. "application/json"
  377. ],
  378. "tags": [
  379. "role"
  380. ],
  381. "summary": "更新角色",
  382. "parameters": [
  383. {
  384. "type": "string",
  385. "description": "id",
  386. "name": "id",
  387. "in": "path",
  388. "required": true
  389. },
  390. {
  391. "type": "string",
  392. "description": "name",
  393. "name": "name",
  394. "in": "query",
  395. "required": true
  396. },
  397. {
  398. "type": "string",
  399. "description": "menu_id",
  400. "name": "menu_id",
  401. "in": "query",
  402. "required": true
  403. }
  404. ],
  405. "responses": {
  406. "200": {
  407. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  408. "schema": {
  409. "type": "string"
  410. }
  411. }
  412. }
  413. },
  414. "delete": {
  415. "consumes": [
  416. "application/json"
  417. ],
  418. "produces": [
  419. "application/json"
  420. ],
  421. "tags": [
  422. "role"
  423. ],
  424. "summary": "删除角色",
  425. "parameters": [
  426. {
  427. "type": "string",
  428. "description": "id",
  429. "name": "id",
  430. "in": "path",
  431. "required": true
  432. }
  433. ],
  434. "responses": {
  435. "200": {
  436. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  437. "schema": {
  438. "type": "string"
  439. }
  440. }
  441. }
  442. }
  443. },
  444. "/authdata/userinfo": {
  445. "get": {
  446. "consumes": [
  447. "application/json"
  448. ],
  449. "produces": [
  450. "application/json"
  451. ],
  452. "tags": [
  453. "users"
  454. ],
  455. "summary": "获取单个用户信息",
  456. "parameters": [
  457. {
  458. "type": "integer",
  459. "description": "iddd",
  460. "name": "id",
  461. "in": "path",
  462. "required": true
  463. }
  464. ],
  465. "responses": {
  466. "200": {
  467. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  468. "schema": {
  469. "type": "string"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "/authdata/users": {
  476. "get": {
  477. "consumes": [
  478. "application/json"
  479. ],
  480. "produces": [
  481. "application/json"
  482. ],
  483. "tags": [
  484. "users"
  485. ],
  486. "summary": "获取所有用户",
  487. "parameters": [
  488. {
  489. "type": "string",
  490. "description": "username",
  491. "name": "username",
  492. "in": "path"
  493. }
  494. ],
  495. "responses": {
  496. "200": {
  497. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  498. "schema": {
  499. "type": "string"
  500. }
  501. }
  502. }
  503. },
  504. "post": {
  505. "consumes": [
  506. "application/json"
  507. ],
  508. "produces": [
  509. "application/json"
  510. ],
  511. "tags": [
  512. "users"
  513. ],
  514. "summary": "增加用户1",
  515. "parameters": [
  516. {
  517. "type": "string",
  518. "description": "username",
  519. "name": "username",
  520. "in": "query",
  521. "required": true
  522. },
  523. {
  524. "type": "string",
  525. "description": "password",
  526. "name": "password",
  527. "in": "query",
  528. "required": true
  529. },
  530. {
  531. "type": "integer",
  532. "description": "role_id",
  533. "name": "role_id",
  534. "in": "path"
  535. }
  536. ],
  537. "responses": {
  538. "200": {
  539. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  540. "schema": {
  541. "type": "string"
  542. }
  543. }
  544. }
  545. }
  546. },
  547. "/authdata/users/": {
  548. "get": {
  549. "consumes": [
  550. "application/json"
  551. ],
  552. "produces": [
  553. "application/json"
  554. ],
  555. "tags": [
  556. "users"
  557. ],
  558. "summary": "获取单个用户信息",
  559. "parameters": [
  560. {
  561. "type": "integer",
  562. "description": "id",
  563. "name": "id",
  564. "in": "path",
  565. "required": true
  566. }
  567. ],
  568. "responses": {
  569. "200": {
  570. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  571. "schema": {
  572. "type": "string"
  573. }
  574. }
  575. }
  576. },
  577. "put": {
  578. "consumes": [
  579. "application/json"
  580. ],
  581. "produces": [
  582. "application/json"
  583. ],
  584. "tags": [
  585. "users"
  586. ],
  587. "summary": "更新用户",
  588. "parameters": [
  589. {
  590. "type": "string",
  591. "description": "username",
  592. "name": "username",
  593. "in": "query",
  594. "required": true
  595. },
  596. {
  597. "type": "string",
  598. "description": "password",
  599. "name": "password",
  600. "in": "query",
  601. "required": true
  602. },
  603. {
  604. "type": "integer",
  605. "description": "role_id",
  606. "name": "role_id",
  607. "in": "query"
  608. }
  609. ],
  610. "responses": {
  611. "200": {
  612. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  613. "schema": {
  614. "type": "string"
  615. }
  616. }
  617. }
  618. },
  619. "delete": {
  620. "consumes": [
  621. "application/json"
  622. ],
  623. "produces": [
  624. "application/json"
  625. ],
  626. "tags": [
  627. "users"
  628. ],
  629. "summary": "删除用户",
  630. "parameters": [
  631. {
  632. "type": "integer",
  633. "description": "id",
  634. "name": "id",
  635. "in": "path",
  636. "required": true
  637. }
  638. ],
  639. "responses": {
  640. "200": {
  641. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  642. "schema": {
  643. "type": "string"
  644. }
  645. }
  646. }
  647. }
  648. },
  649. "/data/GetDataByNameForm": {
  650. "post": {
  651. "consumes": [
  652. "application/json"
  653. ],
  654. "produces": [
  655. "application/json"
  656. ],
  657. "tags": [
  658. "GetDataByNameForm"
  659. ],
  660. "summary": "根据APISQL表中SQL执行得到数据集",
  661. "parameters": [
  662. {
  663. "description": "sqlname",
  664. "name": "sqlname",
  665. "in": "body",
  666. "required": true,
  667. "schema": {
  668. "type": "object",
  669. "$ref": "#/definitions/json"
  670. }
  671. },
  672. {
  673. "type": "integer",
  674. "description": "offset",
  675. "name": "offset",
  676. "in": "query",
  677. "required": true
  678. },
  679. {
  680. "type": "integer",
  681. "description": "pagecount",
  682. "name": "pagecount",
  683. "in": "query",
  684. "required": true
  685. },
  686. {
  687. "type": "string",
  688. "description": "returntype",
  689. "name": "returntype",
  690. "in": "query",
  691. "required": true
  692. },
  693. {
  694. "type": "json",
  695. "description": "ss",
  696. "name": "s",
  697. "in": "formData",
  698. "required": true
  699. }
  700. ],
  701. "responses": {
  702. "200": {
  703. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  704. "schema": {
  705. "type": "string"
  706. }
  707. },
  708. "400": {
  709. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  710. "schema": {
  711. "type": "string"
  712. }
  713. },
  714. "404": {
  715. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  716. "schema": {
  717. "type": "string"
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "/data/GetDataByNames": {
  724. "post": {
  725. "consumes": [
  726. "application/json"
  727. ],
  728. "produces": [
  729. "application/json"
  730. ],
  731. "tags": [
  732. "GetDataByNames"
  733. ],
  734. "summary": "根据APISQL表中SQL执行得到数据集",
  735. "parameters": [
  736. {
  737. "type": "integer",
  738. "description": "offset",
  739. "name": "offset",
  740. "in": "query",
  741. "required": true
  742. },
  743. {
  744. "type": "integer",
  745. "description": "pagecount",
  746. "name": "pagecount",
  747. "in": "query",
  748. "required": true
  749. },
  750. {
  751. "type": "string",
  752. "description": "returntype",
  753. "name": "returntype",
  754. "in": "query",
  755. "required": true
  756. }
  757. ],
  758. "responses": {
  759. "200": {
  760. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  761. "schema": {
  762. "type": "string"
  763. }
  764. },
  765. "400": {
  766. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  767. "schema": {
  768. "type": "string"
  769. }
  770. },
  771. "404": {
  772. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  773. "schema": {
  774. "type": "string"
  775. }
  776. }
  777. }
  778. }
  779. },
  780. "/data/ImportExcel": {
  781. "post": {
  782. "consumes": [
  783. "application/json"
  784. ],
  785. "produces": [
  786. "application/json"
  787. ],
  788. "tags": [
  789. "ImportExcel"
  790. ],
  791. "summary": "导入excel文件到数据库,excel第一行作为参数",
  792. "parameters": [
  793. {
  794. "type": "string",
  795. "description": "文件名",
  796. "name": "file",
  797. "in": "query",
  798. "required": true
  799. },
  800. {
  801. "type": "string",
  802. "description": "执行sql的名字",
  803. "name": "name",
  804. "in": "header",
  805. "required": true
  806. }
  807. ],
  808. "responses": {
  809. "200": {
  810. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  811. "schema": {
  812. "type": "string"
  813. }
  814. },
  815. "400": {
  816. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  817. "schema": {
  818. "type": "string"
  819. }
  820. },
  821. "404": {
  822. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  823. "schema": {
  824. "type": "string"
  825. }
  826. }
  827. }
  828. }
  829. },
  830. "/data/PostDataByName": {
  831. "post": {
  832. "consumes": [
  833. "application/json"
  834. ],
  835. "produces": [
  836. "application/json"
  837. ],
  838. "tags": [
  839. "PostDataByName"
  840. ],
  841. "summary": "根据APISQL表中SQL执行得到数据集",
  842. "parameters": [
  843. {
  844. "type": "string",
  845. "description": "sqlname",
  846. "name": "sqlname",
  847. "in": "query",
  848. "required": true
  849. },
  850. {
  851. "type": "integer",
  852. "description": "offset",
  853. "name": "offset",
  854. "in": "query",
  855. "required": true
  856. },
  857. {
  858. "type": "integer",
  859. "description": "pagecount",
  860. "name": "pagecount",
  861. "in": "query",
  862. "required": true
  863. },
  864. {
  865. "type": "string",
  866. "description": "returntype",
  867. "name": "returntype",
  868. "in": "query",
  869. "required": true
  870. }
  871. ],
  872. "responses": {
  873. "200": {
  874. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  875. "schema": {
  876. "type": "string"
  877. }
  878. },
  879. "400": {
  880. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  881. "schema": {
  882. "type": "string"
  883. }
  884. },
  885. "404": {
  886. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  887. "schema": {
  888. "type": "string"
  889. }
  890. }
  891. }
  892. }
  893. },
  894. "/data/PostDataByNameForm": {
  895. "post": {
  896. "consumes": [
  897. "application/json"
  898. ],
  899. "produces": [
  900. "application/json"
  901. ],
  902. "tags": [
  903. "PostDataByNameForm"
  904. ],
  905. "summary": "根据APISQL表中SQL执行得到数据集",
  906. "parameters": [
  907. {
  908. "type": "string",
  909. "description": "sqlname",
  910. "name": "sqlname",
  911. "in": "query",
  912. "required": true
  913. },
  914. {
  915. "type": "integer",
  916. "description": "offset",
  917. "name": "offset",
  918. "in": "query",
  919. "required": true
  920. },
  921. {
  922. "type": "integer",
  923. "description": "pagecount",
  924. "name": "pagecount",
  925. "in": "query",
  926. "required": true
  927. },
  928. {
  929. "type": "string",
  930. "description": "returntype",
  931. "name": "returntype",
  932. "in": "query",
  933. "required": true
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  939. "schema": {
  940. "type": "string"
  941. }
  942. },
  943. "400": {
  944. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误朱红彬彬\"}",
  945. "schema": {
  946. "type": "string"
  947. }
  948. },
  949. "404": {
  950. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  951. "schema": {
  952. "type": "string"
  953. }
  954. }
  955. }
  956. }
  957. },
  958. "/data/PostDatasByName": {
  959. "post": {
  960. "consumes": [
  961. "application/json"
  962. ],
  963. "produces": [
  964. "application/json"
  965. ],
  966. "tags": [
  967. "PostDatasByName"
  968. ],
  969. "summary": "根据APISQL表中SQL执行得到数据集",
  970. "parameters": [
  971. {
  972. "type": "string",
  973. "description": "sqlname",
  974. "name": "sqlname",
  975. "in": "query",
  976. "required": true
  977. },
  978. {
  979. "type": "integer",
  980. "description": "offset",
  981. "name": "offset",
  982. "in": "query",
  983. "required": true
  984. },
  985. {
  986. "type": "integer",
  987. "description": "pagecount",
  988. "name": "pagecount",
  989. "in": "query",
  990. "required": true
  991. },
  992. {
  993. "type": "string",
  994. "description": "returntype",
  995. "name": "returntype",
  996. "in": "query",
  997. "required": true
  998. }
  999. ],
  1000. "responses": {
  1001. "200": {
  1002. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  1003. "schema": {
  1004. "type": "string"
  1005. }
  1006. },
  1007. "400": {
  1008. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  1009. "schema": {
  1010. "type": "string"
  1011. }
  1012. },
  1013. "404": {
  1014. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  1015. "schema": {
  1016. "type": "string"
  1017. }
  1018. }
  1019. }
  1020. }
  1021. },
  1022. "/data/getdata": {
  1023. "post": {
  1024. "consumes": [
  1025. "application/json"
  1026. ],
  1027. "produces": [
  1028. "application/json"
  1029. ],
  1030. "tags": [
  1031. "getData"
  1032. ],
  1033. "summary": "根据SQL执行得到数据集",
  1034. "parameters": [
  1035. {
  1036. "type": "string",
  1037. "description": "sql",
  1038. "name": "sql",
  1039. "in": "query",
  1040. "required": true
  1041. }
  1042. ],
  1043. "responses": {
  1044. "200": {
  1045. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  1046. "schema": {
  1047. "type": "string"
  1048. }
  1049. },
  1050. "400": {
  1051. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  1052. "schema": {
  1053. "type": "string"
  1054. }
  1055. },
  1056. "404": {
  1057. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  1058. "schema": {
  1059. "type": "string"
  1060. }
  1061. }
  1062. }
  1063. }
  1064. }
  1065. }
  1066. }`
  1067. type swaggerInfo struct {
  1068. Version string
  1069. Host string
  1070. BasePath string
  1071. Title string
  1072. Description string
  1073. }
  1074. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1075. var SwaggerInfo swaggerInfo
  1076. type s struct{}
  1077. func (s *s) ReadDoc() string {
  1078. t, err := template.New("swagger_info").Parse(doc)
  1079. if err != nil {
  1080. return doc
  1081. }
  1082. var tpl bytes.Buffer
  1083. if err := t.Execute(&tpl, SwaggerInfo); err != nil {
  1084. return doc
  1085. }
  1086. return tpl.String()
  1087. }
  1088. func init() {
  1089. swag.Register(swag.Name, &s{})
  1090. }