admin_docs.go 75 KB

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