api_swagger.json 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "接口",
  5. "title": "管理系统API",
  6. "contact": {},
  7. "version": "1.0"
  8. },
  9. "basePath": "/api",
  10. "paths": {
  11. "/": {
  12. "get": {
  13. "description": "首页",
  14. "consumes": [
  15. "application/json"
  16. ],
  17. "produces": [
  18. "application/json"
  19. ],
  20. "tags": [
  21. "首页"
  22. ],
  23. "summary": "首页",
  24. "responses": {
  25. "200": {
  26. "description": "OK",
  27. "schema": {
  28. "$ref": "#/definitions/response.Response"
  29. }
  30. },
  31. "500": {
  32. "description": "Internal Server Error",
  33. "schema": {
  34. "$ref": "#/definitions/response.Response"
  35. }
  36. }
  37. }
  38. }
  39. },
  40. "/ab": {
  41. "get": {
  42. "security": [
  43. {
  44. "BearerAuth": []
  45. }
  46. ],
  47. "description": "地址列表",
  48. "consumes": [
  49. "application/json"
  50. ],
  51. "produces": [
  52. "application/json"
  53. ],
  54. "tags": [
  55. "地址"
  56. ],
  57. "summary": "地址列表",
  58. "responses": {
  59. "200": {
  60. "description": "OK",
  61. "schema": {
  62. "$ref": "#/definitions/response.Response"
  63. }
  64. },
  65. "500": {
  66. "description": "Internal Server Error",
  67. "schema": {
  68. "$ref": "#/definitions/response.ErrorResponse"
  69. }
  70. }
  71. }
  72. },
  73. "post": {
  74. "security": [
  75. {
  76. "BearerAuth": []
  77. }
  78. ],
  79. "description": "地址更新",
  80. "consumes": [
  81. "application/json"
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "地址"
  88. ],
  89. "summary": "地址更新",
  90. "parameters": [
  91. {
  92. "description": "地址表单",
  93. "name": "body",
  94. "in": "body",
  95. "required": true,
  96. "schema": {
  97. "$ref": "#/definitions/api.AddressBookForm"
  98. }
  99. }
  100. ],
  101. "responses": {
  102. "200": {
  103. "description": "null",
  104. "schema": {
  105. "type": "string"
  106. }
  107. },
  108. "500": {
  109. "description": "Internal Server Error",
  110. "schema": {
  111. "$ref": "#/definitions/response.ErrorResponse"
  112. }
  113. }
  114. }
  115. }
  116. },
  117. "/ab/peer/add/{guid}": {
  118. "post": {
  119. "security": [
  120. {
  121. "BearerAuth": []
  122. }
  123. ],
  124. "description": "添加地址",
  125. "consumes": [
  126. "application/json"
  127. ],
  128. "produces": [
  129. "application/json"
  130. ],
  131. "tags": [
  132. "地址[Personal]"
  133. ],
  134. "summary": "添加地址",
  135. "parameters": [
  136. {
  137. "type": "string",
  138. "description": "guid",
  139. "name": "guid",
  140. "in": "path",
  141. "required": true
  142. }
  143. ],
  144. "responses": {
  145. "200": {
  146. "description": "OK",
  147. "schema": {
  148. "type": "string"
  149. }
  150. },
  151. "500": {
  152. "description": "Internal Server Error",
  153. "schema": {
  154. "$ref": "#/definitions/response.ErrorResponse"
  155. }
  156. }
  157. }
  158. },
  159. "delete": {
  160. "security": [
  161. {
  162. "BearerAuth": []
  163. }
  164. ],
  165. "description": "删除地址",
  166. "consumes": [
  167. "application/json"
  168. ],
  169. "produces": [
  170. "application/json"
  171. ],
  172. "tags": [
  173. "地址[Personal]"
  174. ],
  175. "summary": "删除地址",
  176. "parameters": [
  177. {
  178. "type": "string",
  179. "description": "guid",
  180. "name": "guid",
  181. "in": "path",
  182. "required": true
  183. }
  184. ],
  185. "responses": {
  186. "200": {
  187. "description": "OK",
  188. "schema": {
  189. "type": "string"
  190. }
  191. },
  192. "500": {
  193. "description": "Internal Server Error",
  194. "schema": {
  195. "$ref": "#/definitions/response.ErrorResponse"
  196. }
  197. }
  198. }
  199. }
  200. },
  201. "/ab/peer/update/{guid}": {
  202. "put": {
  203. "security": [
  204. {
  205. "BearerAuth": []
  206. }
  207. ],
  208. "description": "更新地址",
  209. "consumes": [
  210. "application/json"
  211. ],
  212. "produces": [
  213. "application/json"
  214. ],
  215. "tags": [
  216. "地址[Personal]"
  217. ],
  218. "summary": "更新地址",
  219. "parameters": [
  220. {
  221. "type": "string",
  222. "description": "guid",
  223. "name": "guid",
  224. "in": "path",
  225. "required": true
  226. }
  227. ],
  228. "responses": {
  229. "200": {
  230. "description": "OK",
  231. "schema": {
  232. "type": "string"
  233. }
  234. },
  235. "500": {
  236. "description": "Internal Server Error",
  237. "schema": {
  238. "$ref": "#/definitions/response.ErrorResponse"
  239. }
  240. }
  241. }
  242. }
  243. },
  244. "/ab/peers": {
  245. "post": {
  246. "security": [
  247. {
  248. "BearerAuth": []
  249. }
  250. ],
  251. "description": "地址",
  252. "consumes": [
  253. "application/json"
  254. ],
  255. "produces": [
  256. "application/json"
  257. ],
  258. "tags": [
  259. "地址[Personal]"
  260. ],
  261. "summary": "地址列表",
  262. "parameters": [
  263. {
  264. "type": "integer",
  265. "description": "页码",
  266. "name": "current",
  267. "in": "query"
  268. },
  269. {
  270. "type": "integer",
  271. "description": "每页数量",
  272. "name": "pageSize",
  273. "in": "query"
  274. },
  275. {
  276. "type": "string",
  277. "description": "guid",
  278. "name": "ab",
  279. "in": "query"
  280. }
  281. ],
  282. "responses": {
  283. "200": {
  284. "description": "OK",
  285. "schema": {
  286. "$ref": "#/definitions/response.Response"
  287. }
  288. },
  289. "500": {
  290. "description": "Internal Server Error",
  291. "schema": {
  292. "$ref": "#/definitions/response.Response"
  293. }
  294. }
  295. }
  296. }
  297. },
  298. "/ab/personal": {
  299. "post": {
  300. "security": [
  301. {
  302. "BearerAuth": []
  303. }
  304. ],
  305. "description": "个人地址",
  306. "consumes": [
  307. "application/json"
  308. ],
  309. "produces": [
  310. "application/json"
  311. ],
  312. "tags": [
  313. "地址[Personal]"
  314. ],
  315. "summary": "个人地址",
  316. "parameters": [
  317. {
  318. "description": "string valid",
  319. "name": "string",
  320. "in": "body",
  321. "schema": {
  322. "type": "string"
  323. }
  324. }
  325. ],
  326. "responses": {
  327. "200": {
  328. "description": "OK",
  329. "schema": {
  330. "$ref": "#/definitions/response.Response"
  331. }
  332. },
  333. "500": {
  334. "description": "Internal Server Error",
  335. "schema": {
  336. "$ref": "#/definitions/response.Response"
  337. }
  338. }
  339. }
  340. }
  341. },
  342. "/ab/settings": {
  343. "post": {
  344. "security": [
  345. {
  346. "BearerAuth": []
  347. }
  348. ],
  349. "description": "设置",
  350. "consumes": [
  351. "application/json"
  352. ],
  353. "produces": [
  354. "application/json"
  355. ],
  356. "tags": [
  357. "地址[Personal]"
  358. ],
  359. "summary": "设置",
  360. "parameters": [
  361. {
  362. "description": "string valid",
  363. "name": "string",
  364. "in": "body",
  365. "schema": {
  366. "type": "string"
  367. }
  368. }
  369. ],
  370. "responses": {
  371. "200": {
  372. "description": "OK",
  373. "schema": {
  374. "$ref": "#/definitions/response.Response"
  375. }
  376. },
  377. "500": {
  378. "description": "Internal Server Error",
  379. "schema": {
  380. "$ref": "#/definitions/response.Response"
  381. }
  382. }
  383. }
  384. }
  385. },
  386. "/ab/shared/profiles": {
  387. "post": {
  388. "security": [
  389. {
  390. "BearerAuth": []
  391. }
  392. ],
  393. "description": "共享",
  394. "consumes": [
  395. "application/json"
  396. ],
  397. "produces": [
  398. "application/json"
  399. ],
  400. "tags": [
  401. "地址[Personal]"
  402. ],
  403. "summary": "共享地址簿",
  404. "parameters": [
  405. {
  406. "type": "integer",
  407. "description": "页码",
  408. "name": "current",
  409. "in": "query"
  410. },
  411. {
  412. "type": "integer",
  413. "description": "每页数量",
  414. "name": "pageSize",
  415. "in": "query"
  416. }
  417. ],
  418. "responses": {
  419. "200": {
  420. "description": "OK",
  421. "schema": {
  422. "$ref": "#/definitions/response.Response"
  423. }
  424. },
  425. "500": {
  426. "description": "Internal Server Error",
  427. "schema": {
  428. "$ref": "#/definitions/response.Response"
  429. }
  430. }
  431. }
  432. }
  433. },
  434. "/ab/tag/add/{guid}": {
  435. "post": {
  436. "security": [
  437. {
  438. "BearerAuth": []
  439. }
  440. ],
  441. "description": "标签",
  442. "consumes": [
  443. "application/json"
  444. ],
  445. "produces": [
  446. "application/json"
  447. ],
  448. "tags": [
  449. "地址[Personal]"
  450. ],
  451. "summary": "标签添加",
  452. "parameters": [
  453. {
  454. "type": "string",
  455. "description": "guid",
  456. "name": "guid",
  457. "in": "path",
  458. "required": true
  459. }
  460. ],
  461. "responses": {
  462. "200": {
  463. "description": "OK",
  464. "schema": {
  465. "type": "string"
  466. }
  467. },
  468. "500": {
  469. "description": "Internal Server Error",
  470. "schema": {
  471. "$ref": "#/definitions/response.ErrorResponse"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "/ab/tag/rename/{guid}": {
  478. "put": {
  479. "security": [
  480. {
  481. "BearerAuth": []
  482. }
  483. ],
  484. "description": "标签",
  485. "consumes": [
  486. "application/json"
  487. ],
  488. "produces": [
  489. "application/json"
  490. ],
  491. "tags": [
  492. "地址[Personal]"
  493. ],
  494. "summary": "标签重命名",
  495. "parameters": [
  496. {
  497. "type": "string",
  498. "description": "guid",
  499. "name": "guid",
  500. "in": "path",
  501. "required": true
  502. }
  503. ],
  504. "responses": {
  505. "200": {
  506. "description": "OK",
  507. "schema": {
  508. "type": "string"
  509. }
  510. },
  511. "500": {
  512. "description": "Internal Server Error",
  513. "schema": {
  514. "$ref": "#/definitions/response.ErrorResponse"
  515. }
  516. }
  517. }
  518. }
  519. },
  520. "/ab/tag/update/{guid}": {
  521. "put": {
  522. "security": [
  523. {
  524. "BearerAuth": []
  525. }
  526. ],
  527. "description": "标签",
  528. "consumes": [
  529. "application/json"
  530. ],
  531. "produces": [
  532. "application/json"
  533. ],
  534. "tags": [
  535. "地址[Personal]"
  536. ],
  537. "summary": "标签修改颜色",
  538. "parameters": [
  539. {
  540. "type": "string",
  541. "description": "guid",
  542. "name": "guid",
  543. "in": "path",
  544. "required": true
  545. }
  546. ],
  547. "responses": {
  548. "200": {
  549. "description": "OK",
  550. "schema": {
  551. "type": "string"
  552. }
  553. },
  554. "500": {
  555. "description": "Internal Server Error",
  556. "schema": {
  557. "$ref": "#/definitions/response.ErrorResponse"
  558. }
  559. }
  560. }
  561. }
  562. },
  563. "/ab/tag/{guid}": {
  564. "delete": {
  565. "security": [
  566. {
  567. "BearerAuth": []
  568. }
  569. ],
  570. "description": "标签",
  571. "consumes": [
  572. "application/json"
  573. ],
  574. "produces": [
  575. "application/json"
  576. ],
  577. "tags": [
  578. "地址[Personal]"
  579. ],
  580. "summary": "标签删除",
  581. "parameters": [
  582. {
  583. "type": "string",
  584. "description": "guid",
  585. "name": "guid",
  586. "in": "path",
  587. "required": true
  588. }
  589. ],
  590. "responses": {
  591. "200": {
  592. "description": "OK",
  593. "schema": {
  594. "type": "string"
  595. }
  596. },
  597. "500": {
  598. "description": "Internal Server Error",
  599. "schema": {
  600. "$ref": "#/definitions/response.ErrorResponse"
  601. }
  602. }
  603. }
  604. }
  605. },
  606. "/ab/tags/{guid}": {
  607. "post": {
  608. "security": [
  609. {
  610. "BearerAuth": []
  611. }
  612. ],
  613. "description": "标签",
  614. "consumes": [
  615. "application/json"
  616. ],
  617. "produces": [
  618. "application/json"
  619. ],
  620. "tags": [
  621. "地址[Personal]"
  622. ],
  623. "summary": "标签",
  624. "parameters": [
  625. {
  626. "type": "string",
  627. "description": "guid",
  628. "name": "guid",
  629. "in": "path",
  630. "required": true
  631. }
  632. ],
  633. "responses": {
  634. "200": {
  635. "description": "OK",
  636. "schema": {
  637. "$ref": "#/definitions/model.TagList"
  638. }
  639. },
  640. "500": {
  641. "description": "Internal Server Error",
  642. "schema": {
  643. "$ref": "#/definitions/response.ErrorResponse"
  644. }
  645. }
  646. }
  647. }
  648. },
  649. "/audit/conn": {
  650. "post": {
  651. "description": "审计连接",
  652. "consumes": [
  653. "application/json"
  654. ],
  655. "produces": [
  656. "application/json"
  657. ],
  658. "tags": [
  659. "审计"
  660. ],
  661. "summary": "审计连接",
  662. "parameters": [
  663. {
  664. "description": "审计连接",
  665. "name": "body",
  666. "in": "body",
  667. "required": true,
  668. "schema": {
  669. "$ref": "#/definitions/api.AuditConnForm"
  670. }
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "OK",
  676. "schema": {
  677. "type": "string"
  678. }
  679. },
  680. "500": {
  681. "description": "Internal Server Error",
  682. "schema": {
  683. "$ref": "#/definitions/response.Response"
  684. }
  685. }
  686. }
  687. }
  688. },
  689. "/audit/file": {
  690. "post": {
  691. "description": "审计文件",
  692. "consumes": [
  693. "application/json"
  694. ],
  695. "produces": [
  696. "application/json"
  697. ],
  698. "tags": [
  699. "审计"
  700. ],
  701. "summary": "审计文件",
  702. "parameters": [
  703. {
  704. "description": "审计文件",
  705. "name": "body",
  706. "in": "body",
  707. "required": true,
  708. "schema": {
  709. "$ref": "#/definitions/api.AuditFileForm"
  710. }
  711. }
  712. ],
  713. "responses": {
  714. "200": {
  715. "description": "OK",
  716. "schema": {
  717. "type": "string"
  718. }
  719. },
  720. "500": {
  721. "description": "Internal Server Error",
  722. "schema": {
  723. "$ref": "#/definitions/response.Response"
  724. }
  725. }
  726. }
  727. }
  728. },
  729. "/currentUser": {
  730. "get": {
  731. "security": [
  732. {
  733. "token": []
  734. }
  735. ],
  736. "description": "用户信息",
  737. "consumes": [
  738. "application/json"
  739. ],
  740. "produces": [
  741. "application/json"
  742. ],
  743. "tags": [
  744. "用户"
  745. ],
  746. "summary": "用户信息",
  747. "responses": {
  748. "200": {
  749. "description": "OK",
  750. "schema": {
  751. "$ref": "#/definitions/api.UserPayload"
  752. }
  753. },
  754. "500": {
  755. "description": "Internal Server Error",
  756. "schema": {
  757. "$ref": "#/definitions/response.Response"
  758. }
  759. }
  760. }
  761. }
  762. },
  763. "/heartbeat": {
  764. "post": {
  765. "description": "心跳",
  766. "consumes": [
  767. "application/json"
  768. ],
  769. "produces": [
  770. "application/json"
  771. ],
  772. "tags": [
  773. "首页"
  774. ],
  775. "summary": "心跳",
  776. "responses": {
  777. "200": {
  778. "description": "OK"
  779. },
  780. "500": {
  781. "description": "Internal Server Error",
  782. "schema": {
  783. "$ref": "#/definitions/response.Response"
  784. }
  785. }
  786. }
  787. }
  788. },
  789. "/login": {
  790. "post": {
  791. "description": "登录",
  792. "consumes": [
  793. "application/json"
  794. ],
  795. "produces": [
  796. "application/json"
  797. ],
  798. "tags": [
  799. "登录"
  800. ],
  801. "summary": "登录",
  802. "parameters": [
  803. {
  804. "description": "登录表单",
  805. "name": "body",
  806. "in": "body",
  807. "required": true,
  808. "schema": {
  809. "$ref": "#/definitions/api.LoginForm"
  810. }
  811. }
  812. ],
  813. "responses": {
  814. "200": {
  815. "description": "OK",
  816. "schema": {
  817. "$ref": "#/definitions/api.LoginRes"
  818. }
  819. },
  820. "500": {
  821. "description": "Internal Server Error",
  822. "schema": {
  823. "$ref": "#/definitions/response.ErrorResponse"
  824. }
  825. }
  826. }
  827. }
  828. },
  829. "/login-options": {
  830. "get": {
  831. "description": "登录选项",
  832. "consumes": [
  833. "application/json"
  834. ],
  835. "produces": [
  836. "application/json"
  837. ],
  838. "tags": [
  839. "登录"
  840. ],
  841. "summary": "登录选项",
  842. "responses": {
  843. "200": {
  844. "description": "OK",
  845. "schema": {
  846. "type": "array",
  847. "items": {
  848. "type": "string"
  849. }
  850. }
  851. },
  852. "500": {
  853. "description": "Internal Server Error",
  854. "schema": {
  855. "$ref": "#/definitions/response.ErrorResponse"
  856. }
  857. }
  858. }
  859. }
  860. },
  861. "/logout": {
  862. "post": {
  863. "description": "登出",
  864. "consumes": [
  865. "application/json"
  866. ],
  867. "produces": [
  868. "application/json"
  869. ],
  870. "tags": [
  871. "登录"
  872. ],
  873. "summary": "登出",
  874. "responses": {
  875. "200": {
  876. "description": "OK",
  877. "schema": {
  878. "type": "string"
  879. }
  880. },
  881. "500": {
  882. "description": "Internal Server Error",
  883. "schema": {
  884. "$ref": "#/definitions/response.ErrorResponse"
  885. }
  886. }
  887. }
  888. }
  889. },
  890. "/oauth/callback": {
  891. "get": {
  892. "description": "OauthCallback",
  893. "consumes": [
  894. "application/json"
  895. ],
  896. "produces": [
  897. "application/json"
  898. ],
  899. "tags": [
  900. "Oauth"
  901. ],
  902. "summary": "OauthCallback",
  903. "responses": {
  904. "200": {
  905. "description": "OK",
  906. "schema": {
  907. "$ref": "#/definitions/api.LoginRes"
  908. }
  909. },
  910. "500": {
  911. "description": "Internal Server Error",
  912. "schema": {
  913. "$ref": "#/definitions/response.ErrorResponse"
  914. }
  915. }
  916. }
  917. }
  918. },
  919. "/oidc/auth": {
  920. "post": {
  921. "description": "OidcAuth",
  922. "consumes": [
  923. "application/json"
  924. ],
  925. "produces": [
  926. "application/json"
  927. ],
  928. "tags": [
  929. "Oauth"
  930. ],
  931. "summary": "OidcAuth",
  932. "responses": {
  933. "200": {
  934. "description": "OK",
  935. "schema": {
  936. "$ref": "#/definitions/api.LoginRes"
  937. }
  938. },
  939. "500": {
  940. "description": "Internal Server Error",
  941. "schema": {
  942. "$ref": "#/definitions/response.ErrorResponse"
  943. }
  944. }
  945. }
  946. }
  947. },
  948. "/oidc/auth-query": {
  949. "get": {
  950. "description": "OidcAuthQuery",
  951. "consumes": [
  952. "application/json"
  953. ],
  954. "produces": [
  955. "application/json"
  956. ],
  957. "tags": [
  958. "Oauth"
  959. ],
  960. "summary": "OidcAuthQuery",
  961. "responses": {
  962. "200": {
  963. "description": "OK",
  964. "schema": {
  965. "$ref": "#/definitions/api.LoginRes"
  966. }
  967. },
  968. "500": {
  969. "description": "Internal Server Error",
  970. "schema": {
  971. "$ref": "#/definitions/response.ErrorResponse"
  972. }
  973. }
  974. }
  975. }
  976. },
  977. "/peers": {
  978. "get": {
  979. "security": [
  980. {
  981. "BearerAuth": []
  982. }
  983. ],
  984. "description": "机器",
  985. "consumes": [
  986. "application/json"
  987. ],
  988. "produces": [
  989. "application/json"
  990. ],
  991. "tags": [
  992. "群组"
  993. ],
  994. "summary": "机器",
  995. "parameters": [
  996. {
  997. "type": "integer",
  998. "description": "页码",
  999. "name": "page",
  1000. "in": "query"
  1001. },
  1002. {
  1003. "type": "integer",
  1004. "description": "每页数量",
  1005. "name": "pageSize",
  1006. "in": "query"
  1007. },
  1008. {
  1009. "type": "integer",
  1010. "description": "状态",
  1011. "name": "status",
  1012. "in": "query"
  1013. },
  1014. {
  1015. "type": "string",
  1016. "description": "accessible",
  1017. "name": "accessible",
  1018. "in": "query"
  1019. }
  1020. ],
  1021. "responses": {
  1022. "200": {
  1023. "description": "OK",
  1024. "schema": {
  1025. "$ref": "#/definitions/response.DataResponse"
  1026. }
  1027. },
  1028. "500": {
  1029. "description": "Internal Server Error",
  1030. "schema": {
  1031. "$ref": "#/definitions/response.Response"
  1032. }
  1033. }
  1034. }
  1035. }
  1036. },
  1037. "/server-config": {
  1038. "get": {
  1039. "security": [
  1040. {
  1041. "token": []
  1042. }
  1043. ],
  1044. "description": "服务配置,给webclient提供api-server",
  1045. "consumes": [
  1046. "application/json"
  1047. ],
  1048. "produces": [
  1049. "application/json"
  1050. ],
  1051. "tags": [
  1052. "WEBCLIENT"
  1053. ],
  1054. "summary": "服务配置",
  1055. "responses": {
  1056. "200": {
  1057. "description": "OK",
  1058. "schema": {
  1059. "$ref": "#/definitions/response.Response"
  1060. }
  1061. },
  1062. "500": {
  1063. "description": "Internal Server Error",
  1064. "schema": {
  1065. "$ref": "#/definitions/response.Response"
  1066. }
  1067. }
  1068. }
  1069. }
  1070. },
  1071. "/server-config-v2": {
  1072. "get": {
  1073. "security": [
  1074. {
  1075. "token": []
  1076. }
  1077. ],
  1078. "description": "服务配置,给webclient提供api-server",
  1079. "consumes": [
  1080. "application/json"
  1081. ],
  1082. "produces": [
  1083. "application/json"
  1084. ],
  1085. "tags": [
  1086. "WEBCLIENT_V2"
  1087. ],
  1088. "summary": "服务配置",
  1089. "responses": {
  1090. "200": {
  1091. "description": "OK",
  1092. "schema": {
  1093. "$ref": "#/definitions/response.Response"
  1094. }
  1095. },
  1096. "500": {
  1097. "description": "Internal Server Error",
  1098. "schema": {
  1099. "$ref": "#/definitions/response.Response"
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "/shared-peer": {
  1106. "post": {
  1107. "description": "分享的peer",
  1108. "consumes": [
  1109. "application/json"
  1110. ],
  1111. "produces": [
  1112. "application/json"
  1113. ],
  1114. "tags": [
  1115. "WEBCLIENT"
  1116. ],
  1117. "summary": "分享的peer",
  1118. "responses": {
  1119. "200": {
  1120. "description": "OK",
  1121. "schema": {
  1122. "$ref": "#/definitions/response.Response"
  1123. }
  1124. },
  1125. "500": {
  1126. "description": "Internal Server Error",
  1127. "schema": {
  1128. "$ref": "#/definitions/response.Response"
  1129. }
  1130. }
  1131. }
  1132. }
  1133. },
  1134. "/sysinfo": {
  1135. "post": {
  1136. "description": "提交系统信息",
  1137. "consumes": [
  1138. "application/json"
  1139. ],
  1140. "produces": [
  1141. "application/json"
  1142. ],
  1143. "tags": [
  1144. "地址"
  1145. ],
  1146. "summary": "提交系统信息",
  1147. "parameters": [
  1148. {
  1149. "description": "系统信息表单",
  1150. "name": "body",
  1151. "in": "body",
  1152. "required": true,
  1153. "schema": {
  1154. "$ref": "#/definitions/api.PeerForm"
  1155. }
  1156. }
  1157. ],
  1158. "responses": {
  1159. "200": {
  1160. "description": "SYSINFO_UPDATED,ID_NOT_FOUND",
  1161. "schema": {
  1162. "type": "string"
  1163. }
  1164. },
  1165. "500": {
  1166. "description": "Internal Server Error",
  1167. "schema": {
  1168. "$ref": "#/definitions/response.ErrorResponse"
  1169. }
  1170. }
  1171. }
  1172. }
  1173. },
  1174. "/users": {
  1175. "get": {
  1176. "security": [
  1177. {
  1178. "BearerAuth": []
  1179. }
  1180. ],
  1181. "description": "用户列表",
  1182. "consumes": [
  1183. "application/json"
  1184. ],
  1185. "produces": [
  1186. "application/json"
  1187. ],
  1188. "tags": [
  1189. "群组"
  1190. ],
  1191. "summary": "用户列表",
  1192. "parameters": [
  1193. {
  1194. "type": "integer",
  1195. "description": "页码",
  1196. "name": "page",
  1197. "in": "query"
  1198. },
  1199. {
  1200. "type": "integer",
  1201. "description": "每页数量",
  1202. "name": "pageSize",
  1203. "in": "query"
  1204. },
  1205. {
  1206. "type": "integer",
  1207. "description": "状态",
  1208. "name": "status",
  1209. "in": "query"
  1210. },
  1211. {
  1212. "type": "string",
  1213. "description": "accessible",
  1214. "name": "accessible",
  1215. "in": "query"
  1216. }
  1217. ],
  1218. "responses": {
  1219. "200": {
  1220. "description": "OK",
  1221. "schema": {
  1222. "allOf": [
  1223. {
  1224. "$ref": "#/definitions/response.DataResponse"
  1225. },
  1226. {
  1227. "type": "object",
  1228. "properties": {
  1229. "data": {
  1230. "type": "array",
  1231. "items": {
  1232. "$ref": "#/definitions/api.UserPayload"
  1233. }
  1234. }
  1235. }
  1236. }
  1237. ]
  1238. }
  1239. },
  1240. "500": {
  1241. "description": "Internal Server Error",
  1242. "schema": {
  1243. "$ref": "#/definitions/response.ErrorResponse"
  1244. }
  1245. }
  1246. }
  1247. }
  1248. }
  1249. },
  1250. "definitions": {
  1251. "api.AddressBookForm": {
  1252. "type": "object",
  1253. "properties": {
  1254. "data": {
  1255. "type": "string",
  1256. "example": "{\"tags\":[\"tag1\",\"tag2\",\"tag3\"],\"peers\":[{\"id\":\"abc\",\"username\":\"abv-l\",\"hostname\":\"\",\"platform\":\"Windows\",\"alias\":\"\",\"tags\":[\"tag1\",\"tag2\"],\"hash\":\"hash\"}],\"tag_colors\":\"{\\\"tag1\\\":4288585374,\\\"tag2\\\":4278238420,\\\"tag3\\\":4291681337}\"}"
  1257. }
  1258. }
  1259. },
  1260. "api.AuditConnForm": {
  1261. "type": "object",
  1262. "properties": {
  1263. "action": {
  1264. "type": "string"
  1265. },
  1266. "conn_id": {
  1267. "type": "integer"
  1268. },
  1269. "id": {
  1270. "type": "string"
  1271. },
  1272. "ip": {
  1273. "type": "string"
  1274. },
  1275. "peer": {
  1276. "type": "array",
  1277. "items": {
  1278. "type": "string"
  1279. }
  1280. },
  1281. "session_id": {
  1282. "type": "number"
  1283. },
  1284. "type": {
  1285. "type": "integer"
  1286. },
  1287. "uuid": {
  1288. "type": "string"
  1289. }
  1290. }
  1291. },
  1292. "api.AuditFileForm": {
  1293. "type": "object",
  1294. "properties": {
  1295. "id": {
  1296. "type": "string"
  1297. },
  1298. "info": {
  1299. "type": "string"
  1300. },
  1301. "is_file": {
  1302. "type": "boolean"
  1303. },
  1304. "path": {
  1305. "type": "string"
  1306. },
  1307. "peer_id": {
  1308. "type": "string"
  1309. },
  1310. "type": {
  1311. "type": "integer"
  1312. },
  1313. "uuid": {
  1314. "type": "string"
  1315. }
  1316. }
  1317. },
  1318. "api.DeviceInfoInLogin": {
  1319. "type": "object",
  1320. "properties": {
  1321. "name": {
  1322. "type": "string"
  1323. },
  1324. "os": {
  1325. "type": "string"
  1326. },
  1327. "type": {
  1328. "type": "string"
  1329. }
  1330. }
  1331. },
  1332. "api.LoginForm": {
  1333. "type": "object",
  1334. "required": [
  1335. "username"
  1336. ],
  1337. "properties": {
  1338. "autoLogin": {
  1339. "type": "boolean"
  1340. },
  1341. "deviceInfo": {
  1342. "$ref": "#/definitions/api.DeviceInfoInLogin"
  1343. },
  1344. "id": {
  1345. "type": "string"
  1346. },
  1347. "password": {
  1348. "type": "string",
  1349. "maxLength": 32,
  1350. "minLength": 4
  1351. },
  1352. "type": {
  1353. "type": "string"
  1354. },
  1355. "username": {
  1356. "type": "string",
  1357. "maxLength": 32,
  1358. "minLength": 2
  1359. },
  1360. "uuid": {
  1361. "type": "string"
  1362. }
  1363. }
  1364. },
  1365. "api.LoginRes": {
  1366. "type": "object",
  1367. "properties": {
  1368. "access_token": {
  1369. "type": "string"
  1370. },
  1371. "secret": {
  1372. "type": "string"
  1373. },
  1374. "tfa_type": {
  1375. "type": "string"
  1376. },
  1377. "type": {
  1378. "type": "string"
  1379. },
  1380. "user": {
  1381. "$ref": "#/definitions/api.UserPayload"
  1382. }
  1383. }
  1384. },
  1385. "api.PeerForm": {
  1386. "type": "object",
  1387. "properties": {
  1388. "cpu": {
  1389. "type": "string"
  1390. },
  1391. "hostname": {
  1392. "type": "string"
  1393. },
  1394. "id": {
  1395. "type": "string"
  1396. },
  1397. "memory": {
  1398. "type": "string"
  1399. },
  1400. "os": {
  1401. "type": "string"
  1402. },
  1403. "username": {
  1404. "type": "string"
  1405. },
  1406. "uuid": {
  1407. "type": "string"
  1408. },
  1409. "version": {
  1410. "type": "string"
  1411. }
  1412. }
  1413. },
  1414. "api.UserPayload": {
  1415. "type": "object",
  1416. "properties": {
  1417. "email": {
  1418. "type": "string"
  1419. },
  1420. "info": {
  1421. "type": "object",
  1422. "additionalProperties": true
  1423. },
  1424. "is_admin": {
  1425. "type": "boolean"
  1426. },
  1427. "name": {
  1428. "type": "string"
  1429. },
  1430. "note": {
  1431. "type": "string"
  1432. },
  1433. "status": {
  1434. "type": "integer"
  1435. }
  1436. }
  1437. },
  1438. "model.AddressBookCollection": {
  1439. "type": "object",
  1440. "required": [
  1441. "name"
  1442. ],
  1443. "properties": {
  1444. "created_at": {
  1445. "type": "string"
  1446. },
  1447. "id": {
  1448. "type": "integer"
  1449. },
  1450. "name": {
  1451. "type": "string"
  1452. },
  1453. "updated_at": {
  1454. "type": "string"
  1455. },
  1456. "user_id": {
  1457. "type": "integer"
  1458. }
  1459. }
  1460. },
  1461. "model.Tag": {
  1462. "type": "object",
  1463. "properties": {
  1464. "collection": {
  1465. "$ref": "#/definitions/model.AddressBookCollection"
  1466. },
  1467. "collection_id": {
  1468. "type": "integer"
  1469. },
  1470. "color": {
  1471. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  1472. "type": "integer"
  1473. },
  1474. "created_at": {
  1475. "type": "string"
  1476. },
  1477. "id": {
  1478. "type": "integer"
  1479. },
  1480. "name": {
  1481. "type": "string"
  1482. },
  1483. "updated_at": {
  1484. "type": "string"
  1485. },
  1486. "user_id": {
  1487. "type": "integer"
  1488. }
  1489. }
  1490. },
  1491. "model.TagList": {
  1492. "type": "object",
  1493. "properties": {
  1494. "list": {
  1495. "type": "array",
  1496. "items": {
  1497. "$ref": "#/definitions/model.Tag"
  1498. }
  1499. },
  1500. "page": {
  1501. "type": "integer"
  1502. },
  1503. "page_size": {
  1504. "type": "integer"
  1505. },
  1506. "total": {
  1507. "type": "integer"
  1508. }
  1509. }
  1510. },
  1511. "response.DataResponse": {
  1512. "type": "object",
  1513. "properties": {
  1514. "data": {},
  1515. "total": {
  1516. "type": "integer"
  1517. }
  1518. }
  1519. },
  1520. "response.ErrorResponse": {
  1521. "type": "object",
  1522. "properties": {
  1523. "error": {
  1524. "type": "string"
  1525. }
  1526. }
  1527. },
  1528. "response.Response": {
  1529. "type": "object",
  1530. "properties": {
  1531. "code": {
  1532. "type": "integer"
  1533. },
  1534. "data": {},
  1535. "message": {
  1536. "type": "string"
  1537. }
  1538. }
  1539. }
  1540. },
  1541. "securityDefinitions": {
  1542. "BearerAuth": {
  1543. "type": "apiKey",
  1544. "name": "Authorization",
  1545. "in": "header"
  1546. },
  1547. "token": {
  1548. "type": "apiKey",
  1549. "name": "api-token",
  1550. "in": "header"
  1551. }
  1552. }
  1553. }