docs.go 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "strings"
  8. "github.com/alecthomas/template"
  9. "github.com/swaggo/swag"
  10. )
  11. var doc = `{
  12. "schemes": {{ marshal .Schemes }},
  13. "swagger": "2.0",
  14. "info": {
  15. "description": "{{.Description}}",
  16. "title": "{{.Title}}",
  17. "contact": {},
  18. "license": {},
  19. "version": "{{.Version}}"
  20. },
  21. "host": "{{.Host}}",
  22. "basePath": "{{.BasePath}}",
  23. "paths": {
  24. "/api/v1/log/list": {
  25. "get": {
  26. "description": "获取日志列表",
  27. "consumes": [
  28. "application/json"
  29. ],
  30. "produces": [
  31. "application/json"
  32. ],
  33. "tags": [
  34. "操作日志"
  35. ],
  36. "summary": "获取日志列表",
  37. "parameters": [
  38. {
  39. "type": "string",
  40. "description": "token",
  41. "name": "token",
  42. "in": "header",
  43. "required": true
  44. },
  45. {
  46. "type": "integer",
  47. "description": " ",
  48. "name": "page",
  49. "in": "query"
  50. },
  51. {
  52. "type": "integer",
  53. "description": " ",
  54. "name": "page_size",
  55. "in": "query"
  56. }
  57. ],
  58. "responses": {
  59. "200": {
  60. "description": "OK",
  61. "schema": {
  62. "$ref": "#/definitions/v1.ManagementLogListResponse"
  63. }
  64. },
  65. "500": {
  66. "description": "Internal Server Error",
  67. "schema": {
  68. "$ref": "#/definitions/base.HTTPError"
  69. }
  70. }
  71. }
  72. }
  73. },
  74. "/api/v1/system/rbac/group": {
  75. "put": {
  76. "description": "修改角色",
  77. "consumes": [
  78. "application/json"
  79. ],
  80. "produces": [
  81. "application/json"
  82. ],
  83. "tags": [
  84. "系统管理-角色管理"
  85. ],
  86. "summary": "修改角色",
  87. "parameters": [
  88. {
  89. "type": "string",
  90. "description": "token",
  91. "name": "token",
  92. "in": "header",
  93. "required": true
  94. },
  95. {
  96. "description": "token",
  97. "name": "body",
  98. "in": "body",
  99. "required": true,
  100. "schema": {
  101. "$ref": "#/definitions/v1.RbacGroupUpdateBody"
  102. }
  103. }
  104. ],
  105. "responses": {
  106. "200": {
  107. "description": "OK",
  108. "schema": {
  109. "$ref": "#/definitions/v1.RbacGroupUpdateResponse"
  110. }
  111. },
  112. "500": {
  113. "description": "Internal Server Error",
  114. "schema": {
  115. "$ref": "#/definitions/base.HTTPError"
  116. }
  117. }
  118. }
  119. },
  120. "post": {
  121. "description": "添加角色",
  122. "consumes": [
  123. "application/json"
  124. ],
  125. "produces": [
  126. "application/json"
  127. ],
  128. "tags": [
  129. "系统管理-角色管理"
  130. ],
  131. "summary": "添加角色",
  132. "parameters": [
  133. {
  134. "type": "string",
  135. "description": "token",
  136. "name": "token",
  137. "in": "header",
  138. "required": true
  139. },
  140. {
  141. "description": "token",
  142. "name": "body",
  143. "in": "body",
  144. "required": true,
  145. "schema": {
  146. "$ref": "#/definitions/v1.RbacGroupAddBody"
  147. }
  148. }
  149. ],
  150. "responses": {
  151. "200": {
  152. "description": "OK",
  153. "schema": {
  154. "$ref": "#/definitions/v1.RbacGroupAddResponse"
  155. }
  156. },
  157. "500": {
  158. "description": "Internal Server Error",
  159. "schema": {
  160. "$ref": "#/definitions/base.HTTPError"
  161. }
  162. }
  163. }
  164. }
  165. },
  166. "/api/v1/system/rbac/group/list": {
  167. "get": {
  168. "description": "角色列表",
  169. "consumes": [
  170. "application/json"
  171. ],
  172. "produces": [
  173. "application/json"
  174. ],
  175. "tags": [
  176. "系统管理-角色管理"
  177. ],
  178. "summary": "角色列表",
  179. "parameters": [
  180. {
  181. "type": "string",
  182. "description": "token",
  183. "name": "token",
  184. "in": "header",
  185. "required": true
  186. }
  187. ],
  188. "responses": {
  189. "200": {
  190. "description": "OK",
  191. "schema": {
  192. "$ref": "#/definitions/v1.RbacGroupListResponse"
  193. }
  194. },
  195. "500": {
  196. "description": "Internal Server Error",
  197. "schema": {
  198. "$ref": "#/definitions/base.HTTPError"
  199. }
  200. }
  201. }
  202. }
  203. },
  204. "/api/v1/system/rbac/group/{id}": {
  205. "delete": {
  206. "description": "删除角色",
  207. "consumes": [
  208. "application/json"
  209. ],
  210. "produces": [
  211. "application/json"
  212. ],
  213. "tags": [
  214. "系统管理-角色管理"
  215. ],
  216. "summary": "删除角色",
  217. "parameters": [
  218. {
  219. "type": "string",
  220. "description": "token",
  221. "name": "token",
  222. "in": "header",
  223. "required": true
  224. },
  225. {
  226. "type": "integer",
  227. "description": "token",
  228. "name": "id",
  229. "in": "path",
  230. "required": true
  231. }
  232. ],
  233. "responses": {
  234. "200": {
  235. "description": "OK",
  236. "schema": {
  237. "$ref": "#/definitions/v1.RbacGroupDelResponse"
  238. }
  239. },
  240. "500": {
  241. "description": "Internal Server Error",
  242. "schema": {
  243. "$ref": "#/definitions/base.HTTPError"
  244. }
  245. }
  246. }
  247. }
  248. },
  249. "/api/v1/system/rbac/node/list": {
  250. "get": {
  251. "description": "权限节点列表",
  252. "consumes": [
  253. "application/json"
  254. ],
  255. "produces": [
  256. "application/json"
  257. ],
  258. "tags": [
  259. "系统管理-角色管理"
  260. ],
  261. "summary": "权限节点列表",
  262. "parameters": [
  263. {
  264. "type": "string",
  265. "description": "token",
  266. "name": "token",
  267. "in": "header",
  268. "required": true
  269. },
  270. {
  271. "type": "integer",
  272. "description": "不填返回所有,填了返回该角色下的权限",
  273. "name": "group_id",
  274. "in": "query"
  275. },
  276. {
  277. "type": "boolean",
  278. "description": "填了groupid后,true:仅返回角色下的节点, false:返回所有节点,对属于该角色的节点作标记",
  279. "name": "only_select",
  280. "in": "query"
  281. }
  282. ],
  283. "responses": {
  284. "200": {
  285. "description": "OK",
  286. "schema": {
  287. "$ref": "#/definitions/v1.RbacNodeListResponse"
  288. }
  289. },
  290. "500": {
  291. "description": "Internal Server Error",
  292. "schema": {
  293. "$ref": "#/definitions/base.HTTPError"
  294. }
  295. }
  296. }
  297. }
  298. },
  299. "/api/v1/system/user": {
  300. "put": {
  301. "description": "修改用户",
  302. "consumes": [
  303. "application/json"
  304. ],
  305. "produces": [
  306. "application/json"
  307. ],
  308. "tags": [
  309. "系统管理-用户管理"
  310. ],
  311. "summary": "修改用户",
  312. "parameters": [
  313. {
  314. "type": "string",
  315. "description": "token",
  316. "name": "token",
  317. "in": "header",
  318. "required": true
  319. },
  320. {
  321. "description": " ",
  322. "name": "body",
  323. "in": "body",
  324. "required": true,
  325. "schema": {
  326. "$ref": "#/definitions/v1.UserUpdateBody"
  327. }
  328. }
  329. ],
  330. "responses": {
  331. "200": {
  332. "description": "OK",
  333. "schema": {
  334. "$ref": "#/definitions/v1.UserUpdateResponse"
  335. }
  336. },
  337. "500": {
  338. "description": "Internal Server Error",
  339. "schema": {
  340. "$ref": "#/definitions/base.HTTPError"
  341. }
  342. }
  343. }
  344. },
  345. "post": {
  346. "description": "创建用户",
  347. "consumes": [
  348. "application/json"
  349. ],
  350. "produces": [
  351. "application/json"
  352. ],
  353. "tags": [
  354. "系统管理-用户管理"
  355. ],
  356. "summary": "创建用户",
  357. "parameters": [
  358. {
  359. "type": "string",
  360. "description": "token",
  361. "name": "token",
  362. "in": "header",
  363. "required": true
  364. },
  365. {
  366. "description": " ",
  367. "name": "body",
  368. "in": "body",
  369. "required": true,
  370. "schema": {
  371. "$ref": "#/definitions/v1.UserCreateBody"
  372. }
  373. }
  374. ],
  375. "responses": {
  376. "200": {
  377. "description": "OK",
  378. "schema": {
  379. "$ref": "#/definitions/v1.UserCreateResponse"
  380. }
  381. },
  382. "500": {
  383. "description": "Internal Server Error",
  384. "schema": {
  385. "$ref": "#/definitions/base.HTTPError"
  386. }
  387. }
  388. }
  389. }
  390. },
  391. "/api/v1/system/user/info/{id}": {
  392. "get": {
  393. "description": "用户详情",
  394. "consumes": [
  395. "application/json"
  396. ],
  397. "produces": [
  398. "application/json"
  399. ],
  400. "tags": [
  401. "系统管理-用户管理"
  402. ],
  403. "summary": "用户详情",
  404. "parameters": [
  405. {
  406. "type": "string",
  407. "description": "token",
  408. "name": "token",
  409. "in": "header",
  410. "required": true
  411. },
  412. {
  413. "type": "integer",
  414. "description": " ",
  415. "name": "id",
  416. "in": "path",
  417. "required": true
  418. }
  419. ],
  420. "responses": {
  421. "200": {
  422. "description": "OK",
  423. "schema": {
  424. "$ref": "#/definitions/v1.UserInfoResponse"
  425. }
  426. },
  427. "500": {
  428. "description": "Internal Server Error",
  429. "schema": {
  430. "$ref": "#/definitions/base.HTTPError"
  431. }
  432. }
  433. }
  434. }
  435. },
  436. "/api/v1/system/user/list": {
  437. "get": {
  438. "description": "用户列表",
  439. "consumes": [
  440. "application/json"
  441. ],
  442. "produces": [
  443. "application/json"
  444. ],
  445. "tags": [
  446. "系统管理-用户管理"
  447. ],
  448. "summary": "用户列表",
  449. "parameters": [
  450. {
  451. "type": "string",
  452. "description": "token",
  453. "name": "token",
  454. "in": "header",
  455. "required": true
  456. },
  457. {
  458. "type": "integer",
  459. "description": " ",
  460. "name": "page",
  461. "in": "query"
  462. },
  463. {
  464. "type": "integer",
  465. "description": " ",
  466. "name": "page_size",
  467. "in": "query"
  468. },
  469. {
  470. "type": "string",
  471. "description": "姓名或账户名 ",
  472. "name": "name",
  473. "in": "query"
  474. },
  475. {
  476. "type": "string",
  477. "description": "区域 ",
  478. "name": "zone",
  479. "in": "query"
  480. }
  481. ],
  482. "responses": {
  483. "200": {
  484. "description": "OK",
  485. "schema": {
  486. "$ref": "#/definitions/v1.UserListResponse"
  487. }
  488. },
  489. "500": {
  490. "description": "Internal Server Error",
  491. "schema": {
  492. "$ref": "#/definitions/base.HTTPError"
  493. }
  494. }
  495. }
  496. }
  497. },
  498. "/api/v1/system/user/{id}": {
  499. "delete": {
  500. "description": "删除用户",
  501. "consumes": [
  502. "application/json"
  503. ],
  504. "produces": [
  505. "application/json"
  506. ],
  507. "tags": [
  508. "系统管理-用户管理"
  509. ],
  510. "summary": "删除用户",
  511. "parameters": [
  512. {
  513. "type": "string",
  514. "description": "token",
  515. "name": "token",
  516. "in": "header",
  517. "required": true
  518. },
  519. {
  520. "type": "integer",
  521. "description": " ",
  522. "name": "id",
  523. "in": "path",
  524. "required": true
  525. }
  526. ],
  527. "responses": {
  528. "200": {
  529. "description": "OK",
  530. "schema": {
  531. "$ref": "#/definitions/v1.UserDelResponse"
  532. }
  533. },
  534. "500": {
  535. "description": "Internal Server Error",
  536. "schema": {
  537. "$ref": "#/definitions/base.HTTPError"
  538. }
  539. }
  540. }
  541. }
  542. },
  543. "/api/v1/token_refresh": {
  544. "put": {
  545. "description": "刷新token",
  546. "consumes": [
  547. "application/json"
  548. ],
  549. "produces": [
  550. "application/json"
  551. ],
  552. "tags": [
  553. "用户"
  554. ],
  555. "summary": "刷新token",
  556. "parameters": [
  557. {
  558. "type": "string",
  559. "description": "token",
  560. "name": "token",
  561. "in": "header",
  562. "required": true
  563. }
  564. ],
  565. "responses": {
  566. "200": {
  567. "description": "OK",
  568. "schema": {
  569. "$ref": "#/definitions/v1.TokenResponse"
  570. }
  571. },
  572. "500": {
  573. "description": "Internal Server Error",
  574. "schema": {
  575. "$ref": "#/definitions/base.HTTPError"
  576. }
  577. }
  578. }
  579. }
  580. },
  581. "/api/v1/user/login": {
  582. "post": {
  583. "description": "登录",
  584. "consumes": [
  585. "application/json"
  586. ],
  587. "produces": [
  588. "application/json"
  589. ],
  590. "tags": [
  591. "用户"
  592. ],
  593. "summary": "登录",
  594. "parameters": [
  595. {
  596. "description": "登录信息",
  597. "name": "body",
  598. "in": "body",
  599. "required": true,
  600. "schema": {
  601. "$ref": "#/definitions/v1.LoginBody"
  602. }
  603. }
  604. ],
  605. "responses": {
  606. "200": {
  607. "description": "OK",
  608. "schema": {
  609. "$ref": "#/definitions/v1.LoginResponse"
  610. }
  611. },
  612. "500": {
  613. "description": "Internal Server Error",
  614. "schema": {
  615. "$ref": "#/definitions/base.HTTPError"
  616. }
  617. }
  618. }
  619. }
  620. },
  621. "/api/v1/zone": {
  622. "put": {
  623. "description": "修改区域",
  624. "consumes": [
  625. "application/json"
  626. ],
  627. "produces": [
  628. "application/json"
  629. ],
  630. "tags": [
  631. "区域"
  632. ],
  633. "summary": "修改区域",
  634. "parameters": [
  635. {
  636. "type": "string",
  637. "description": "token",
  638. "name": "token",
  639. "in": "header",
  640. "required": true
  641. },
  642. {
  643. "description": " ",
  644. "name": "body",
  645. "in": "body",
  646. "required": true,
  647. "schema": {
  648. "$ref": "#/definitions/v1.ZoneUpdateBody"
  649. }
  650. }
  651. ],
  652. "responses": {
  653. "200": {
  654. "description": "OK",
  655. "schema": {
  656. "$ref": "#/definitions/v1.ZoneUpdateResponse"
  657. }
  658. },
  659. "500": {
  660. "description": "Internal Server Error",
  661. "schema": {
  662. "$ref": "#/definitions/base.HTTPError"
  663. }
  664. }
  665. }
  666. },
  667. "post": {
  668. "description": "添加区域",
  669. "consumes": [
  670. "application/json"
  671. ],
  672. "produces": [
  673. "application/json"
  674. ],
  675. "tags": [
  676. "区域"
  677. ],
  678. "summary": "添加区域",
  679. "parameters": [
  680. {
  681. "type": "string",
  682. "description": "token",
  683. "name": "token",
  684. "in": "header",
  685. "required": true
  686. },
  687. {
  688. "description": " ",
  689. "name": "body",
  690. "in": "body",
  691. "required": true,
  692. "schema": {
  693. "$ref": "#/definitions/v1.ZoneAddBody"
  694. }
  695. }
  696. ],
  697. "responses": {
  698. "200": {
  699. "description": "OK",
  700. "schema": {
  701. "$ref": "#/definitions/v1.ZoneAddResponse"
  702. }
  703. },
  704. "500": {
  705. "description": "Internal Server Error",
  706. "schema": {
  707. "$ref": "#/definitions/base.HTTPError"
  708. }
  709. }
  710. }
  711. }
  712. },
  713. "/api/v1/zone/list": {
  714. "get": {
  715. "description": "区域列表",
  716. "consumes": [
  717. "application/json"
  718. ],
  719. "produces": [
  720. "application/json"
  721. ],
  722. "tags": [
  723. "区域"
  724. ],
  725. "summary": "区域列表",
  726. "parameters": [
  727. {
  728. "type": "string",
  729. "description": "token",
  730. "name": "token",
  731. "in": "header",
  732. "required": true
  733. }
  734. ],
  735. "responses": {
  736. "200": {
  737. "description": "OK",
  738. "schema": {
  739. "$ref": "#/definitions/v1.ZoneListResponse"
  740. }
  741. },
  742. "500": {
  743. "description": "Internal Server Error",
  744. "schema": {
  745. "$ref": "#/definitions/base.HTTPError"
  746. }
  747. }
  748. }
  749. }
  750. },
  751. "/api/v1/zone/{zone_code}": {
  752. "delete": {
  753. "description": "删除区域",
  754. "consumes": [
  755. "application/json"
  756. ],
  757. "produces": [
  758. "application/json"
  759. ],
  760. "tags": [
  761. "区域"
  762. ],
  763. "summary": "删除区域",
  764. "parameters": [
  765. {
  766. "type": "string",
  767. "description": "token",
  768. "name": "token",
  769. "in": "header",
  770. "required": true
  771. },
  772. {
  773. "type": "string",
  774. "description": " ",
  775. "name": "zone_code",
  776. "in": "path",
  777. "required": true
  778. }
  779. ],
  780. "responses": {
  781. "200": {
  782. "description": "OK",
  783. "schema": {
  784. "$ref": "#/definitions/v1.ZoneDelResponse"
  785. }
  786. },
  787. "500": {
  788. "description": "Internal Server Error",
  789. "schema": {
  790. "$ref": "#/definitions/base.HTTPError"
  791. }
  792. }
  793. }
  794. }
  795. }
  796. },
  797. "definitions": {
  798. "base.HTTPError": {
  799. "type": "object",
  800. "properties": {
  801. "code": {
  802. "type": "integer",
  803. "format": "int",
  804. "example": 500
  805. },
  806. "message": {
  807. "type": "string",
  808. "example": "status bad request"
  809. }
  810. }
  811. },
  812. "v1.CreateManagementUserReply": {
  813. "type": "object",
  814. "properties": {
  815. "uid": {
  816. "type": "integer"
  817. }
  818. }
  819. },
  820. "v1.LoginBody": {
  821. "type": "object",
  822. "properties": {
  823. "key": {
  824. "type": "string"
  825. },
  826. "password": {
  827. "type": "string"
  828. },
  829. "user": {
  830. "type": "string"
  831. }
  832. }
  833. },
  834. "v1.LoginData": {
  835. "type": "object",
  836. "properties": {
  837. "organization": {
  838. "type": "string"
  839. },
  840. "refresh_token": {
  841. "type": "string"
  842. },
  843. "token": {
  844. "type": "string"
  845. },
  846. "uid": {
  847. "type": "integer"
  848. },
  849. "user": {
  850. "type": "string"
  851. }
  852. }
  853. },
  854. "v1.LoginResponse": {
  855. "type": "object",
  856. "properties": {
  857. "code": {
  858. "description": "返回码",
  859. "type": "integer",
  860. "format": "int",
  861. "default": 0
  862. },
  863. "data": {
  864. "type": "object",
  865. "$ref": "#/definitions/v1.LoginData"
  866. },
  867. "message": {
  868. "description": "消息",
  869. "type": "string",
  870. "default": "success"
  871. }
  872. }
  873. },
  874. "v1.ManagementLogItem": {
  875. "type": "object",
  876. "properties": {
  877. "action": {
  878. "description": "行为",
  879. "type": "string"
  880. },
  881. "created_at": {
  882. "description": "时间",
  883. "type": "string"
  884. },
  885. "id": {
  886. "description": "日志id",
  887. "type": "integer"
  888. },
  889. "module": {
  890. "description": "模块",
  891. "type": "string"
  892. },
  893. "origin": {
  894. "description": "修改前信息",
  895. "type": "string"
  896. },
  897. "target": {
  898. "description": "修改后信息",
  899. "type": "string"
  900. },
  901. "uid": {
  902. "description": "账号id",
  903. "type": "integer"
  904. },
  905. "username": {
  906. "description": "账号名",
  907. "type": "string"
  908. }
  909. }
  910. },
  911. "v1.ManagementLogListReply": {
  912. "type": "object",
  913. "properties": {
  914. "list": {
  915. "type": "array",
  916. "items": {
  917. "$ref": "#/definitions/v1.ManagementLogItem"
  918. }
  919. },
  920. "page": {
  921. "type": "integer"
  922. },
  923. "total": {
  924. "type": "integer"
  925. }
  926. }
  927. },
  928. "v1.ManagementLogListResponse": {
  929. "type": "object",
  930. "properties": {
  931. "code": {
  932. "description": "返回码",
  933. "type": "integer",
  934. "format": "int",
  935. "default": 0
  936. },
  937. "data": {
  938. "type": "object",
  939. "$ref": "#/definitions/v1.ManagementLogListReply"
  940. },
  941. "message": {
  942. "description": "消息",
  943. "type": "string",
  944. "default": "success"
  945. }
  946. }
  947. },
  948. "v1.RbacGroupAddBody": {
  949. "type": "object",
  950. "properties": {
  951. "name": {
  952. "type": "string"
  953. },
  954. "node_list": {
  955. "type": "string"
  956. }
  957. }
  958. },
  959. "v1.RbacGroupAddReply": {
  960. "type": "object",
  961. "properties": {
  962. "id": {
  963. "type": "integer"
  964. }
  965. }
  966. },
  967. "v1.RbacGroupAddResponse": {
  968. "type": "object",
  969. "properties": {
  970. "code": {
  971. "description": "返回码",
  972. "type": "integer",
  973. "format": "int",
  974. "default": 0
  975. },
  976. "data": {
  977. "type": "object",
  978. "$ref": "#/definitions/v1.RbacGroupAddReply"
  979. },
  980. "message": {
  981. "description": "消息",
  982. "type": "string",
  983. "default": "success"
  984. }
  985. }
  986. },
  987. "v1.RbacGroupDelResponse": {
  988. "type": "object",
  989. "properties": {
  990. "code": {
  991. "description": "返回码",
  992. "type": "integer",
  993. "format": "int",
  994. "default": 0
  995. },
  996. "message": {
  997. "description": "消息",
  998. "type": "string",
  999. "default": "success"
  1000. }
  1001. }
  1002. },
  1003. "v1.RbacGroupItem": {
  1004. "type": "object",
  1005. "properties": {
  1006. "id": {
  1007. "type": "integer"
  1008. },
  1009. "name": {
  1010. "type": "string"
  1011. }
  1012. }
  1013. },
  1014. "v1.RbacGroupListReply": {
  1015. "type": "object",
  1016. "properties": {
  1017. "list": {
  1018. "type": "array",
  1019. "items": {
  1020. "$ref": "#/definitions/v1.RbacGroupItem"
  1021. }
  1022. }
  1023. }
  1024. },
  1025. "v1.RbacGroupListResponse": {
  1026. "type": "object",
  1027. "properties": {
  1028. "code": {
  1029. "description": "返回码",
  1030. "type": "integer",
  1031. "format": "int",
  1032. "default": 0
  1033. },
  1034. "data": {
  1035. "type": "object",
  1036. "$ref": "#/definitions/v1.RbacGroupListReply"
  1037. },
  1038. "message": {
  1039. "description": "消息",
  1040. "type": "string",
  1041. "default": "success"
  1042. }
  1043. }
  1044. },
  1045. "v1.RbacGroupUpdateBody": {
  1046. "type": "object",
  1047. "properties": {
  1048. "id": {
  1049. "type": "integer"
  1050. },
  1051. "name": {
  1052. "type": "string"
  1053. },
  1054. "node_list": {
  1055. "type": "string"
  1056. }
  1057. }
  1058. },
  1059. "v1.RbacGroupUpdateResponse": {
  1060. "type": "object",
  1061. "properties": {
  1062. "code": {
  1063. "description": "返回码",
  1064. "type": "integer",
  1065. "format": "int",
  1066. "default": 0
  1067. },
  1068. "message": {
  1069. "description": "消息",
  1070. "type": "string",
  1071. "default": "success"
  1072. }
  1073. }
  1074. },
  1075. "v1.RbacNodeItem": {
  1076. "type": "object",
  1077. "properties": {
  1078. "childs": {
  1079. "type": "array",
  1080. "items": {
  1081. "$ref": "#/definitions/v1.RbacNodeItem"
  1082. }
  1083. },
  1084. "id": {
  1085. "type": "integer"
  1086. },
  1087. "method": {
  1088. "type": "string"
  1089. },
  1090. "name": {
  1091. "type": "string"
  1092. },
  1093. "object": {
  1094. "type": "string"
  1095. },
  1096. "pid": {
  1097. "type": "integer"
  1098. },
  1099. "resource": {
  1100. "type": "string"
  1101. },
  1102. "router": {
  1103. "type": "string"
  1104. },
  1105. "select": {
  1106. "type": "boolean"
  1107. }
  1108. }
  1109. },
  1110. "v1.RbacNodeListReply": {
  1111. "type": "object",
  1112. "properties": {
  1113. "list": {
  1114. "type": "array",
  1115. "items": {
  1116. "$ref": "#/definitions/v1.RbacNodeItem"
  1117. }
  1118. }
  1119. }
  1120. },
  1121. "v1.RbacNodeListResponse": {
  1122. "type": "object",
  1123. "properties": {
  1124. "code": {
  1125. "description": "返回码",
  1126. "type": "integer",
  1127. "format": "int",
  1128. "default": 0
  1129. },
  1130. "data": {
  1131. "type": "object",
  1132. "$ref": "#/definitions/v1.RbacNodeListReply"
  1133. },
  1134. "message": {
  1135. "description": "消息",
  1136. "type": "string",
  1137. "default": "success"
  1138. }
  1139. }
  1140. },
  1141. "v1.TokenResponse": {
  1142. "type": "object",
  1143. "properties": {
  1144. "code": {
  1145. "description": "返回码",
  1146. "type": "integer",
  1147. "format": "int",
  1148. "default": 0
  1149. },
  1150. "data": {
  1151. "type": "string"
  1152. },
  1153. "message": {
  1154. "description": "消息",
  1155. "type": "string",
  1156. "default": "success"
  1157. },
  1158. "refresh_token": {
  1159. "type": "string"
  1160. }
  1161. }
  1162. },
  1163. "v1.UserCreateBody": {
  1164. "type": "object",
  1165. "properties": {
  1166. "email": {
  1167. "type": "string"
  1168. },
  1169. "group_id": {
  1170. "type": "integer"
  1171. },
  1172. "name": {
  1173. "description": "姓名",
  1174. "type": "string"
  1175. },
  1176. "password": {
  1177. "type": "string"
  1178. },
  1179. "phone": {
  1180. "type": "string"
  1181. },
  1182. "username": {
  1183. "description": "账户名",
  1184. "type": "string"
  1185. },
  1186. "zones": {
  1187. "type": "string"
  1188. }
  1189. }
  1190. },
  1191. "v1.UserCreateResponse": {
  1192. "type": "object",
  1193. "properties": {
  1194. "code": {
  1195. "description": "返回码",
  1196. "type": "integer",
  1197. "format": "int",
  1198. "default": 0
  1199. },
  1200. "data": {
  1201. "type": "object",
  1202. "$ref": "#/definitions/v1.CreateManagementUserReply"
  1203. },
  1204. "message": {
  1205. "description": "消息",
  1206. "type": "string",
  1207. "default": "success"
  1208. }
  1209. }
  1210. },
  1211. "v1.UserDelResponse": {
  1212. "type": "object",
  1213. "properties": {
  1214. "code": {
  1215. "description": "返回码",
  1216. "type": "integer",
  1217. "format": "int",
  1218. "default": 0
  1219. },
  1220. "message": {
  1221. "description": "消息",
  1222. "type": "string",
  1223. "default": "success"
  1224. }
  1225. }
  1226. },
  1227. "v1.UserInfoReply": {
  1228. "type": "object",
  1229. "properties": {
  1230. "email": {
  1231. "type": "string"
  1232. },
  1233. "group_id": {
  1234. "description": "所属角色",
  1235. "type": "integer"
  1236. },
  1237. "group_name": {
  1238. "type": "string"
  1239. },
  1240. "id": {
  1241. "type": "integer"
  1242. },
  1243. "name": {
  1244. "type": "string"
  1245. },
  1246. "node_list": {
  1247. "description": "所拥有的权限",
  1248. "type": "array",
  1249. "items": {
  1250. "$ref": "#/definitions/v1.RbacNodeItem"
  1251. }
  1252. },
  1253. "phone": {
  1254. "type": "string"
  1255. },
  1256. "username": {
  1257. "type": "string"
  1258. },
  1259. "zone_list": {
  1260. "type": "array",
  1261. "items": {
  1262. "$ref": "#/definitions/v1.ZoneItemSelect"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "v1.UserInfoResponse": {
  1268. "type": "object",
  1269. "properties": {
  1270. "code": {
  1271. "description": "返回码",
  1272. "type": "integer",
  1273. "format": "int",
  1274. "default": 0
  1275. },
  1276. "data": {
  1277. "type": "object",
  1278. "$ref": "#/definitions/v1.UserInfoReply"
  1279. },
  1280. "message": {
  1281. "description": "消息",
  1282. "type": "string",
  1283. "default": "success"
  1284. }
  1285. }
  1286. },
  1287. "v1.UserItem": {
  1288. "type": "object",
  1289. "properties": {
  1290. "email": {
  1291. "type": "string"
  1292. },
  1293. "id": {
  1294. "type": "integer"
  1295. },
  1296. "name": {
  1297. "type": "string"
  1298. },
  1299. "phone": {
  1300. "type": "string"
  1301. },
  1302. "username": {
  1303. "type": "string"
  1304. },
  1305. "zones": {
  1306. "type": "array",
  1307. "items": {
  1308. "type": "string"
  1309. }
  1310. }
  1311. }
  1312. },
  1313. "v1.UserListReply": {
  1314. "type": "object",
  1315. "properties": {
  1316. "list": {
  1317. "type": "array",
  1318. "items": {
  1319. "$ref": "#/definitions/v1.UserItem"
  1320. }
  1321. },
  1322. "page": {
  1323. "type": "integer"
  1324. },
  1325. "total": {
  1326. "type": "integer"
  1327. }
  1328. }
  1329. },
  1330. "v1.UserListResponse": {
  1331. "type": "object",
  1332. "properties": {
  1333. "code": {
  1334. "description": "返回码",
  1335. "type": "integer",
  1336. "format": "int",
  1337. "default": 0
  1338. },
  1339. "data": {
  1340. "type": "object",
  1341. "$ref": "#/definitions/v1.UserListReply"
  1342. },
  1343. "message": {
  1344. "description": "消息",
  1345. "type": "string",
  1346. "default": "success"
  1347. }
  1348. }
  1349. },
  1350. "v1.UserUpdateBody": {
  1351. "type": "object",
  1352. "properties": {
  1353. "email": {
  1354. "type": "string"
  1355. },
  1356. "group_id": {
  1357. "type": "integer"
  1358. },
  1359. "id": {
  1360. "type": "integer"
  1361. },
  1362. "name": {
  1363. "description": "姓名",
  1364. "type": "string"
  1365. },
  1366. "password": {
  1367. "type": "string"
  1368. },
  1369. "phone": {
  1370. "type": "string"
  1371. },
  1372. "username": {
  1373. "description": "账户名",
  1374. "type": "string"
  1375. },
  1376. "zones": {
  1377. "type": "string"
  1378. }
  1379. }
  1380. },
  1381. "v1.UserUpdateResponse": {
  1382. "type": "object",
  1383. "properties": {
  1384. "code": {
  1385. "description": "返回码",
  1386. "type": "integer",
  1387. "format": "int",
  1388. "default": 0
  1389. },
  1390. "message": {
  1391. "description": "消息",
  1392. "type": "string",
  1393. "default": "success"
  1394. }
  1395. }
  1396. },
  1397. "v1.ZoneAddBody": {
  1398. "type": "object",
  1399. "properties": {
  1400. "parent_zone_code": {
  1401. "type": "string"
  1402. },
  1403. "zone_name": {
  1404. "type": "string"
  1405. }
  1406. }
  1407. },
  1408. "v1.ZoneAddReply": {
  1409. "type": "object",
  1410. "properties": {
  1411. "zone_code": {
  1412. "type": "string"
  1413. }
  1414. }
  1415. },
  1416. "v1.ZoneAddResponse": {
  1417. "type": "object",
  1418. "properties": {
  1419. "code": {
  1420. "description": "返回码",
  1421. "type": "integer",
  1422. "format": "int",
  1423. "default": 0
  1424. },
  1425. "data": {
  1426. "type": "object",
  1427. "$ref": "#/definitions/v1.ZoneAddReply"
  1428. },
  1429. "message": {
  1430. "description": "消息",
  1431. "type": "string",
  1432. "default": "success"
  1433. }
  1434. }
  1435. },
  1436. "v1.ZoneDelResponse": {
  1437. "type": "object",
  1438. "properties": {
  1439. "code": {
  1440. "description": "返回码",
  1441. "type": "integer",
  1442. "format": "int",
  1443. "default": 0
  1444. },
  1445. "message": {
  1446. "description": "消息",
  1447. "type": "string",
  1448. "default": "success"
  1449. }
  1450. }
  1451. },
  1452. "v1.ZoneItem": {
  1453. "type": "object",
  1454. "properties": {
  1455. "childs": {
  1456. "type": "array",
  1457. "items": {
  1458. "$ref": "#/definitions/v1.ZoneItem"
  1459. }
  1460. },
  1461. "parent_zone_code": {
  1462. "type": "string"
  1463. },
  1464. "zone_code": {
  1465. "type": "string"
  1466. },
  1467. "zone_name": {
  1468. "type": "string"
  1469. }
  1470. }
  1471. },
  1472. "v1.ZoneItemSelect": {
  1473. "type": "object",
  1474. "properties": {
  1475. "childs": {
  1476. "type": "array",
  1477. "items": {
  1478. "$ref": "#/definitions/v1.ZoneItemSelect"
  1479. }
  1480. },
  1481. "parent_zone_code": {
  1482. "type": "string"
  1483. },
  1484. "select": {
  1485. "type": "boolean"
  1486. },
  1487. "zone_code": {
  1488. "type": "string"
  1489. },
  1490. "zone_name": {
  1491. "type": "string"
  1492. }
  1493. }
  1494. },
  1495. "v1.ZoneListReply": {
  1496. "type": "object",
  1497. "properties": {
  1498. "list": {
  1499. "type": "array",
  1500. "items": {
  1501. "$ref": "#/definitions/v1.ZoneItem"
  1502. }
  1503. }
  1504. }
  1505. },
  1506. "v1.ZoneListResponse": {
  1507. "type": "object",
  1508. "properties": {
  1509. "code": {
  1510. "description": "返回码",
  1511. "type": "integer",
  1512. "format": "int",
  1513. "default": 0
  1514. },
  1515. "data": {
  1516. "type": "object",
  1517. "$ref": "#/definitions/v1.ZoneListReply"
  1518. },
  1519. "message": {
  1520. "description": "消息",
  1521. "type": "string",
  1522. "default": "success"
  1523. }
  1524. }
  1525. },
  1526. "v1.ZoneUpdateBody": {
  1527. "type": "object",
  1528. "properties": {
  1529. "parent_zone_code": {
  1530. "type": "string"
  1531. },
  1532. "zone_code": {
  1533. "type": "string"
  1534. },
  1535. "zone_name": {
  1536. "type": "string"
  1537. }
  1538. }
  1539. },
  1540. "v1.ZoneUpdateResponse": {
  1541. "type": "object",
  1542. "properties": {
  1543. "code": {
  1544. "description": "返回码",
  1545. "type": "integer",
  1546. "format": "int",
  1547. "default": 0
  1548. },
  1549. "message": {
  1550. "description": "消息",
  1551. "type": "string",
  1552. "default": "success"
  1553. }
  1554. }
  1555. }
  1556. }
  1557. }`
  1558. type swaggerInfo struct {
  1559. Version string
  1560. Host string
  1561. BasePath string
  1562. Schemes []string
  1563. Title string
  1564. Description string
  1565. }
  1566. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1567. var SwaggerInfo = swaggerInfo{
  1568. Version: "1.1",
  1569. Host: "",
  1570. BasePath: "",
  1571. Schemes: []string{},
  1572. Title: "Project cp-organization-management-gateway's APIs",
  1573. Description: "This is a gateway server. On the page, you can go to do testing for every API.",
  1574. }
  1575. type s struct{}
  1576. func (s *s) ReadDoc() string {
  1577. sInfo := SwaggerInfo
  1578. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  1579. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  1580. "marshal": func(v interface{}) string {
  1581. a, _ := json.Marshal(v)
  1582. return string(a)
  1583. },
  1584. }).Parse(doc)
  1585. if err != nil {
  1586. return doc
  1587. }
  1588. var tpl bytes.Buffer
  1589. if err := t.Execute(&tpl, sInfo); err != nil {
  1590. return doc
  1591. }
  1592. return tpl.String()
  1593. }
  1594. func init() {
  1595. swag.Register(swag.Name, &s{})
  1596. }