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.

1422 lines
43 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
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag at
  3. // 2019-11-20 16:59:15.3568689 +0800 CST m=+0.056920101
  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/deleteFile": {
  505. "post": {
  506. "security": [
  507. {
  508. "ApiKeyAuth": []
  509. }
  510. ],
  511. "produces": [
  512. "application/json"
  513. ],
  514. "tags": [
  515. "FileUploadAndDownload"
  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.FileUploadAndDownload"
  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. "FileUploadAndDownload"
  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. "FileUploadAndDownload"
  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/dbModel.BaseMenu"
  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/dbModel.BaseMenu"
  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. "User"
  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. "User"
  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. "User"
  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. "User"
  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/dbModel.Workflow"
  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/dbModel.BaseMenu"
  1121. }
  1122. }
  1123. }
  1124. },
  1125. "api.AuthAndPathIn": {
  1126. "type": "object",
  1127. "properties": {
  1128. "apiIds": {
  1129. "type": "array",
  1130. "items": {
  1131. "type": "integer"
  1132. }
  1133. },
  1134. "authorityId": {
  1135. "type": "string"
  1136. }
  1137. }
  1138. },
  1139. "api.AuthorityIdInfo": {
  1140. "type": "object",
  1141. "properties": {
  1142. "authorityId": {
  1143. "type": "string"
  1144. }
  1145. }
  1146. },
  1147. "api.ChangePasswordStutrc": {
  1148. "type": "object",
  1149. "properties": {
  1150. "newPassword": {
  1151. "type": "string"
  1152. },
  1153. "password": {
  1154. "type": "string"
  1155. },
  1156. "username": {
  1157. "type": "string"
  1158. }
  1159. }
  1160. },
  1161. "api.CreateApiParams": {
  1162. "type": "object",
  1163. "properties": {
  1164. "description": {
  1165. "type": "string"
  1166. },
  1167. "path": {
  1168. "type": "string"
  1169. }
  1170. }
  1171. },
  1172. "api.CreateAuthorityPatams": {
  1173. "type": "object",
  1174. "properties": {
  1175. "authorityId": {
  1176. "type": "string"
  1177. },
  1178. "authorityName": {
  1179. "type": "string"
  1180. }
  1181. }
  1182. },
  1183. "api.DeleteAuthorityPatams": {
  1184. "type": "object",
  1185. "properties": {
  1186. "authorityId": {
  1187. "type": "integer"
  1188. }
  1189. }
  1190. },
  1191. "api.GetAuthorityId": {
  1192. "type": "object",
  1193. "properties": {
  1194. "authorityId": {
  1195. "type": "string"
  1196. }
  1197. }
  1198. },
  1199. "api.GetById": {
  1200. "type": "object",
  1201. "properties": {
  1202. "id": {
  1203. "type": "number"
  1204. }
  1205. }
  1206. },
  1207. "api.IdInfo": {
  1208. "type": "object",
  1209. "properties": {
  1210. "id": {
  1211. "type": "number"
  1212. }
  1213. }
  1214. },
  1215. "api.RegistAndLoginStuct": {
  1216. "type": "object",
  1217. "properties": {
  1218. "password": {
  1219. "type": "string"
  1220. },
  1221. "username": {
  1222. "type": "string"
  1223. }
  1224. }
  1225. },
  1226. "api.SetUserAuth": {
  1227. "type": "object",
  1228. "properties": {
  1229. "authorityId": {
  1230. "type": "string"
  1231. },
  1232. "uuid": {
  1233. "type": "string"
  1234. }
  1235. }
  1236. },
  1237. "dbModel.Api": {
  1238. "type": "object",
  1239. "properties": {
  1240. "description": {
  1241. "type": "string"
  1242. },
  1243. "group": {
  1244. "type": "string"
  1245. },
  1246. "path": {
  1247. "type": "string"
  1248. }
  1249. }
  1250. },
  1251. "dbModel.BaseMenu": {
  1252. "type": "object",
  1253. "properties": {
  1254. "children": {
  1255. "type": "array",
  1256. "items": {
  1257. "$ref": "#/definitions/dbModel.BaseMenu"
  1258. }
  1259. },
  1260. "component": {
  1261. "type": "string"
  1262. },
  1263. "hidden": {
  1264. "type": "boolean"
  1265. },
  1266. "icon": {
  1267. "type": "string"
  1268. },
  1269. "name": {
  1270. "type": "string"
  1271. },
  1272. "nickName": {
  1273. "type": "string"
  1274. },
  1275. "parentId": {
  1276. "type": "string"
  1277. },
  1278. "path": {
  1279. "type": "string"
  1280. },
  1281. "title": {
  1282. "type": "string"
  1283. }
  1284. }
  1285. },
  1286. "dbModel.FileUploadAndDownload": {
  1287. "type": "object",
  1288. "properties": {
  1289. "key": {
  1290. "type": "string"
  1291. },
  1292. "name": {
  1293. "type": "string"
  1294. },
  1295. "tag": {
  1296. "type": "string"
  1297. },
  1298. "url": {
  1299. "type": "string"
  1300. }
  1301. }
  1302. },
  1303. "dbModel.Workflow": {
  1304. "type": "object",
  1305. "properties": {
  1306. "workflowDescription": {
  1307. "description": "工作流描述",
  1308. "type": "string"
  1309. },
  1310. "workflowName": {
  1311. "description": "工作流英文id",
  1312. "type": "string"
  1313. },
  1314. "workflowNickName": {
  1315. "description": "工作流名称",
  1316. "type": "string"
  1317. },
  1318. "workflowStep": {
  1319. "description": "工作流步骤",
  1320. "type": "array",
  1321. "items": {
  1322. "$ref": "#/definitions/dbModel.WorkflowStepInfo"
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "dbModel.WorkflowStepInfo": {
  1328. "type": "object",
  1329. "properties": {
  1330. "isEnd": {
  1331. "description": "是否是完结流节点",
  1332. "type": "boolean"
  1333. },
  1334. "isStrat": {
  1335. "description": "是否是开始流节点",
  1336. "type": "boolean"
  1337. },
  1338. "stepAuthorityID": {
  1339. "description": "操作者级别id",
  1340. "type": "string"
  1341. },
  1342. "stepName": {
  1343. "description": "工作流名称",
  1344. "type": "string"
  1345. },
  1346. "stepNo": {
  1347. "description": "步骤id (第几步)",
  1348. "type": "number"
  1349. }
  1350. }
  1351. },
  1352. "modelInterface.PageInfo": {
  1353. "type": "object",
  1354. "properties": {
  1355. "page": {
  1356. "type": "integer"
  1357. },
  1358. "pageSize": {
  1359. "type": "integer"
  1360. }
  1361. }
  1362. }
  1363. },
  1364. "securityDefinitions": {
  1365. "ApiKeyAuth": {
  1366. "type": "apiKey",
  1367. "name": "x-token",
  1368. "in": "header"
  1369. }
  1370. }
  1371. }`
  1372. type swaggerInfo struct {
  1373. Version string
  1374. Host string
  1375. BasePath string
  1376. Schemes []string
  1377. Title string
  1378. Description string
  1379. }
  1380. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1381. var SwaggerInfo = swaggerInfo{
  1382. Version: "0.0.1",
  1383. Host: "",
  1384. BasePath: "/",
  1385. Schemes: []string{},
  1386. Title: "Swagger Example API",
  1387. Description: "This is a sample Server pets",
  1388. }
  1389. type s struct{}
  1390. func (s *s) ReadDoc() string {
  1391. sInfo := SwaggerInfo
  1392. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  1393. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  1394. "marshal": func(v interface{}) string {
  1395. a, _ := json.Marshal(v)
  1396. return string(a)
  1397. },
  1398. }).Parse(doc)
  1399. if err != nil {
  1400. return doc
  1401. }
  1402. var tpl bytes.Buffer
  1403. if err := t.Execute(&tpl, sInfo); err != nil {
  1404. return doc
  1405. }
  1406. return tpl.String()
  1407. }
  1408. func init() {
  1409. swag.Register(swag.Name, &s{})
  1410. }