docs.go 70 KB

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