admin_docs.go 96 KB

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