admin_swagger.json 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "接口",
  5. "title": "管理系统API",
  6. "contact": {},
  7. "version": "1.0"
  8. },
  9. "basePath": "/api",
  10. "paths": {
  11. "/admin/address_book/create": {
  12. "post": {
  13. "security": [
  14. {
  15. "token": []
  16. }
  17. ],
  18. "description": "创建地址簿",
  19. "consumes": [
  20. "application/json"
  21. ],
  22. "produces": [
  23. "application/json"
  24. ],
  25. "tags": [
  26. "地址簿"
  27. ],
  28. "summary": "创建地址簿",
  29. "parameters": [
  30. {
  31. "description": "地址簿信息",
  32. "name": "body",
  33. "in": "body",
  34. "required": true,
  35. "schema": {
  36. "$ref": "#/definitions/admin.AddressBookForm"
  37. }
  38. }
  39. ],
  40. "responses": {
  41. "200": {
  42. "description": "OK",
  43. "schema": {
  44. "allOf": [
  45. {
  46. "$ref": "#/definitions/response.Response"
  47. },
  48. {
  49. "type": "object",
  50. "properties": {
  51. "data": {
  52. "$ref": "#/definitions/model.AddressBook"
  53. }
  54. }
  55. }
  56. ]
  57. }
  58. },
  59. "500": {
  60. "description": "Internal Server Error",
  61. "schema": {
  62. "$ref": "#/definitions/response.Response"
  63. }
  64. }
  65. }
  66. }
  67. },
  68. "/admin/address_book/delete": {
  69. "post": {
  70. "security": [
  71. {
  72. "token": []
  73. }
  74. ],
  75. "description": "地址簿删除",
  76. "consumes": [
  77. "application/json"
  78. ],
  79. "produces": [
  80. "application/json"
  81. ],
  82. "tags": [
  83. "地址簿"
  84. ],
  85. "summary": "地址簿删除",
  86. "parameters": [
  87. {
  88. "description": "地址簿信息",
  89. "name": "body",
  90. "in": "body",
  91. "required": true,
  92. "schema": {
  93. "$ref": "#/definitions/admin.AddressBookForm"
  94. }
  95. }
  96. ],
  97. "responses": {
  98. "200": {
  99. "description": "OK",
  100. "schema": {
  101. "$ref": "#/definitions/response.Response"
  102. }
  103. },
  104. "500": {
  105. "description": "Internal Server Error",
  106. "schema": {
  107. "$ref": "#/definitions/response.Response"
  108. }
  109. }
  110. }
  111. }
  112. },
  113. "/admin/address_book/detail/{id}": {
  114. "get": {
  115. "security": [
  116. {
  117. "token": []
  118. }
  119. ],
  120. "description": "地址簿详情",
  121. "consumes": [
  122. "application/json"
  123. ],
  124. "produces": [
  125. "application/json"
  126. ],
  127. "tags": [
  128. "地址簿"
  129. ],
  130. "summary": "地址簿详情",
  131. "parameters": [
  132. {
  133. "type": "integer",
  134. "description": "ID",
  135. "name": "id",
  136. "in": "path",
  137. "required": true
  138. }
  139. ],
  140. "responses": {
  141. "200": {
  142. "description": "OK",
  143. "schema": {
  144. "allOf": [
  145. {
  146. "$ref": "#/definitions/response.Response"
  147. },
  148. {
  149. "type": "object",
  150. "properties": {
  151. "data": {
  152. "$ref": "#/definitions/model.AddressBook"
  153. }
  154. }
  155. }
  156. ]
  157. }
  158. },
  159. "500": {
  160. "description": "Internal Server Error",
  161. "schema": {
  162. "$ref": "#/definitions/response.Response"
  163. }
  164. }
  165. }
  166. }
  167. },
  168. "/admin/address_book/list": {
  169. "get": {
  170. "security": [
  171. {
  172. "token": []
  173. }
  174. ],
  175. "description": "地址簿列表",
  176. "consumes": [
  177. "application/json"
  178. ],
  179. "produces": [
  180. "application/json"
  181. ],
  182. "tags": [
  183. "地址簿"
  184. ],
  185. "summary": "地址簿列表",
  186. "parameters": [
  187. {
  188. "type": "integer",
  189. "description": "页码",
  190. "name": "page",
  191. "in": "query"
  192. },
  193. {
  194. "type": "integer",
  195. "description": "页大小",
  196. "name": "page_size",
  197. "in": "query"
  198. },
  199. {
  200. "type": "integer",
  201. "description": "用户id",
  202. "name": "user_id",
  203. "in": "query"
  204. },
  205. {
  206. "type": "integer",
  207. "description": "是否是我的",
  208. "name": "is_my",
  209. "in": "query"
  210. }
  211. ],
  212. "responses": {
  213. "200": {
  214. "description": "OK",
  215. "schema": {
  216. "allOf": [
  217. {
  218. "$ref": "#/definitions/response.Response"
  219. },
  220. {
  221. "type": "object",
  222. "properties": {
  223. "data": {
  224. "$ref": "#/definitions/model.AddressBookList"
  225. }
  226. }
  227. }
  228. ]
  229. }
  230. },
  231. "500": {
  232. "description": "Internal Server Error",
  233. "schema": {
  234. "$ref": "#/definitions/response.Response"
  235. }
  236. }
  237. }
  238. }
  239. },
  240. "/admin/address_book/update": {
  241. "post": {
  242. "security": [
  243. {
  244. "token": []
  245. }
  246. ],
  247. "description": "地址簿编辑",
  248. "consumes": [
  249. "application/json"
  250. ],
  251. "produces": [
  252. "application/json"
  253. ],
  254. "tags": [
  255. "地址簿"
  256. ],
  257. "summary": "地址簿编辑",
  258. "parameters": [
  259. {
  260. "description": "地址簿信息",
  261. "name": "body",
  262. "in": "body",
  263. "required": true,
  264. "schema": {
  265. "$ref": "#/definitions/admin.AddressBookForm"
  266. }
  267. }
  268. ],
  269. "responses": {
  270. "200": {
  271. "description": "OK",
  272. "schema": {
  273. "allOf": [
  274. {
  275. "$ref": "#/definitions/response.Response"
  276. },
  277. {
  278. "type": "object",
  279. "properties": {
  280. "data": {
  281. "$ref": "#/definitions/model.AddressBook"
  282. }
  283. }
  284. }
  285. ]
  286. }
  287. },
  288. "500": {
  289. "description": "Internal Server Error",
  290. "schema": {
  291. "$ref": "#/definitions/response.Response"
  292. }
  293. }
  294. }
  295. }
  296. },
  297. "/admin/file/oss_token": {
  298. "get": {
  299. "security": [
  300. {
  301. "token": []
  302. }
  303. ],
  304. "description": "获取ossToken",
  305. "consumes": [
  306. "application/json"
  307. ],
  308. "produces": [
  309. "application/json"
  310. ],
  311. "tags": [
  312. "文件"
  313. ],
  314. "summary": "获取ossToken",
  315. "responses": {
  316. "200": {
  317. "description": "OK",
  318. "schema": {
  319. "$ref": "#/definitions/response.Response"
  320. }
  321. },
  322. "500": {
  323. "description": "Internal Server Error",
  324. "schema": {
  325. "$ref": "#/definitions/response.Response"
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/admin/file/upload": {
  332. "post": {
  333. "security": [
  334. {
  335. "token": []
  336. }
  337. ],
  338. "description": "上传文件到本地",
  339. "consumes": [
  340. "multipart/form-data"
  341. ],
  342. "produces": [
  343. "application/json"
  344. ],
  345. "tags": [
  346. "文件"
  347. ],
  348. "summary": "上传文件到本地",
  349. "parameters": [
  350. {
  351. "type": "file",
  352. "description": "上传文件示例",
  353. "name": "file",
  354. "in": "formData",
  355. "required": true
  356. }
  357. ],
  358. "responses": {
  359. "200": {
  360. "description": "OK",
  361. "schema": {
  362. "$ref": "#/definitions/response.Response"
  363. }
  364. },
  365. "500": {
  366. "description": "Internal Server Error",
  367. "schema": {
  368. "$ref": "#/definitions/response.Response"
  369. }
  370. }
  371. }
  372. }
  373. },
  374. "/admin/group/create": {
  375. "post": {
  376. "security": [
  377. {
  378. "token": []
  379. }
  380. ],
  381. "description": "创建群组",
  382. "consumes": [
  383. "application/json"
  384. ],
  385. "produces": [
  386. "application/json"
  387. ],
  388. "tags": [
  389. "群组"
  390. ],
  391. "summary": "创建群组",
  392. "parameters": [
  393. {
  394. "description": "群组信息",
  395. "name": "body",
  396. "in": "body",
  397. "required": true,
  398. "schema": {
  399. "$ref": "#/definitions/admin.GroupForm"
  400. }
  401. }
  402. ],
  403. "responses": {
  404. "200": {
  405. "description": "OK",
  406. "schema": {
  407. "allOf": [
  408. {
  409. "$ref": "#/definitions/response.Response"
  410. },
  411. {
  412. "type": "object",
  413. "properties": {
  414. "data": {
  415. "$ref": "#/definitions/model.Group"
  416. }
  417. }
  418. }
  419. ]
  420. }
  421. },
  422. "500": {
  423. "description": "Internal Server Error",
  424. "schema": {
  425. "$ref": "#/definitions/response.Response"
  426. }
  427. }
  428. }
  429. }
  430. },
  431. "/admin/group/delete": {
  432. "post": {
  433. "security": [
  434. {
  435. "token": []
  436. }
  437. ],
  438. "description": "群组删除",
  439. "consumes": [
  440. "application/json"
  441. ],
  442. "produces": [
  443. "application/json"
  444. ],
  445. "tags": [
  446. "群组"
  447. ],
  448. "summary": "群组删除",
  449. "parameters": [
  450. {
  451. "description": "群组信息",
  452. "name": "body",
  453. "in": "body",
  454. "required": true,
  455. "schema": {
  456. "$ref": "#/definitions/admin.GroupForm"
  457. }
  458. }
  459. ],
  460. "responses": {
  461. "200": {
  462. "description": "OK",
  463. "schema": {
  464. "$ref": "#/definitions/response.Response"
  465. }
  466. },
  467. "500": {
  468. "description": "Internal Server Error",
  469. "schema": {
  470. "$ref": "#/definitions/response.Response"
  471. }
  472. }
  473. }
  474. }
  475. },
  476. "/admin/group/detail/{id}": {
  477. "get": {
  478. "security": [
  479. {
  480. "token": []
  481. }
  482. ],
  483. "description": "群组详情",
  484. "consumes": [
  485. "application/json"
  486. ],
  487. "produces": [
  488. "application/json"
  489. ],
  490. "tags": [
  491. "群组"
  492. ],
  493. "summary": "群组详情",
  494. "parameters": [
  495. {
  496. "type": "integer",
  497. "description": "ID",
  498. "name": "id",
  499. "in": "path",
  500. "required": true
  501. }
  502. ],
  503. "responses": {
  504. "200": {
  505. "description": "OK",
  506. "schema": {
  507. "allOf": [
  508. {
  509. "$ref": "#/definitions/response.Response"
  510. },
  511. {
  512. "type": "object",
  513. "properties": {
  514. "data": {
  515. "$ref": "#/definitions/model.Group"
  516. }
  517. }
  518. }
  519. ]
  520. }
  521. },
  522. "500": {
  523. "description": "Internal Server Error",
  524. "schema": {
  525. "$ref": "#/definitions/response.Response"
  526. }
  527. }
  528. }
  529. }
  530. },
  531. "/admin/group/list": {
  532. "get": {
  533. "security": [
  534. {
  535. "token": []
  536. }
  537. ],
  538. "description": "群组列表",
  539. "consumes": [
  540. "application/json"
  541. ],
  542. "produces": [
  543. "application/json"
  544. ],
  545. "tags": [
  546. "群组"
  547. ],
  548. "summary": "群组列表",
  549. "parameters": [
  550. {
  551. "type": "integer",
  552. "description": "页码",
  553. "name": "page",
  554. "in": "query"
  555. },
  556. {
  557. "type": "integer",
  558. "description": "页大小",
  559. "name": "page_size",
  560. "in": "query"
  561. }
  562. ],
  563. "responses": {
  564. "200": {
  565. "description": "OK",
  566. "schema": {
  567. "allOf": [
  568. {
  569. "$ref": "#/definitions/response.Response"
  570. },
  571. {
  572. "type": "object",
  573. "properties": {
  574. "data": {
  575. "$ref": "#/definitions/model.GroupList"
  576. }
  577. }
  578. }
  579. ]
  580. }
  581. },
  582. "500": {
  583. "description": "Internal Server Error",
  584. "schema": {
  585. "$ref": "#/definitions/response.Response"
  586. }
  587. }
  588. }
  589. }
  590. },
  591. "/admin/group/update": {
  592. "post": {
  593. "security": [
  594. {
  595. "token": []
  596. }
  597. ],
  598. "description": "群组编辑",
  599. "consumes": [
  600. "application/json"
  601. ],
  602. "produces": [
  603. "application/json"
  604. ],
  605. "tags": [
  606. "群组"
  607. ],
  608. "summary": "群组编辑",
  609. "parameters": [
  610. {
  611. "description": "群组信息",
  612. "name": "body",
  613. "in": "body",
  614. "required": true,
  615. "schema": {
  616. "$ref": "#/definitions/admin.GroupForm"
  617. }
  618. }
  619. ],
  620. "responses": {
  621. "200": {
  622. "description": "OK",
  623. "schema": {
  624. "allOf": [
  625. {
  626. "$ref": "#/definitions/response.Response"
  627. },
  628. {
  629. "type": "object",
  630. "properties": {
  631. "data": {
  632. "$ref": "#/definitions/model.Group"
  633. }
  634. }
  635. }
  636. ]
  637. }
  638. },
  639. "500": {
  640. "description": "Internal Server Error",
  641. "schema": {
  642. "$ref": "#/definitions/response.Response"
  643. }
  644. }
  645. }
  646. }
  647. },
  648. "/admin/login": {
  649. "post": {
  650. "security": [
  651. {
  652. "token": []
  653. }
  654. ],
  655. "description": "登录",
  656. "consumes": [
  657. "application/json"
  658. ],
  659. "produces": [
  660. "application/json"
  661. ],
  662. "tags": [
  663. "登录"
  664. ],
  665. "summary": "登录",
  666. "parameters": [
  667. {
  668. "description": "登录信息",
  669. "name": "body",
  670. "in": "body",
  671. "required": true,
  672. "schema": {
  673. "$ref": "#/definitions/Gwen_http_request_admin.Login"
  674. }
  675. }
  676. ],
  677. "responses": {
  678. "200": {
  679. "description": "OK",
  680. "schema": {
  681. "allOf": [
  682. {
  683. "$ref": "#/definitions/response.Response"
  684. },
  685. {
  686. "type": "object",
  687. "properties": {
  688. "data": {
  689. "$ref": "#/definitions/admin.LoginPayload"
  690. }
  691. }
  692. }
  693. ]
  694. }
  695. },
  696. "500": {
  697. "description": "Internal Server Error",
  698. "schema": {
  699. "$ref": "#/definitions/response.Response"
  700. }
  701. }
  702. }
  703. }
  704. },
  705. "/admin/logout": {
  706. "post": {
  707. "description": "登出",
  708. "consumes": [
  709. "application/json"
  710. ],
  711. "produces": [
  712. "application/json"
  713. ],
  714. "tags": [
  715. "登录"
  716. ],
  717. "summary": "登出",
  718. "responses": {
  719. "200": {
  720. "description": "OK",
  721. "schema": {
  722. "$ref": "#/definitions/response.Response"
  723. }
  724. },
  725. "500": {
  726. "description": "Internal Server Error",
  727. "schema": {
  728. "$ref": "#/definitions/response.Response"
  729. }
  730. }
  731. }
  732. }
  733. },
  734. "/admin/peer/create": {
  735. "post": {
  736. "security": [
  737. {
  738. "token": []
  739. }
  740. ],
  741. "description": "创建机器",
  742. "consumes": [
  743. "application/json"
  744. ],
  745. "produces": [
  746. "application/json"
  747. ],
  748. "tags": [
  749. "机器"
  750. ],
  751. "summary": "创建机器",
  752. "parameters": [
  753. {
  754. "description": "机器信息",
  755. "name": "body",
  756. "in": "body",
  757. "required": true,
  758. "schema": {
  759. "$ref": "#/definitions/admin.PeerForm"
  760. }
  761. }
  762. ],
  763. "responses": {
  764. "200": {
  765. "description": "OK",
  766. "schema": {
  767. "allOf": [
  768. {
  769. "$ref": "#/definitions/response.Response"
  770. },
  771. {
  772. "type": "object",
  773. "properties": {
  774. "data": {
  775. "$ref": "#/definitions/model.Peer"
  776. }
  777. }
  778. }
  779. ]
  780. }
  781. },
  782. "500": {
  783. "description": "Internal Server Error",
  784. "schema": {
  785. "$ref": "#/definitions/response.Response"
  786. }
  787. }
  788. }
  789. }
  790. },
  791. "/admin/peer/delete": {
  792. "post": {
  793. "security": [
  794. {
  795. "token": []
  796. }
  797. ],
  798. "description": "机器删除",
  799. "consumes": [
  800. "application/json"
  801. ],
  802. "produces": [
  803. "application/json"
  804. ],
  805. "tags": [
  806. "机器"
  807. ],
  808. "summary": "机器删除",
  809. "parameters": [
  810. {
  811. "description": "机器信息",
  812. "name": "body",
  813. "in": "body",
  814. "required": true,
  815. "schema": {
  816. "$ref": "#/definitions/admin.PeerForm"
  817. }
  818. }
  819. ],
  820. "responses": {
  821. "200": {
  822. "description": "OK",
  823. "schema": {
  824. "$ref": "#/definitions/response.Response"
  825. }
  826. },
  827. "500": {
  828. "description": "Internal Server Error",
  829. "schema": {
  830. "$ref": "#/definitions/response.Response"
  831. }
  832. }
  833. }
  834. }
  835. },
  836. "/admin/peer/detail/{id}": {
  837. "get": {
  838. "security": [
  839. {
  840. "token": []
  841. }
  842. ],
  843. "description": "机器详情",
  844. "consumes": [
  845. "application/json"
  846. ],
  847. "produces": [
  848. "application/json"
  849. ],
  850. "tags": [
  851. "机器"
  852. ],
  853. "summary": "机器详情",
  854. "parameters": [
  855. {
  856. "type": "integer",
  857. "description": "ID",
  858. "name": "id",
  859. "in": "path",
  860. "required": true
  861. }
  862. ],
  863. "responses": {
  864. "200": {
  865. "description": "OK",
  866. "schema": {
  867. "allOf": [
  868. {
  869. "$ref": "#/definitions/response.Response"
  870. },
  871. {
  872. "type": "object",
  873. "properties": {
  874. "data": {
  875. "$ref": "#/definitions/model.Peer"
  876. }
  877. }
  878. }
  879. ]
  880. }
  881. },
  882. "500": {
  883. "description": "Internal Server Error",
  884. "schema": {
  885. "$ref": "#/definitions/response.Response"
  886. }
  887. }
  888. }
  889. }
  890. },
  891. "/admin/peer/list": {
  892. "get": {
  893. "security": [
  894. {
  895. "token": []
  896. }
  897. ],
  898. "description": "机器列表",
  899. "consumes": [
  900. "application/json"
  901. ],
  902. "produces": [
  903. "application/json"
  904. ],
  905. "tags": [
  906. "机器"
  907. ],
  908. "summary": "机器列表",
  909. "parameters": [
  910. {
  911. "type": "integer",
  912. "description": "页码",
  913. "name": "page",
  914. "in": "query"
  915. },
  916. {
  917. "type": "integer",
  918. "description": "页大小",
  919. "name": "page_size",
  920. "in": "query"
  921. }
  922. ],
  923. "responses": {
  924. "200": {
  925. "description": "OK",
  926. "schema": {
  927. "allOf": [
  928. {
  929. "$ref": "#/definitions/response.Response"
  930. },
  931. {
  932. "type": "object",
  933. "properties": {
  934. "data": {
  935. "$ref": "#/definitions/model.PeerList"
  936. }
  937. }
  938. }
  939. ]
  940. }
  941. },
  942. "500": {
  943. "description": "Internal Server Error",
  944. "schema": {
  945. "$ref": "#/definitions/response.Response"
  946. }
  947. }
  948. }
  949. }
  950. },
  951. "/admin/peer/update": {
  952. "post": {
  953. "security": [
  954. {
  955. "token": []
  956. }
  957. ],
  958. "description": "机器编辑",
  959. "consumes": [
  960. "application/json"
  961. ],
  962. "produces": [
  963. "application/json"
  964. ],
  965. "tags": [
  966. "机器"
  967. ],
  968. "summary": "机器编辑",
  969. "parameters": [
  970. {
  971. "description": "机器信息",
  972. "name": "body",
  973. "in": "body",
  974. "required": true,
  975. "schema": {
  976. "$ref": "#/definitions/admin.PeerForm"
  977. }
  978. }
  979. ],
  980. "responses": {
  981. "200": {
  982. "description": "OK",
  983. "schema": {
  984. "allOf": [
  985. {
  986. "$ref": "#/definitions/response.Response"
  987. },
  988. {
  989. "type": "object",
  990. "properties": {
  991. "data": {
  992. "$ref": "#/definitions/model.Peer"
  993. }
  994. }
  995. }
  996. ]
  997. }
  998. },
  999. "500": {
  1000. "description": "Internal Server Error",
  1001. "schema": {
  1002. "$ref": "#/definitions/response.Response"
  1003. }
  1004. }
  1005. }
  1006. }
  1007. },
  1008. "/admin/server-config": {
  1009. "get": {
  1010. "security": [
  1011. {
  1012. "token": []
  1013. }
  1014. ],
  1015. "description": "服务配置,给webclient提供api-server",
  1016. "consumes": [
  1017. "application/json"
  1018. ],
  1019. "produces": [
  1020. "application/json"
  1021. ],
  1022. "tags": [
  1023. "ADMIN"
  1024. ],
  1025. "summary": "服务配置",
  1026. "responses": {
  1027. "200": {
  1028. "description": "OK",
  1029. "schema": {
  1030. "$ref": "#/definitions/response.Response"
  1031. }
  1032. },
  1033. "500": {
  1034. "description": "Internal Server Error",
  1035. "schema": {
  1036. "$ref": "#/definitions/response.Response"
  1037. }
  1038. }
  1039. }
  1040. }
  1041. },
  1042. "/admin/tag/create": {
  1043. "post": {
  1044. "security": [
  1045. {
  1046. "token": []
  1047. }
  1048. ],
  1049. "description": "创建标签",
  1050. "consumes": [
  1051. "application/json"
  1052. ],
  1053. "produces": [
  1054. "application/json"
  1055. ],
  1056. "tags": [
  1057. "标签"
  1058. ],
  1059. "summary": "创建标签",
  1060. "parameters": [
  1061. {
  1062. "description": "标签信息",
  1063. "name": "body",
  1064. "in": "body",
  1065. "required": true,
  1066. "schema": {
  1067. "$ref": "#/definitions/admin.TagForm"
  1068. }
  1069. }
  1070. ],
  1071. "responses": {
  1072. "200": {
  1073. "description": "OK",
  1074. "schema": {
  1075. "allOf": [
  1076. {
  1077. "$ref": "#/definitions/response.Response"
  1078. },
  1079. {
  1080. "type": "object",
  1081. "properties": {
  1082. "data": {
  1083. "$ref": "#/definitions/model.Tag"
  1084. }
  1085. }
  1086. }
  1087. ]
  1088. }
  1089. },
  1090. "500": {
  1091. "description": "Internal Server Error",
  1092. "schema": {
  1093. "$ref": "#/definitions/response.Response"
  1094. }
  1095. }
  1096. }
  1097. }
  1098. },
  1099. "/admin/tag/delete": {
  1100. "post": {
  1101. "security": [
  1102. {
  1103. "token": []
  1104. }
  1105. ],
  1106. "description": "标签删除",
  1107. "consumes": [
  1108. "application/json"
  1109. ],
  1110. "produces": [
  1111. "application/json"
  1112. ],
  1113. "tags": [
  1114. "标签"
  1115. ],
  1116. "summary": "标签删除",
  1117. "parameters": [
  1118. {
  1119. "description": "标签信息",
  1120. "name": "body",
  1121. "in": "body",
  1122. "required": true,
  1123. "schema": {
  1124. "$ref": "#/definitions/admin.TagForm"
  1125. }
  1126. }
  1127. ],
  1128. "responses": {
  1129. "200": {
  1130. "description": "OK",
  1131. "schema": {
  1132. "$ref": "#/definitions/response.Response"
  1133. }
  1134. },
  1135. "500": {
  1136. "description": "Internal Server Error",
  1137. "schema": {
  1138. "$ref": "#/definitions/response.Response"
  1139. }
  1140. }
  1141. }
  1142. }
  1143. },
  1144. "/admin/tag/detail/{id}": {
  1145. "get": {
  1146. "security": [
  1147. {
  1148. "token": []
  1149. }
  1150. ],
  1151. "description": "标签详情",
  1152. "consumes": [
  1153. "application/json"
  1154. ],
  1155. "produces": [
  1156. "application/json"
  1157. ],
  1158. "tags": [
  1159. "标签"
  1160. ],
  1161. "summary": "标签详情",
  1162. "parameters": [
  1163. {
  1164. "type": "integer",
  1165. "description": "ID",
  1166. "name": "id",
  1167. "in": "path",
  1168. "required": true
  1169. }
  1170. ],
  1171. "responses": {
  1172. "200": {
  1173. "description": "OK",
  1174. "schema": {
  1175. "allOf": [
  1176. {
  1177. "$ref": "#/definitions/response.Response"
  1178. },
  1179. {
  1180. "type": "object",
  1181. "properties": {
  1182. "data": {
  1183. "$ref": "#/definitions/model.Tag"
  1184. }
  1185. }
  1186. }
  1187. ]
  1188. }
  1189. },
  1190. "500": {
  1191. "description": "Internal Server Error",
  1192. "schema": {
  1193. "$ref": "#/definitions/response.Response"
  1194. }
  1195. }
  1196. }
  1197. }
  1198. },
  1199. "/admin/tag/list": {
  1200. "get": {
  1201. "security": [
  1202. {
  1203. "token": []
  1204. }
  1205. ],
  1206. "description": "标签列表",
  1207. "consumes": [
  1208. "application/json"
  1209. ],
  1210. "produces": [
  1211. "application/json"
  1212. ],
  1213. "tags": [
  1214. "标签"
  1215. ],
  1216. "summary": "标签列表",
  1217. "parameters": [
  1218. {
  1219. "type": "integer",
  1220. "description": "页码",
  1221. "name": "page",
  1222. "in": "query"
  1223. },
  1224. {
  1225. "type": "integer",
  1226. "description": "页大小",
  1227. "name": "page_size",
  1228. "in": "query"
  1229. },
  1230. {
  1231. "type": "integer",
  1232. "description": "是否是我的",
  1233. "name": "is_my",
  1234. "in": "query"
  1235. },
  1236. {
  1237. "type": "integer",
  1238. "description": "用户id",
  1239. "name": "user_id",
  1240. "in": "query"
  1241. }
  1242. ],
  1243. "responses": {
  1244. "200": {
  1245. "description": "OK",
  1246. "schema": {
  1247. "allOf": [
  1248. {
  1249. "$ref": "#/definitions/response.Response"
  1250. },
  1251. {
  1252. "type": "object",
  1253. "properties": {
  1254. "data": {
  1255. "$ref": "#/definitions/model.TagList"
  1256. }
  1257. }
  1258. }
  1259. ]
  1260. }
  1261. },
  1262. "500": {
  1263. "description": "Internal Server Error",
  1264. "schema": {
  1265. "$ref": "#/definitions/response.Response"
  1266. }
  1267. }
  1268. }
  1269. }
  1270. },
  1271. "/admin/tag/update": {
  1272. "post": {
  1273. "security": [
  1274. {
  1275. "token": []
  1276. }
  1277. ],
  1278. "description": "标签编辑",
  1279. "consumes": [
  1280. "application/json"
  1281. ],
  1282. "produces": [
  1283. "application/json"
  1284. ],
  1285. "tags": [
  1286. "标签"
  1287. ],
  1288. "summary": "标签编辑",
  1289. "parameters": [
  1290. {
  1291. "description": "标签信息",
  1292. "name": "body",
  1293. "in": "body",
  1294. "required": true,
  1295. "schema": {
  1296. "$ref": "#/definitions/admin.TagForm"
  1297. }
  1298. }
  1299. ],
  1300. "responses": {
  1301. "200": {
  1302. "description": "OK",
  1303. "schema": {
  1304. "allOf": [
  1305. {
  1306. "$ref": "#/definitions/response.Response"
  1307. },
  1308. {
  1309. "type": "object",
  1310. "properties": {
  1311. "data": {
  1312. "$ref": "#/definitions/model.Tag"
  1313. }
  1314. }
  1315. }
  1316. ]
  1317. }
  1318. },
  1319. "500": {
  1320. "description": "Internal Server Error",
  1321. "schema": {
  1322. "$ref": "#/definitions/response.Response"
  1323. }
  1324. }
  1325. }
  1326. }
  1327. },
  1328. "/admin/user/changeCurPwd": {
  1329. "post": {
  1330. "security": [
  1331. {
  1332. "token": []
  1333. }
  1334. ],
  1335. "description": "修改当前用户密码",
  1336. "consumes": [
  1337. "application/json"
  1338. ],
  1339. "produces": [
  1340. "application/json"
  1341. ],
  1342. "tags": [
  1343. "用户"
  1344. ],
  1345. "summary": "修改当前用户密码",
  1346. "parameters": [
  1347. {
  1348. "description": "用户信息",
  1349. "name": "body",
  1350. "in": "body",
  1351. "required": true,
  1352. "schema": {
  1353. "$ref": "#/definitions/admin.ChangeCurPasswordForm"
  1354. }
  1355. }
  1356. ],
  1357. "responses": {
  1358. "200": {
  1359. "description": "OK",
  1360. "schema": {
  1361. "$ref": "#/definitions/response.Response"
  1362. }
  1363. },
  1364. "500": {
  1365. "description": "Internal Server Error",
  1366. "schema": {
  1367. "$ref": "#/definitions/response.Response"
  1368. }
  1369. }
  1370. }
  1371. }
  1372. },
  1373. "/admin/user/create": {
  1374. "post": {
  1375. "security": [
  1376. {
  1377. "token": []
  1378. }
  1379. ],
  1380. "description": "创建管理员",
  1381. "consumes": [
  1382. "application/json"
  1383. ],
  1384. "produces": [
  1385. "application/json"
  1386. ],
  1387. "tags": [
  1388. "用户"
  1389. ],
  1390. "summary": "创建管理员",
  1391. "parameters": [
  1392. {
  1393. "description": "管理员信息",
  1394. "name": "body",
  1395. "in": "body",
  1396. "required": true,
  1397. "schema": {
  1398. "$ref": "#/definitions/admin.UserForm"
  1399. }
  1400. }
  1401. ],
  1402. "responses": {
  1403. "200": {
  1404. "description": "OK",
  1405. "schema": {
  1406. "allOf": [
  1407. {
  1408. "$ref": "#/definitions/response.Response"
  1409. },
  1410. {
  1411. "type": "object",
  1412. "properties": {
  1413. "data": {
  1414. "$ref": "#/definitions/model.User"
  1415. }
  1416. }
  1417. }
  1418. ]
  1419. }
  1420. },
  1421. "500": {
  1422. "description": "Internal Server Error",
  1423. "schema": {
  1424. "$ref": "#/definitions/response.Response"
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "/admin/user/current": {
  1431. "get": {
  1432. "security": [
  1433. {
  1434. "token": []
  1435. }
  1436. ],
  1437. "description": "当前用户",
  1438. "consumes": [
  1439. "application/json"
  1440. ],
  1441. "produces": [
  1442. "application/json"
  1443. ],
  1444. "tags": [
  1445. "用户"
  1446. ],
  1447. "summary": "当前用户",
  1448. "responses": {
  1449. "200": {
  1450. "description": "OK",
  1451. "schema": {
  1452. "allOf": [
  1453. {
  1454. "$ref": "#/definitions/response.Response"
  1455. },
  1456. {
  1457. "type": "object",
  1458. "properties": {
  1459. "data": {
  1460. "$ref": "#/definitions/admin.LoginPayload"
  1461. }
  1462. }
  1463. }
  1464. ]
  1465. }
  1466. },
  1467. "500": {
  1468. "description": "Internal Server Error",
  1469. "schema": {
  1470. "$ref": "#/definitions/response.Response"
  1471. }
  1472. }
  1473. }
  1474. }
  1475. },
  1476. "/admin/user/delete": {
  1477. "post": {
  1478. "security": [
  1479. {
  1480. "token": []
  1481. }
  1482. ],
  1483. "description": "管理员编删除",
  1484. "consumes": [
  1485. "application/json"
  1486. ],
  1487. "produces": [
  1488. "application/json"
  1489. ],
  1490. "tags": [
  1491. "用户"
  1492. ],
  1493. "summary": "管理员删除",
  1494. "parameters": [
  1495. {
  1496. "description": "用户信息",
  1497. "name": "body",
  1498. "in": "body",
  1499. "required": true,
  1500. "schema": {
  1501. "$ref": "#/definitions/admin.UserForm"
  1502. }
  1503. }
  1504. ],
  1505. "responses": {
  1506. "200": {
  1507. "description": "OK",
  1508. "schema": {
  1509. "$ref": "#/definitions/response.Response"
  1510. }
  1511. },
  1512. "500": {
  1513. "description": "Internal Server Error",
  1514. "schema": {
  1515. "$ref": "#/definitions/response.Response"
  1516. }
  1517. }
  1518. }
  1519. }
  1520. },
  1521. "/admin/user/detail/{id}": {
  1522. "get": {
  1523. "security": [
  1524. {
  1525. "token": []
  1526. }
  1527. ],
  1528. "description": "管理员详情",
  1529. "consumes": [
  1530. "application/json"
  1531. ],
  1532. "produces": [
  1533. "application/json"
  1534. ],
  1535. "tags": [
  1536. "用户"
  1537. ],
  1538. "summary": "管理员详情",
  1539. "parameters": [
  1540. {
  1541. "type": "integer",
  1542. "description": "ID",
  1543. "name": "id",
  1544. "in": "path",
  1545. "required": true
  1546. }
  1547. ],
  1548. "responses": {
  1549. "200": {
  1550. "description": "OK",
  1551. "schema": {
  1552. "allOf": [
  1553. {
  1554. "$ref": "#/definitions/response.Response"
  1555. },
  1556. {
  1557. "type": "object",
  1558. "properties": {
  1559. "data": {
  1560. "$ref": "#/definitions/model.User"
  1561. }
  1562. }
  1563. }
  1564. ]
  1565. }
  1566. },
  1567. "500": {
  1568. "description": "Internal Server Error",
  1569. "schema": {
  1570. "$ref": "#/definitions/response.Response"
  1571. }
  1572. }
  1573. }
  1574. }
  1575. },
  1576. "/admin/user/list": {
  1577. "get": {
  1578. "security": [
  1579. {
  1580. "token": []
  1581. }
  1582. ],
  1583. "description": "管理员列表",
  1584. "consumes": [
  1585. "application/json"
  1586. ],
  1587. "produces": [
  1588. "application/json"
  1589. ],
  1590. "tags": [
  1591. "用户"
  1592. ],
  1593. "summary": "管理员列表",
  1594. "parameters": [
  1595. {
  1596. "type": "integer",
  1597. "description": "页码",
  1598. "name": "page",
  1599. "in": "query"
  1600. },
  1601. {
  1602. "type": "integer",
  1603. "description": "页大小",
  1604. "name": "page_size",
  1605. "in": "query"
  1606. },
  1607. {
  1608. "type": "integer",
  1609. "description": "账户",
  1610. "name": "username",
  1611. "in": "query"
  1612. }
  1613. ],
  1614. "responses": {
  1615. "200": {
  1616. "description": "OK",
  1617. "schema": {
  1618. "allOf": [
  1619. {
  1620. "$ref": "#/definitions/response.Response"
  1621. },
  1622. {
  1623. "type": "object",
  1624. "properties": {
  1625. "data": {
  1626. "$ref": "#/definitions/model.UserList"
  1627. }
  1628. }
  1629. }
  1630. ]
  1631. }
  1632. },
  1633. "500": {
  1634. "description": "Internal Server Error",
  1635. "schema": {
  1636. "$ref": "#/definitions/response.Response"
  1637. }
  1638. }
  1639. }
  1640. }
  1641. },
  1642. "/admin/user/update": {
  1643. "post": {
  1644. "security": [
  1645. {
  1646. "token": []
  1647. }
  1648. ],
  1649. "description": "管理员编辑",
  1650. "consumes": [
  1651. "application/json"
  1652. ],
  1653. "produces": [
  1654. "application/json"
  1655. ],
  1656. "tags": [
  1657. "用户"
  1658. ],
  1659. "summary": "管理员编辑",
  1660. "parameters": [
  1661. {
  1662. "description": "用户信息",
  1663. "name": "body",
  1664. "in": "body",
  1665. "required": true,
  1666. "schema": {
  1667. "$ref": "#/definitions/admin.UserForm"
  1668. }
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "description": "OK",
  1674. "schema": {
  1675. "allOf": [
  1676. {
  1677. "$ref": "#/definitions/response.Response"
  1678. },
  1679. {
  1680. "type": "object",
  1681. "properties": {
  1682. "data": {
  1683. "$ref": "#/definitions/model.User"
  1684. }
  1685. }
  1686. }
  1687. ]
  1688. }
  1689. },
  1690. "500": {
  1691. "description": "Internal Server Error",
  1692. "schema": {
  1693. "$ref": "#/definitions/response.Response"
  1694. }
  1695. }
  1696. }
  1697. }
  1698. },
  1699. "/admin/user/updatePassword": {
  1700. "post": {
  1701. "security": [
  1702. {
  1703. "token": []
  1704. }
  1705. ],
  1706. "description": "修改密码",
  1707. "consumes": [
  1708. "application/json"
  1709. ],
  1710. "produces": [
  1711. "application/json"
  1712. ],
  1713. "tags": [
  1714. "用户"
  1715. ],
  1716. "summary": "修改密码",
  1717. "parameters": [
  1718. {
  1719. "description": "用户信息",
  1720. "name": "body",
  1721. "in": "body",
  1722. "required": true,
  1723. "schema": {
  1724. "$ref": "#/definitions/admin.UserPasswordForm"
  1725. }
  1726. }
  1727. ],
  1728. "responses": {
  1729. "200": {
  1730. "description": "OK",
  1731. "schema": {
  1732. "$ref": "#/definitions/response.Response"
  1733. }
  1734. },
  1735. "500": {
  1736. "description": "Internal Server Error",
  1737. "schema": {
  1738. "$ref": "#/definitions/response.Response"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. }
  1744. },
  1745. "definitions": {
  1746. "Gwen_http_request_admin.Login": {
  1747. "type": "object",
  1748. "required": [
  1749. "password",
  1750. "username"
  1751. ],
  1752. "properties": {
  1753. "password": {
  1754. "type": "string"
  1755. },
  1756. "username": {
  1757. "type": "string"
  1758. }
  1759. }
  1760. },
  1761. "admin.AddressBookForm": {
  1762. "type": "object",
  1763. "required": [
  1764. "id"
  1765. ],
  1766. "properties": {
  1767. "alias": {
  1768. "type": "string"
  1769. },
  1770. "force_always_relay": {
  1771. "type": "boolean"
  1772. },
  1773. "hash": {
  1774. "type": "string"
  1775. },
  1776. "hostname": {
  1777. "type": "string"
  1778. },
  1779. "id": {
  1780. "type": "string"
  1781. },
  1782. "login_name": {
  1783. "type": "string"
  1784. },
  1785. "online": {
  1786. "type": "boolean"
  1787. },
  1788. "password": {
  1789. "type": "string"
  1790. },
  1791. "platform": {
  1792. "type": "string"
  1793. },
  1794. "rdp_port": {
  1795. "type": "string"
  1796. },
  1797. "rdp_username": {
  1798. "type": "string"
  1799. },
  1800. "row_id": {
  1801. "type": "integer"
  1802. },
  1803. "same_server": {
  1804. "type": "boolean"
  1805. },
  1806. "tags": {
  1807. "type": "array",
  1808. "items": {
  1809. "type": "string"
  1810. }
  1811. },
  1812. "user_id": {
  1813. "type": "integer"
  1814. },
  1815. "username": {
  1816. "type": "string"
  1817. }
  1818. }
  1819. },
  1820. "admin.ChangeCurPasswordForm": {
  1821. "type": "object",
  1822. "required": [
  1823. "new_password",
  1824. "old_password"
  1825. ],
  1826. "properties": {
  1827. "new_password": {
  1828. "type": "string",
  1829. "maxLength": 20,
  1830. "minLength": 4
  1831. },
  1832. "old_password": {
  1833. "type": "string",
  1834. "maxLength": 20,
  1835. "minLength": 4
  1836. }
  1837. }
  1838. },
  1839. "admin.GroupForm": {
  1840. "type": "object",
  1841. "required": [
  1842. "name"
  1843. ],
  1844. "properties": {
  1845. "id": {
  1846. "type": "integer"
  1847. },
  1848. "name": {
  1849. "type": "string"
  1850. }
  1851. }
  1852. },
  1853. "admin.LoginPayload": {
  1854. "type": "object",
  1855. "properties": {
  1856. "nickname": {
  1857. "type": "string"
  1858. },
  1859. "route_names": {
  1860. "type": "array",
  1861. "items": {
  1862. "type": "string"
  1863. }
  1864. },
  1865. "token": {
  1866. "type": "string"
  1867. },
  1868. "username": {
  1869. "type": "string"
  1870. }
  1871. }
  1872. },
  1873. "admin.PeerForm": {
  1874. "type": "object",
  1875. "properties": {
  1876. "cpu": {
  1877. "type": "string"
  1878. },
  1879. "hostname": {
  1880. "type": "string"
  1881. },
  1882. "id": {
  1883. "type": "string"
  1884. },
  1885. "memory": {
  1886. "type": "string"
  1887. },
  1888. "os": {
  1889. "type": "string"
  1890. },
  1891. "row_id": {
  1892. "type": "integer"
  1893. },
  1894. "username": {
  1895. "type": "string"
  1896. },
  1897. "uuid": {
  1898. "type": "string"
  1899. },
  1900. "version": {
  1901. "type": "string"
  1902. }
  1903. }
  1904. },
  1905. "admin.TagForm": {
  1906. "type": "object",
  1907. "required": [
  1908. "color",
  1909. "name",
  1910. "user_id"
  1911. ],
  1912. "properties": {
  1913. "color": {
  1914. "type": "integer"
  1915. },
  1916. "id": {
  1917. "type": "integer"
  1918. },
  1919. "name": {
  1920. "type": "string"
  1921. },
  1922. "user_id": {
  1923. "type": "integer"
  1924. }
  1925. }
  1926. },
  1927. "admin.UserForm": {
  1928. "type": "object",
  1929. "required": [
  1930. "group_id",
  1931. "nickname",
  1932. "status",
  1933. "username"
  1934. ],
  1935. "properties": {
  1936. "avatar": {
  1937. "type": "string"
  1938. },
  1939. "group_id": {
  1940. "type": "integer"
  1941. },
  1942. "id": {
  1943. "type": "integer"
  1944. },
  1945. "is_admin": {
  1946. "type": "boolean"
  1947. },
  1948. "nickname": {
  1949. "description": "Password string `json:\"password\" validate:\"required,gte=4,lte=20\"`",
  1950. "type": "string"
  1951. },
  1952. "status": {
  1953. "minimum": 0,
  1954. "allOf": [
  1955. {
  1956. "$ref": "#/definitions/model.StatusCode"
  1957. }
  1958. ]
  1959. },
  1960. "username": {
  1961. "type": "string",
  1962. "maxLength": 10,
  1963. "minLength": 4
  1964. }
  1965. }
  1966. },
  1967. "admin.UserPasswordForm": {
  1968. "type": "object",
  1969. "required": [
  1970. "id",
  1971. "password"
  1972. ],
  1973. "properties": {
  1974. "id": {
  1975. "type": "integer"
  1976. },
  1977. "password": {
  1978. "type": "string",
  1979. "maxLength": 20,
  1980. "minLength": 4
  1981. }
  1982. }
  1983. },
  1984. "model.AddressBook": {
  1985. "type": "object",
  1986. "properties": {
  1987. "alias": {
  1988. "type": "string"
  1989. },
  1990. "created_at": {
  1991. "type": "string"
  1992. },
  1993. "forceAlwaysRelay": {
  1994. "type": "boolean"
  1995. },
  1996. "hash": {
  1997. "type": "string"
  1998. },
  1999. "hostname": {
  2000. "type": "string"
  2001. },
  2002. "id": {
  2003. "type": "string"
  2004. },
  2005. "loginName": {
  2006. "type": "string"
  2007. },
  2008. "online": {
  2009. "type": "boolean"
  2010. },
  2011. "password": {
  2012. "type": "string"
  2013. },
  2014. "platform": {
  2015. "type": "string"
  2016. },
  2017. "rdpPort": {
  2018. "type": "string"
  2019. },
  2020. "rdpUsername": {
  2021. "type": "string"
  2022. },
  2023. "row_id": {
  2024. "type": "integer"
  2025. },
  2026. "sameServer": {
  2027. "type": "boolean"
  2028. },
  2029. "tags": {
  2030. "type": "array",
  2031. "items": {
  2032. "type": "string"
  2033. }
  2034. },
  2035. "updated_at": {
  2036. "type": "string"
  2037. },
  2038. "user_id": {
  2039. "type": "integer"
  2040. },
  2041. "username": {
  2042. "type": "string"
  2043. }
  2044. }
  2045. },
  2046. "model.AddressBookList": {
  2047. "type": "object",
  2048. "properties": {
  2049. "list": {
  2050. "type": "array",
  2051. "items": {
  2052. "$ref": "#/definitions/model.AddressBook"
  2053. }
  2054. },
  2055. "page": {
  2056. "type": "integer"
  2057. },
  2058. "page_size": {
  2059. "type": "integer"
  2060. },
  2061. "total": {
  2062. "type": "integer"
  2063. }
  2064. }
  2065. },
  2066. "model.Group": {
  2067. "type": "object",
  2068. "properties": {
  2069. "created_at": {
  2070. "type": "string"
  2071. },
  2072. "id": {
  2073. "type": "integer"
  2074. },
  2075. "name": {
  2076. "type": "string"
  2077. },
  2078. "type": {
  2079. "type": "integer"
  2080. },
  2081. "updated_at": {
  2082. "type": "string"
  2083. }
  2084. }
  2085. },
  2086. "model.GroupList": {
  2087. "type": "object",
  2088. "properties": {
  2089. "list": {
  2090. "type": "array",
  2091. "items": {
  2092. "$ref": "#/definitions/model.Group"
  2093. }
  2094. },
  2095. "page": {
  2096. "type": "integer"
  2097. },
  2098. "page_size": {
  2099. "type": "integer"
  2100. },
  2101. "total": {
  2102. "type": "integer"
  2103. }
  2104. }
  2105. },
  2106. "model.Peer": {
  2107. "type": "object",
  2108. "properties": {
  2109. "cpu": {
  2110. "type": "string"
  2111. },
  2112. "created_at": {
  2113. "type": "string"
  2114. },
  2115. "hostname": {
  2116. "type": "string"
  2117. },
  2118. "id": {
  2119. "type": "string"
  2120. },
  2121. "memory": {
  2122. "type": "string"
  2123. },
  2124. "os": {
  2125. "type": "string"
  2126. },
  2127. "row_id": {
  2128. "type": "integer"
  2129. },
  2130. "updated_at": {
  2131. "type": "string"
  2132. },
  2133. "user": {
  2134. "$ref": "#/definitions/model.User"
  2135. },
  2136. "user_id": {
  2137. "type": "integer"
  2138. },
  2139. "username": {
  2140. "type": "string"
  2141. },
  2142. "uuid": {
  2143. "type": "string"
  2144. },
  2145. "version": {
  2146. "type": "string"
  2147. }
  2148. }
  2149. },
  2150. "model.PeerList": {
  2151. "type": "object",
  2152. "properties": {
  2153. "list": {
  2154. "type": "array",
  2155. "items": {
  2156. "$ref": "#/definitions/model.Peer"
  2157. }
  2158. },
  2159. "page": {
  2160. "type": "integer"
  2161. },
  2162. "page_size": {
  2163. "type": "integer"
  2164. },
  2165. "total": {
  2166. "type": "integer"
  2167. }
  2168. }
  2169. },
  2170. "model.StatusCode": {
  2171. "type": "integer",
  2172. "enum": [
  2173. 1,
  2174. 2
  2175. ],
  2176. "x-enum-comments": {
  2177. "COMMON_STATUS_DISABLED": "通用状态 禁用",
  2178. "COMMON_STATUS_ENABLE": "通用状态 启用"
  2179. },
  2180. "x-enum-varnames": [
  2181. "COMMON_STATUS_ENABLE",
  2182. "COMMON_STATUS_DISABLED"
  2183. ]
  2184. },
  2185. "model.Tag": {
  2186. "type": "object",
  2187. "properties": {
  2188. "color": {
  2189. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  2190. "type": "integer"
  2191. },
  2192. "created_at": {
  2193. "type": "string"
  2194. },
  2195. "id": {
  2196. "type": "integer"
  2197. },
  2198. "name": {
  2199. "type": "string"
  2200. },
  2201. "updated_at": {
  2202. "type": "string"
  2203. },
  2204. "user_id": {
  2205. "type": "integer"
  2206. }
  2207. }
  2208. },
  2209. "model.TagList": {
  2210. "type": "object",
  2211. "properties": {
  2212. "list": {
  2213. "type": "array",
  2214. "items": {
  2215. "$ref": "#/definitions/model.Tag"
  2216. }
  2217. },
  2218. "page": {
  2219. "type": "integer"
  2220. },
  2221. "page_size": {
  2222. "type": "integer"
  2223. },
  2224. "total": {
  2225. "type": "integer"
  2226. }
  2227. }
  2228. },
  2229. "model.User": {
  2230. "type": "object",
  2231. "properties": {
  2232. "avatar": {
  2233. "type": "string"
  2234. },
  2235. "created_at": {
  2236. "type": "string"
  2237. },
  2238. "group_id": {
  2239. "type": "integer"
  2240. },
  2241. "id": {
  2242. "type": "integer"
  2243. },
  2244. "is_admin": {
  2245. "type": "boolean"
  2246. },
  2247. "nickname": {
  2248. "type": "string"
  2249. },
  2250. "status": {
  2251. "$ref": "#/definitions/model.StatusCode"
  2252. },
  2253. "updated_at": {
  2254. "type": "string"
  2255. },
  2256. "username": {
  2257. "type": "string"
  2258. }
  2259. }
  2260. },
  2261. "model.UserList": {
  2262. "type": "object",
  2263. "properties": {
  2264. "list": {
  2265. "type": "array",
  2266. "items": {
  2267. "$ref": "#/definitions/model.User"
  2268. }
  2269. },
  2270. "page": {
  2271. "type": "integer"
  2272. },
  2273. "page_size": {
  2274. "type": "integer"
  2275. },
  2276. "total": {
  2277. "type": "integer"
  2278. }
  2279. }
  2280. },
  2281. "response.Response": {
  2282. "type": "object",
  2283. "properties": {
  2284. "code": {
  2285. "type": "integer"
  2286. },
  2287. "data": {},
  2288. "message": {
  2289. "type": "string"
  2290. }
  2291. }
  2292. }
  2293. },
  2294. "securityDefinitions": {
  2295. "BearerAuth": {
  2296. "type": "apiKey",
  2297. "name": "Authorization",
  2298. "in": "header"
  2299. },
  2300. "token": {
  2301. "type": "apiKey",
  2302. "name": "api-token",
  2303. "in": "header"
  2304. }
  2305. }
  2306. }