admin_swagger.yaml 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798
  1. basePath: /api
  2. definitions:
  3. Gwen_http_request_admin.Login:
  4. properties:
  5. password:
  6. type: string
  7. platform:
  8. type: string
  9. username:
  10. type: string
  11. required:
  12. - password
  13. - username
  14. type: object
  15. admin.AddressBookForm:
  16. properties:
  17. alias:
  18. type: string
  19. forceAlwaysRelay:
  20. type: boolean
  21. hash:
  22. type: string
  23. hostname:
  24. type: string
  25. id:
  26. type: string
  27. loginName:
  28. type: string
  29. online:
  30. type: boolean
  31. password:
  32. type: string
  33. platform:
  34. type: string
  35. rdpPort:
  36. type: string
  37. rdpUsername:
  38. type: string
  39. row_id:
  40. type: integer
  41. sameServer:
  42. type: boolean
  43. tags:
  44. items:
  45. type: string
  46. type: array
  47. user_id:
  48. type: integer
  49. username:
  50. type: string
  51. required:
  52. - id
  53. type: object
  54. admin.ChangeCurPasswordForm:
  55. properties:
  56. new_password:
  57. maxLength: 20
  58. minLength: 4
  59. type: string
  60. old_password:
  61. maxLength: 20
  62. minLength: 4
  63. type: string
  64. required:
  65. - new_password
  66. - old_password
  67. type: object
  68. admin.GroupForm:
  69. properties:
  70. id:
  71. type: integer
  72. name:
  73. type: string
  74. required:
  75. - name
  76. type: object
  77. admin.LoginPayload:
  78. properties:
  79. nickname:
  80. type: string
  81. route_names:
  82. items:
  83. type: string
  84. type: array
  85. token:
  86. type: string
  87. username:
  88. type: string
  89. type: object
  90. admin.OauthForm:
  91. properties:
  92. auto_register:
  93. type: boolean
  94. client_id:
  95. type: string
  96. client_secret:
  97. type: string
  98. id:
  99. type: integer
  100. op:
  101. type: string
  102. redirect_url:
  103. type: string
  104. required:
  105. - client_id
  106. - client_secret
  107. - op
  108. - redirect_url
  109. type: object
  110. admin.PeerForm:
  111. properties:
  112. cpu:
  113. type: string
  114. hostname:
  115. type: string
  116. id:
  117. type: string
  118. memory:
  119. type: string
  120. os:
  121. type: string
  122. row_id:
  123. type: integer
  124. username:
  125. type: string
  126. uuid:
  127. type: string
  128. version:
  129. type: string
  130. type: object
  131. admin.TagForm:
  132. properties:
  133. color:
  134. type: integer
  135. id:
  136. type: integer
  137. name:
  138. type: string
  139. user_id:
  140. type: integer
  141. required:
  142. - color
  143. - name
  144. type: object
  145. admin.UserForm:
  146. properties:
  147. avatar:
  148. type: string
  149. group_id:
  150. type: integer
  151. id:
  152. type: integer
  153. is_admin:
  154. type: boolean
  155. nickname:
  156. description: Password string `json:"password" validate:"required,gte=4,lte=20"`
  157. type: string
  158. status:
  159. allOf:
  160. - $ref: '#/definitions/model.StatusCode'
  161. minimum: 0
  162. username:
  163. maxLength: 10
  164. minLength: 4
  165. type: string
  166. required:
  167. - group_id
  168. - status
  169. - username
  170. type: object
  171. admin.UserOauthItem:
  172. properties:
  173. status:
  174. type: integer
  175. third_type:
  176. type: string
  177. type: object
  178. admin.UserPasswordForm:
  179. properties:
  180. id:
  181. type: integer
  182. password:
  183. maxLength: 20
  184. minLength: 4
  185. type: string
  186. required:
  187. - id
  188. - password
  189. type: object
  190. model.AddressBook:
  191. properties:
  192. alias:
  193. type: string
  194. created_at:
  195. type: string
  196. forceAlwaysRelay:
  197. type: boolean
  198. hash:
  199. type: string
  200. hostname:
  201. type: string
  202. id:
  203. type: string
  204. loginName:
  205. type: string
  206. online:
  207. type: boolean
  208. password:
  209. type: string
  210. platform:
  211. type: string
  212. rdpPort:
  213. type: string
  214. rdpUsername:
  215. type: string
  216. row_id:
  217. type: integer
  218. sameServer:
  219. type: boolean
  220. tags:
  221. items:
  222. type: string
  223. type: array
  224. updated_at:
  225. type: string
  226. user_id:
  227. type: integer
  228. username:
  229. type: string
  230. type: object
  231. model.AddressBookList:
  232. properties:
  233. list:
  234. items:
  235. $ref: '#/definitions/model.AddressBook'
  236. type: array
  237. page:
  238. type: integer
  239. page_size:
  240. type: integer
  241. total:
  242. type: integer
  243. type: object
  244. model.Group:
  245. properties:
  246. created_at:
  247. type: string
  248. id:
  249. type: integer
  250. name:
  251. type: string
  252. type:
  253. type: integer
  254. updated_at:
  255. type: string
  256. type: object
  257. model.GroupList:
  258. properties:
  259. list:
  260. items:
  261. $ref: '#/definitions/model.Group'
  262. type: array
  263. page:
  264. type: integer
  265. page_size:
  266. type: integer
  267. total:
  268. type: integer
  269. type: object
  270. model.LoginLog:
  271. properties:
  272. client:
  273. description: webadmin,webclient,app,
  274. type: string
  275. created_at:
  276. type: string
  277. id:
  278. type: integer
  279. ip:
  280. type: string
  281. platform:
  282. description: windows,linux,mac,android,ios
  283. type: string
  284. type:
  285. description: account,oauth
  286. type: string
  287. updated_at:
  288. type: string
  289. user_id:
  290. type: integer
  291. uuid:
  292. type: string
  293. type: object
  294. model.LoginLogList:
  295. properties:
  296. list:
  297. items:
  298. $ref: '#/definitions/model.LoginLog'
  299. type: array
  300. page:
  301. type: integer
  302. page_size:
  303. type: integer
  304. total:
  305. type: integer
  306. type: object
  307. model.Oauth:
  308. properties:
  309. auto_register:
  310. type: boolean
  311. client_id:
  312. type: string
  313. client_secret:
  314. type: string
  315. created_at:
  316. type: string
  317. id:
  318. type: integer
  319. op:
  320. type: string
  321. redirect_url:
  322. type: string
  323. updated_at:
  324. type: string
  325. type: object
  326. model.OauthList:
  327. properties:
  328. list:
  329. items:
  330. $ref: '#/definitions/model.Oauth'
  331. type: array
  332. page:
  333. type: integer
  334. page_size:
  335. type: integer
  336. total:
  337. type: integer
  338. type: object
  339. model.Peer:
  340. properties:
  341. cpu:
  342. type: string
  343. created_at:
  344. type: string
  345. hostname:
  346. type: string
  347. id:
  348. type: string
  349. last_online_time:
  350. type: integer
  351. memory:
  352. type: string
  353. os:
  354. type: string
  355. row_id:
  356. type: integer
  357. updated_at:
  358. type: string
  359. user:
  360. $ref: '#/definitions/model.User'
  361. user_id:
  362. type: integer
  363. username:
  364. type: string
  365. uuid:
  366. type: string
  367. version:
  368. type: string
  369. type: object
  370. model.PeerList:
  371. properties:
  372. list:
  373. items:
  374. $ref: '#/definitions/model.Peer'
  375. type: array
  376. page:
  377. type: integer
  378. page_size:
  379. type: integer
  380. total:
  381. type: integer
  382. type: object
  383. model.StatusCode:
  384. enum:
  385. - 1
  386. - 2
  387. type: integer
  388. x-enum-comments:
  389. COMMON_STATUS_DISABLED: 通用状态 禁用
  390. COMMON_STATUS_ENABLE: 通用状态 启用
  391. x-enum-varnames:
  392. - COMMON_STATUS_ENABLE
  393. - COMMON_STATUS_DISABLED
  394. model.Tag:
  395. properties:
  396. color:
  397. description: color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色,
  398. 可以转成rgba
  399. type: integer
  400. created_at:
  401. type: string
  402. id:
  403. type: integer
  404. name:
  405. type: string
  406. updated_at:
  407. type: string
  408. user_id:
  409. type: integer
  410. type: object
  411. model.TagList:
  412. properties:
  413. list:
  414. items:
  415. $ref: '#/definitions/model.Tag'
  416. type: array
  417. page:
  418. type: integer
  419. page_size:
  420. type: integer
  421. total:
  422. type: integer
  423. type: object
  424. model.User:
  425. properties:
  426. avatar:
  427. type: string
  428. created_at:
  429. type: string
  430. group_id:
  431. type: integer
  432. id:
  433. type: integer
  434. is_admin:
  435. type: boolean
  436. nickname:
  437. type: string
  438. status:
  439. $ref: '#/definitions/model.StatusCode'
  440. updated_at:
  441. type: string
  442. username:
  443. type: string
  444. type: object
  445. model.UserList:
  446. properties:
  447. list:
  448. items:
  449. $ref: '#/definitions/model.User'
  450. type: array
  451. page:
  452. type: integer
  453. page_size:
  454. type: integer
  455. total:
  456. type: integer
  457. type: object
  458. response.Response:
  459. properties:
  460. code:
  461. type: integer
  462. data: {}
  463. message:
  464. type: string
  465. type: object
  466. info:
  467. contact: {}
  468. description: 接口
  469. title: 管理系统API
  470. version: "1.0"
  471. paths:
  472. /admin/address_book/create:
  473. post:
  474. consumes:
  475. - application/json
  476. description: 创建地址簿
  477. parameters:
  478. - description: 地址簿信息
  479. in: body
  480. name: body
  481. required: true
  482. schema:
  483. $ref: '#/definitions/admin.AddressBookForm'
  484. produces:
  485. - application/json
  486. responses:
  487. "200":
  488. description: OK
  489. schema:
  490. allOf:
  491. - $ref: '#/definitions/response.Response'
  492. - properties:
  493. data:
  494. $ref: '#/definitions/model.AddressBook'
  495. type: object
  496. "500":
  497. description: Internal Server Error
  498. schema:
  499. $ref: '#/definitions/response.Response'
  500. security:
  501. - token: []
  502. summary: 创建地址簿
  503. tags:
  504. - 地址簿
  505. /admin/address_book/delete:
  506. post:
  507. consumes:
  508. - application/json
  509. description: 地址簿删除
  510. parameters:
  511. - description: 地址簿信息
  512. in: body
  513. name: body
  514. required: true
  515. schema:
  516. $ref: '#/definitions/admin.AddressBookForm'
  517. produces:
  518. - application/json
  519. responses:
  520. "200":
  521. description: OK
  522. schema:
  523. $ref: '#/definitions/response.Response'
  524. "500":
  525. description: Internal Server Error
  526. schema:
  527. $ref: '#/definitions/response.Response'
  528. security:
  529. - token: []
  530. summary: 地址簿删除
  531. tags:
  532. - 地址簿
  533. /admin/address_book/detail/{id}:
  534. get:
  535. consumes:
  536. - application/json
  537. description: 地址簿详情
  538. parameters:
  539. - description: ID
  540. in: path
  541. name: id
  542. required: true
  543. type: integer
  544. produces:
  545. - application/json
  546. responses:
  547. "200":
  548. description: OK
  549. schema:
  550. allOf:
  551. - $ref: '#/definitions/response.Response'
  552. - properties:
  553. data:
  554. $ref: '#/definitions/model.AddressBook'
  555. type: object
  556. "500":
  557. description: Internal Server Error
  558. schema:
  559. $ref: '#/definitions/response.Response'
  560. security:
  561. - token: []
  562. summary: 地址簿详情
  563. tags:
  564. - 地址簿
  565. /admin/address_book/list:
  566. get:
  567. consumes:
  568. - application/json
  569. description: 地址簿列表
  570. parameters:
  571. - description: 页码
  572. in: query
  573. name: page
  574. type: integer
  575. - description: 页大小
  576. in: query
  577. name: page_size
  578. type: integer
  579. - description: 用户id
  580. in: query
  581. name: user_id
  582. type: integer
  583. - description: 是否是我的
  584. in: query
  585. name: is_my
  586. type: integer
  587. produces:
  588. - application/json
  589. responses:
  590. "200":
  591. description: OK
  592. schema:
  593. allOf:
  594. - $ref: '#/definitions/response.Response'
  595. - properties:
  596. data:
  597. $ref: '#/definitions/model.AddressBookList'
  598. type: object
  599. "500":
  600. description: Internal Server Error
  601. schema:
  602. $ref: '#/definitions/response.Response'
  603. security:
  604. - token: []
  605. summary: 地址簿列表
  606. tags:
  607. - 地址簿
  608. /admin/address_book/update:
  609. post:
  610. consumes:
  611. - application/json
  612. description: 地址簿编辑
  613. parameters:
  614. - description: 地址簿信息
  615. in: body
  616. name: body
  617. required: true
  618. schema:
  619. $ref: '#/definitions/admin.AddressBookForm'
  620. produces:
  621. - application/json
  622. responses:
  623. "200":
  624. description: OK
  625. schema:
  626. allOf:
  627. - $ref: '#/definitions/response.Response'
  628. - properties:
  629. data:
  630. $ref: '#/definitions/model.AddressBook'
  631. type: object
  632. "500":
  633. description: Internal Server Error
  634. schema:
  635. $ref: '#/definitions/response.Response'
  636. security:
  637. - token: []
  638. summary: 地址簿编辑
  639. tags:
  640. - 地址簿
  641. /admin/file/oss_token:
  642. get:
  643. consumes:
  644. - application/json
  645. description: 获取ossToken
  646. produces:
  647. - application/json
  648. responses:
  649. "200":
  650. description: OK
  651. schema:
  652. $ref: '#/definitions/response.Response'
  653. "500":
  654. description: Internal Server Error
  655. schema:
  656. $ref: '#/definitions/response.Response'
  657. security:
  658. - token: []
  659. summary: 获取ossToken
  660. tags:
  661. - 文件
  662. /admin/file/upload:
  663. post:
  664. consumes:
  665. - multipart/form-data
  666. description: 上传文件到本地
  667. parameters:
  668. - description: 上传文件示例
  669. in: formData
  670. name: file
  671. required: true
  672. type: file
  673. produces:
  674. - application/json
  675. responses:
  676. "200":
  677. description: OK
  678. schema:
  679. $ref: '#/definitions/response.Response'
  680. "500":
  681. description: Internal Server Error
  682. schema:
  683. $ref: '#/definitions/response.Response'
  684. security:
  685. - token: []
  686. summary: 上传文件到本地
  687. tags:
  688. - 文件
  689. /admin/group/create:
  690. post:
  691. consumes:
  692. - application/json
  693. description: 创建群组
  694. parameters:
  695. - description: 群组信息
  696. in: body
  697. name: body
  698. required: true
  699. schema:
  700. $ref: '#/definitions/admin.GroupForm'
  701. produces:
  702. - application/json
  703. responses:
  704. "200":
  705. description: OK
  706. schema:
  707. allOf:
  708. - $ref: '#/definitions/response.Response'
  709. - properties:
  710. data:
  711. $ref: '#/definitions/model.Group'
  712. type: object
  713. "500":
  714. description: Internal Server Error
  715. schema:
  716. $ref: '#/definitions/response.Response'
  717. security:
  718. - token: []
  719. summary: 创建群组
  720. tags:
  721. - 群组
  722. /admin/group/delete:
  723. post:
  724. consumes:
  725. - application/json
  726. description: 群组删除
  727. parameters:
  728. - description: 群组信息
  729. in: body
  730. name: body
  731. required: true
  732. schema:
  733. $ref: '#/definitions/admin.GroupForm'
  734. produces:
  735. - application/json
  736. responses:
  737. "200":
  738. description: OK
  739. schema:
  740. $ref: '#/definitions/response.Response'
  741. "500":
  742. description: Internal Server Error
  743. schema:
  744. $ref: '#/definitions/response.Response'
  745. security:
  746. - token: []
  747. summary: 群组删除
  748. tags:
  749. - 群组
  750. /admin/group/detail/{id}:
  751. get:
  752. consumes:
  753. - application/json
  754. description: 群组详情
  755. parameters:
  756. - description: ID
  757. in: path
  758. name: id
  759. required: true
  760. type: integer
  761. produces:
  762. - application/json
  763. responses:
  764. "200":
  765. description: OK
  766. schema:
  767. allOf:
  768. - $ref: '#/definitions/response.Response'
  769. - properties:
  770. data:
  771. $ref: '#/definitions/model.Group'
  772. type: object
  773. "500":
  774. description: Internal Server Error
  775. schema:
  776. $ref: '#/definitions/response.Response'
  777. security:
  778. - token: []
  779. summary: 群组详情
  780. tags:
  781. - 群组
  782. /admin/group/list:
  783. get:
  784. consumes:
  785. - application/json
  786. description: 群组列表
  787. parameters:
  788. - description: 页码
  789. in: query
  790. name: page
  791. type: integer
  792. - description: 页大小
  793. in: query
  794. name: page_size
  795. type: integer
  796. produces:
  797. - application/json
  798. responses:
  799. "200":
  800. description: OK
  801. schema:
  802. allOf:
  803. - $ref: '#/definitions/response.Response'
  804. - properties:
  805. data:
  806. $ref: '#/definitions/model.GroupList'
  807. type: object
  808. "500":
  809. description: Internal Server Error
  810. schema:
  811. $ref: '#/definitions/response.Response'
  812. security:
  813. - token: []
  814. summary: 群组列表
  815. tags:
  816. - 群组
  817. /admin/group/update:
  818. post:
  819. consumes:
  820. - application/json
  821. description: 群组编辑
  822. parameters:
  823. - description: 群组信息
  824. in: body
  825. name: body
  826. required: true
  827. schema:
  828. $ref: '#/definitions/admin.GroupForm'
  829. produces:
  830. - application/json
  831. responses:
  832. "200":
  833. description: OK
  834. schema:
  835. allOf:
  836. - $ref: '#/definitions/response.Response'
  837. - properties:
  838. data:
  839. $ref: '#/definitions/model.Group'
  840. type: object
  841. "500":
  842. description: Internal Server Error
  843. schema:
  844. $ref: '#/definitions/response.Response'
  845. security:
  846. - token: []
  847. summary: 群组编辑
  848. tags:
  849. - 群组
  850. /admin/login:
  851. post:
  852. consumes:
  853. - application/json
  854. description: 登录
  855. parameters:
  856. - description: 登录信息
  857. in: body
  858. name: body
  859. required: true
  860. schema:
  861. $ref: '#/definitions/Gwen_http_request_admin.Login'
  862. produces:
  863. - application/json
  864. responses:
  865. "200":
  866. description: OK
  867. schema:
  868. allOf:
  869. - $ref: '#/definitions/response.Response'
  870. - properties:
  871. data:
  872. $ref: '#/definitions/admin.LoginPayload'
  873. type: object
  874. "500":
  875. description: Internal Server Error
  876. schema:
  877. $ref: '#/definitions/response.Response'
  878. security:
  879. - token: []
  880. summary: 登录
  881. tags:
  882. - 登录
  883. /admin/loginLog/delete:
  884. post:
  885. consumes:
  886. - application/json
  887. description: 登录日志删除
  888. parameters:
  889. - description: 登录日志信息
  890. in: body
  891. name: body
  892. required: true
  893. schema:
  894. $ref: '#/definitions/model.LoginLog'
  895. produces:
  896. - application/json
  897. responses:
  898. "200":
  899. description: OK
  900. schema:
  901. $ref: '#/definitions/response.Response'
  902. "500":
  903. description: Internal Server Error
  904. schema:
  905. $ref: '#/definitions/response.Response'
  906. security:
  907. - token: []
  908. summary: 登录日志删除
  909. tags:
  910. - 登录日志
  911. /admin/loginLog/detail/{id}:
  912. get:
  913. consumes:
  914. - application/json
  915. description: 登录日志详情
  916. parameters:
  917. - description: ID
  918. in: path
  919. name: id
  920. required: true
  921. type: integer
  922. produces:
  923. - application/json
  924. responses:
  925. "200":
  926. description: OK
  927. schema:
  928. allOf:
  929. - $ref: '#/definitions/response.Response'
  930. - properties:
  931. data:
  932. $ref: '#/definitions/model.LoginLog'
  933. type: object
  934. "500":
  935. description: Internal Server Error
  936. schema:
  937. $ref: '#/definitions/response.Response'
  938. security:
  939. - token: []
  940. summary: 登录日志详情
  941. tags:
  942. - 登录日志
  943. /admin/loginLog/list:
  944. get:
  945. consumes:
  946. - application/json
  947. description: 登录日志列表
  948. parameters:
  949. - description: 页码
  950. in: query
  951. name: page
  952. type: integer
  953. - description: 页大小
  954. in: query
  955. name: page_size
  956. type: integer
  957. - description: 用户ID
  958. in: query
  959. name: user_id
  960. type: integer
  961. produces:
  962. - application/json
  963. responses:
  964. "200":
  965. description: OK
  966. schema:
  967. allOf:
  968. - $ref: '#/definitions/response.Response'
  969. - properties:
  970. data:
  971. $ref: '#/definitions/model.LoginLogList'
  972. type: object
  973. "500":
  974. description: Internal Server Error
  975. schema:
  976. $ref: '#/definitions/response.Response'
  977. security:
  978. - token: []
  979. summary: 登录日志列表
  980. tags:
  981. - 登录日志
  982. /admin/logout:
  983. post:
  984. consumes:
  985. - application/json
  986. description: 登出
  987. produces:
  988. - application/json
  989. responses:
  990. "200":
  991. description: OK
  992. schema:
  993. $ref: '#/definitions/response.Response'
  994. "500":
  995. description: Internal Server Error
  996. schema:
  997. $ref: '#/definitions/response.Response'
  998. summary: 登出
  999. tags:
  1000. - 登录
  1001. /admin/oauth/create:
  1002. post:
  1003. consumes:
  1004. - application/json
  1005. description: 创建Oauth
  1006. parameters:
  1007. - description: Oauth信息
  1008. in: body
  1009. name: body
  1010. required: true
  1011. schema:
  1012. $ref: '#/definitions/admin.OauthForm'
  1013. produces:
  1014. - application/json
  1015. responses:
  1016. "200":
  1017. description: OK
  1018. schema:
  1019. allOf:
  1020. - $ref: '#/definitions/response.Response'
  1021. - properties:
  1022. data:
  1023. $ref: '#/definitions/model.Oauth'
  1024. type: object
  1025. "500":
  1026. description: Internal Server Error
  1027. schema:
  1028. $ref: '#/definitions/response.Response'
  1029. security:
  1030. - token: []
  1031. summary: 创建Oauth
  1032. tags:
  1033. - Oauth
  1034. /admin/oauth/delete:
  1035. post:
  1036. consumes:
  1037. - application/json
  1038. description: Oauth删除
  1039. parameters:
  1040. - description: Oauth信息
  1041. in: body
  1042. name: body
  1043. required: true
  1044. schema:
  1045. $ref: '#/definitions/admin.OauthForm'
  1046. produces:
  1047. - application/json
  1048. responses:
  1049. "200":
  1050. description: OK
  1051. schema:
  1052. $ref: '#/definitions/response.Response'
  1053. "500":
  1054. description: Internal Server Error
  1055. schema:
  1056. $ref: '#/definitions/response.Response'
  1057. security:
  1058. - token: []
  1059. summary: Oauth删除
  1060. tags:
  1061. - Oauth
  1062. /admin/oauth/detail/{id}:
  1063. get:
  1064. consumes:
  1065. - application/json
  1066. description: Oauth详情
  1067. parameters:
  1068. - description: ID
  1069. in: path
  1070. name: id
  1071. required: true
  1072. type: integer
  1073. produces:
  1074. - application/json
  1075. responses:
  1076. "200":
  1077. description: OK
  1078. schema:
  1079. allOf:
  1080. - $ref: '#/definitions/response.Response'
  1081. - properties:
  1082. data:
  1083. $ref: '#/definitions/model.Oauth'
  1084. type: object
  1085. "500":
  1086. description: Internal Server Error
  1087. schema:
  1088. $ref: '#/definitions/response.Response'
  1089. security:
  1090. - token: []
  1091. summary: Oauth详情
  1092. tags:
  1093. - Oauth
  1094. /admin/oauth/list:
  1095. get:
  1096. consumes:
  1097. - application/json
  1098. description: Oauth列表
  1099. parameters:
  1100. - description: 页码
  1101. in: query
  1102. name: page
  1103. type: integer
  1104. - description: 页大小
  1105. in: query
  1106. name: page_size
  1107. type: integer
  1108. produces:
  1109. - application/json
  1110. responses:
  1111. "200":
  1112. description: OK
  1113. schema:
  1114. allOf:
  1115. - $ref: '#/definitions/response.Response'
  1116. - properties:
  1117. data:
  1118. $ref: '#/definitions/model.OauthList'
  1119. type: object
  1120. "500":
  1121. description: Internal Server Error
  1122. schema:
  1123. $ref: '#/definitions/response.Response'
  1124. security:
  1125. - token: []
  1126. summary: Oauth列表
  1127. tags:
  1128. - Oauth
  1129. /admin/oauth/update:
  1130. post:
  1131. consumes:
  1132. - application/json
  1133. description: Oauth编辑
  1134. parameters:
  1135. - description: Oauth信息
  1136. in: body
  1137. name: body
  1138. required: true
  1139. schema:
  1140. $ref: '#/definitions/admin.OauthForm'
  1141. produces:
  1142. - application/json
  1143. responses:
  1144. "200":
  1145. description: OK
  1146. schema:
  1147. allOf:
  1148. - $ref: '#/definitions/response.Response'
  1149. - properties:
  1150. data:
  1151. $ref: '#/definitions/model.OauthList'
  1152. type: object
  1153. "500":
  1154. description: Internal Server Error
  1155. schema:
  1156. $ref: '#/definitions/response.Response'
  1157. security:
  1158. - token: []
  1159. summary: Oauth编辑
  1160. tags:
  1161. - Oauth
  1162. /admin/peer/create:
  1163. post:
  1164. consumes:
  1165. - application/json
  1166. description: 创建设备
  1167. parameters:
  1168. - description: 设备信息
  1169. in: body
  1170. name: body
  1171. required: true
  1172. schema:
  1173. $ref: '#/definitions/admin.PeerForm'
  1174. produces:
  1175. - application/json
  1176. responses:
  1177. "200":
  1178. description: OK
  1179. schema:
  1180. allOf:
  1181. - $ref: '#/definitions/response.Response'
  1182. - properties:
  1183. data:
  1184. $ref: '#/definitions/model.Peer'
  1185. type: object
  1186. "500":
  1187. description: Internal Server Error
  1188. schema:
  1189. $ref: '#/definitions/response.Response'
  1190. security:
  1191. - token: []
  1192. summary: 创建设备
  1193. tags:
  1194. - 设备
  1195. /admin/peer/delete:
  1196. post:
  1197. consumes:
  1198. - application/json
  1199. description: 设备删除
  1200. parameters:
  1201. - description: 设备信息
  1202. in: body
  1203. name: body
  1204. required: true
  1205. schema:
  1206. $ref: '#/definitions/admin.PeerForm'
  1207. produces:
  1208. - application/json
  1209. responses:
  1210. "200":
  1211. description: OK
  1212. schema:
  1213. $ref: '#/definitions/response.Response'
  1214. "500":
  1215. description: Internal Server Error
  1216. schema:
  1217. $ref: '#/definitions/response.Response'
  1218. security:
  1219. - token: []
  1220. summary: 设备删除
  1221. tags:
  1222. - 设备
  1223. /admin/peer/detail/{id}:
  1224. get:
  1225. consumes:
  1226. - application/json
  1227. description: 设备详情
  1228. parameters:
  1229. - description: ID
  1230. in: path
  1231. name: id
  1232. required: true
  1233. type: integer
  1234. produces:
  1235. - application/json
  1236. responses:
  1237. "200":
  1238. description: OK
  1239. schema:
  1240. allOf:
  1241. - $ref: '#/definitions/response.Response'
  1242. - properties:
  1243. data:
  1244. $ref: '#/definitions/model.Peer'
  1245. type: object
  1246. "500":
  1247. description: Internal Server Error
  1248. schema:
  1249. $ref: '#/definitions/response.Response'
  1250. security:
  1251. - token: []
  1252. summary: 设备详情
  1253. tags:
  1254. - 设备
  1255. /admin/peer/list:
  1256. get:
  1257. consumes:
  1258. - application/json
  1259. description: 设备列表
  1260. parameters:
  1261. - description: 页码
  1262. in: query
  1263. name: page
  1264. type: integer
  1265. - description: 页大小
  1266. in: query
  1267. name: page_size
  1268. type: integer
  1269. produces:
  1270. - application/json
  1271. responses:
  1272. "200":
  1273. description: OK
  1274. schema:
  1275. allOf:
  1276. - $ref: '#/definitions/response.Response'
  1277. - properties:
  1278. data:
  1279. $ref: '#/definitions/model.PeerList'
  1280. type: object
  1281. "500":
  1282. description: Internal Server Error
  1283. schema:
  1284. $ref: '#/definitions/response.Response'
  1285. security:
  1286. - token: []
  1287. summary: 设备列表
  1288. tags:
  1289. - 设备
  1290. /admin/peer/update:
  1291. post:
  1292. consumes:
  1293. - application/json
  1294. description: 设备编辑
  1295. parameters:
  1296. - description: 设备信息
  1297. in: body
  1298. name: body
  1299. required: true
  1300. schema:
  1301. $ref: '#/definitions/admin.PeerForm'
  1302. produces:
  1303. - application/json
  1304. responses:
  1305. "200":
  1306. description: OK
  1307. schema:
  1308. allOf:
  1309. - $ref: '#/definitions/response.Response'
  1310. - properties:
  1311. data:
  1312. $ref: '#/definitions/model.Peer'
  1313. type: object
  1314. "500":
  1315. description: Internal Server Error
  1316. schema:
  1317. $ref: '#/definitions/response.Response'
  1318. security:
  1319. - token: []
  1320. summary: 设备编辑
  1321. tags:
  1322. - 设备
  1323. /admin/server-config:
  1324. get:
  1325. consumes:
  1326. - application/json
  1327. description: 服务配置,给webclient提供api-server
  1328. produces:
  1329. - application/json
  1330. responses:
  1331. "200":
  1332. description: OK
  1333. schema:
  1334. $ref: '#/definitions/response.Response'
  1335. "500":
  1336. description: Internal Server Error
  1337. schema:
  1338. $ref: '#/definitions/response.Response'
  1339. security:
  1340. - token: []
  1341. summary: 服务配置
  1342. tags:
  1343. - ADMIN
  1344. /admin/tag/create:
  1345. post:
  1346. consumes:
  1347. - application/json
  1348. description: 创建标签
  1349. parameters:
  1350. - description: 标签信息
  1351. in: body
  1352. name: body
  1353. required: true
  1354. schema:
  1355. $ref: '#/definitions/admin.TagForm'
  1356. produces:
  1357. - application/json
  1358. responses:
  1359. "200":
  1360. description: OK
  1361. schema:
  1362. allOf:
  1363. - $ref: '#/definitions/response.Response'
  1364. - properties:
  1365. data:
  1366. $ref: '#/definitions/model.Tag'
  1367. type: object
  1368. "500":
  1369. description: Internal Server Error
  1370. schema:
  1371. $ref: '#/definitions/response.Response'
  1372. security:
  1373. - token: []
  1374. summary: 创建标签
  1375. tags:
  1376. - 标签
  1377. /admin/tag/delete:
  1378. post:
  1379. consumes:
  1380. - application/json
  1381. description: 标签删除
  1382. parameters:
  1383. - description: 标签信息
  1384. in: body
  1385. name: body
  1386. required: true
  1387. schema:
  1388. $ref: '#/definitions/admin.TagForm'
  1389. produces:
  1390. - application/json
  1391. responses:
  1392. "200":
  1393. description: OK
  1394. schema:
  1395. $ref: '#/definitions/response.Response'
  1396. "500":
  1397. description: Internal Server Error
  1398. schema:
  1399. $ref: '#/definitions/response.Response'
  1400. security:
  1401. - token: []
  1402. summary: 标签删除
  1403. tags:
  1404. - 标签
  1405. /admin/tag/detail/{id}:
  1406. get:
  1407. consumes:
  1408. - application/json
  1409. description: 标签详情
  1410. parameters:
  1411. - description: ID
  1412. in: path
  1413. name: id
  1414. required: true
  1415. type: integer
  1416. produces:
  1417. - application/json
  1418. responses:
  1419. "200":
  1420. description: OK
  1421. schema:
  1422. allOf:
  1423. - $ref: '#/definitions/response.Response'
  1424. - properties:
  1425. data:
  1426. $ref: '#/definitions/model.Tag'
  1427. type: object
  1428. "500":
  1429. description: Internal Server Error
  1430. schema:
  1431. $ref: '#/definitions/response.Response'
  1432. security:
  1433. - token: []
  1434. summary: 标签详情
  1435. tags:
  1436. - 标签
  1437. /admin/tag/list:
  1438. get:
  1439. consumes:
  1440. - application/json
  1441. description: 标签列表
  1442. parameters:
  1443. - description: 页码
  1444. in: query
  1445. name: page
  1446. type: integer
  1447. - description: 页大小
  1448. in: query
  1449. name: page_size
  1450. type: integer
  1451. - description: 是否是我的
  1452. in: query
  1453. name: is_my
  1454. type: integer
  1455. - description: 用户id
  1456. in: query
  1457. name: user_id
  1458. type: integer
  1459. produces:
  1460. - application/json
  1461. responses:
  1462. "200":
  1463. description: OK
  1464. schema:
  1465. allOf:
  1466. - $ref: '#/definitions/response.Response'
  1467. - properties:
  1468. data:
  1469. $ref: '#/definitions/model.TagList'
  1470. type: object
  1471. "500":
  1472. description: Internal Server Error
  1473. schema:
  1474. $ref: '#/definitions/response.Response'
  1475. security:
  1476. - token: []
  1477. summary: 标签列表
  1478. tags:
  1479. - 标签
  1480. /admin/tag/update:
  1481. post:
  1482. consumes:
  1483. - application/json
  1484. description: 标签编辑
  1485. parameters:
  1486. - description: 标签信息
  1487. in: body
  1488. name: body
  1489. required: true
  1490. schema:
  1491. $ref: '#/definitions/admin.TagForm'
  1492. produces:
  1493. - application/json
  1494. responses:
  1495. "200":
  1496. description: OK
  1497. schema:
  1498. allOf:
  1499. - $ref: '#/definitions/response.Response'
  1500. - properties:
  1501. data:
  1502. $ref: '#/definitions/model.Tag'
  1503. type: object
  1504. "500":
  1505. description: Internal Server Error
  1506. schema:
  1507. $ref: '#/definitions/response.Response'
  1508. security:
  1509. - token: []
  1510. summary: 标签编辑
  1511. tags:
  1512. - 标签
  1513. /admin/user/changeCurPwd:
  1514. post:
  1515. consumes:
  1516. - application/json
  1517. description: 修改当前用户密码
  1518. parameters:
  1519. - description: 用户信息
  1520. in: body
  1521. name: body
  1522. required: true
  1523. schema:
  1524. $ref: '#/definitions/admin.ChangeCurPasswordForm'
  1525. produces:
  1526. - application/json
  1527. responses:
  1528. "200":
  1529. description: OK
  1530. schema:
  1531. $ref: '#/definitions/response.Response'
  1532. "500":
  1533. description: Internal Server Error
  1534. schema:
  1535. $ref: '#/definitions/response.Response'
  1536. security:
  1537. - token: []
  1538. summary: 修改当前用户密码
  1539. tags:
  1540. - 用户
  1541. /admin/user/create:
  1542. post:
  1543. consumes:
  1544. - application/json
  1545. description: 创建管理员
  1546. parameters:
  1547. - description: 管理员信息
  1548. in: body
  1549. name: body
  1550. required: true
  1551. schema:
  1552. $ref: '#/definitions/admin.UserForm'
  1553. produces:
  1554. - application/json
  1555. responses:
  1556. "200":
  1557. description: OK
  1558. schema:
  1559. allOf:
  1560. - $ref: '#/definitions/response.Response'
  1561. - properties:
  1562. data:
  1563. $ref: '#/definitions/model.User'
  1564. type: object
  1565. "500":
  1566. description: Internal Server Error
  1567. schema:
  1568. $ref: '#/definitions/response.Response'
  1569. security:
  1570. - token: []
  1571. summary: 创建管理员
  1572. tags:
  1573. - 用户
  1574. /admin/user/current:
  1575. get:
  1576. consumes:
  1577. - application/json
  1578. description: 当前用户
  1579. produces:
  1580. - application/json
  1581. responses:
  1582. "200":
  1583. description: OK
  1584. schema:
  1585. allOf:
  1586. - $ref: '#/definitions/response.Response'
  1587. - properties:
  1588. data:
  1589. $ref: '#/definitions/admin.LoginPayload'
  1590. type: object
  1591. "500":
  1592. description: Internal Server Error
  1593. schema:
  1594. $ref: '#/definitions/response.Response'
  1595. security:
  1596. - token: []
  1597. summary: 当前用户
  1598. tags:
  1599. - 用户
  1600. /admin/user/delete:
  1601. post:
  1602. consumes:
  1603. - application/json
  1604. description: 管理员编删除
  1605. parameters:
  1606. - description: 用户信息
  1607. in: body
  1608. name: body
  1609. required: true
  1610. schema:
  1611. $ref: '#/definitions/admin.UserForm'
  1612. produces:
  1613. - application/json
  1614. responses:
  1615. "200":
  1616. description: OK
  1617. schema:
  1618. $ref: '#/definitions/response.Response'
  1619. "500":
  1620. description: Internal Server Error
  1621. schema:
  1622. $ref: '#/definitions/response.Response'
  1623. security:
  1624. - token: []
  1625. summary: 管理员删除
  1626. tags:
  1627. - 用户
  1628. /admin/user/detail/{id}:
  1629. get:
  1630. consumes:
  1631. - application/json
  1632. description: 管理员详情
  1633. parameters:
  1634. - description: ID
  1635. in: path
  1636. name: id
  1637. required: true
  1638. type: integer
  1639. produces:
  1640. - application/json
  1641. responses:
  1642. "200":
  1643. description: OK
  1644. schema:
  1645. allOf:
  1646. - $ref: '#/definitions/response.Response'
  1647. - properties:
  1648. data:
  1649. $ref: '#/definitions/model.User'
  1650. type: object
  1651. "500":
  1652. description: Internal Server Error
  1653. schema:
  1654. $ref: '#/definitions/response.Response'
  1655. security:
  1656. - token: []
  1657. summary: 管理员详情
  1658. tags:
  1659. - 用户
  1660. /admin/user/list:
  1661. get:
  1662. consumes:
  1663. - application/json
  1664. description: 管理员列表
  1665. parameters:
  1666. - description: 页码
  1667. in: query
  1668. name: page
  1669. type: integer
  1670. - description: 页大小
  1671. in: query
  1672. name: page_size
  1673. type: integer
  1674. - description: 账户
  1675. in: query
  1676. name: username
  1677. type: integer
  1678. produces:
  1679. - application/json
  1680. responses:
  1681. "200":
  1682. description: OK
  1683. schema:
  1684. allOf:
  1685. - $ref: '#/definitions/response.Response'
  1686. - properties:
  1687. data:
  1688. $ref: '#/definitions/model.UserList'
  1689. type: object
  1690. "500":
  1691. description: Internal Server Error
  1692. schema:
  1693. $ref: '#/definitions/response.Response'
  1694. security:
  1695. - token: []
  1696. summary: 管理员列表
  1697. tags:
  1698. - 用户
  1699. /admin/user/myOauth:
  1700. get:
  1701. consumes:
  1702. - application/json
  1703. description: 我的授权
  1704. produces:
  1705. - application/json
  1706. responses:
  1707. "200":
  1708. description: OK
  1709. schema:
  1710. allOf:
  1711. - $ref: '#/definitions/response.Response'
  1712. - properties:
  1713. data:
  1714. items:
  1715. $ref: '#/definitions/admin.UserOauthItem'
  1716. type: array
  1717. type: object
  1718. "500":
  1719. description: Internal Server Error
  1720. schema:
  1721. $ref: '#/definitions/response.Response'
  1722. security:
  1723. - token: []
  1724. summary: 我的授权
  1725. tags:
  1726. - 用户
  1727. /admin/user/update:
  1728. post:
  1729. consumes:
  1730. - application/json
  1731. description: 管理员编辑
  1732. parameters:
  1733. - description: 用户信息
  1734. in: body
  1735. name: body
  1736. required: true
  1737. schema:
  1738. $ref: '#/definitions/admin.UserForm'
  1739. produces:
  1740. - application/json
  1741. responses:
  1742. "200":
  1743. description: OK
  1744. schema:
  1745. allOf:
  1746. - $ref: '#/definitions/response.Response'
  1747. - properties:
  1748. data:
  1749. $ref: '#/definitions/model.User'
  1750. type: object
  1751. "500":
  1752. description: Internal Server Error
  1753. schema:
  1754. $ref: '#/definitions/response.Response'
  1755. security:
  1756. - token: []
  1757. summary: 管理员编辑
  1758. tags:
  1759. - 用户
  1760. /admin/user/updatePassword:
  1761. post:
  1762. consumes:
  1763. - application/json
  1764. description: 修改密码
  1765. parameters:
  1766. - description: 用户信息
  1767. in: body
  1768. name: body
  1769. required: true
  1770. schema:
  1771. $ref: '#/definitions/admin.UserPasswordForm'
  1772. produces:
  1773. - application/json
  1774. responses:
  1775. "200":
  1776. description: OK
  1777. schema:
  1778. $ref: '#/definitions/response.Response'
  1779. "500":
  1780. description: Internal Server Error
  1781. schema:
  1782. $ref: '#/definitions/response.Response'
  1783. security:
  1784. - token: []
  1785. summary: 修改密码
  1786. tags:
  1787. - 用户
  1788. securityDefinitions:
  1789. BearerAuth:
  1790. in: header
  1791. name: Authorization
  1792. type: apiKey
  1793. token:
  1794. in: header
  1795. name: api-token
  1796. type: apiKey
  1797. swagger: "2.0"