api_swagger.json 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590
  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. "/api": {
  650. "get": {
  651. "security": [
  652. {
  653. "token": []
  654. }
  655. ],
  656. "description": "用户信息",
  657. "consumes": [
  658. "application/json"
  659. ],
  660. "produces": [
  661. "application/json"
  662. ],
  663. "tags": [
  664. "用户"
  665. ],
  666. "summary": "用户信息",
  667. "responses": {
  668. "200": {
  669. "description": "OK",
  670. "schema": {
  671. "$ref": "#/definitions/api.UserPayload"
  672. }
  673. },
  674. "500": {
  675. "description": "Internal Server Error",
  676. "schema": {
  677. "$ref": "#/definitions/response.Response"
  678. }
  679. }
  680. }
  681. }
  682. },
  683. "/audit/conn": {
  684. "post": {
  685. "description": "审计连接",
  686. "consumes": [
  687. "application/json"
  688. ],
  689. "produces": [
  690. "application/json"
  691. ],
  692. "tags": [
  693. "审计"
  694. ],
  695. "summary": "审计连接",
  696. "parameters": [
  697. {
  698. "description": "审计连接",
  699. "name": "body",
  700. "in": "body",
  701. "required": true,
  702. "schema": {
  703. "$ref": "#/definitions/api.AuditConnForm"
  704. }
  705. }
  706. ],
  707. "responses": {
  708. "200": {
  709. "description": "OK",
  710. "schema": {
  711. "type": "string"
  712. }
  713. },
  714. "500": {
  715. "description": "Internal Server Error",
  716. "schema": {
  717. "$ref": "#/definitions/response.Response"
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "/audit/file": {
  724. "post": {
  725. "description": "审计文件",
  726. "consumes": [
  727. "application/json"
  728. ],
  729. "produces": [
  730. "application/json"
  731. ],
  732. "tags": [
  733. "审计"
  734. ],
  735. "summary": "审计文件",
  736. "parameters": [
  737. {
  738. "description": "审计文件",
  739. "name": "body",
  740. "in": "body",
  741. "required": true,
  742. "schema": {
  743. "$ref": "#/definitions/api.AuditFileForm"
  744. }
  745. }
  746. ],
  747. "responses": {
  748. "200": {
  749. "description": "OK",
  750. "schema": {
  751. "type": "string"
  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. "/tags": {
  1175. "post": {
  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. "responses": {
  1193. "200": {
  1194. "description": "OK",
  1195. "schema": {
  1196. "type": "array",
  1197. "items": {
  1198. "$ref": "#/definitions/model.Tag"
  1199. }
  1200. }
  1201. },
  1202. "500": {
  1203. "description": "Internal Server Error",
  1204. "schema": {
  1205. "$ref": "#/definitions/response.ErrorResponse"
  1206. }
  1207. }
  1208. }
  1209. }
  1210. },
  1211. "/users": {
  1212. "get": {
  1213. "security": [
  1214. {
  1215. "BearerAuth": []
  1216. }
  1217. ],
  1218. "description": "用户列表",
  1219. "consumes": [
  1220. "application/json"
  1221. ],
  1222. "produces": [
  1223. "application/json"
  1224. ],
  1225. "tags": [
  1226. "群组"
  1227. ],
  1228. "summary": "用户列表",
  1229. "parameters": [
  1230. {
  1231. "type": "integer",
  1232. "description": "页码",
  1233. "name": "page",
  1234. "in": "query"
  1235. },
  1236. {
  1237. "type": "integer",
  1238. "description": "每页数量",
  1239. "name": "pageSize",
  1240. "in": "query"
  1241. },
  1242. {
  1243. "type": "integer",
  1244. "description": "状态",
  1245. "name": "status",
  1246. "in": "query"
  1247. },
  1248. {
  1249. "type": "string",
  1250. "description": "accessible",
  1251. "name": "accessible",
  1252. "in": "query"
  1253. }
  1254. ],
  1255. "responses": {
  1256. "200": {
  1257. "description": "OK",
  1258. "schema": {
  1259. "allOf": [
  1260. {
  1261. "$ref": "#/definitions/response.DataResponse"
  1262. },
  1263. {
  1264. "type": "object",
  1265. "properties": {
  1266. "data": {
  1267. "type": "array",
  1268. "items": {
  1269. "$ref": "#/definitions/api.UserPayload"
  1270. }
  1271. }
  1272. }
  1273. }
  1274. ]
  1275. }
  1276. },
  1277. "500": {
  1278. "description": "Internal Server Error",
  1279. "schema": {
  1280. "$ref": "#/definitions/response.ErrorResponse"
  1281. }
  1282. }
  1283. }
  1284. }
  1285. }
  1286. },
  1287. "definitions": {
  1288. "api.AddressBookForm": {
  1289. "type": "object",
  1290. "properties": {
  1291. "data": {
  1292. "type": "string",
  1293. "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}\"}"
  1294. }
  1295. }
  1296. },
  1297. "api.AuditConnForm": {
  1298. "type": "object",
  1299. "properties": {
  1300. "action": {
  1301. "type": "string"
  1302. },
  1303. "conn_id": {
  1304. "type": "integer"
  1305. },
  1306. "id": {
  1307. "type": "string"
  1308. },
  1309. "ip": {
  1310. "type": "string"
  1311. },
  1312. "peer": {
  1313. "type": "array",
  1314. "items": {
  1315. "type": "string"
  1316. }
  1317. },
  1318. "session_id": {
  1319. "type": "number"
  1320. },
  1321. "type": {
  1322. "type": "integer"
  1323. },
  1324. "uuid": {
  1325. "type": "string"
  1326. }
  1327. }
  1328. },
  1329. "api.AuditFileForm": {
  1330. "type": "object",
  1331. "properties": {
  1332. "id": {
  1333. "type": "string"
  1334. },
  1335. "info": {
  1336. "type": "string"
  1337. },
  1338. "is_file": {
  1339. "type": "boolean"
  1340. },
  1341. "path": {
  1342. "type": "string"
  1343. },
  1344. "peer_id": {
  1345. "type": "string"
  1346. },
  1347. "type": {
  1348. "type": "integer"
  1349. },
  1350. "uuid": {
  1351. "type": "string"
  1352. }
  1353. }
  1354. },
  1355. "api.DeviceInfoInLogin": {
  1356. "type": "object",
  1357. "properties": {
  1358. "name": {
  1359. "type": "string"
  1360. },
  1361. "os": {
  1362. "type": "string"
  1363. },
  1364. "type": {
  1365. "type": "string"
  1366. }
  1367. }
  1368. },
  1369. "api.LoginForm": {
  1370. "type": "object",
  1371. "required": [
  1372. "username"
  1373. ],
  1374. "properties": {
  1375. "autoLogin": {
  1376. "type": "boolean"
  1377. },
  1378. "deviceInfo": {
  1379. "$ref": "#/definitions/api.DeviceInfoInLogin"
  1380. },
  1381. "id": {
  1382. "type": "string"
  1383. },
  1384. "password": {
  1385. "type": "string",
  1386. "maxLength": 32,
  1387. "minLength": 4
  1388. },
  1389. "type": {
  1390. "type": "string"
  1391. },
  1392. "username": {
  1393. "type": "string",
  1394. "maxLength": 32,
  1395. "minLength": 2
  1396. },
  1397. "uuid": {
  1398. "type": "string"
  1399. }
  1400. }
  1401. },
  1402. "api.LoginRes": {
  1403. "type": "object",
  1404. "properties": {
  1405. "access_token": {
  1406. "type": "string"
  1407. },
  1408. "secret": {
  1409. "type": "string"
  1410. },
  1411. "tfa_type": {
  1412. "type": "string"
  1413. },
  1414. "type": {
  1415. "type": "string"
  1416. },
  1417. "user": {
  1418. "$ref": "#/definitions/api.UserPayload"
  1419. }
  1420. }
  1421. },
  1422. "api.PeerForm": {
  1423. "type": "object",
  1424. "properties": {
  1425. "cpu": {
  1426. "type": "string"
  1427. },
  1428. "hostname": {
  1429. "type": "string"
  1430. },
  1431. "id": {
  1432. "type": "string"
  1433. },
  1434. "memory": {
  1435. "type": "string"
  1436. },
  1437. "os": {
  1438. "type": "string"
  1439. },
  1440. "username": {
  1441. "type": "string"
  1442. },
  1443. "uuid": {
  1444. "type": "string"
  1445. },
  1446. "version": {
  1447. "type": "string"
  1448. }
  1449. }
  1450. },
  1451. "api.UserPayload": {
  1452. "type": "object",
  1453. "properties": {
  1454. "email": {
  1455. "type": "string"
  1456. },
  1457. "info": {
  1458. "type": "object",
  1459. "additionalProperties": true
  1460. },
  1461. "is_admin": {
  1462. "type": "boolean"
  1463. },
  1464. "name": {
  1465. "type": "string"
  1466. },
  1467. "note": {
  1468. "type": "string"
  1469. },
  1470. "status": {
  1471. "type": "integer"
  1472. }
  1473. }
  1474. },
  1475. "model.AddressBookCollection": {
  1476. "type": "object",
  1477. "required": [
  1478. "name"
  1479. ],
  1480. "properties": {
  1481. "created_at": {
  1482. "type": "string"
  1483. },
  1484. "id": {
  1485. "type": "integer"
  1486. },
  1487. "name": {
  1488. "type": "string"
  1489. },
  1490. "updated_at": {
  1491. "type": "string"
  1492. },
  1493. "user_id": {
  1494. "type": "integer"
  1495. }
  1496. }
  1497. },
  1498. "model.Tag": {
  1499. "type": "object",
  1500. "properties": {
  1501. "collection": {
  1502. "$ref": "#/definitions/model.AddressBookCollection"
  1503. },
  1504. "collection_id": {
  1505. "type": "integer"
  1506. },
  1507. "color": {
  1508. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  1509. "type": "integer"
  1510. },
  1511. "created_at": {
  1512. "type": "string"
  1513. },
  1514. "id": {
  1515. "type": "integer"
  1516. },
  1517. "name": {
  1518. "type": "string"
  1519. },
  1520. "updated_at": {
  1521. "type": "string"
  1522. },
  1523. "user_id": {
  1524. "type": "integer"
  1525. }
  1526. }
  1527. },
  1528. "model.TagList": {
  1529. "type": "object",
  1530. "properties": {
  1531. "list": {
  1532. "type": "array",
  1533. "items": {
  1534. "$ref": "#/definitions/model.Tag"
  1535. }
  1536. },
  1537. "page": {
  1538. "type": "integer"
  1539. },
  1540. "page_size": {
  1541. "type": "integer"
  1542. },
  1543. "total": {
  1544. "type": "integer"
  1545. }
  1546. }
  1547. },
  1548. "response.DataResponse": {
  1549. "type": "object",
  1550. "properties": {
  1551. "data": {},
  1552. "total": {
  1553. "type": "integer"
  1554. }
  1555. }
  1556. },
  1557. "response.ErrorResponse": {
  1558. "type": "object",
  1559. "properties": {
  1560. "error": {
  1561. "type": "string"
  1562. }
  1563. }
  1564. },
  1565. "response.Response": {
  1566. "type": "object",
  1567. "properties": {
  1568. "code": {
  1569. "type": "integer"
  1570. },
  1571. "data": {},
  1572. "message": {
  1573. "type": "string"
  1574. }
  1575. }
  1576. }
  1577. },
  1578. "securityDefinitions": {
  1579. "BearerAuth": {
  1580. "type": "apiKey",
  1581. "name": "Authorization",
  1582. "in": "header"
  1583. },
  1584. "token": {
  1585. "type": "apiKey",
  1586. "name": "api-token",
  1587. "in": "header"
  1588. }
  1589. }
  1590. }