admin_swagger.yaml 40 KB

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