admin_swagger.yaml 41 KB

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