api_docs.go 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616
  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"
  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. "/server-config-v2": {
  1077. "get": {
  1078. "security": [
  1079. {
  1080. "token": []
  1081. }
  1082. ],
  1083. "description": "服务配置,给webclient提供api-server",
  1084. "consumes": [
  1085. "application/json"
  1086. ],
  1087. "produces": [
  1088. "application/json"
  1089. ],
  1090. "tags": [
  1091. "WEBCLIENT_V2"
  1092. ],
  1093. "summary": "服务配置",
  1094. "responses": {
  1095. "200": {
  1096. "description": "OK",
  1097. "schema": {
  1098. "$ref": "#/definitions/response.Response"
  1099. }
  1100. },
  1101. "500": {
  1102. "description": "Internal Server Error",
  1103. "schema": {
  1104. "$ref": "#/definitions/response.Response"
  1105. }
  1106. }
  1107. }
  1108. }
  1109. },
  1110. "/shared-peer": {
  1111. "post": {
  1112. "description": "分享的peer",
  1113. "consumes": [
  1114. "application/json"
  1115. ],
  1116. "produces": [
  1117. "application/json"
  1118. ],
  1119. "tags": [
  1120. "WEBCLIENT"
  1121. ],
  1122. "summary": "分享的peer",
  1123. "responses": {
  1124. "200": {
  1125. "description": "OK",
  1126. "schema": {
  1127. "$ref": "#/definitions/response.Response"
  1128. }
  1129. },
  1130. "500": {
  1131. "description": "Internal Server Error",
  1132. "schema": {
  1133. "$ref": "#/definitions/response.Response"
  1134. }
  1135. }
  1136. }
  1137. }
  1138. },
  1139. "/sysinfo": {
  1140. "post": {
  1141. "description": "提交系统信息",
  1142. "consumes": [
  1143. "application/json"
  1144. ],
  1145. "produces": [
  1146. "application/json"
  1147. ],
  1148. "tags": [
  1149. "地址"
  1150. ],
  1151. "summary": "提交系统信息",
  1152. "parameters": [
  1153. {
  1154. "description": "系统信息表单",
  1155. "name": "body",
  1156. "in": "body",
  1157. "required": true,
  1158. "schema": {
  1159. "$ref": "#/definitions/api.PeerForm"
  1160. }
  1161. }
  1162. ],
  1163. "responses": {
  1164. "200": {
  1165. "description": "SYSINFO_UPDATED,ID_NOT_FOUND",
  1166. "schema": {
  1167. "type": "string"
  1168. }
  1169. },
  1170. "500": {
  1171. "description": "Internal Server Error",
  1172. "schema": {
  1173. "$ref": "#/definitions/response.ErrorResponse"
  1174. }
  1175. }
  1176. }
  1177. }
  1178. },
  1179. "/tags": {
  1180. "post": {
  1181. "security": [
  1182. {
  1183. "BearerAuth": []
  1184. }
  1185. ],
  1186. "description": "标签",
  1187. "consumes": [
  1188. "application/json"
  1189. ],
  1190. "produces": [
  1191. "application/json"
  1192. ],
  1193. "tags": [
  1194. "地址"
  1195. ],
  1196. "summary": "标签",
  1197. "responses": {
  1198. "200": {
  1199. "description": "OK",
  1200. "schema": {
  1201. "type": "array",
  1202. "items": {
  1203. "$ref": "#/definitions/model.Tag"
  1204. }
  1205. }
  1206. },
  1207. "500": {
  1208. "description": "Internal Server Error",
  1209. "schema": {
  1210. "$ref": "#/definitions/response.ErrorResponse"
  1211. }
  1212. }
  1213. }
  1214. }
  1215. },
  1216. "/users": {
  1217. "get": {
  1218. "security": [
  1219. {
  1220. "BearerAuth": []
  1221. }
  1222. ],
  1223. "description": "用户列表",
  1224. "consumes": [
  1225. "application/json"
  1226. ],
  1227. "produces": [
  1228. "application/json"
  1229. ],
  1230. "tags": [
  1231. "群组"
  1232. ],
  1233. "summary": "用户列表",
  1234. "parameters": [
  1235. {
  1236. "type": "integer",
  1237. "description": "页码",
  1238. "name": "page",
  1239. "in": "query"
  1240. },
  1241. {
  1242. "type": "integer",
  1243. "description": "每页数量",
  1244. "name": "pageSize",
  1245. "in": "query"
  1246. },
  1247. {
  1248. "type": "integer",
  1249. "description": "状态",
  1250. "name": "status",
  1251. "in": "query"
  1252. },
  1253. {
  1254. "type": "string",
  1255. "description": "accessible",
  1256. "name": "accessible",
  1257. "in": "query"
  1258. }
  1259. ],
  1260. "responses": {
  1261. "200": {
  1262. "description": "OK",
  1263. "schema": {
  1264. "allOf": [
  1265. {
  1266. "$ref": "#/definitions/response.DataResponse"
  1267. },
  1268. {
  1269. "type": "object",
  1270. "properties": {
  1271. "data": {
  1272. "type": "array",
  1273. "items": {
  1274. "$ref": "#/definitions/api.UserPayload"
  1275. }
  1276. }
  1277. }
  1278. }
  1279. ]
  1280. }
  1281. },
  1282. "500": {
  1283. "description": "Internal Server Error",
  1284. "schema": {
  1285. "$ref": "#/definitions/response.ErrorResponse"
  1286. }
  1287. }
  1288. }
  1289. }
  1290. }
  1291. },
  1292. "definitions": {
  1293. "api.AddressBookForm": {
  1294. "type": "object",
  1295. "properties": {
  1296. "data": {
  1297. "type": "string",
  1298. "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}\"}"
  1299. }
  1300. }
  1301. },
  1302. "api.AuditConnForm": {
  1303. "type": "object",
  1304. "properties": {
  1305. "action": {
  1306. "type": "string"
  1307. },
  1308. "conn_id": {
  1309. "type": "integer"
  1310. },
  1311. "id": {
  1312. "type": "string"
  1313. },
  1314. "ip": {
  1315. "type": "string"
  1316. },
  1317. "peer": {
  1318. "type": "array",
  1319. "items": {
  1320. "type": "string"
  1321. }
  1322. },
  1323. "session_id": {
  1324. "type": "number"
  1325. },
  1326. "type": {
  1327. "type": "integer"
  1328. },
  1329. "uuid": {
  1330. "type": "string"
  1331. }
  1332. }
  1333. },
  1334. "api.AuditFileForm": {
  1335. "type": "object",
  1336. "properties": {
  1337. "id": {
  1338. "type": "string"
  1339. },
  1340. "info": {
  1341. "type": "string"
  1342. },
  1343. "is_file": {
  1344. "type": "boolean"
  1345. },
  1346. "path": {
  1347. "type": "string"
  1348. },
  1349. "peer_id": {
  1350. "type": "string"
  1351. },
  1352. "type": {
  1353. "type": "integer"
  1354. },
  1355. "uuid": {
  1356. "type": "string"
  1357. }
  1358. }
  1359. },
  1360. "api.DeviceInfoInLogin": {
  1361. "type": "object",
  1362. "properties": {
  1363. "name": {
  1364. "type": "string"
  1365. },
  1366. "os": {
  1367. "type": "string"
  1368. },
  1369. "type": {
  1370. "type": "string"
  1371. }
  1372. }
  1373. },
  1374. "api.LoginForm": {
  1375. "type": "object",
  1376. "required": [
  1377. "username"
  1378. ],
  1379. "properties": {
  1380. "autoLogin": {
  1381. "type": "boolean"
  1382. },
  1383. "deviceInfo": {
  1384. "$ref": "#/definitions/api.DeviceInfoInLogin"
  1385. },
  1386. "id": {
  1387. "type": "string"
  1388. },
  1389. "password": {
  1390. "type": "string",
  1391. "maxLength": 32,
  1392. "minLength": 4
  1393. },
  1394. "type": {
  1395. "type": "string"
  1396. },
  1397. "username": {
  1398. "type": "string",
  1399. "maxLength": 32,
  1400. "minLength": 2
  1401. },
  1402. "uuid": {
  1403. "type": "string"
  1404. }
  1405. }
  1406. },
  1407. "api.LoginRes": {
  1408. "type": "object",
  1409. "properties": {
  1410. "access_token": {
  1411. "type": "string"
  1412. },
  1413. "secret": {
  1414. "type": "string"
  1415. },
  1416. "tfa_type": {
  1417. "type": "string"
  1418. },
  1419. "type": {
  1420. "type": "string"
  1421. },
  1422. "user": {
  1423. "$ref": "#/definitions/api.UserPayload"
  1424. }
  1425. }
  1426. },
  1427. "api.PeerForm": {
  1428. "type": "object",
  1429. "properties": {
  1430. "cpu": {
  1431. "type": "string"
  1432. },
  1433. "hostname": {
  1434. "type": "string"
  1435. },
  1436. "id": {
  1437. "type": "string"
  1438. },
  1439. "memory": {
  1440. "type": "string"
  1441. },
  1442. "os": {
  1443. "type": "string"
  1444. },
  1445. "username": {
  1446. "type": "string"
  1447. },
  1448. "uuid": {
  1449. "type": "string"
  1450. },
  1451. "version": {
  1452. "type": "string"
  1453. }
  1454. }
  1455. },
  1456. "api.UserPayload": {
  1457. "type": "object",
  1458. "properties": {
  1459. "email": {
  1460. "type": "string"
  1461. },
  1462. "info": {
  1463. "type": "object",
  1464. "additionalProperties": true
  1465. },
  1466. "is_admin": {
  1467. "type": "boolean"
  1468. },
  1469. "name": {
  1470. "type": "string"
  1471. },
  1472. "note": {
  1473. "type": "string"
  1474. },
  1475. "status": {
  1476. "type": "integer"
  1477. }
  1478. }
  1479. },
  1480. "model.AddressBookCollection": {
  1481. "type": "object",
  1482. "required": [
  1483. "name"
  1484. ],
  1485. "properties": {
  1486. "created_at": {
  1487. "type": "string"
  1488. },
  1489. "id": {
  1490. "type": "integer"
  1491. },
  1492. "name": {
  1493. "type": "string"
  1494. },
  1495. "updated_at": {
  1496. "type": "string"
  1497. },
  1498. "user_id": {
  1499. "type": "integer"
  1500. }
  1501. }
  1502. },
  1503. "model.Tag": {
  1504. "type": "object",
  1505. "properties": {
  1506. "collection": {
  1507. "$ref": "#/definitions/model.AddressBookCollection"
  1508. },
  1509. "collection_id": {
  1510. "type": "integer"
  1511. },
  1512. "color": {
  1513. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  1514. "type": "integer"
  1515. },
  1516. "created_at": {
  1517. "type": "string"
  1518. },
  1519. "id": {
  1520. "type": "integer"
  1521. },
  1522. "name": {
  1523. "type": "string"
  1524. },
  1525. "updated_at": {
  1526. "type": "string"
  1527. },
  1528. "user_id": {
  1529. "type": "integer"
  1530. }
  1531. }
  1532. },
  1533. "model.TagList": {
  1534. "type": "object",
  1535. "properties": {
  1536. "list": {
  1537. "type": "array",
  1538. "items": {
  1539. "$ref": "#/definitions/model.Tag"
  1540. }
  1541. },
  1542. "page": {
  1543. "type": "integer"
  1544. },
  1545. "page_size": {
  1546. "type": "integer"
  1547. },
  1548. "total": {
  1549. "type": "integer"
  1550. }
  1551. }
  1552. },
  1553. "response.DataResponse": {
  1554. "type": "object",
  1555. "properties": {
  1556. "data": {},
  1557. "total": {
  1558. "type": "integer"
  1559. }
  1560. }
  1561. },
  1562. "response.ErrorResponse": {
  1563. "type": "object",
  1564. "properties": {
  1565. "error": {
  1566. "type": "string"
  1567. }
  1568. }
  1569. },
  1570. "response.Response": {
  1571. "type": "object",
  1572. "properties": {
  1573. "code": {
  1574. "type": "integer"
  1575. },
  1576. "data": {},
  1577. "message": {
  1578. "type": "string"
  1579. }
  1580. }
  1581. }
  1582. },
  1583. "securityDefinitions": {
  1584. "BearerAuth": {
  1585. "type": "apiKey",
  1586. "name": "Authorization",
  1587. "in": "header"
  1588. },
  1589. "token": {
  1590. "type": "apiKey",
  1591. "name": "api-token",
  1592. "in": "header"
  1593. }
  1594. }
  1595. }`
  1596. // SwaggerInfoapi holds exported Swagger Info so clients can modify it
  1597. var SwaggerInfoapi = &swag.Spec{
  1598. Version: "1.0",
  1599. Host: "",
  1600. BasePath: "/api",
  1601. Schemes: []string{},
  1602. Title: "管理系统API",
  1603. Description: "接口",
  1604. InfoInstanceName: "api",
  1605. SwaggerTemplate: docTemplateapi,
  1606. LeftDelim: "{{",
  1607. RightDelim: "}}",
  1608. }
  1609. func init() {
  1610. swag.Register(SwaggerInfoapi.InstanceName(), SwaggerInfoapi)
  1611. }