api_docs.go 49 KB

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