admin_swagger.json 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087
  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/share": {
  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.ShareByWebClientForm"
  266. }
  267. }
  268. ],
  269. "responses": {
  270. "200": {
  271. "description": "OK",
  272. "schema": {
  273. "$ref": "#/definitions/response.Response"
  274. }
  275. },
  276. "500": {
  277. "description": "Internal Server Error",
  278. "schema": {
  279. "$ref": "#/definitions/response.Response"
  280. }
  281. }
  282. }
  283. }
  284. },
  285. "/admin/address_book/update": {
  286. "post": {
  287. "security": [
  288. {
  289. "token": []
  290. }
  291. ],
  292. "description": "地址簿编辑",
  293. "consumes": [
  294. "application/json"
  295. ],
  296. "produces": [
  297. "application/json"
  298. ],
  299. "tags": [
  300. "地址簿"
  301. ],
  302. "summary": "地址簿编辑",
  303. "parameters": [
  304. {
  305. "description": "地址簿信息",
  306. "name": "body",
  307. "in": "body",
  308. "required": true,
  309. "schema": {
  310. "$ref": "#/definitions/admin.AddressBookForm"
  311. }
  312. }
  313. ],
  314. "responses": {
  315. "200": {
  316. "description": "OK",
  317. "schema": {
  318. "allOf": [
  319. {
  320. "$ref": "#/definitions/response.Response"
  321. },
  322. {
  323. "type": "object",
  324. "properties": {
  325. "data": {
  326. "$ref": "#/definitions/model.AddressBook"
  327. }
  328. }
  329. }
  330. ]
  331. }
  332. },
  333. "500": {
  334. "description": "Internal Server Error",
  335. "schema": {
  336. "$ref": "#/definitions/response.Response"
  337. }
  338. }
  339. }
  340. }
  341. },
  342. "/admin/app-config": {
  343. "get": {
  344. "security": [
  345. {
  346. "token": []
  347. }
  348. ],
  349. "description": "APP服务配置",
  350. "consumes": [
  351. "application/json"
  352. ],
  353. "produces": [
  354. "application/json"
  355. ],
  356. "tags": [
  357. "ADMIN"
  358. ],
  359. "summary": "APP服务配置",
  360. "responses": {
  361. "200": {
  362. "description": "OK",
  363. "schema": {
  364. "$ref": "#/definitions/response.Response"
  365. }
  366. },
  367. "500": {
  368. "description": "Internal Server Error",
  369. "schema": {
  370. "$ref": "#/definitions/response.Response"
  371. }
  372. }
  373. }
  374. }
  375. },
  376. "/admin/file/oss_token": {
  377. "get": {
  378. "security": [
  379. {
  380. "token": []
  381. }
  382. ],
  383. "description": "获取ossToken",
  384. "consumes": [
  385. "application/json"
  386. ],
  387. "produces": [
  388. "application/json"
  389. ],
  390. "tags": [
  391. "文件"
  392. ],
  393. "summary": "获取ossToken",
  394. "responses": {
  395. "200": {
  396. "description": "OK",
  397. "schema": {
  398. "$ref": "#/definitions/response.Response"
  399. }
  400. },
  401. "500": {
  402. "description": "Internal Server Error",
  403. "schema": {
  404. "$ref": "#/definitions/response.Response"
  405. }
  406. }
  407. }
  408. }
  409. },
  410. "/admin/file/upload": {
  411. "post": {
  412. "security": [
  413. {
  414. "token": []
  415. }
  416. ],
  417. "description": "上传文件到本地",
  418. "consumes": [
  419. "multipart/form-data"
  420. ],
  421. "produces": [
  422. "application/json"
  423. ],
  424. "tags": [
  425. "文件"
  426. ],
  427. "summary": "上传文件到本地",
  428. "parameters": [
  429. {
  430. "type": "file",
  431. "description": "上传文件示例",
  432. "name": "file",
  433. "in": "formData",
  434. "required": true
  435. }
  436. ],
  437. "responses": {
  438. "200": {
  439. "description": "OK",
  440. "schema": {
  441. "$ref": "#/definitions/response.Response"
  442. }
  443. },
  444. "500": {
  445. "description": "Internal Server Error",
  446. "schema": {
  447. "$ref": "#/definitions/response.Response"
  448. }
  449. }
  450. }
  451. }
  452. },
  453. "/admin/group/create": {
  454. "post": {
  455. "security": [
  456. {
  457. "token": []
  458. }
  459. ],
  460. "description": "创建群组",
  461. "consumes": [
  462. "application/json"
  463. ],
  464. "produces": [
  465. "application/json"
  466. ],
  467. "tags": [
  468. "群组"
  469. ],
  470. "summary": "创建群组",
  471. "parameters": [
  472. {
  473. "description": "群组信息",
  474. "name": "body",
  475. "in": "body",
  476. "required": true,
  477. "schema": {
  478. "$ref": "#/definitions/admin.GroupForm"
  479. }
  480. }
  481. ],
  482. "responses": {
  483. "200": {
  484. "description": "OK",
  485. "schema": {
  486. "allOf": [
  487. {
  488. "$ref": "#/definitions/response.Response"
  489. },
  490. {
  491. "type": "object",
  492. "properties": {
  493. "data": {
  494. "$ref": "#/definitions/model.Group"
  495. }
  496. }
  497. }
  498. ]
  499. }
  500. },
  501. "500": {
  502. "description": "Internal Server Error",
  503. "schema": {
  504. "$ref": "#/definitions/response.Response"
  505. }
  506. }
  507. }
  508. }
  509. },
  510. "/admin/group/delete": {
  511. "post": {
  512. "security": [
  513. {
  514. "token": []
  515. }
  516. ],
  517. "description": "群组删除",
  518. "consumes": [
  519. "application/json"
  520. ],
  521. "produces": [
  522. "application/json"
  523. ],
  524. "tags": [
  525. "群组"
  526. ],
  527. "summary": "群组删除",
  528. "parameters": [
  529. {
  530. "description": "群组信息",
  531. "name": "body",
  532. "in": "body",
  533. "required": true,
  534. "schema": {
  535. "$ref": "#/definitions/admin.GroupForm"
  536. }
  537. }
  538. ],
  539. "responses": {
  540. "200": {
  541. "description": "OK",
  542. "schema": {
  543. "$ref": "#/definitions/response.Response"
  544. }
  545. },
  546. "500": {
  547. "description": "Internal Server Error",
  548. "schema": {
  549. "$ref": "#/definitions/response.Response"
  550. }
  551. }
  552. }
  553. }
  554. },
  555. "/admin/group/detail/{id}": {
  556. "get": {
  557. "security": [
  558. {
  559. "token": []
  560. }
  561. ],
  562. "description": "群组详情",
  563. "consumes": [
  564. "application/json"
  565. ],
  566. "produces": [
  567. "application/json"
  568. ],
  569. "tags": [
  570. "群组"
  571. ],
  572. "summary": "群组详情",
  573. "parameters": [
  574. {
  575. "type": "integer",
  576. "description": "ID",
  577. "name": "id",
  578. "in": "path",
  579. "required": true
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "OK",
  585. "schema": {
  586. "allOf": [
  587. {
  588. "$ref": "#/definitions/response.Response"
  589. },
  590. {
  591. "type": "object",
  592. "properties": {
  593. "data": {
  594. "$ref": "#/definitions/model.Group"
  595. }
  596. }
  597. }
  598. ]
  599. }
  600. },
  601. "500": {
  602. "description": "Internal Server Error",
  603. "schema": {
  604. "$ref": "#/definitions/response.Response"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "/admin/group/list": {
  611. "get": {
  612. "security": [
  613. {
  614. "token": []
  615. }
  616. ],
  617. "description": "群组列表",
  618. "consumes": [
  619. "application/json"
  620. ],
  621. "produces": [
  622. "application/json"
  623. ],
  624. "tags": [
  625. "群组"
  626. ],
  627. "summary": "群组列表",
  628. "parameters": [
  629. {
  630. "type": "integer",
  631. "description": "页码",
  632. "name": "page",
  633. "in": "query"
  634. },
  635. {
  636. "type": "integer",
  637. "description": "页大小",
  638. "name": "page_size",
  639. "in": "query"
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "OK",
  645. "schema": {
  646. "allOf": [
  647. {
  648. "$ref": "#/definitions/response.Response"
  649. },
  650. {
  651. "type": "object",
  652. "properties": {
  653. "data": {
  654. "$ref": "#/definitions/model.GroupList"
  655. }
  656. }
  657. }
  658. ]
  659. }
  660. },
  661. "500": {
  662. "description": "Internal Server Error",
  663. "schema": {
  664. "$ref": "#/definitions/response.Response"
  665. }
  666. }
  667. }
  668. }
  669. },
  670. "/admin/group/update": {
  671. "post": {
  672. "security": [
  673. {
  674. "token": []
  675. }
  676. ],
  677. "description": "群组编辑",
  678. "consumes": [
  679. "application/json"
  680. ],
  681. "produces": [
  682. "application/json"
  683. ],
  684. "tags": [
  685. "群组"
  686. ],
  687. "summary": "群组编辑",
  688. "parameters": [
  689. {
  690. "description": "群组信息",
  691. "name": "body",
  692. "in": "body",
  693. "required": true,
  694. "schema": {
  695. "$ref": "#/definitions/admin.GroupForm"
  696. }
  697. }
  698. ],
  699. "responses": {
  700. "200": {
  701. "description": "OK",
  702. "schema": {
  703. "allOf": [
  704. {
  705. "$ref": "#/definitions/response.Response"
  706. },
  707. {
  708. "type": "object",
  709. "properties": {
  710. "data": {
  711. "$ref": "#/definitions/model.Group"
  712. }
  713. }
  714. }
  715. ]
  716. }
  717. },
  718. "500": {
  719. "description": "Internal Server Error",
  720. "schema": {
  721. "$ref": "#/definitions/response.Response"
  722. }
  723. }
  724. }
  725. }
  726. },
  727. "/admin/login": {
  728. "post": {
  729. "security": [
  730. {
  731. "token": []
  732. }
  733. ],
  734. "description": "登录",
  735. "consumes": [
  736. "application/json"
  737. ],
  738. "produces": [
  739. "application/json"
  740. ],
  741. "tags": [
  742. "登录"
  743. ],
  744. "summary": "登录",
  745. "parameters": [
  746. {
  747. "description": "登录信息",
  748. "name": "body",
  749. "in": "body",
  750. "required": true,
  751. "schema": {
  752. "$ref": "#/definitions/Gwen_http_request_admin.Login"
  753. }
  754. }
  755. ],
  756. "responses": {
  757. "200": {
  758. "description": "OK",
  759. "schema": {
  760. "allOf": [
  761. {
  762. "$ref": "#/definitions/response.Response"
  763. },
  764. {
  765. "type": "object",
  766. "properties": {
  767. "data": {
  768. "$ref": "#/definitions/admin.LoginPayload"
  769. }
  770. }
  771. }
  772. ]
  773. }
  774. },
  775. "500": {
  776. "description": "Internal Server Error",
  777. "schema": {
  778. "$ref": "#/definitions/response.Response"
  779. }
  780. }
  781. }
  782. }
  783. },
  784. "/admin/loginLog/delete": {
  785. "post": {
  786. "security": [
  787. {
  788. "token": []
  789. }
  790. ],
  791. "description": "登录日志删除",
  792. "consumes": [
  793. "application/json"
  794. ],
  795. "produces": [
  796. "application/json"
  797. ],
  798. "tags": [
  799. "登录日志"
  800. ],
  801. "summary": "登录日志删除",
  802. "parameters": [
  803. {
  804. "description": "登录日志信息",
  805. "name": "body",
  806. "in": "body",
  807. "required": true,
  808. "schema": {
  809. "$ref": "#/definitions/model.LoginLog"
  810. }
  811. }
  812. ],
  813. "responses": {
  814. "200": {
  815. "description": "OK",
  816. "schema": {
  817. "$ref": "#/definitions/response.Response"
  818. }
  819. },
  820. "500": {
  821. "description": "Internal Server Error",
  822. "schema": {
  823. "$ref": "#/definitions/response.Response"
  824. }
  825. }
  826. }
  827. }
  828. },
  829. "/admin/loginLog/detail/{id}": {
  830. "get": {
  831. "security": [
  832. {
  833. "token": []
  834. }
  835. ],
  836. "description": "登录日志详情",
  837. "consumes": [
  838. "application/json"
  839. ],
  840. "produces": [
  841. "application/json"
  842. ],
  843. "tags": [
  844. "登录日志"
  845. ],
  846. "summary": "登录日志详情",
  847. "parameters": [
  848. {
  849. "type": "integer",
  850. "description": "ID",
  851. "name": "id",
  852. "in": "path",
  853. "required": true
  854. }
  855. ],
  856. "responses": {
  857. "200": {
  858. "description": "OK",
  859. "schema": {
  860. "allOf": [
  861. {
  862. "$ref": "#/definitions/response.Response"
  863. },
  864. {
  865. "type": "object",
  866. "properties": {
  867. "data": {
  868. "$ref": "#/definitions/model.LoginLog"
  869. }
  870. }
  871. }
  872. ]
  873. }
  874. },
  875. "500": {
  876. "description": "Internal Server Error",
  877. "schema": {
  878. "$ref": "#/definitions/response.Response"
  879. }
  880. }
  881. }
  882. }
  883. },
  884. "/admin/loginLog/list": {
  885. "get": {
  886. "security": [
  887. {
  888. "token": []
  889. }
  890. ],
  891. "description": "登录日志列表",
  892. "consumes": [
  893. "application/json"
  894. ],
  895. "produces": [
  896. "application/json"
  897. ],
  898. "tags": [
  899. "登录日志"
  900. ],
  901. "summary": "登录日志列表",
  902. "parameters": [
  903. {
  904. "type": "integer",
  905. "description": "页码",
  906. "name": "page",
  907. "in": "query"
  908. },
  909. {
  910. "type": "integer",
  911. "description": "页大小",
  912. "name": "page_size",
  913. "in": "query"
  914. },
  915. {
  916. "type": "integer",
  917. "description": "用户ID",
  918. "name": "user_id",
  919. "in": "query"
  920. }
  921. ],
  922. "responses": {
  923. "200": {
  924. "description": "OK",
  925. "schema": {
  926. "allOf": [
  927. {
  928. "$ref": "#/definitions/response.Response"
  929. },
  930. {
  931. "type": "object",
  932. "properties": {
  933. "data": {
  934. "$ref": "#/definitions/model.LoginLogList"
  935. }
  936. }
  937. }
  938. ]
  939. }
  940. },
  941. "500": {
  942. "description": "Internal Server Error",
  943. "schema": {
  944. "$ref": "#/definitions/response.Response"
  945. }
  946. }
  947. }
  948. }
  949. },
  950. "/admin/logout": {
  951. "post": {
  952. "description": "登出",
  953. "consumes": [
  954. "application/json"
  955. ],
  956. "produces": [
  957. "application/json"
  958. ],
  959. "tags": [
  960. "登录"
  961. ],
  962. "summary": "登出",
  963. "responses": {
  964. "200": {
  965. "description": "OK",
  966. "schema": {
  967. "$ref": "#/definitions/response.Response"
  968. }
  969. },
  970. "500": {
  971. "description": "Internal Server Error",
  972. "schema": {
  973. "$ref": "#/definitions/response.Response"
  974. }
  975. }
  976. }
  977. }
  978. },
  979. "/admin/oauth/create": {
  980. "post": {
  981. "security": [
  982. {
  983. "token": []
  984. }
  985. ],
  986. "description": "创建Oauth",
  987. "consumes": [
  988. "application/json"
  989. ],
  990. "produces": [
  991. "application/json"
  992. ],
  993. "tags": [
  994. "Oauth"
  995. ],
  996. "summary": "创建Oauth",
  997. "parameters": [
  998. {
  999. "description": "Oauth信息",
  1000. "name": "body",
  1001. "in": "body",
  1002. "required": true,
  1003. "schema": {
  1004. "$ref": "#/definitions/admin.OauthForm"
  1005. }
  1006. }
  1007. ],
  1008. "responses": {
  1009. "200": {
  1010. "description": "OK",
  1011. "schema": {
  1012. "allOf": [
  1013. {
  1014. "$ref": "#/definitions/response.Response"
  1015. },
  1016. {
  1017. "type": "object",
  1018. "properties": {
  1019. "data": {
  1020. "$ref": "#/definitions/model.Oauth"
  1021. }
  1022. }
  1023. }
  1024. ]
  1025. }
  1026. },
  1027. "500": {
  1028. "description": "Internal Server Error",
  1029. "schema": {
  1030. "$ref": "#/definitions/response.Response"
  1031. }
  1032. }
  1033. }
  1034. }
  1035. },
  1036. "/admin/oauth/delete": {
  1037. "post": {
  1038. "security": [
  1039. {
  1040. "token": []
  1041. }
  1042. ],
  1043. "description": "Oauth删除",
  1044. "consumes": [
  1045. "application/json"
  1046. ],
  1047. "produces": [
  1048. "application/json"
  1049. ],
  1050. "tags": [
  1051. "Oauth"
  1052. ],
  1053. "summary": "Oauth删除",
  1054. "parameters": [
  1055. {
  1056. "description": "Oauth信息",
  1057. "name": "body",
  1058. "in": "body",
  1059. "required": true,
  1060. "schema": {
  1061. "$ref": "#/definitions/admin.OauthForm"
  1062. }
  1063. }
  1064. ],
  1065. "responses": {
  1066. "200": {
  1067. "description": "OK",
  1068. "schema": {
  1069. "$ref": "#/definitions/response.Response"
  1070. }
  1071. },
  1072. "500": {
  1073. "description": "Internal Server Error",
  1074. "schema": {
  1075. "$ref": "#/definitions/response.Response"
  1076. }
  1077. }
  1078. }
  1079. }
  1080. },
  1081. "/admin/oauth/detail/{id}": {
  1082. "get": {
  1083. "security": [
  1084. {
  1085. "token": []
  1086. }
  1087. ],
  1088. "description": "Oauth详情",
  1089. "consumes": [
  1090. "application/json"
  1091. ],
  1092. "produces": [
  1093. "application/json"
  1094. ],
  1095. "tags": [
  1096. "Oauth"
  1097. ],
  1098. "summary": "Oauth详情",
  1099. "parameters": [
  1100. {
  1101. "type": "integer",
  1102. "description": "ID",
  1103. "name": "id",
  1104. "in": "path",
  1105. "required": true
  1106. }
  1107. ],
  1108. "responses": {
  1109. "200": {
  1110. "description": "OK",
  1111. "schema": {
  1112. "allOf": [
  1113. {
  1114. "$ref": "#/definitions/response.Response"
  1115. },
  1116. {
  1117. "type": "object",
  1118. "properties": {
  1119. "data": {
  1120. "$ref": "#/definitions/model.Oauth"
  1121. }
  1122. }
  1123. }
  1124. ]
  1125. }
  1126. },
  1127. "500": {
  1128. "description": "Internal Server Error",
  1129. "schema": {
  1130. "$ref": "#/definitions/response.Response"
  1131. }
  1132. }
  1133. }
  1134. }
  1135. },
  1136. "/admin/oauth/list": {
  1137. "get": {
  1138. "security": [
  1139. {
  1140. "token": []
  1141. }
  1142. ],
  1143. "description": "Oauth列表",
  1144. "consumes": [
  1145. "application/json"
  1146. ],
  1147. "produces": [
  1148. "application/json"
  1149. ],
  1150. "tags": [
  1151. "Oauth"
  1152. ],
  1153. "summary": "Oauth列表",
  1154. "parameters": [
  1155. {
  1156. "type": "integer",
  1157. "description": "页码",
  1158. "name": "page",
  1159. "in": "query"
  1160. },
  1161. {
  1162. "type": "integer",
  1163. "description": "页大小",
  1164. "name": "page_size",
  1165. "in": "query"
  1166. }
  1167. ],
  1168. "responses": {
  1169. "200": {
  1170. "description": "OK",
  1171. "schema": {
  1172. "allOf": [
  1173. {
  1174. "$ref": "#/definitions/response.Response"
  1175. },
  1176. {
  1177. "type": "object",
  1178. "properties": {
  1179. "data": {
  1180. "$ref": "#/definitions/model.OauthList"
  1181. }
  1182. }
  1183. }
  1184. ]
  1185. }
  1186. },
  1187. "500": {
  1188. "description": "Internal Server Error",
  1189. "schema": {
  1190. "$ref": "#/definitions/response.Response"
  1191. }
  1192. }
  1193. }
  1194. }
  1195. },
  1196. "/admin/oauth/update": {
  1197. "post": {
  1198. "security": [
  1199. {
  1200. "token": []
  1201. }
  1202. ],
  1203. "description": "Oauth编辑",
  1204. "consumes": [
  1205. "application/json"
  1206. ],
  1207. "produces": [
  1208. "application/json"
  1209. ],
  1210. "tags": [
  1211. "Oauth"
  1212. ],
  1213. "summary": "Oauth编辑",
  1214. "parameters": [
  1215. {
  1216. "description": "Oauth信息",
  1217. "name": "body",
  1218. "in": "body",
  1219. "required": true,
  1220. "schema": {
  1221. "$ref": "#/definitions/admin.OauthForm"
  1222. }
  1223. }
  1224. ],
  1225. "responses": {
  1226. "200": {
  1227. "description": "OK",
  1228. "schema": {
  1229. "allOf": [
  1230. {
  1231. "$ref": "#/definitions/response.Response"
  1232. },
  1233. {
  1234. "type": "object",
  1235. "properties": {
  1236. "data": {
  1237. "$ref": "#/definitions/model.OauthList"
  1238. }
  1239. }
  1240. }
  1241. ]
  1242. }
  1243. },
  1244. "500": {
  1245. "description": "Internal Server Error",
  1246. "schema": {
  1247. "$ref": "#/definitions/response.Response"
  1248. }
  1249. }
  1250. }
  1251. }
  1252. },
  1253. "/admin/peer/create": {
  1254. "post": {
  1255. "security": [
  1256. {
  1257. "token": []
  1258. }
  1259. ],
  1260. "description": "创建设备",
  1261. "consumes": [
  1262. "application/json"
  1263. ],
  1264. "produces": [
  1265. "application/json"
  1266. ],
  1267. "tags": [
  1268. "设备"
  1269. ],
  1270. "summary": "创建设备",
  1271. "parameters": [
  1272. {
  1273. "description": "设备信息",
  1274. "name": "body",
  1275. "in": "body",
  1276. "required": true,
  1277. "schema": {
  1278. "$ref": "#/definitions/admin.PeerForm"
  1279. }
  1280. }
  1281. ],
  1282. "responses": {
  1283. "200": {
  1284. "description": "OK",
  1285. "schema": {
  1286. "allOf": [
  1287. {
  1288. "$ref": "#/definitions/response.Response"
  1289. },
  1290. {
  1291. "type": "object",
  1292. "properties": {
  1293. "data": {
  1294. "$ref": "#/definitions/model.Peer"
  1295. }
  1296. }
  1297. }
  1298. ]
  1299. }
  1300. },
  1301. "500": {
  1302. "description": "Internal Server Error",
  1303. "schema": {
  1304. "$ref": "#/definitions/response.Response"
  1305. }
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "/admin/peer/delete": {
  1311. "post": {
  1312. "security": [
  1313. {
  1314. "token": []
  1315. }
  1316. ],
  1317. "description": "批量设备删除",
  1318. "consumes": [
  1319. "application/json"
  1320. ],
  1321. "produces": [
  1322. "application/json"
  1323. ],
  1324. "tags": [
  1325. "设备"
  1326. ],
  1327. "summary": "批量设备删除",
  1328. "parameters": [
  1329. {
  1330. "description": "设备id",
  1331. "name": "body",
  1332. "in": "body",
  1333. "required": true,
  1334. "schema": {
  1335. "$ref": "#/definitions/admin.PeerBatchDeleteForm"
  1336. }
  1337. }
  1338. ],
  1339. "responses": {
  1340. "200": {
  1341. "description": "OK",
  1342. "schema": {
  1343. "$ref": "#/definitions/response.Response"
  1344. }
  1345. },
  1346. "500": {
  1347. "description": "Internal Server Error",
  1348. "schema": {
  1349. "$ref": "#/definitions/response.Response"
  1350. }
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "/admin/peer/detail/{id}": {
  1356. "get": {
  1357. "security": [
  1358. {
  1359. "token": []
  1360. }
  1361. ],
  1362. "description": "设备详情",
  1363. "consumes": [
  1364. "application/json"
  1365. ],
  1366. "produces": [
  1367. "application/json"
  1368. ],
  1369. "tags": [
  1370. "设备"
  1371. ],
  1372. "summary": "设备详情",
  1373. "parameters": [
  1374. {
  1375. "type": "integer",
  1376. "description": "ID",
  1377. "name": "id",
  1378. "in": "path",
  1379. "required": true
  1380. }
  1381. ],
  1382. "responses": {
  1383. "200": {
  1384. "description": "OK",
  1385. "schema": {
  1386. "allOf": [
  1387. {
  1388. "$ref": "#/definitions/response.Response"
  1389. },
  1390. {
  1391. "type": "object",
  1392. "properties": {
  1393. "data": {
  1394. "$ref": "#/definitions/model.Peer"
  1395. }
  1396. }
  1397. }
  1398. ]
  1399. }
  1400. },
  1401. "500": {
  1402. "description": "Internal Server Error",
  1403. "schema": {
  1404. "$ref": "#/definitions/response.Response"
  1405. }
  1406. }
  1407. }
  1408. }
  1409. },
  1410. "/admin/peer/list": {
  1411. "get": {
  1412. "security": [
  1413. {
  1414. "token": []
  1415. }
  1416. ],
  1417. "description": "设备列表",
  1418. "consumes": [
  1419. "application/json"
  1420. ],
  1421. "produces": [
  1422. "application/json"
  1423. ],
  1424. "tags": [
  1425. "设备"
  1426. ],
  1427. "summary": "设备列表",
  1428. "parameters": [
  1429. {
  1430. "type": "integer",
  1431. "description": "页码",
  1432. "name": "page",
  1433. "in": "query"
  1434. },
  1435. {
  1436. "type": "integer",
  1437. "description": "页大小",
  1438. "name": "page_size",
  1439. "in": "query"
  1440. },
  1441. {
  1442. "type": "integer",
  1443. "description": "时间",
  1444. "name": "time_ago",
  1445. "in": "query"
  1446. },
  1447. {
  1448. "type": "string",
  1449. "description": "ID",
  1450. "name": "id",
  1451. "in": "query"
  1452. },
  1453. {
  1454. "type": "string",
  1455. "description": "主机名",
  1456. "name": "hostname",
  1457. "in": "query"
  1458. }
  1459. ],
  1460. "responses": {
  1461. "200": {
  1462. "description": "OK",
  1463. "schema": {
  1464. "allOf": [
  1465. {
  1466. "$ref": "#/definitions/response.Response"
  1467. },
  1468. {
  1469. "type": "object",
  1470. "properties": {
  1471. "data": {
  1472. "$ref": "#/definitions/model.PeerList"
  1473. }
  1474. }
  1475. }
  1476. ]
  1477. }
  1478. },
  1479. "500": {
  1480. "description": "Internal Server Error",
  1481. "schema": {
  1482. "$ref": "#/definitions/response.Response"
  1483. }
  1484. }
  1485. }
  1486. }
  1487. },
  1488. "/admin/peer/update": {
  1489. "post": {
  1490. "security": [
  1491. {
  1492. "token": []
  1493. }
  1494. ],
  1495. "description": "设备编辑",
  1496. "consumes": [
  1497. "application/json"
  1498. ],
  1499. "produces": [
  1500. "application/json"
  1501. ],
  1502. "tags": [
  1503. "设备"
  1504. ],
  1505. "summary": "设备编辑",
  1506. "parameters": [
  1507. {
  1508. "description": "设备信息",
  1509. "name": "body",
  1510. "in": "body",
  1511. "required": true,
  1512. "schema": {
  1513. "$ref": "#/definitions/admin.PeerForm"
  1514. }
  1515. }
  1516. ],
  1517. "responses": {
  1518. "200": {
  1519. "description": "OK",
  1520. "schema": {
  1521. "allOf": [
  1522. {
  1523. "$ref": "#/definitions/response.Response"
  1524. },
  1525. {
  1526. "type": "object",
  1527. "properties": {
  1528. "data": {
  1529. "$ref": "#/definitions/model.Peer"
  1530. }
  1531. }
  1532. }
  1533. ]
  1534. }
  1535. },
  1536. "500": {
  1537. "description": "Internal Server Error",
  1538. "schema": {
  1539. "$ref": "#/definitions/response.Response"
  1540. }
  1541. }
  1542. }
  1543. }
  1544. },
  1545. "/admin/server-config": {
  1546. "get": {
  1547. "security": [
  1548. {
  1549. "token": []
  1550. }
  1551. ],
  1552. "description": "服务配置,给webclient提供api-server",
  1553. "consumes": [
  1554. "application/json"
  1555. ],
  1556. "produces": [
  1557. "application/json"
  1558. ],
  1559. "tags": [
  1560. "ADMIN"
  1561. ],
  1562. "summary": "RUSTDESK服务配置",
  1563. "responses": {
  1564. "200": {
  1565. "description": "OK",
  1566. "schema": {
  1567. "$ref": "#/definitions/response.Response"
  1568. }
  1569. },
  1570. "500": {
  1571. "description": "Internal Server Error",
  1572. "schema": {
  1573. "$ref": "#/definitions/response.Response"
  1574. }
  1575. }
  1576. }
  1577. }
  1578. },
  1579. "/admin/tag/create": {
  1580. "post": {
  1581. "security": [
  1582. {
  1583. "token": []
  1584. }
  1585. ],
  1586. "description": "创建标签",
  1587. "consumes": [
  1588. "application/json"
  1589. ],
  1590. "produces": [
  1591. "application/json"
  1592. ],
  1593. "tags": [
  1594. "标签"
  1595. ],
  1596. "summary": "创建标签",
  1597. "parameters": [
  1598. {
  1599. "description": "标签信息",
  1600. "name": "body",
  1601. "in": "body",
  1602. "required": true,
  1603. "schema": {
  1604. "$ref": "#/definitions/admin.TagForm"
  1605. }
  1606. }
  1607. ],
  1608. "responses": {
  1609. "200": {
  1610. "description": "OK",
  1611. "schema": {
  1612. "allOf": [
  1613. {
  1614. "$ref": "#/definitions/response.Response"
  1615. },
  1616. {
  1617. "type": "object",
  1618. "properties": {
  1619. "data": {
  1620. "$ref": "#/definitions/model.Tag"
  1621. }
  1622. }
  1623. }
  1624. ]
  1625. }
  1626. },
  1627. "500": {
  1628. "description": "Internal Server Error",
  1629. "schema": {
  1630. "$ref": "#/definitions/response.Response"
  1631. }
  1632. }
  1633. }
  1634. }
  1635. },
  1636. "/admin/tag/delete": {
  1637. "post": {
  1638. "security": [
  1639. {
  1640. "token": []
  1641. }
  1642. ],
  1643. "description": "标签删除",
  1644. "consumes": [
  1645. "application/json"
  1646. ],
  1647. "produces": [
  1648. "application/json"
  1649. ],
  1650. "tags": [
  1651. "标签"
  1652. ],
  1653. "summary": "标签删除",
  1654. "parameters": [
  1655. {
  1656. "description": "标签信息",
  1657. "name": "body",
  1658. "in": "body",
  1659. "required": true,
  1660. "schema": {
  1661. "$ref": "#/definitions/admin.TagForm"
  1662. }
  1663. }
  1664. ],
  1665. "responses": {
  1666. "200": {
  1667. "description": "OK",
  1668. "schema": {
  1669. "$ref": "#/definitions/response.Response"
  1670. }
  1671. },
  1672. "500": {
  1673. "description": "Internal Server Error",
  1674. "schema": {
  1675. "$ref": "#/definitions/response.Response"
  1676. }
  1677. }
  1678. }
  1679. }
  1680. },
  1681. "/admin/tag/detail/{id}": {
  1682. "get": {
  1683. "security": [
  1684. {
  1685. "token": []
  1686. }
  1687. ],
  1688. "description": "标签详情",
  1689. "consumes": [
  1690. "application/json"
  1691. ],
  1692. "produces": [
  1693. "application/json"
  1694. ],
  1695. "tags": [
  1696. "标签"
  1697. ],
  1698. "summary": "标签详情",
  1699. "parameters": [
  1700. {
  1701. "type": "integer",
  1702. "description": "ID",
  1703. "name": "id",
  1704. "in": "path",
  1705. "required": true
  1706. }
  1707. ],
  1708. "responses": {
  1709. "200": {
  1710. "description": "OK",
  1711. "schema": {
  1712. "allOf": [
  1713. {
  1714. "$ref": "#/definitions/response.Response"
  1715. },
  1716. {
  1717. "type": "object",
  1718. "properties": {
  1719. "data": {
  1720. "$ref": "#/definitions/model.Tag"
  1721. }
  1722. }
  1723. }
  1724. ]
  1725. }
  1726. },
  1727. "500": {
  1728. "description": "Internal Server Error",
  1729. "schema": {
  1730. "$ref": "#/definitions/response.Response"
  1731. }
  1732. }
  1733. }
  1734. }
  1735. },
  1736. "/admin/tag/list": {
  1737. "get": {
  1738. "security": [
  1739. {
  1740. "token": []
  1741. }
  1742. ],
  1743. "description": "标签列表",
  1744. "consumes": [
  1745. "application/json"
  1746. ],
  1747. "produces": [
  1748. "application/json"
  1749. ],
  1750. "tags": [
  1751. "标签"
  1752. ],
  1753. "summary": "标签列表",
  1754. "parameters": [
  1755. {
  1756. "type": "integer",
  1757. "description": "页码",
  1758. "name": "page",
  1759. "in": "query"
  1760. },
  1761. {
  1762. "type": "integer",
  1763. "description": "页大小",
  1764. "name": "page_size",
  1765. "in": "query"
  1766. },
  1767. {
  1768. "type": "integer",
  1769. "description": "是否是我的",
  1770. "name": "is_my",
  1771. "in": "query"
  1772. },
  1773. {
  1774. "type": "integer",
  1775. "description": "用户id",
  1776. "name": "user_id",
  1777. "in": "query"
  1778. }
  1779. ],
  1780. "responses": {
  1781. "200": {
  1782. "description": "OK",
  1783. "schema": {
  1784. "allOf": [
  1785. {
  1786. "$ref": "#/definitions/response.Response"
  1787. },
  1788. {
  1789. "type": "object",
  1790. "properties": {
  1791. "data": {
  1792. "$ref": "#/definitions/model.TagList"
  1793. }
  1794. }
  1795. }
  1796. ]
  1797. }
  1798. },
  1799. "500": {
  1800. "description": "Internal Server Error",
  1801. "schema": {
  1802. "$ref": "#/definitions/response.Response"
  1803. }
  1804. }
  1805. }
  1806. }
  1807. },
  1808. "/admin/tag/update": {
  1809. "post": {
  1810. "security": [
  1811. {
  1812. "token": []
  1813. }
  1814. ],
  1815. "description": "标签编辑",
  1816. "consumes": [
  1817. "application/json"
  1818. ],
  1819. "produces": [
  1820. "application/json"
  1821. ],
  1822. "tags": [
  1823. "标签"
  1824. ],
  1825. "summary": "标签编辑",
  1826. "parameters": [
  1827. {
  1828. "description": "标签信息",
  1829. "name": "body",
  1830. "in": "body",
  1831. "required": true,
  1832. "schema": {
  1833. "$ref": "#/definitions/admin.TagForm"
  1834. }
  1835. }
  1836. ],
  1837. "responses": {
  1838. "200": {
  1839. "description": "OK",
  1840. "schema": {
  1841. "allOf": [
  1842. {
  1843. "$ref": "#/definitions/response.Response"
  1844. },
  1845. {
  1846. "type": "object",
  1847. "properties": {
  1848. "data": {
  1849. "$ref": "#/definitions/model.Tag"
  1850. }
  1851. }
  1852. }
  1853. ]
  1854. }
  1855. },
  1856. "500": {
  1857. "description": "Internal Server Error",
  1858. "schema": {
  1859. "$ref": "#/definitions/response.Response"
  1860. }
  1861. }
  1862. }
  1863. }
  1864. },
  1865. "/admin/user/changeCurPwd": {
  1866. "post": {
  1867. "security": [
  1868. {
  1869. "token": []
  1870. }
  1871. ],
  1872. "description": "修改当前用户密码",
  1873. "consumes": [
  1874. "application/json"
  1875. ],
  1876. "produces": [
  1877. "application/json"
  1878. ],
  1879. "tags": [
  1880. "用户"
  1881. ],
  1882. "summary": "修改当前用户密码",
  1883. "parameters": [
  1884. {
  1885. "description": "用户信息",
  1886. "name": "body",
  1887. "in": "body",
  1888. "required": true,
  1889. "schema": {
  1890. "$ref": "#/definitions/admin.ChangeCurPasswordForm"
  1891. }
  1892. }
  1893. ],
  1894. "responses": {
  1895. "200": {
  1896. "description": "OK",
  1897. "schema": {
  1898. "$ref": "#/definitions/response.Response"
  1899. }
  1900. },
  1901. "500": {
  1902. "description": "Internal Server Error",
  1903. "schema": {
  1904. "$ref": "#/definitions/response.Response"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "/admin/user/create": {
  1911. "post": {
  1912. "security": [
  1913. {
  1914. "token": []
  1915. }
  1916. ],
  1917. "description": "创建管理员",
  1918. "consumes": [
  1919. "application/json"
  1920. ],
  1921. "produces": [
  1922. "application/json"
  1923. ],
  1924. "tags": [
  1925. "用户"
  1926. ],
  1927. "summary": "创建管理员",
  1928. "parameters": [
  1929. {
  1930. "description": "管理员信息",
  1931. "name": "body",
  1932. "in": "body",
  1933. "required": true,
  1934. "schema": {
  1935. "$ref": "#/definitions/admin.UserForm"
  1936. }
  1937. }
  1938. ],
  1939. "responses": {
  1940. "200": {
  1941. "description": "OK",
  1942. "schema": {
  1943. "allOf": [
  1944. {
  1945. "$ref": "#/definitions/response.Response"
  1946. },
  1947. {
  1948. "type": "object",
  1949. "properties": {
  1950. "data": {
  1951. "$ref": "#/definitions/model.User"
  1952. }
  1953. }
  1954. }
  1955. ]
  1956. }
  1957. },
  1958. "500": {
  1959. "description": "Internal Server Error",
  1960. "schema": {
  1961. "$ref": "#/definitions/response.Response"
  1962. }
  1963. }
  1964. }
  1965. }
  1966. },
  1967. "/admin/user/current": {
  1968. "get": {
  1969. "security": [
  1970. {
  1971. "token": []
  1972. }
  1973. ],
  1974. "description": "当前用户",
  1975. "consumes": [
  1976. "application/json"
  1977. ],
  1978. "produces": [
  1979. "application/json"
  1980. ],
  1981. "tags": [
  1982. "用户"
  1983. ],
  1984. "summary": "当前用户",
  1985. "responses": {
  1986. "200": {
  1987. "description": "OK",
  1988. "schema": {
  1989. "allOf": [
  1990. {
  1991. "$ref": "#/definitions/response.Response"
  1992. },
  1993. {
  1994. "type": "object",
  1995. "properties": {
  1996. "data": {
  1997. "$ref": "#/definitions/admin.LoginPayload"
  1998. }
  1999. }
  2000. }
  2001. ]
  2002. }
  2003. },
  2004. "500": {
  2005. "description": "Internal Server Error",
  2006. "schema": {
  2007. "$ref": "#/definitions/response.Response"
  2008. }
  2009. }
  2010. }
  2011. }
  2012. },
  2013. "/admin/user/delete": {
  2014. "post": {
  2015. "security": [
  2016. {
  2017. "token": []
  2018. }
  2019. ],
  2020. "description": "管理员编删除",
  2021. "consumes": [
  2022. "application/json"
  2023. ],
  2024. "produces": [
  2025. "application/json"
  2026. ],
  2027. "tags": [
  2028. "用户"
  2029. ],
  2030. "summary": "管理员删除",
  2031. "parameters": [
  2032. {
  2033. "description": "用户信息",
  2034. "name": "body",
  2035. "in": "body",
  2036. "required": true,
  2037. "schema": {
  2038. "$ref": "#/definitions/admin.UserForm"
  2039. }
  2040. }
  2041. ],
  2042. "responses": {
  2043. "200": {
  2044. "description": "OK",
  2045. "schema": {
  2046. "$ref": "#/definitions/response.Response"
  2047. }
  2048. },
  2049. "500": {
  2050. "description": "Internal Server Error",
  2051. "schema": {
  2052. "$ref": "#/definitions/response.Response"
  2053. }
  2054. }
  2055. }
  2056. }
  2057. },
  2058. "/admin/user/detail/{id}": {
  2059. "get": {
  2060. "security": [
  2061. {
  2062. "token": []
  2063. }
  2064. ],
  2065. "description": "管理员详情",
  2066. "consumes": [
  2067. "application/json"
  2068. ],
  2069. "produces": [
  2070. "application/json"
  2071. ],
  2072. "tags": [
  2073. "用户"
  2074. ],
  2075. "summary": "管理员详情",
  2076. "parameters": [
  2077. {
  2078. "type": "integer",
  2079. "description": "ID",
  2080. "name": "id",
  2081. "in": "path",
  2082. "required": true
  2083. }
  2084. ],
  2085. "responses": {
  2086. "200": {
  2087. "description": "OK",
  2088. "schema": {
  2089. "allOf": [
  2090. {
  2091. "$ref": "#/definitions/response.Response"
  2092. },
  2093. {
  2094. "type": "object",
  2095. "properties": {
  2096. "data": {
  2097. "$ref": "#/definitions/model.User"
  2098. }
  2099. }
  2100. }
  2101. ]
  2102. }
  2103. },
  2104. "500": {
  2105. "description": "Internal Server Error",
  2106. "schema": {
  2107. "$ref": "#/definitions/response.Response"
  2108. }
  2109. }
  2110. }
  2111. }
  2112. },
  2113. "/admin/user/list": {
  2114. "get": {
  2115. "security": [
  2116. {
  2117. "token": []
  2118. }
  2119. ],
  2120. "description": "管理员列表",
  2121. "consumes": [
  2122. "application/json"
  2123. ],
  2124. "produces": [
  2125. "application/json"
  2126. ],
  2127. "tags": [
  2128. "用户"
  2129. ],
  2130. "summary": "管理员列表",
  2131. "parameters": [
  2132. {
  2133. "type": "integer",
  2134. "description": "页码",
  2135. "name": "page",
  2136. "in": "query"
  2137. },
  2138. {
  2139. "type": "integer",
  2140. "description": "页大小",
  2141. "name": "page_size",
  2142. "in": "query"
  2143. },
  2144. {
  2145. "type": "integer",
  2146. "description": "账户",
  2147. "name": "username",
  2148. "in": "query"
  2149. }
  2150. ],
  2151. "responses": {
  2152. "200": {
  2153. "description": "OK",
  2154. "schema": {
  2155. "allOf": [
  2156. {
  2157. "$ref": "#/definitions/response.Response"
  2158. },
  2159. {
  2160. "type": "object",
  2161. "properties": {
  2162. "data": {
  2163. "$ref": "#/definitions/model.UserList"
  2164. }
  2165. }
  2166. }
  2167. ]
  2168. }
  2169. },
  2170. "500": {
  2171. "description": "Internal Server Error",
  2172. "schema": {
  2173. "$ref": "#/definitions/response.Response"
  2174. }
  2175. }
  2176. }
  2177. }
  2178. },
  2179. "/admin/user/myOauth": {
  2180. "get": {
  2181. "security": [
  2182. {
  2183. "token": []
  2184. }
  2185. ],
  2186. "description": "我的授权",
  2187. "consumes": [
  2188. "application/json"
  2189. ],
  2190. "produces": [
  2191. "application/json"
  2192. ],
  2193. "tags": [
  2194. "用户"
  2195. ],
  2196. "summary": "我的授权",
  2197. "responses": {
  2198. "200": {
  2199. "description": "OK",
  2200. "schema": {
  2201. "allOf": [
  2202. {
  2203. "$ref": "#/definitions/response.Response"
  2204. },
  2205. {
  2206. "type": "object",
  2207. "properties": {
  2208. "data": {
  2209. "type": "array",
  2210. "items": {
  2211. "$ref": "#/definitions/admin.UserOauthItem"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. ]
  2217. }
  2218. },
  2219. "500": {
  2220. "description": "Internal Server Error",
  2221. "schema": {
  2222. "$ref": "#/definitions/response.Response"
  2223. }
  2224. }
  2225. }
  2226. }
  2227. },
  2228. "/admin/user/update": {
  2229. "post": {
  2230. "security": [
  2231. {
  2232. "token": []
  2233. }
  2234. ],
  2235. "description": "管理员编辑",
  2236. "consumes": [
  2237. "application/json"
  2238. ],
  2239. "produces": [
  2240. "application/json"
  2241. ],
  2242. "tags": [
  2243. "用户"
  2244. ],
  2245. "summary": "管理员编辑",
  2246. "parameters": [
  2247. {
  2248. "description": "用户信息",
  2249. "name": "body",
  2250. "in": "body",
  2251. "required": true,
  2252. "schema": {
  2253. "$ref": "#/definitions/admin.UserForm"
  2254. }
  2255. }
  2256. ],
  2257. "responses": {
  2258. "200": {
  2259. "description": "OK",
  2260. "schema": {
  2261. "allOf": [
  2262. {
  2263. "$ref": "#/definitions/response.Response"
  2264. },
  2265. {
  2266. "type": "object",
  2267. "properties": {
  2268. "data": {
  2269. "$ref": "#/definitions/model.User"
  2270. }
  2271. }
  2272. }
  2273. ]
  2274. }
  2275. },
  2276. "500": {
  2277. "description": "Internal Server Error",
  2278. "schema": {
  2279. "$ref": "#/definitions/response.Response"
  2280. }
  2281. }
  2282. }
  2283. }
  2284. },
  2285. "/admin/user/updatePassword": {
  2286. "post": {
  2287. "security": [
  2288. {
  2289. "token": []
  2290. }
  2291. ],
  2292. "description": "修改密码",
  2293. "consumes": [
  2294. "application/json"
  2295. ],
  2296. "produces": [
  2297. "application/json"
  2298. ],
  2299. "tags": [
  2300. "用户"
  2301. ],
  2302. "summary": "修改密码",
  2303. "parameters": [
  2304. {
  2305. "description": "用户信息",
  2306. "name": "body",
  2307. "in": "body",
  2308. "required": true,
  2309. "schema": {
  2310. "$ref": "#/definitions/admin.UserPasswordForm"
  2311. }
  2312. }
  2313. ],
  2314. "responses": {
  2315. "200": {
  2316. "description": "OK",
  2317. "schema": {
  2318. "$ref": "#/definitions/response.Response"
  2319. }
  2320. },
  2321. "500": {
  2322. "description": "Internal Server Error",
  2323. "schema": {
  2324. "$ref": "#/definitions/response.Response"
  2325. }
  2326. }
  2327. }
  2328. }
  2329. }
  2330. },
  2331. "definitions": {
  2332. "Gwen_http_request_admin.Login": {
  2333. "type": "object",
  2334. "required": [
  2335. "password",
  2336. "username"
  2337. ],
  2338. "properties": {
  2339. "password": {
  2340. "type": "string"
  2341. },
  2342. "platform": {
  2343. "type": "string"
  2344. },
  2345. "username": {
  2346. "type": "string"
  2347. }
  2348. }
  2349. },
  2350. "admin.AddressBookForm": {
  2351. "type": "object",
  2352. "required": [
  2353. "id"
  2354. ],
  2355. "properties": {
  2356. "alias": {
  2357. "type": "string"
  2358. },
  2359. "forceAlwaysRelay": {
  2360. "type": "boolean"
  2361. },
  2362. "hash": {
  2363. "type": "string"
  2364. },
  2365. "hostname": {
  2366. "type": "string"
  2367. },
  2368. "id": {
  2369. "type": "string"
  2370. },
  2371. "loginName": {
  2372. "type": "string"
  2373. },
  2374. "online": {
  2375. "type": "boolean"
  2376. },
  2377. "password": {
  2378. "type": "string"
  2379. },
  2380. "platform": {
  2381. "type": "string"
  2382. },
  2383. "rdpPort": {
  2384. "type": "string"
  2385. },
  2386. "rdpUsername": {
  2387. "type": "string"
  2388. },
  2389. "row_id": {
  2390. "type": "integer"
  2391. },
  2392. "sameServer": {
  2393. "type": "boolean"
  2394. },
  2395. "tags": {
  2396. "type": "array",
  2397. "items": {
  2398. "type": "string"
  2399. }
  2400. },
  2401. "user_id": {
  2402. "type": "integer"
  2403. },
  2404. "user_ids": {
  2405. "type": "array",
  2406. "items": {
  2407. "type": "integer"
  2408. }
  2409. },
  2410. "username": {
  2411. "type": "string"
  2412. }
  2413. }
  2414. },
  2415. "admin.ChangeCurPasswordForm": {
  2416. "type": "object",
  2417. "required": [
  2418. "new_password",
  2419. "old_password"
  2420. ],
  2421. "properties": {
  2422. "new_password": {
  2423. "type": "string",
  2424. "maxLength": 20,
  2425. "minLength": 4
  2426. },
  2427. "old_password": {
  2428. "type": "string",
  2429. "maxLength": 20,
  2430. "minLength": 4
  2431. }
  2432. }
  2433. },
  2434. "admin.GroupForm": {
  2435. "type": "object",
  2436. "required": [
  2437. "name"
  2438. ],
  2439. "properties": {
  2440. "id": {
  2441. "type": "integer"
  2442. },
  2443. "name": {
  2444. "type": "string"
  2445. }
  2446. }
  2447. },
  2448. "admin.LoginPayload": {
  2449. "type": "object",
  2450. "properties": {
  2451. "nickname": {
  2452. "type": "string"
  2453. },
  2454. "route_names": {
  2455. "type": "array",
  2456. "items": {
  2457. "type": "string"
  2458. }
  2459. },
  2460. "token": {
  2461. "type": "string"
  2462. },
  2463. "username": {
  2464. "type": "string"
  2465. }
  2466. }
  2467. },
  2468. "admin.OauthForm": {
  2469. "type": "object",
  2470. "required": [
  2471. "client_id",
  2472. "client_secret",
  2473. "op",
  2474. "redirect_url"
  2475. ],
  2476. "properties": {
  2477. "auto_register": {
  2478. "type": "boolean"
  2479. },
  2480. "client_id": {
  2481. "type": "string"
  2482. },
  2483. "client_secret": {
  2484. "type": "string"
  2485. },
  2486. "id": {
  2487. "type": "integer"
  2488. },
  2489. "op": {
  2490. "type": "string"
  2491. },
  2492. "redirect_url": {
  2493. "type": "string"
  2494. }
  2495. }
  2496. },
  2497. "admin.PeerBatchDeleteForm": {
  2498. "type": "object",
  2499. "required": [
  2500. "row_ids"
  2501. ],
  2502. "properties": {
  2503. "row_ids": {
  2504. "type": "array",
  2505. "items": {
  2506. "type": "integer"
  2507. }
  2508. }
  2509. }
  2510. },
  2511. "admin.PeerForm": {
  2512. "type": "object",
  2513. "properties": {
  2514. "cpu": {
  2515. "type": "string"
  2516. },
  2517. "hostname": {
  2518. "type": "string"
  2519. },
  2520. "id": {
  2521. "type": "string"
  2522. },
  2523. "memory": {
  2524. "type": "string"
  2525. },
  2526. "os": {
  2527. "type": "string"
  2528. },
  2529. "row_id": {
  2530. "type": "integer"
  2531. },
  2532. "username": {
  2533. "type": "string"
  2534. },
  2535. "uuid": {
  2536. "type": "string"
  2537. },
  2538. "version": {
  2539. "type": "string"
  2540. }
  2541. }
  2542. },
  2543. "admin.ShareByWebClientForm": {
  2544. "type": "object",
  2545. "required": [
  2546. "id",
  2547. "password",
  2548. "password_type"
  2549. ],
  2550. "properties": {
  2551. "expire": {
  2552. "type": "integer"
  2553. },
  2554. "id": {
  2555. "type": "string"
  2556. },
  2557. "password": {
  2558. "type": "string"
  2559. },
  2560. "password_type": {
  2561. "description": "只能是once,fixed",
  2562. "type": "string",
  2563. "enum": [
  2564. "once",
  2565. "fixed"
  2566. ]
  2567. }
  2568. }
  2569. },
  2570. "admin.TagForm": {
  2571. "type": "object",
  2572. "required": [
  2573. "color",
  2574. "name"
  2575. ],
  2576. "properties": {
  2577. "color": {
  2578. "type": "integer"
  2579. },
  2580. "id": {
  2581. "type": "integer"
  2582. },
  2583. "name": {
  2584. "type": "string"
  2585. },
  2586. "user_id": {
  2587. "type": "integer"
  2588. }
  2589. }
  2590. },
  2591. "admin.UserForm": {
  2592. "type": "object",
  2593. "required": [
  2594. "group_id",
  2595. "status",
  2596. "username"
  2597. ],
  2598. "properties": {
  2599. "avatar": {
  2600. "type": "string"
  2601. },
  2602. "group_id": {
  2603. "type": "integer"
  2604. },
  2605. "id": {
  2606. "type": "integer"
  2607. },
  2608. "is_admin": {
  2609. "type": "boolean"
  2610. },
  2611. "nickname": {
  2612. "description": "Password string `json:\"password\" validate:\"required,gte=4,lte=20\"`",
  2613. "type": "string"
  2614. },
  2615. "status": {
  2616. "minimum": 0,
  2617. "allOf": [
  2618. {
  2619. "$ref": "#/definitions/model.StatusCode"
  2620. }
  2621. ]
  2622. },
  2623. "username": {
  2624. "type": "string",
  2625. "maxLength": 10,
  2626. "minLength": 4
  2627. }
  2628. }
  2629. },
  2630. "admin.UserOauthItem": {
  2631. "type": "object",
  2632. "properties": {
  2633. "status": {
  2634. "type": "integer"
  2635. },
  2636. "third_type": {
  2637. "type": "string"
  2638. }
  2639. }
  2640. },
  2641. "admin.UserPasswordForm": {
  2642. "type": "object",
  2643. "required": [
  2644. "id",
  2645. "password"
  2646. ],
  2647. "properties": {
  2648. "id": {
  2649. "type": "integer"
  2650. },
  2651. "password": {
  2652. "type": "string",
  2653. "maxLength": 20,
  2654. "minLength": 4
  2655. }
  2656. }
  2657. },
  2658. "model.AddressBook": {
  2659. "type": "object",
  2660. "properties": {
  2661. "alias": {
  2662. "type": "string"
  2663. },
  2664. "created_at": {
  2665. "type": "string"
  2666. },
  2667. "forceAlwaysRelay": {
  2668. "type": "boolean"
  2669. },
  2670. "hash": {
  2671. "type": "string"
  2672. },
  2673. "hostname": {
  2674. "type": "string"
  2675. },
  2676. "id": {
  2677. "type": "string"
  2678. },
  2679. "loginName": {
  2680. "type": "string"
  2681. },
  2682. "online": {
  2683. "type": "boolean"
  2684. },
  2685. "password": {
  2686. "type": "string"
  2687. },
  2688. "platform": {
  2689. "type": "string"
  2690. },
  2691. "rdpPort": {
  2692. "type": "string"
  2693. },
  2694. "rdpUsername": {
  2695. "type": "string"
  2696. },
  2697. "row_id": {
  2698. "type": "integer"
  2699. },
  2700. "sameServer": {
  2701. "type": "boolean"
  2702. },
  2703. "tags": {
  2704. "type": "array",
  2705. "items": {
  2706. "type": "string"
  2707. }
  2708. },
  2709. "updated_at": {
  2710. "type": "string"
  2711. },
  2712. "user_id": {
  2713. "type": "integer"
  2714. },
  2715. "username": {
  2716. "type": "string"
  2717. }
  2718. }
  2719. },
  2720. "model.AddressBookList": {
  2721. "type": "object",
  2722. "properties": {
  2723. "list": {
  2724. "type": "array",
  2725. "items": {
  2726. "$ref": "#/definitions/model.AddressBook"
  2727. }
  2728. },
  2729. "page": {
  2730. "type": "integer"
  2731. },
  2732. "page_size": {
  2733. "type": "integer"
  2734. },
  2735. "total": {
  2736. "type": "integer"
  2737. }
  2738. }
  2739. },
  2740. "model.Group": {
  2741. "type": "object",
  2742. "properties": {
  2743. "created_at": {
  2744. "type": "string"
  2745. },
  2746. "id": {
  2747. "type": "integer"
  2748. },
  2749. "name": {
  2750. "type": "string"
  2751. },
  2752. "type": {
  2753. "type": "integer"
  2754. },
  2755. "updated_at": {
  2756. "type": "string"
  2757. }
  2758. }
  2759. },
  2760. "model.GroupList": {
  2761. "type": "object",
  2762. "properties": {
  2763. "list": {
  2764. "type": "array",
  2765. "items": {
  2766. "$ref": "#/definitions/model.Group"
  2767. }
  2768. },
  2769. "page": {
  2770. "type": "integer"
  2771. },
  2772. "page_size": {
  2773. "type": "integer"
  2774. },
  2775. "total": {
  2776. "type": "integer"
  2777. }
  2778. }
  2779. },
  2780. "model.LoginLog": {
  2781. "type": "object",
  2782. "properties": {
  2783. "client": {
  2784. "description": "webadmin,webclient,app,",
  2785. "type": "string"
  2786. },
  2787. "created_at": {
  2788. "type": "string"
  2789. },
  2790. "id": {
  2791. "type": "integer"
  2792. },
  2793. "ip": {
  2794. "type": "string"
  2795. },
  2796. "platform": {
  2797. "description": "windows,linux,mac,android,ios",
  2798. "type": "string"
  2799. },
  2800. "type": {
  2801. "description": "account,oauth",
  2802. "type": "string"
  2803. },
  2804. "updated_at": {
  2805. "type": "string"
  2806. },
  2807. "user_id": {
  2808. "type": "integer"
  2809. },
  2810. "uuid": {
  2811. "type": "string"
  2812. }
  2813. }
  2814. },
  2815. "model.LoginLogList": {
  2816. "type": "object",
  2817. "properties": {
  2818. "list": {
  2819. "type": "array",
  2820. "items": {
  2821. "$ref": "#/definitions/model.LoginLog"
  2822. }
  2823. },
  2824. "page": {
  2825. "type": "integer"
  2826. },
  2827. "page_size": {
  2828. "type": "integer"
  2829. },
  2830. "total": {
  2831. "type": "integer"
  2832. }
  2833. }
  2834. },
  2835. "model.Oauth": {
  2836. "type": "object",
  2837. "properties": {
  2838. "auto_register": {
  2839. "type": "boolean"
  2840. },
  2841. "client_id": {
  2842. "type": "string"
  2843. },
  2844. "client_secret": {
  2845. "type": "string"
  2846. },
  2847. "created_at": {
  2848. "type": "string"
  2849. },
  2850. "id": {
  2851. "type": "integer"
  2852. },
  2853. "op": {
  2854. "type": "string"
  2855. },
  2856. "redirect_url": {
  2857. "type": "string"
  2858. },
  2859. "updated_at": {
  2860. "type": "string"
  2861. }
  2862. }
  2863. },
  2864. "model.OauthList": {
  2865. "type": "object",
  2866. "properties": {
  2867. "list": {
  2868. "type": "array",
  2869. "items": {
  2870. "$ref": "#/definitions/model.Oauth"
  2871. }
  2872. },
  2873. "page": {
  2874. "type": "integer"
  2875. },
  2876. "page_size": {
  2877. "type": "integer"
  2878. },
  2879. "total": {
  2880. "type": "integer"
  2881. }
  2882. }
  2883. },
  2884. "model.Peer": {
  2885. "type": "object",
  2886. "properties": {
  2887. "cpu": {
  2888. "type": "string"
  2889. },
  2890. "created_at": {
  2891. "type": "string"
  2892. },
  2893. "hostname": {
  2894. "type": "string"
  2895. },
  2896. "id": {
  2897. "type": "string"
  2898. },
  2899. "last_online_time": {
  2900. "type": "integer"
  2901. },
  2902. "memory": {
  2903. "type": "string"
  2904. },
  2905. "os": {
  2906. "type": "string"
  2907. },
  2908. "row_id": {
  2909. "type": "integer"
  2910. },
  2911. "updated_at": {
  2912. "type": "string"
  2913. },
  2914. "user": {
  2915. "$ref": "#/definitions/model.User"
  2916. },
  2917. "user_id": {
  2918. "type": "integer"
  2919. },
  2920. "username": {
  2921. "type": "string"
  2922. },
  2923. "uuid": {
  2924. "type": "string"
  2925. },
  2926. "version": {
  2927. "type": "string"
  2928. }
  2929. }
  2930. },
  2931. "model.PeerList": {
  2932. "type": "object",
  2933. "properties": {
  2934. "list": {
  2935. "type": "array",
  2936. "items": {
  2937. "$ref": "#/definitions/model.Peer"
  2938. }
  2939. },
  2940. "page": {
  2941. "type": "integer"
  2942. },
  2943. "page_size": {
  2944. "type": "integer"
  2945. },
  2946. "total": {
  2947. "type": "integer"
  2948. }
  2949. }
  2950. },
  2951. "model.StatusCode": {
  2952. "type": "integer",
  2953. "enum": [
  2954. 1,
  2955. 2
  2956. ],
  2957. "x-enum-comments": {
  2958. "COMMON_STATUS_DISABLED": "通用状态 禁用",
  2959. "COMMON_STATUS_ENABLE": "通用状态 启用"
  2960. },
  2961. "x-enum-varnames": [
  2962. "COMMON_STATUS_ENABLE",
  2963. "COMMON_STATUS_DISABLED"
  2964. ]
  2965. },
  2966. "model.Tag": {
  2967. "type": "object",
  2968. "properties": {
  2969. "color": {
  2970. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  2971. "type": "integer"
  2972. },
  2973. "created_at": {
  2974. "type": "string"
  2975. },
  2976. "id": {
  2977. "type": "integer"
  2978. },
  2979. "name": {
  2980. "type": "string"
  2981. },
  2982. "updated_at": {
  2983. "type": "string"
  2984. },
  2985. "user_id": {
  2986. "type": "integer"
  2987. }
  2988. }
  2989. },
  2990. "model.TagList": {
  2991. "type": "object",
  2992. "properties": {
  2993. "list": {
  2994. "type": "array",
  2995. "items": {
  2996. "$ref": "#/definitions/model.Tag"
  2997. }
  2998. },
  2999. "page": {
  3000. "type": "integer"
  3001. },
  3002. "page_size": {
  3003. "type": "integer"
  3004. },
  3005. "total": {
  3006. "type": "integer"
  3007. }
  3008. }
  3009. },
  3010. "model.User": {
  3011. "type": "object",
  3012. "properties": {
  3013. "avatar": {
  3014. "type": "string"
  3015. },
  3016. "created_at": {
  3017. "type": "string"
  3018. },
  3019. "group_id": {
  3020. "type": "integer"
  3021. },
  3022. "id": {
  3023. "type": "integer"
  3024. },
  3025. "is_admin": {
  3026. "type": "boolean"
  3027. },
  3028. "nickname": {
  3029. "type": "string"
  3030. },
  3031. "status": {
  3032. "$ref": "#/definitions/model.StatusCode"
  3033. },
  3034. "updated_at": {
  3035. "type": "string"
  3036. },
  3037. "username": {
  3038. "type": "string"
  3039. }
  3040. }
  3041. },
  3042. "model.UserList": {
  3043. "type": "object",
  3044. "properties": {
  3045. "list": {
  3046. "type": "array",
  3047. "items": {
  3048. "$ref": "#/definitions/model.User"
  3049. }
  3050. },
  3051. "page": {
  3052. "type": "integer"
  3053. },
  3054. "page_size": {
  3055. "type": "integer"
  3056. },
  3057. "total": {
  3058. "type": "integer"
  3059. }
  3060. }
  3061. },
  3062. "response.Response": {
  3063. "type": "object",
  3064. "properties": {
  3065. "code": {
  3066. "type": "integer"
  3067. },
  3068. "data": {},
  3069. "message": {
  3070. "type": "string"
  3071. }
  3072. }
  3073. }
  3074. },
  3075. "securityDefinitions": {
  3076. "BearerAuth": {
  3077. "type": "apiKey",
  3078. "name": "Authorization",
  3079. "in": "header"
  3080. },
  3081. "token": {
  3082. "type": "apiKey",
  3083. "name": "api-token",
  3084. "in": "header"
  3085. }
  3086. }
  3087. }