admin_swagger.yaml 40 KB

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