You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1442 lines
44 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag at
  3. // 2019-12-20 11:36:51.4275267 +0800 CST m=+0.082812601
  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. "SysApi"
  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. "SysApi"
  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/sysModel.SysApi"
  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. "SysApi"
  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. "SysApi"
  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. "SysApi"
  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/updataApi": {
  209. "post": {
  210. "security": [
  211. {
  212. "ApiKeyAuth": []
  213. }
  214. ],
  215. "consumes": [
  216. "application/json"
  217. ],
  218. "produces": [
  219. "application/json"
  220. ],
  221. "tags": [
  222. "SysApi"
  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.CreateApiParams"
  234. }
  235. }
  236. ],
  237. "responses": {
  238. "200": {
  239. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  240. "schema": {
  241. "type": "string"
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "/authority/createAuthority": {
  248. "post": {
  249. "security": [
  250. {
  251. "ApiKeyAuth": []
  252. }
  253. ],
  254. "consumes": [
  255. "application/json"
  256. ],
  257. "produces": [
  258. "application/json"
  259. ],
  260. "tags": [
  261. "authority"
  262. ],
  263. "summary": "创建角色",
  264. "parameters": [
  265. {
  266. "description": "创建角色",
  267. "name": "data",
  268. "in": "body",
  269. "required": true,
  270. "schema": {
  271. "type": "object",
  272. "$ref": "#/definitions/api.CreateAuthorityParams"
  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/deleteAuthority": {
  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.DeleteAuthorityPatams"
  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/getAuthorityList": {
  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/modelInterface.PageInfo"
  351. }
  352. }
  353. ],
  354. "responses": {
  355. "200": {
  356. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  357. "schema": {
  358. "type": "string"
  359. }
  360. }
  361. }
  362. }
  363. },
  364. "/base/login": {
  365. "post": {
  366. "produces": [
  367. "application/json"
  368. ],
  369. "tags": [
  370. "Base"
  371. ],
  372. "summary": "用户登录",
  373. "parameters": [
  374. {
  375. "description": "用户登录接口",
  376. "name": "data",
  377. "in": "body",
  378. "required": true,
  379. "schema": {
  380. "type": "object",
  381. "$ref": "#/definitions/api.RegistAndLoginStuct"
  382. }
  383. }
  384. ],
  385. "responses": {
  386. "200": {
  387. "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
  388. "schema": {
  389. "type": "string"
  390. }
  391. }
  392. }
  393. }
  394. },
  395. "/base/regist": {
  396. "post": {
  397. "produces": [
  398. "application/json"
  399. ],
  400. "tags": [
  401. "Base"
  402. ],
  403. "summary": "用户注册账号",
  404. "parameters": [
  405. {
  406. "description": "用户注册接口",
  407. "name": "data",
  408. "in": "body",
  409. "required": true,
  410. "schema": {
  411. "type": "object",
  412. "$ref": "#/definitions/sysModel.SysUser"
  413. }
  414. }
  415. ],
  416. "responses": {
  417. "200": {
  418. "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
  419. "schema": {
  420. "type": "string"
  421. }
  422. }
  423. }
  424. }
  425. },
  426. "/casbin/casbinPUpdata": {
  427. "post": {
  428. "security": [
  429. {
  430. "ApiKeyAuth": []
  431. }
  432. ],
  433. "consumes": [
  434. "application/json"
  435. ],
  436. "produces": [
  437. "application/json"
  438. ],
  439. "tags": [
  440. "casbin"
  441. ],
  442. "summary": "更改角色api权限",
  443. "parameters": [
  444. {
  445. "description": "更改角色api权限",
  446. "name": "data",
  447. "in": "body",
  448. "required": true,
  449. "schema": {
  450. "type": "object",
  451. "$ref": "#/definitions/api.CreateAuthorityParams"
  452. }
  453. }
  454. ],
  455. "responses": {
  456. "200": {
  457. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  458. "schema": {
  459. "type": "string"
  460. }
  461. }
  462. }
  463. }
  464. },
  465. "/casbin/getPolicyPathByAuthorityId": {
  466. "post": {
  467. "security": [
  468. {
  469. "ApiKeyAuth": []
  470. }
  471. ],
  472. "consumes": [
  473. "application/json"
  474. ],
  475. "produces": [
  476. "application/json"
  477. ],
  478. "tags": [
  479. "casbin"
  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.CreateAuthorityParams"
  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/deleteFile": {
  505. "post": {
  506. "security": [
  507. {
  508. "ApiKeyAuth": []
  509. }
  510. ],
  511. "produces": [
  512. "application/json"
  513. ],
  514. "tags": [
  515. "ExaFileUploadAndDownload"
  516. ],
  517. "summary": "删除文件",
  518. "parameters": [
  519. {
  520. "description": "传入文件里面id即可",
  521. "name": "data",
  522. "in": "body",
  523. "required": true,
  524. "schema": {
  525. "type": "object",
  526. "$ref": "#/definitions/dbModel.ExaFileUploadAndDownload"
  527. }
  528. }
  529. ],
  530. "responses": {
  531. "200": {
  532. "description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
  533. "schema": {
  534. "type": "string"
  535. }
  536. }
  537. }
  538. }
  539. },
  540. "/fileUploadAndDownload/getFileList": {
  541. "post": {
  542. "security": [
  543. {
  544. "ApiKeyAuth": []
  545. }
  546. ],
  547. "consumes": [
  548. "application/json"
  549. ],
  550. "produces": [
  551. "application/json"
  552. ],
  553. "tags": [
  554. "ExaFileUploadAndDownload"
  555. ],
  556. "summary": "分页文件列表",
  557. "parameters": [
  558. {
  559. "description": "分页获取文件户列表",
  560. "name": "data",
  561. "in": "body",
  562. "required": true,
  563. "schema": {
  564. "type": "object",
  565. "$ref": "#/definitions/modelInterface.PageInfo"
  566. }
  567. }
  568. ],
  569. "responses": {
  570. "200": {
  571. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  572. "schema": {
  573. "type": "string"
  574. }
  575. }
  576. }
  577. }
  578. },
  579. "/fileUploadAndDownload/upload": {
  580. "post": {
  581. "security": [
  582. {
  583. "ApiKeyAuth": []
  584. }
  585. ],
  586. "consumes": [
  587. "multipart/form-data"
  588. ],
  589. "produces": [
  590. "application/json"
  591. ],
  592. "tags": [
  593. "ExaFileUploadAndDownload"
  594. ],
  595. "summary": "上传文件示例",
  596. "parameters": [
  597. {
  598. "type": "file",
  599. "description": "上传文件示例",
  600. "name": "file",
  601. "in": "formData",
  602. "required": true
  603. }
  604. ],
  605. "responses": {
  606. "200": {
  607. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  608. "schema": {
  609. "type": "string"
  610. }
  611. }
  612. }
  613. }
  614. },
  615. "/menu/addBaseMenu": {
  616. "post": {
  617. "security": [
  618. {
  619. "ApiKeyAuth": []
  620. }
  621. ],
  622. "consumes": [
  623. "application/json"
  624. ],
  625. "produces": [
  626. "application/json"
  627. ],
  628. "tags": [
  629. "menu"
  630. ],
  631. "summary": "新增菜单",
  632. "parameters": [
  633. {
  634. "description": "新增菜单",
  635. "name": "data",
  636. "in": "body",
  637. "required": true,
  638. "schema": {
  639. "type": "object",
  640. "$ref": "#/definitions/sysModel.SysBaseMenu"
  641. }
  642. }
  643. ],
  644. "responses": {
  645. "200": {
  646. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  647. "schema": {
  648. "type": "string"
  649. }
  650. }
  651. }
  652. }
  653. },
  654. "/menu/addMenuAuthority": {
  655. "post": {
  656. "security": [
  657. {
  658. "ApiKeyAuth": []
  659. }
  660. ],
  661. "consumes": [
  662. "application/json"
  663. ],
  664. "produces": [
  665. "application/json"
  666. ],
  667. "tags": [
  668. "authorityAndMenu"
  669. ],
  670. "summary": "获取指定角色menu",
  671. "parameters": [
  672. {
  673. "description": "增加menu和角色关联关系",
  674. "name": "data",
  675. "in": "body",
  676. "required": true,
  677. "schema": {
  678. "type": "object",
  679. "$ref": "#/definitions/api.AuthorityIdInfo"
  680. }
  681. }
  682. ],
  683. "responses": {
  684. "200": {
  685. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  686. "schema": {
  687. "type": "string"
  688. }
  689. }
  690. }
  691. }
  692. },
  693. "/menu/deleteBaseMenu": {
  694. "post": {
  695. "security": [
  696. {
  697. "ApiKeyAuth": []
  698. }
  699. ],
  700. "consumes": [
  701. "application/json"
  702. ],
  703. "produces": [
  704. "application/json"
  705. ],
  706. "tags": [
  707. "menu"
  708. ],
  709. "summary": "删除菜单",
  710. "parameters": [
  711. {
  712. "description": "删除菜单",
  713. "name": "data",
  714. "in": "body",
  715. "required": true,
  716. "schema": {
  717. "type": "object",
  718. "$ref": "#/definitions/api.IdInfo"
  719. }
  720. }
  721. ],
  722. "responses": {
  723. "200": {
  724. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  725. "schema": {
  726. "type": "string"
  727. }
  728. }
  729. }
  730. }
  731. },
  732. "/menu/getBaseMenuById": {
  733. "post": {
  734. "security": [
  735. {
  736. "ApiKeyAuth": []
  737. }
  738. ],
  739. "consumes": [
  740. "application/json"
  741. ],
  742. "produces": [
  743. "application/json"
  744. ],
  745. "tags": [
  746. "menu"
  747. ],
  748. "summary": "根据id获取菜单",
  749. "parameters": [
  750. {
  751. "description": "根据id获取菜单",
  752. "name": "data",
  753. "in": "body",
  754. "required": true,
  755. "schema": {
  756. "type": "object",
  757. "$ref": "#/definitions/api.GetById"
  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/getBaseMenuTree": {
  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/getMenu": {
  808. "post": {
  809. "security": [
  810. {
  811. "ApiKeyAuth": []
  812. }
  813. ],
  814. "produces": [
  815. "application/json"
  816. ],
  817. "tags": [
  818. "authorityAndMenu"
  819. ],
  820. "summary": "获取用户动态路由",
  821. "parameters": [
  822. {
  823. "description": "可以什么都不填",
  824. "name": "data",
  825. "in": "body",
  826. "required": true,
  827. "schema": {
  828. "type": "object",
  829. "$ref": "#/definitions/api.RegistAndLoginStuct"
  830. }
  831. }
  832. ],
  833. "responses": {
  834. "200": {
  835. "description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
  836. "schema": {
  837. "type": "string"
  838. }
  839. }
  840. }
  841. }
  842. },
  843. "/menu/getMenuList": {
  844. "post": {
  845. "security": [
  846. {
  847. "ApiKeyAuth": []
  848. }
  849. ],
  850. "consumes": [
  851. "application/json"
  852. ],
  853. "produces": [
  854. "application/json"
  855. ],
  856. "tags": [
  857. "menu"
  858. ],
  859. "summary": "分页获取基础menu列表",
  860. "parameters": [
  861. {
  862. "description": "分页获取基础menu列表",
  863. "name": "data",
  864. "in": "body",
  865. "required": true,
  866. "schema": {
  867. "type": "object",
  868. "$ref": "#/definitions/modelInterface.PageInfo"
  869. }
  870. }
  871. ],
  872. "responses": {
  873. "200": {
  874. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  875. "schema": {
  876. "type": "string"
  877. }
  878. }
  879. }
  880. }
  881. },
  882. "/menu/updataBaseMen": {
  883. "post": {
  884. "security": [
  885. {
  886. "ApiKeyAuth": []
  887. }
  888. ],
  889. "consumes": [
  890. "application/json"
  891. ],
  892. "produces": [
  893. "application/json"
  894. ],
  895. "tags": [
  896. "menu"
  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/sysModel.SysBaseMenu"
  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/changePassword": {
  922. "post": {
  923. "security": [
  924. {
  925. "ApiKeyAuth": []
  926. }
  927. ],
  928. "produces": [
  929. "application/json"
  930. ],
  931. "tags": [
  932. "SysUser"
  933. ],
  934. "summary": "用户修改密码",
  935. "parameters": [
  936. {
  937. "description": "用户修改密码",
  938. "name": "data",
  939. "in": "body",
  940. "required": true,
  941. "schema": {
  942. "type": "object",
  943. "$ref": "#/definitions/api.ChangePasswordStutrc"
  944. }
  945. }
  946. ],
  947. "responses": {
  948. "200": {
  949. "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
  950. "schema": {
  951. "type": "string"
  952. }
  953. }
  954. }
  955. }
  956. },
  957. "/user/getUserList": {
  958. "post": {
  959. "security": [
  960. {
  961. "ApiKeyAuth": []
  962. }
  963. ],
  964. "consumes": [
  965. "application/json"
  966. ],
  967. "produces": [
  968. "application/json"
  969. ],
  970. "tags": [
  971. "SysUser"
  972. ],
  973. "summary": "分页获取用户列表",
  974. "parameters": [
  975. {
  976. "description": "分页获取用户列表",
  977. "name": "data",
  978. "in": "body",
  979. "required": true,
  980. "schema": {
  981. "type": "object",
  982. "$ref": "#/definitions/modelInterface.PageInfo"
  983. }
  984. }
  985. ],
  986. "responses": {
  987. "200": {
  988. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  989. "schema": {
  990. "type": "string"
  991. }
  992. }
  993. }
  994. }
  995. },
  996. "/user/setUserAuthority": {
  997. "post": {
  998. "security": [
  999. {
  1000. "ApiKeyAuth": []
  1001. }
  1002. ],
  1003. "consumes": [
  1004. "application/json"
  1005. ],
  1006. "produces": [
  1007. "application/json"
  1008. ],
  1009. "tags": [
  1010. "SysUser"
  1011. ],
  1012. "summary": "设置用户权限",
  1013. "parameters": [
  1014. {
  1015. "description": "设置用户权限",
  1016. "name": "data",
  1017. "in": "body",
  1018. "required": true,
  1019. "schema": {
  1020. "type": "object",
  1021. "$ref": "#/definitions/api.SetUserAuth"
  1022. }
  1023. }
  1024. ],
  1025. "responses": {
  1026. "200": {
  1027. "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
  1028. "schema": {
  1029. "type": "string"
  1030. }
  1031. }
  1032. }
  1033. }
  1034. },
  1035. "/user/uploadHeaderImg": {
  1036. "post": {
  1037. "security": [
  1038. {
  1039. "ApiKeyAuth": []
  1040. }
  1041. ],
  1042. "consumes": [
  1043. "multipart/form-data"
  1044. ],
  1045. "produces": [
  1046. "application/json"
  1047. ],
  1048. "tags": [
  1049. "SysUser"
  1050. ],
  1051. "summary": "用户上传头像",
  1052. "parameters": [
  1053. {
  1054. "type": "file",
  1055. "description": "用户上传头像",
  1056. "name": "headerImg",
  1057. "in": "formData",
  1058. "required": true
  1059. },
  1060. {
  1061. "type": "string",
  1062. "description": "用户上传头像",
  1063. "name": "username",
  1064. "in": "formData",
  1065. "required": true
  1066. }
  1067. ],
  1068. "responses": {
  1069. "200": {
  1070. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  1071. "schema": {
  1072. "type": "string"
  1073. }
  1074. }
  1075. }
  1076. }
  1077. },
  1078. "/workflow/createWorkFlow": {
  1079. "post": {
  1080. "produces": [
  1081. "application/json"
  1082. ],
  1083. "tags": [
  1084. "workflow"
  1085. ],
  1086. "summary": "注册工作流",
  1087. "parameters": [
  1088. {
  1089. "description": "注册工作流接口",
  1090. "name": "data",
  1091. "in": "body",
  1092. "required": true,
  1093. "schema": {
  1094. "type": "object",
  1095. "$ref": "#/definitions/sysModel.SysWorkflow"
  1096. }
  1097. }
  1098. ],
  1099. "responses": {
  1100. "200": {
  1101. "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
  1102. "schema": {
  1103. "type": "string"
  1104. }
  1105. }
  1106. }
  1107. }
  1108. }
  1109. },
  1110. "definitions": {
  1111. "api.AddMenuAuthorityInfo": {
  1112. "type": "object",
  1113. "properties": {
  1114. "authorityId": {
  1115. "type": "string"
  1116. },
  1117. "menus": {
  1118. "type": "array",
  1119. "items": {
  1120. "$ref": "#/definitions/sysModel.SysBaseMenu"
  1121. }
  1122. }
  1123. }
  1124. },
  1125. "api.AuthorityIdInfo": {
  1126. "type": "object",
  1127. "properties": {
  1128. "authorityId": {
  1129. "type": "string"
  1130. }
  1131. }
  1132. },
  1133. "api.ChangePasswordStutrc": {
  1134. "type": "object",
  1135. "properties": {
  1136. "newPassword": {
  1137. "type": "string"
  1138. },
  1139. "password": {
  1140. "type": "string"
  1141. },
  1142. "username": {
  1143. "type": "string"
  1144. }
  1145. }
  1146. },
  1147. "api.CreateApiParams": {
  1148. "type": "object",
  1149. "properties": {
  1150. "description": {
  1151. "type": "string"
  1152. },
  1153. "path": {
  1154. "type": "string"
  1155. }
  1156. }
  1157. },
  1158. "api.CreateAuthorityParams": {
  1159. "type": "object",
  1160. "properties": {
  1161. "authorityId": {
  1162. "type": "string"
  1163. },
  1164. "authorityName": {
  1165. "type": "string"
  1166. }
  1167. }
  1168. },
  1169. "api.DeleteAuthorityPatams": {
  1170. "type": "object",
  1171. "properties": {
  1172. "authorityId": {
  1173. "type": "integer"
  1174. }
  1175. }
  1176. },
  1177. "api.GetById": {
  1178. "type": "object",
  1179. "properties": {
  1180. "id": {
  1181. "type": "number"
  1182. }
  1183. }
  1184. },
  1185. "api.IdInfo": {
  1186. "type": "object",
  1187. "properties": {
  1188. "id": {
  1189. "type": "number"
  1190. }
  1191. }
  1192. },
  1193. "api.RegistAndLoginStuct": {
  1194. "type": "object",
  1195. "properties": {
  1196. "password": {
  1197. "type": "string"
  1198. },
  1199. "username": {
  1200. "type": "string"
  1201. }
  1202. }
  1203. },
  1204. "api.SetUserAuth": {
  1205. "type": "object",
  1206. "properties": {
  1207. "authorityId": {
  1208. "type": "string"
  1209. },
  1210. "uuid": {
  1211. "type": "string"
  1212. }
  1213. }
  1214. },
  1215. "dbModel.ExaFileUploadAndDownload": {
  1216. "type": "object",
  1217. "properties": {
  1218. "key": {
  1219. "type": "string"
  1220. },
  1221. "name": {
  1222. "type": "string"
  1223. },
  1224. "tag": {
  1225. "type": "string"
  1226. },
  1227. "url": {
  1228. "type": "string"
  1229. }
  1230. }
  1231. },
  1232. "modelInterface.PageInfo": {
  1233. "type": "object",
  1234. "properties": {
  1235. "page": {
  1236. "type": "integer"
  1237. },
  1238. "pageSize": {
  1239. "type": "integer"
  1240. }
  1241. }
  1242. },
  1243. "sysModel.SysApi": {
  1244. "type": "object",
  1245. "properties": {
  1246. "description": {
  1247. "type": "string"
  1248. },
  1249. "group": {
  1250. "type": "string"
  1251. },
  1252. "path": {
  1253. "type": "string"
  1254. }
  1255. }
  1256. },
  1257. "sysModel.SysAuthority": {
  1258. "type": "object",
  1259. "properties": {
  1260. "authorityId": {
  1261. "type": "string"
  1262. },
  1263. "authorityName": {
  1264. "type": "string"
  1265. }
  1266. }
  1267. },
  1268. "sysModel.SysBaseMenu": {
  1269. "type": "object",
  1270. "properties": {
  1271. "children": {
  1272. "type": "array",
  1273. "items": {
  1274. "$ref": "#/definitions/sysModel.SysBaseMenu"
  1275. }
  1276. },
  1277. "component": {
  1278. "type": "string"
  1279. },
  1280. "hidden": {
  1281. "type": "boolean"
  1282. },
  1283. "icon": {
  1284. "type": "string"
  1285. },
  1286. "name": {
  1287. "type": "string"
  1288. },
  1289. "nickName": {
  1290. "type": "string"
  1291. },
  1292. "parentId": {
  1293. "type": "string"
  1294. },
  1295. "path": {
  1296. "type": "string"
  1297. },
  1298. "sort": {
  1299. "type": "string"
  1300. },
  1301. "title": {
  1302. "type": "string"
  1303. }
  1304. }
  1305. },
  1306. "sysModel.SysUser": {
  1307. "type": "object",
  1308. "properties": {
  1309. "authority": {
  1310. "type": "object",
  1311. "$ref": "#/definitions/sysModel.SysAuthority"
  1312. },
  1313. "authorityId": {
  1314. "type": "string"
  1315. },
  1316. "headerImg": {
  1317. "type": "string"
  1318. },
  1319. "nickName": {
  1320. "type": "string"
  1321. },
  1322. "userName": {
  1323. "type": "string"
  1324. },
  1325. "uuid": {
  1326. "type": "string"
  1327. }
  1328. }
  1329. },
  1330. "sysModel.SysWorkflow": {
  1331. "type": "object",
  1332. "properties": {
  1333. "workflowDescription": {
  1334. "description": "工作流描述",
  1335. "type": "string"
  1336. },
  1337. "workflowName": {
  1338. "description": "工作流英文id",
  1339. "type": "string"
  1340. },
  1341. "workflowNickName": {
  1342. "description": "工作流名称",
  1343. "type": "string"
  1344. },
  1345. "workflowStep": {
  1346. "description": "工作流步骤",
  1347. "type": "array",
  1348. "items": {
  1349. "$ref": "#/definitions/sysModel.SysWorkflowStepInfo"
  1350. }
  1351. }
  1352. }
  1353. },
  1354. "sysModel.SysWorkflowStepInfo": {
  1355. "type": "object",
  1356. "properties": {
  1357. "isEnd": {
  1358. "description": "是否是完结流节点",
  1359. "type": "boolean"
  1360. },
  1361. "isStrat": {
  1362. "description": "是否是开始流节点",
  1363. "type": "boolean"
  1364. },
  1365. "stepAuthorityID": {
  1366. "description": "操作者级别id",
  1367. "type": "string"
  1368. },
  1369. "stepName": {
  1370. "description": "工作流名称",
  1371. "type": "string"
  1372. },
  1373. "stepNo": {
  1374. "description": "步骤id (第几步)",
  1375. "type": "number"
  1376. },
  1377. "workflowID": {
  1378. "description": "所属工作流ID",
  1379. "type": "integer"
  1380. }
  1381. }
  1382. }
  1383. },
  1384. "securityDefinitions": {
  1385. "ApiKeyAuth": {
  1386. "type": "apiKey",
  1387. "name": "x-token",
  1388. "in": "header"
  1389. }
  1390. }
  1391. }`
  1392. type swaggerInfo struct {
  1393. Version string
  1394. Host string
  1395. BasePath string
  1396. Schemes []string
  1397. Title string
  1398. Description string
  1399. }
  1400. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1401. var SwaggerInfo = swaggerInfo{
  1402. Version: "0.0.1",
  1403. Host: "",
  1404. BasePath: "/",
  1405. Schemes: []string{},
  1406. Title: "Swagger Example API",
  1407. Description: "This is a sample Server pets",
  1408. }
  1409. type s struct{}
  1410. func (s *s) ReadDoc() string {
  1411. sInfo := SwaggerInfo
  1412. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  1413. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  1414. "marshal": func(v interface{}) string {
  1415. a, _ := json.Marshal(v)
  1416. return string(a)
  1417. },
  1418. }).Parse(doc)
  1419. if err != nil {
  1420. return doc
  1421. }
  1422. var tpl bytes.Buffer
  1423. if err := t.Execute(&tpl, sInfo); err != nil {
  1424. return doc
  1425. }
  1426. return tpl.String()
  1427. }
  1428. func init() {
  1429. swag.Register(swag.Name, &s{})
  1430. }