docs.go 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag at
  3. // 2019-10-26 23:18:53.1133875 +0800 CST m=+0.203566501
  4. package docs
  5. import (
  6. "bytes"
  7. "encoding/json"
  8. "strings"
  9. "github.com/alecthomas/template"
  10. "github.com/swaggo/swag"
  11. )
  12. var doc = `{
  13. "schemes": {{ marshal .Schemes }},
  14. "swagger": "2.0",
  15. "info": {
  16. "description": "{{.Description}}",
  17. "title": "{{.Title}}",
  18. "contact": {},
  19. "license": {},
  20. "version": "{{.Version}}"
  21. },
  22. "host": "{{.Host}}",
  23. "basePath": "{{.BasePath}}",
  24. "paths": {
  25. "/api/createApi": {
  26. "post": {
  27. "security": [
  28. {
  29. "ApiKeyAuth": []
  30. }
  31. ],
  32. "consumes": [
  33. "application/json"
  34. ],
  35. "produces": [
  36. "application/json"
  37. ],
  38. "tags": [
  39. "Api"
  40. ],
  41. "summary": "创建基础api",
  42. "parameters": [
  43. {
  44. "description": "创建api",
  45. "name": "data",
  46. "in": "body",
  47. "required": true,
  48. "schema": {
  49. "type": "object",
  50. "$ref": "#/definitions/api.CreateApiParams"
  51. }
  52. }
  53. ],
  54. "responses": {
  55. "200": {
  56. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  57. "schema": {
  58. "type": "string"
  59. }
  60. }
  61. }
  62. }
  63. },
  64. "/api/deleteApi": {
  65. "post": {
  66. "security": [
  67. {
  68. "ApiKeyAuth": []
  69. }
  70. ],
  71. "consumes": [
  72. "application/json"
  73. ],
  74. "produces": [
  75. "application/json"
  76. ],
  77. "tags": [
  78. "Api"
  79. ],
  80. "summary": "删除指定api",
  81. "parameters": [
  82. {
  83. "description": "删除api",
  84. "name": "data",
  85. "in": "body",
  86. "required": true,
  87. "schema": {
  88. "type": "object",
  89. "$ref": "#/definitions/dbModel.Api"
  90. }
  91. }
  92. ],
  93. "responses": {
  94. "200": {
  95. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  96. "schema": {
  97. "type": "string"
  98. }
  99. }
  100. }
  101. }
  102. },
  103. "/api/getAllApis": {
  104. "post": {
  105. "security": [
  106. {
  107. "ApiKeyAuth": []
  108. }
  109. ],
  110. "consumes": [
  111. "application/json"
  112. ],
  113. "produces": [
  114. "application/json"
  115. ],
  116. "tags": [
  117. "Api"
  118. ],
  119. "summary": "获取所有的Api 不分页",
  120. "responses": {
  121. "200": {
  122. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  123. "schema": {
  124. "type": "string"
  125. }
  126. }
  127. }
  128. }
  129. },
  130. "/api/getApiById": {
  131. "post": {
  132. "security": [
  133. {
  134. "ApiKeyAuth": []
  135. }
  136. ],
  137. "consumes": [
  138. "application/json"
  139. ],
  140. "produces": [
  141. "application/json"
  142. ],
  143. "tags": [
  144. "Api"
  145. ],
  146. "summary": "根据id获取api",
  147. "parameters": [
  148. {
  149. "description": "分页获取用户列表",
  150. "name": "data",
  151. "in": "body",
  152. "required": true,
  153. "schema": {
  154. "type": "object",
  155. "$ref": "#/definitions/modelInterface.PageInfo"
  156. }
  157. }
  158. ],
  159. "responses": {
  160. "200": {
  161. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  162. "schema": {
  163. "type": "string"
  164. }
  165. }
  166. }
  167. }
  168. },
  169. "/api/getApiList": {
  170. "post": {
  171. "security": [
  172. {
  173. "ApiKeyAuth": []
  174. }
  175. ],
  176. "consumes": [
  177. "application/json"
  178. ],
  179. "produces": [
  180. "application/json"
  181. ],
  182. "tags": [
  183. "Api"
  184. ],
  185. "summary": "分页获取API列表",
  186. "parameters": [
  187. {
  188. "description": "分页获取API列表",
  189. "name": "data",
  190. "in": "body",
  191. "required": true,
  192. "schema": {
  193. "type": "object",
  194. "$ref": "#/definitions/modelInterface.PageInfo"
  195. }
  196. }
  197. ],
  198. "responses": {
  199. "200": {
  200. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  201. "schema": {
  202. "type": "string"
  203. }
  204. }
  205. }
  206. }
  207. },
  208. "/api/setAuthAndApi": {
  209. "post": {
  210. "security": [
  211. {
  212. "ApiKeyAuth": []
  213. }
  214. ],
  215. "consumes": [
  216. "application/json"
  217. ],
  218. "produces": [
  219. "application/json"
  220. ],
  221. "tags": [
  222. "Api"
  223. ],
  224. "summary": "创建api和角色关系",
  225. "parameters": [
  226. {
  227. "description": "创建api和角色关系",
  228. "name": "data",
  229. "in": "body",
  230. "required": true,
  231. "schema": {
  232. "type": "object",
  233. "$ref": "#/definitions/api.AuthAndPathIn"
  234. }
  235. }
  236. ],
  237. "responses": {
  238. "200": {
  239. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  240. "schema": {
  241. "type": "string"
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "/api/updataApi": {
  248. "post": {
  249. "security": [
  250. {
  251. "ApiKeyAuth": []
  252. }
  253. ],
  254. "consumes": [
  255. "application/json"
  256. ],
  257. "produces": [
  258. "application/json"
  259. ],
  260. "tags": [
  261. "Api"
  262. ],
  263. "summary": "创建基础api",
  264. "parameters": [
  265. {
  266. "description": "创建api",
  267. "name": "data",
  268. "in": "body",
  269. "required": true,
  270. "schema": {
  271. "type": "object",
  272. "$ref": "#/definitions/api.CreateApiParams"
  273. }
  274. }
  275. ],
  276. "responses": {
  277. "200": {
  278. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  279. "schema": {
  280. "type": "string"
  281. }
  282. }
  283. }
  284. }
  285. },
  286. "/authority/createAuthority": {
  287. "post": {
  288. "security": [
  289. {
  290. "ApiKeyAuth": []
  291. }
  292. ],
  293. "consumes": [
  294. "application/json"
  295. ],
  296. "produces": [
  297. "application/json"
  298. ],
  299. "tags": [
  300. "authority"
  301. ],
  302. "summary": "创建角色",
  303. "parameters": [
  304. {
  305. "description": "创建角色",
  306. "name": "data",
  307. "in": "body",
  308. "required": true,
  309. "schema": {
  310. "type": "object",
  311. "$ref": "#/definitions/api.CreateAuthorityPatams"
  312. }
  313. }
  314. ],
  315. "responses": {
  316. "200": {
  317. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  318. "schema": {
  319. "type": "string"
  320. }
  321. }
  322. }
  323. }
  324. },
  325. "/authority/deleteAuthority": {
  326. "post": {
  327. "security": [
  328. {
  329. "ApiKeyAuth": []
  330. }
  331. ],
  332. "consumes": [
  333. "application/json"
  334. ],
  335. "produces": [
  336. "application/json"
  337. ],
  338. "tags": [
  339. "authority"
  340. ],
  341. "summary": "删除角色",
  342. "parameters": [
  343. {
  344. "description": "删除角色",
  345. "name": "data",
  346. "in": "body",
  347. "required": true,
  348. "schema": {
  349. "type": "object",
  350. "$ref": "#/definitions/api.DeleteAuthorityPatams"
  351. }
  352. }
  353. ],
  354. "responses": {
  355. "200": {
  356. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  357. "schema": {
  358. "type": "string"
  359. }
  360. }
  361. }
  362. }
  363. },
  364. "/authority/getAuthAndApi": {
  365. "post": {
  366. "security": [
  367. {
  368. "ApiKeyAuth": []
  369. }
  370. ],
  371. "consumes": [
  372. "application/json"
  373. ],
  374. "produces": [
  375. "application/json"
  376. ],
  377. "tags": [
  378. "authority"
  379. ],
  380. "summary": "获取本角色所有有权限的apiId",
  381. "parameters": [
  382. {
  383. "description": "获取本角色所有有权限的apiId",
  384. "name": "data",
  385. "in": "body",
  386. "required": true,
  387. "schema": {
  388. "type": "object",
  389. "$ref": "#/definitions/api.GetAuthorityId"
  390. }
  391. }
  392. ],
  393. "responses": {
  394. "200": {
  395. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  396. "schema": {
  397. "type": "string"
  398. }
  399. }
  400. }
  401. }
  402. },
  403. "/authority/getAuthorityList": {
  404. "post": {
  405. "security": [
  406. {
  407. "ApiKeyAuth": []
  408. }
  409. ],
  410. "consumes": [
  411. "application/json"
  412. ],
  413. "produces": [
  414. "application/json"
  415. ],
  416. "tags": [
  417. "authority"
  418. ],
  419. "summary": "分页获取角色列表",
  420. "parameters": [
  421. {
  422. "description": "分页获取用户列表",
  423. "name": "data",
  424. "in": "body",
  425. "required": true,
  426. "schema": {
  427. "type": "object",
  428. "$ref": "#/definitions/modelInterface.PageInfo"
  429. }
  430. }
  431. ],
  432. "responses": {
  433. "200": {
  434. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  435. "schema": {
  436. "type": "string"
  437. }
  438. }
  439. }
  440. }
  441. },
  442. "/base/login": {
  443. "post": {
  444. "produces": [
  445. "application/json"
  446. ],
  447. "tags": [
  448. "Base"
  449. ],
  450. "summary": "用户登录",
  451. "parameters": [
  452. {
  453. "description": "用户登录接口",
  454. "name": "data",
  455. "in": "body",
  456. "required": true,
  457. "schema": {
  458. "type": "object",
  459. "$ref": "#/definitions/api.RegistAndLoginStuct"
  460. }
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
  466. "schema": {
  467. "type": "string"
  468. }
  469. }
  470. }
  471. }
  472. },
  473. "/base/regist": {
  474. "post": {
  475. "produces": [
  476. "application/json"
  477. ],
  478. "tags": [
  479. "Base"
  480. ],
  481. "summary": "用户注册账号",
  482. "parameters": [
  483. {
  484. "description": "用户注册接口",
  485. "name": "data",
  486. "in": "body",
  487. "required": true,
  488. "schema": {
  489. "type": "object",
  490. "$ref": "#/definitions/api.RegistAndLoginStuct"
  491. }
  492. }
  493. ],
  494. "responses": {
  495. "200": {
  496. "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
  497. "schema": {
  498. "type": "string"
  499. }
  500. }
  501. }
  502. }
  503. },
  504. "/fileUploadAndDownload/getFileList": {
  505. "post": {
  506. "security": [
  507. {
  508. "ApiKeyAuth": []
  509. }
  510. ],
  511. "consumes": [
  512. "application/json"
  513. ],
  514. "produces": [
  515. "application/json"
  516. ],
  517. "tags": [
  518. "FileUploadAndDownload"
  519. ],
  520. "summary": "分页文件列表",
  521. "parameters": [
  522. {
  523. "description": "分页获取文件户列表",
  524. "name": "data",
  525. "in": "body",
  526. "required": true,
  527. "schema": {
  528. "type": "object",
  529. "$ref": "#/definitions/modelInterface.PageInfo"
  530. }
  531. }
  532. ],
  533. "responses": {
  534. "200": {
  535. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  536. "schema": {
  537. "type": "string"
  538. }
  539. }
  540. }
  541. }
  542. },
  543. "/fileUploadAndDownload/upload": {
  544. "post": {
  545. "security": [
  546. {
  547. "ApiKeyAuth": []
  548. }
  549. ],
  550. "consumes": [
  551. "multipart/form-data"
  552. ],
  553. "produces": [
  554. "application/json"
  555. ],
  556. "tags": [
  557. "FileUploadAndDownload"
  558. ],
  559. "summary": "上传文件示例",
  560. "parameters": [
  561. {
  562. "type": "file",
  563. "description": "上传文件示例",
  564. "name": "file",
  565. "in": "formData",
  566. "required": true
  567. }
  568. ],
  569. "responses": {
  570. "200": {
  571. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  572. "schema": {
  573. "type": "string"
  574. }
  575. }
  576. }
  577. }
  578. },
  579. "/menu/addBaseMenu": {
  580. "post": {
  581. "security": [
  582. {
  583. "ApiKeyAuth": []
  584. }
  585. ],
  586. "consumes": [
  587. "application/json"
  588. ],
  589. "produces": [
  590. "application/json"
  591. ],
  592. "tags": [
  593. "menu"
  594. ],
  595. "summary": "新增菜单",
  596. "parameters": [
  597. {
  598. "description": "新增菜单",
  599. "name": "data",
  600. "in": "body",
  601. "required": true,
  602. "schema": {
  603. "type": "object",
  604. "$ref": "#/definitions/dbModel.BaseMenu"
  605. }
  606. }
  607. ],
  608. "responses": {
  609. "200": {
  610. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  611. "schema": {
  612. "type": "string"
  613. }
  614. }
  615. }
  616. }
  617. },
  618. "/menu/addMenuAuthority": {
  619. "post": {
  620. "security": [
  621. {
  622. "ApiKeyAuth": []
  623. }
  624. ],
  625. "consumes": [
  626. "application/json"
  627. ],
  628. "produces": [
  629. "application/json"
  630. ],
  631. "tags": [
  632. "authorityAndMenu"
  633. ],
  634. "summary": "获取指定角色menu",
  635. "parameters": [
  636. {
  637. "description": "增加menu和角色关联关系",
  638. "name": "data",
  639. "in": "body",
  640. "required": true,
  641. "schema": {
  642. "type": "object",
  643. "$ref": "#/definitions/api.AuthorityIdInfo"
  644. }
  645. }
  646. ],
  647. "responses": {
  648. "200": {
  649. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  650. "schema": {
  651. "type": "string"
  652. }
  653. }
  654. }
  655. }
  656. },
  657. "/menu/deleteBaseMenu": {
  658. "post": {
  659. "security": [
  660. {
  661. "ApiKeyAuth": []
  662. }
  663. ],
  664. "consumes": [
  665. "application/json"
  666. ],
  667. "produces": [
  668. "application/json"
  669. ],
  670. "tags": [
  671. "menu"
  672. ],
  673. "summary": "删除菜单",
  674. "parameters": [
  675. {
  676. "description": "删除菜单",
  677. "name": "data",
  678. "in": "body",
  679. "required": true,
  680. "schema": {
  681. "type": "object",
  682. "$ref": "#/definitions/api.IdInfo"
  683. }
  684. }
  685. ],
  686. "responses": {
  687. "200": {
  688. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  689. "schema": {
  690. "type": "string"
  691. }
  692. }
  693. }
  694. }
  695. },
  696. "/menu/getBaseMenuById": {
  697. "post": {
  698. "security": [
  699. {
  700. "ApiKeyAuth": []
  701. }
  702. ],
  703. "consumes": [
  704. "application/json"
  705. ],
  706. "produces": [
  707. "application/json"
  708. ],
  709. "tags": [
  710. "menu"
  711. ],
  712. "summary": "根据id获取菜单",
  713. "parameters": [
  714. {
  715. "description": "根据id获取菜单",
  716. "name": "data",
  717. "in": "body",
  718. "required": true,
  719. "schema": {
  720. "type": "object",
  721. "$ref": "#/definitions/api.GetById"
  722. }
  723. }
  724. ],
  725. "responses": {
  726. "200": {
  727. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  728. "schema": {
  729. "type": "string"
  730. }
  731. }
  732. }
  733. }
  734. },
  735. "/menu/getBaseMenuTree": {
  736. "post": {
  737. "security": [
  738. {
  739. "ApiKeyAuth": []
  740. }
  741. ],
  742. "produces": [
  743. "application/json"
  744. ],
  745. "tags": [
  746. "authorityAndMenu"
  747. ],
  748. "summary": "获取用户动态路由",
  749. "parameters": [
  750. {
  751. "description": "可以什么都不填",
  752. "name": "data",
  753. "in": "body",
  754. "required": true,
  755. "schema": {
  756. "type": "object",
  757. "$ref": "#/definitions/api.RegistAndLoginStuct"
  758. }
  759. }
  760. ],
  761. "responses": {
  762. "200": {
  763. "description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
  764. "schema": {
  765. "type": "string"
  766. }
  767. }
  768. }
  769. }
  770. },
  771. "/menu/getMenu": {
  772. "post": {
  773. "security": [
  774. {
  775. "ApiKeyAuth": []
  776. }
  777. ],
  778. "produces": [
  779. "application/json"
  780. ],
  781. "tags": [
  782. "authorityAndMenu"
  783. ],
  784. "summary": "获取用户动态路由",
  785. "parameters": [
  786. {
  787. "description": "可以什么都不填",
  788. "name": "data",
  789. "in": "body",
  790. "required": true,
  791. "schema": {
  792. "type": "object",
  793. "$ref": "#/definitions/api.RegistAndLoginStuct"
  794. }
  795. }
  796. ],
  797. "responses": {
  798. "200": {
  799. "description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
  800. "schema": {
  801. "type": "string"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "/menu/getMenuList": {
  808. "post": {
  809. "security": [
  810. {
  811. "ApiKeyAuth": []
  812. }
  813. ],
  814. "consumes": [
  815. "application/json"
  816. ],
  817. "produces": [
  818. "application/json"
  819. ],
  820. "tags": [
  821. "menu"
  822. ],
  823. "summary": "分页获取基础menu列表",
  824. "parameters": [
  825. {
  826. "description": "分页获取基础menu列表",
  827. "name": "data",
  828. "in": "body",
  829. "required": true,
  830. "schema": {
  831. "type": "object",
  832. "$ref": "#/definitions/modelInterface.PageInfo"
  833. }
  834. }
  835. ],
  836. "responses": {
  837. "200": {
  838. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  839. "schema": {
  840. "type": "string"
  841. }
  842. }
  843. }
  844. }
  845. },
  846. "/menu/updataBaseMen": {
  847. "post": {
  848. "security": [
  849. {
  850. "ApiKeyAuth": []
  851. }
  852. ],
  853. "consumes": [
  854. "application/json"
  855. ],
  856. "produces": [
  857. "application/json"
  858. ],
  859. "tags": [
  860. "menu"
  861. ],
  862. "summary": "更新菜单",
  863. "parameters": [
  864. {
  865. "description": "更新菜单",
  866. "name": "data",
  867. "in": "body",
  868. "required": true,
  869. "schema": {
  870. "type": "object",
  871. "$ref": "#/definitions/dbModel.BaseMenu"
  872. }
  873. }
  874. ],
  875. "responses": {
  876. "200": {
  877. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  878. "schema": {
  879. "type": "string"
  880. }
  881. }
  882. }
  883. }
  884. },
  885. "/user/changePassword": {
  886. "post": {
  887. "security": [
  888. {
  889. "ApiKeyAuth": []
  890. }
  891. ],
  892. "produces": [
  893. "application/json"
  894. ],
  895. "tags": [
  896. "User"
  897. ],
  898. "summary": "用户修改密码",
  899. "parameters": [
  900. {
  901. "description": "用户修改密码",
  902. "name": "data",
  903. "in": "body",
  904. "required": true,
  905. "schema": {
  906. "type": "object",
  907. "$ref": "#/definitions/api.ChangePasswordStutrc"
  908. }
  909. }
  910. ],
  911. "responses": {
  912. "200": {
  913. "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
  914. "schema": {
  915. "type": "string"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "/user/getUserList": {
  922. "post": {
  923. "security": [
  924. {
  925. "ApiKeyAuth": []
  926. }
  927. ],
  928. "consumes": [
  929. "application/json"
  930. ],
  931. "produces": [
  932. "application/json"
  933. ],
  934. "tags": [
  935. "User"
  936. ],
  937. "summary": "分页获取用户列表",
  938. "parameters": [
  939. {
  940. "description": "分页获取用户列表",
  941. "name": "data",
  942. "in": "body",
  943. "required": true,
  944. "schema": {
  945. "type": "object",
  946. "$ref": "#/definitions/modelInterface.PageInfo"
  947. }
  948. }
  949. ],
  950. "responses": {
  951. "200": {
  952. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  953. "schema": {
  954. "type": "string"
  955. }
  956. }
  957. }
  958. }
  959. },
  960. "/user/setUserAuthority": {
  961. "post": {
  962. "security": [
  963. {
  964. "ApiKeyAuth": []
  965. }
  966. ],
  967. "consumes": [
  968. "application/json"
  969. ],
  970. "produces": [
  971. "application/json"
  972. ],
  973. "tags": [
  974. "User"
  975. ],
  976. "summary": "设置用户权限",
  977. "parameters": [
  978. {
  979. "description": "设置用户权限",
  980. "name": "data",
  981. "in": "body",
  982. "required": true,
  983. "schema": {
  984. "type": "object",
  985. "$ref": "#/definitions/api.SetUserAuth"
  986. }
  987. }
  988. ],
  989. "responses": {
  990. "200": {
  991. "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
  992. "schema": {
  993. "type": "string"
  994. }
  995. }
  996. }
  997. }
  998. },
  999. "/user/uploadHeaderImg": {
  1000. "post": {
  1001. "security": [
  1002. {
  1003. "ApiKeyAuth": []
  1004. }
  1005. ],
  1006. "consumes": [
  1007. "multipart/form-data"
  1008. ],
  1009. "produces": [
  1010. "application/json"
  1011. ],
  1012. "tags": [
  1013. "User"
  1014. ],
  1015. "summary": "用户上传头像",
  1016. "parameters": [
  1017. {
  1018. "type": "file",
  1019. "description": "用户上传头像",
  1020. "name": "headerImg",
  1021. "in": "formData",
  1022. "required": true
  1023. },
  1024. {
  1025. "type": "string",
  1026. "description": "用户上传头像",
  1027. "name": "username",
  1028. "in": "formData",
  1029. "required": true
  1030. }
  1031. ],
  1032. "responses": {
  1033. "200": {
  1034. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  1035. "schema": {
  1036. "type": "string"
  1037. }
  1038. }
  1039. }
  1040. }
  1041. }
  1042. },
  1043. "definitions": {
  1044. "api.AddMenuAuthorityInfo": {
  1045. "type": "object",
  1046. "properties": {
  1047. "authorityId": {
  1048. "type": "string"
  1049. },
  1050. "menus": {
  1051. "type": "array",
  1052. "items": {
  1053. "$ref": "#/definitions/dbModel.BaseMenu"
  1054. }
  1055. }
  1056. }
  1057. },
  1058. "api.AuthAndPathIn": {
  1059. "type": "object",
  1060. "properties": {
  1061. "apiIds": {
  1062. "type": "array",
  1063. "items": {
  1064. "type": "integer"
  1065. }
  1066. },
  1067. "authorityId": {
  1068. "type": "string"
  1069. }
  1070. }
  1071. },
  1072. "api.AuthorityIdInfo": {
  1073. "type": "object",
  1074. "properties": {
  1075. "authorityId": {
  1076. "type": "string"
  1077. }
  1078. }
  1079. },
  1080. "api.ChangePasswordStutrc": {
  1081. "type": "object",
  1082. "properties": {
  1083. "newPassword": {
  1084. "type": "string"
  1085. },
  1086. "password": {
  1087. "type": "string"
  1088. },
  1089. "username": {
  1090. "type": "string"
  1091. }
  1092. }
  1093. },
  1094. "api.CreateApiParams": {
  1095. "type": "object",
  1096. "properties": {
  1097. "description": {
  1098. "type": "string"
  1099. },
  1100. "path": {
  1101. "type": "string"
  1102. }
  1103. }
  1104. },
  1105. "api.CreateAuthorityPatams": {
  1106. "type": "object",
  1107. "properties": {
  1108. "authorityId": {
  1109. "type": "string"
  1110. },
  1111. "authorityName": {
  1112. "type": "string"
  1113. }
  1114. }
  1115. },
  1116. "api.DeleteAuthorityPatams": {
  1117. "type": "object",
  1118. "properties": {
  1119. "authorityId": {
  1120. "type": "integer"
  1121. }
  1122. }
  1123. },
  1124. "api.GetAuthorityId": {
  1125. "type": "object",
  1126. "properties": {
  1127. "authorityId": {
  1128. "type": "string"
  1129. }
  1130. }
  1131. },
  1132. "api.GetById": {
  1133. "type": "object",
  1134. "properties": {
  1135. "id": {
  1136. "type": "number"
  1137. }
  1138. }
  1139. },
  1140. "api.IdInfo": {
  1141. "type": "object",
  1142. "properties": {
  1143. "id": {
  1144. "type": "number"
  1145. }
  1146. }
  1147. },
  1148. "api.RegistAndLoginStuct": {
  1149. "type": "object",
  1150. "properties": {
  1151. "password": {
  1152. "type": "string"
  1153. },
  1154. "username": {
  1155. "type": "string"
  1156. }
  1157. }
  1158. },
  1159. "api.SetUserAuth": {
  1160. "type": "object",
  1161. "properties": {
  1162. "authorityId": {
  1163. "type": "string"
  1164. },
  1165. "uuid": {
  1166. "type": "string"
  1167. }
  1168. }
  1169. },
  1170. "dbModel.Api": {
  1171. "type": "object",
  1172. "properties": {
  1173. "description": {
  1174. "type": "string"
  1175. },
  1176. "group": {
  1177. "type": "string"
  1178. },
  1179. "path": {
  1180. "type": "string"
  1181. }
  1182. }
  1183. },
  1184. "dbModel.BaseMenu": {
  1185. "type": "object",
  1186. "properties": {
  1187. "children": {
  1188. "type": "array",
  1189. "items": {
  1190. "$ref": "#/definitions/dbModel.BaseMenu"
  1191. }
  1192. },
  1193. "component": {
  1194. "type": "string"
  1195. },
  1196. "hidden": {
  1197. "type": "boolean"
  1198. },
  1199. "icon": {
  1200. "type": "string"
  1201. },
  1202. "name": {
  1203. "type": "string"
  1204. },
  1205. "nickName": {
  1206. "type": "string"
  1207. },
  1208. "parentId": {
  1209. "type": "string"
  1210. },
  1211. "path": {
  1212. "type": "string"
  1213. },
  1214. "title": {
  1215. "type": "string"
  1216. }
  1217. }
  1218. },
  1219. "modelInterface.PageInfo": {
  1220. "type": "object",
  1221. "properties": {
  1222. "page": {
  1223. "type": "integer"
  1224. },
  1225. "pageSize": {
  1226. "type": "integer"
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "securityDefinitions": {
  1232. "ApiKeyAuth": {
  1233. "type": "apiKey",
  1234. "name": "x-token",
  1235. "in": "header"
  1236. }
  1237. }
  1238. }`
  1239. type swaggerInfo struct {
  1240. Version string
  1241. Host string
  1242. BasePath string
  1243. Schemes []string
  1244. Title string
  1245. Description string
  1246. }
  1247. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1248. var SwaggerInfo = swaggerInfo{
  1249. Version: "0.0.1",
  1250. Host: "",
  1251. BasePath: "/",
  1252. Schemes: []string{},
  1253. Title: "Swagger Example API",
  1254. Description: "This is a sample Server pets",
  1255. }
  1256. type s struct{}
  1257. func (s *s) ReadDoc() string {
  1258. sInfo := SwaggerInfo
  1259. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  1260. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  1261. "marshal": func(v interface{}) string {
  1262. a, _ := json.Marshal(v)
  1263. return string(a)
  1264. },
  1265. }).Parse(doc)
  1266. if err != nil {
  1267. return doc
  1268. }
  1269. var tpl bytes.Buffer
  1270. if err := t.Execute(&tpl, sInfo); err != nil {
  1271. return doc
  1272. }
  1273. return tpl.String()
  1274. }
  1275. func init() {
  1276. swag.Register(swag.Name, &s{})
  1277. }