api_docs.go 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668
  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. "/audit/conn": {
  655. "post": {
  656. "description": "审计连接",
  657. "consumes": [
  658. "application/json"
  659. ],
  660. "produces": [
  661. "application/json"
  662. ],
  663. "tags": [
  664. "审计"
  665. ],
  666. "summary": "审计连接",
  667. "parameters": [
  668. {
  669. "description": "审计连接",
  670. "name": "body",
  671. "in": "body",
  672. "required": true,
  673. "schema": {
  674. "$ref": "#/definitions/api.AuditConnForm"
  675. }
  676. }
  677. ],
  678. "responses": {
  679. "200": {
  680. "description": "OK",
  681. "schema": {
  682. "type": "string"
  683. }
  684. },
  685. "500": {
  686. "description": "Internal Server Error",
  687. "schema": {
  688. "$ref": "#/definitions/response.Response"
  689. }
  690. }
  691. }
  692. }
  693. },
  694. "/audit/file": {
  695. "post": {
  696. "description": "审计文件",
  697. "consumes": [
  698. "application/json"
  699. ],
  700. "produces": [
  701. "application/json"
  702. ],
  703. "tags": [
  704. "审计"
  705. ],
  706. "summary": "审计文件",
  707. "parameters": [
  708. {
  709. "description": "审计文件",
  710. "name": "body",
  711. "in": "body",
  712. "required": true,
  713. "schema": {
  714. "$ref": "#/definitions/api.AuditFileForm"
  715. }
  716. }
  717. ],
  718. "responses": {
  719. "200": {
  720. "description": "OK",
  721. "schema": {
  722. "type": "string"
  723. }
  724. },
  725. "500": {
  726. "description": "Internal Server Error",
  727. "schema": {
  728. "$ref": "#/definitions/response.Response"
  729. }
  730. }
  731. }
  732. }
  733. },
  734. "/currentUser": {
  735. "get": {
  736. "security": [
  737. {
  738. "token": []
  739. }
  740. ],
  741. "description": "用户信息",
  742. "consumes": [
  743. "application/json"
  744. ],
  745. "produces": [
  746. "application/json"
  747. ],
  748. "tags": [
  749. "用户"
  750. ],
  751. "summary": "用户信息",
  752. "responses": {
  753. "200": {
  754. "description": "OK",
  755. "schema": {
  756. "$ref": "#/definitions/api.UserPayload"
  757. }
  758. },
  759. "500": {
  760. "description": "Internal Server Error",
  761. "schema": {
  762. "$ref": "#/definitions/response.Response"
  763. }
  764. }
  765. }
  766. }
  767. },
  768. "/device-group/accessible": {
  769. "get": {
  770. "security": [
  771. {
  772. "BearerAuth": []
  773. }
  774. ],
  775. "description": "机器",
  776. "consumes": [
  777. "application/json"
  778. ],
  779. "produces": [
  780. "application/json"
  781. ],
  782. "tags": [
  783. "群组"
  784. ],
  785. "summary": "设备",
  786. "parameters": [
  787. {
  788. "type": "integer",
  789. "description": "页码",
  790. "name": "page",
  791. "in": "query"
  792. },
  793. {
  794. "type": "integer",
  795. "description": "每页数量",
  796. "name": "pageSize",
  797. "in": "query"
  798. },
  799. {
  800. "type": "integer",
  801. "description": "状态",
  802. "name": "status",
  803. "in": "query"
  804. },
  805. {
  806. "type": "string",
  807. "description": "accessible",
  808. "name": "accessible",
  809. "in": "query"
  810. }
  811. ],
  812. "responses": {
  813. "200": {
  814. "description": "OK",
  815. "schema": {
  816. "$ref": "#/definitions/response.DataResponse"
  817. }
  818. },
  819. "500": {
  820. "description": "Internal Server Error",
  821. "schema": {
  822. "$ref": "#/definitions/response.Response"
  823. }
  824. }
  825. }
  826. }
  827. },
  828. "/heartbeat": {
  829. "post": {
  830. "description": "心跳",
  831. "consumes": [
  832. "application/json"
  833. ],
  834. "produces": [
  835. "application/json"
  836. ],
  837. "tags": [
  838. "首页"
  839. ],
  840. "summary": "心跳",
  841. "responses": {
  842. "200": {
  843. "description": "OK"
  844. },
  845. "500": {
  846. "description": "Internal Server Error",
  847. "schema": {
  848. "$ref": "#/definitions/response.Response"
  849. }
  850. }
  851. }
  852. }
  853. },
  854. "/login": {
  855. "post": {
  856. "description": "登录",
  857. "consumes": [
  858. "application/json"
  859. ],
  860. "produces": [
  861. "application/json"
  862. ],
  863. "tags": [
  864. "登录"
  865. ],
  866. "summary": "登录",
  867. "parameters": [
  868. {
  869. "description": "登录表单",
  870. "name": "body",
  871. "in": "body",
  872. "required": true,
  873. "schema": {
  874. "$ref": "#/definitions/api.LoginForm"
  875. }
  876. }
  877. ],
  878. "responses": {
  879. "200": {
  880. "description": "OK",
  881. "schema": {
  882. "$ref": "#/definitions/api.LoginRes"
  883. }
  884. },
  885. "500": {
  886. "description": "Internal Server Error",
  887. "schema": {
  888. "$ref": "#/definitions/response.ErrorResponse"
  889. }
  890. }
  891. }
  892. }
  893. },
  894. "/login-options": {
  895. "get": {
  896. "description": "登录选项",
  897. "consumes": [
  898. "application/json"
  899. ],
  900. "produces": [
  901. "application/json"
  902. ],
  903. "tags": [
  904. "登录"
  905. ],
  906. "summary": "登录选项",
  907. "responses": {
  908. "200": {
  909. "description": "OK",
  910. "schema": {
  911. "type": "array",
  912. "items": {
  913. "type": "string"
  914. }
  915. }
  916. },
  917. "500": {
  918. "description": "Internal Server Error",
  919. "schema": {
  920. "$ref": "#/definitions/response.ErrorResponse"
  921. }
  922. }
  923. }
  924. }
  925. },
  926. "/logout": {
  927. "post": {
  928. "description": "登出",
  929. "consumes": [
  930. "application/json"
  931. ],
  932. "produces": [
  933. "application/json"
  934. ],
  935. "tags": [
  936. "登录"
  937. ],
  938. "summary": "登出",
  939. "responses": {
  940. "200": {
  941. "description": "OK",
  942. "schema": {
  943. "type": "string"
  944. }
  945. },
  946. "500": {
  947. "description": "Internal Server Error",
  948. "schema": {
  949. "$ref": "#/definitions/response.ErrorResponse"
  950. }
  951. }
  952. }
  953. }
  954. },
  955. "/oauth/callback": {
  956. "get": {
  957. "description": "OauthCallback",
  958. "consumes": [
  959. "application/json"
  960. ],
  961. "produces": [
  962. "application/json"
  963. ],
  964. "tags": [
  965. "Oauth"
  966. ],
  967. "summary": "OauthCallback",
  968. "responses": {
  969. "200": {
  970. "description": "OK",
  971. "schema": {
  972. "$ref": "#/definitions/api.LoginRes"
  973. }
  974. },
  975. "500": {
  976. "description": "Internal Server Error",
  977. "schema": {
  978. "$ref": "#/definitions/response.ErrorResponse"
  979. }
  980. }
  981. }
  982. }
  983. },
  984. "/oidc/auth": {
  985. "post": {
  986. "description": "OidcAuth",
  987. "consumes": [
  988. "application/json"
  989. ],
  990. "produces": [
  991. "application/json"
  992. ],
  993. "tags": [
  994. "Oauth"
  995. ],
  996. "summary": "OidcAuth",
  997. "responses": {
  998. "200": {
  999. "description": "OK",
  1000. "schema": {
  1001. "$ref": "#/definitions/api.LoginRes"
  1002. }
  1003. },
  1004. "500": {
  1005. "description": "Internal Server Error",
  1006. "schema": {
  1007. "$ref": "#/definitions/response.ErrorResponse"
  1008. }
  1009. }
  1010. }
  1011. }
  1012. },
  1013. "/oidc/auth-query": {
  1014. "get": {
  1015. "description": "OidcAuthQuery",
  1016. "consumes": [
  1017. "application/json"
  1018. ],
  1019. "produces": [
  1020. "application/json"
  1021. ],
  1022. "tags": [
  1023. "Oauth"
  1024. ],
  1025. "summary": "OidcAuthQuery",
  1026. "responses": {
  1027. "200": {
  1028. "description": "OK",
  1029. "schema": {
  1030. "$ref": "#/definitions/api.LoginRes"
  1031. }
  1032. },
  1033. "500": {
  1034. "description": "Internal Server Error",
  1035. "schema": {
  1036. "$ref": "#/definitions/response.ErrorResponse"
  1037. }
  1038. }
  1039. }
  1040. }
  1041. },
  1042. "/peers": {
  1043. "get": {
  1044. "security": [
  1045. {
  1046. "BearerAuth": []
  1047. }
  1048. ],
  1049. "description": "机器",
  1050. "consumes": [
  1051. "application/json"
  1052. ],
  1053. "produces": [
  1054. "application/json"
  1055. ],
  1056. "tags": [
  1057. "群组"
  1058. ],
  1059. "summary": "机器",
  1060. "parameters": [
  1061. {
  1062. "type": "integer",
  1063. "description": "页码",
  1064. "name": "page",
  1065. "in": "query"
  1066. },
  1067. {
  1068. "type": "integer",
  1069. "description": "每页数量",
  1070. "name": "pageSize",
  1071. "in": "query"
  1072. },
  1073. {
  1074. "type": "integer",
  1075. "description": "状态",
  1076. "name": "status",
  1077. "in": "query"
  1078. },
  1079. {
  1080. "type": "string",
  1081. "description": "accessible",
  1082. "name": "accessible",
  1083. "in": "query"
  1084. }
  1085. ],
  1086. "responses": {
  1087. "200": {
  1088. "description": "OK",
  1089. "schema": {
  1090. "$ref": "#/definitions/response.DataResponse"
  1091. }
  1092. },
  1093. "500": {
  1094. "description": "Internal Server Error",
  1095. "schema": {
  1096. "$ref": "#/definitions/response.Response"
  1097. }
  1098. }
  1099. }
  1100. }
  1101. },
  1102. "/server-config": {
  1103. "get": {
  1104. "security": [
  1105. {
  1106. "token": []
  1107. }
  1108. ],
  1109. "description": "服务配置,给webclient提供api-server",
  1110. "consumes": [
  1111. "application/json"
  1112. ],
  1113. "produces": [
  1114. "application/json"
  1115. ],
  1116. "tags": [
  1117. "WEBCLIENT"
  1118. ],
  1119. "summary": "服务配置",
  1120. "responses": {
  1121. "200": {
  1122. "description": "OK",
  1123. "schema": {
  1124. "$ref": "#/definitions/response.Response"
  1125. }
  1126. },
  1127. "500": {
  1128. "description": "Internal Server Error",
  1129. "schema": {
  1130. "$ref": "#/definitions/response.Response"
  1131. }
  1132. }
  1133. }
  1134. }
  1135. },
  1136. "/server-config-v2": {
  1137. "get": {
  1138. "security": [
  1139. {
  1140. "token": []
  1141. }
  1142. ],
  1143. "description": "服务配置,给webclient提供api-server",
  1144. "consumes": [
  1145. "application/json"
  1146. ],
  1147. "produces": [
  1148. "application/json"
  1149. ],
  1150. "tags": [
  1151. "WEBCLIENT_V2"
  1152. ],
  1153. "summary": "服务配置",
  1154. "responses": {
  1155. "200": {
  1156. "description": "OK",
  1157. "schema": {
  1158. "$ref": "#/definitions/response.Response"
  1159. }
  1160. },
  1161. "500": {
  1162. "description": "Internal Server Error",
  1163. "schema": {
  1164. "$ref": "#/definitions/response.Response"
  1165. }
  1166. }
  1167. }
  1168. }
  1169. },
  1170. "/shared-peer": {
  1171. "post": {
  1172. "description": "分享的peer",
  1173. "consumes": [
  1174. "application/json"
  1175. ],
  1176. "produces": [
  1177. "application/json"
  1178. ],
  1179. "tags": [
  1180. "WEBCLIENT"
  1181. ],
  1182. "summary": "分享的peer",
  1183. "responses": {
  1184. "200": {
  1185. "description": "OK",
  1186. "schema": {
  1187. "$ref": "#/definitions/response.Response"
  1188. }
  1189. },
  1190. "500": {
  1191. "description": "Internal Server Error",
  1192. "schema": {
  1193. "$ref": "#/definitions/response.Response"
  1194. }
  1195. }
  1196. }
  1197. }
  1198. },
  1199. "/sysinfo": {
  1200. "post": {
  1201. "description": "提交系统信息",
  1202. "consumes": [
  1203. "application/json"
  1204. ],
  1205. "produces": [
  1206. "application/json"
  1207. ],
  1208. "tags": [
  1209. "地址"
  1210. ],
  1211. "summary": "提交系统信息",
  1212. "parameters": [
  1213. {
  1214. "description": "系统信息表单",
  1215. "name": "body",
  1216. "in": "body",
  1217. "required": true,
  1218. "schema": {
  1219. "$ref": "#/definitions/api.PeerForm"
  1220. }
  1221. }
  1222. ],
  1223. "responses": {
  1224. "200": {
  1225. "description": "SYSINFO_UPDATED,ID_NOT_FOUND",
  1226. "schema": {
  1227. "type": "string"
  1228. }
  1229. },
  1230. "500": {
  1231. "description": "Internal Server Error",
  1232. "schema": {
  1233. "$ref": "#/definitions/response.ErrorResponse"
  1234. }
  1235. }
  1236. }
  1237. }
  1238. },
  1239. "/users": {
  1240. "get": {
  1241. "security": [
  1242. {
  1243. "BearerAuth": []
  1244. }
  1245. ],
  1246. "description": "用户列表",
  1247. "consumes": [
  1248. "application/json"
  1249. ],
  1250. "produces": [
  1251. "application/json"
  1252. ],
  1253. "tags": [
  1254. "群组"
  1255. ],
  1256. "summary": "用户列表",
  1257. "parameters": [
  1258. {
  1259. "type": "integer",
  1260. "description": "页码",
  1261. "name": "page",
  1262. "in": "query"
  1263. },
  1264. {
  1265. "type": "integer",
  1266. "description": "每页数量",
  1267. "name": "pageSize",
  1268. "in": "query"
  1269. },
  1270. {
  1271. "type": "integer",
  1272. "description": "状态",
  1273. "name": "status",
  1274. "in": "query"
  1275. },
  1276. {
  1277. "type": "string",
  1278. "description": "accessible",
  1279. "name": "accessible",
  1280. "in": "query"
  1281. }
  1282. ],
  1283. "responses": {
  1284. "200": {
  1285. "description": "OK",
  1286. "schema": {
  1287. "allOf": [
  1288. {
  1289. "$ref": "#/definitions/response.DataResponse"
  1290. },
  1291. {
  1292. "type": "object",
  1293. "properties": {
  1294. "data": {
  1295. "type": "array",
  1296. "items": {
  1297. "$ref": "#/definitions/api.UserPayload"
  1298. }
  1299. }
  1300. }
  1301. }
  1302. ]
  1303. }
  1304. },
  1305. "500": {
  1306. "description": "Internal Server Error",
  1307. "schema": {
  1308. "$ref": "#/definitions/response.ErrorResponse"
  1309. }
  1310. }
  1311. }
  1312. }
  1313. },
  1314. "/version": {
  1315. "get": {
  1316. "description": "版本",
  1317. "consumes": [
  1318. "application/json"
  1319. ],
  1320. "produces": [
  1321. "application/json"
  1322. ],
  1323. "tags": [
  1324. "首页"
  1325. ],
  1326. "summary": "版本",
  1327. "responses": {
  1328. "200": {
  1329. "description": "OK",
  1330. "schema": {
  1331. "$ref": "#/definitions/response.Response"
  1332. }
  1333. },
  1334. "500": {
  1335. "description": "Internal Server Error",
  1336. "schema": {
  1337. "$ref": "#/definitions/response.Response"
  1338. }
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "definitions": {
  1345. "api.AddressBookForm": {
  1346. "type": "object",
  1347. "properties": {
  1348. "data": {
  1349. "type": "string",
  1350. "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}\"}"
  1351. }
  1352. }
  1353. },
  1354. "api.AuditConnForm": {
  1355. "type": "object",
  1356. "properties": {
  1357. "action": {
  1358. "type": "string"
  1359. },
  1360. "conn_id": {
  1361. "type": "integer"
  1362. },
  1363. "id": {
  1364. "type": "string"
  1365. },
  1366. "ip": {
  1367. "type": "string"
  1368. },
  1369. "peer": {
  1370. "type": "array",
  1371. "items": {
  1372. "type": "string"
  1373. }
  1374. },
  1375. "session_id": {
  1376. "type": "number"
  1377. },
  1378. "type": {
  1379. "type": "integer"
  1380. },
  1381. "uuid": {
  1382. "type": "string"
  1383. }
  1384. }
  1385. },
  1386. "api.AuditFileForm": {
  1387. "type": "object",
  1388. "properties": {
  1389. "id": {
  1390. "type": "string"
  1391. },
  1392. "info": {
  1393. "type": "string"
  1394. },
  1395. "is_file": {
  1396. "type": "boolean"
  1397. },
  1398. "path": {
  1399. "type": "string"
  1400. },
  1401. "peer_id": {
  1402. "type": "string"
  1403. },
  1404. "type": {
  1405. "type": "integer"
  1406. },
  1407. "uuid": {
  1408. "type": "string"
  1409. }
  1410. }
  1411. },
  1412. "api.DeviceInfoInLogin": {
  1413. "type": "object",
  1414. "properties": {
  1415. "name": {
  1416. "type": "string"
  1417. },
  1418. "os": {
  1419. "type": "string"
  1420. },
  1421. "type": {
  1422. "type": "string"
  1423. }
  1424. }
  1425. },
  1426. "api.LoginForm": {
  1427. "type": "object",
  1428. "required": [
  1429. "username"
  1430. ],
  1431. "properties": {
  1432. "autoLogin": {
  1433. "type": "boolean"
  1434. },
  1435. "deviceInfo": {
  1436. "$ref": "#/definitions/api.DeviceInfoInLogin"
  1437. },
  1438. "id": {
  1439. "type": "string"
  1440. },
  1441. "password": {
  1442. "type": "string",
  1443. "maxLength": 32,
  1444. "minLength": 4
  1445. },
  1446. "type": {
  1447. "type": "string"
  1448. },
  1449. "username": {
  1450. "type": "string",
  1451. "maxLength": 32,
  1452. "minLength": 2
  1453. },
  1454. "uuid": {
  1455. "type": "string"
  1456. }
  1457. }
  1458. },
  1459. "api.LoginRes": {
  1460. "type": "object",
  1461. "properties": {
  1462. "access_token": {
  1463. "type": "string"
  1464. },
  1465. "secret": {
  1466. "type": "string"
  1467. },
  1468. "tfa_type": {
  1469. "type": "string"
  1470. },
  1471. "type": {
  1472. "type": "string"
  1473. },
  1474. "user": {
  1475. "$ref": "#/definitions/api.UserPayload"
  1476. }
  1477. }
  1478. },
  1479. "api.PeerForm": {
  1480. "type": "object",
  1481. "properties": {
  1482. "cpu": {
  1483. "type": "string"
  1484. },
  1485. "hostname": {
  1486. "type": "string"
  1487. },
  1488. "id": {
  1489. "type": "string"
  1490. },
  1491. "memory": {
  1492. "type": "string"
  1493. },
  1494. "os": {
  1495. "type": "string"
  1496. },
  1497. "username": {
  1498. "type": "string"
  1499. },
  1500. "uuid": {
  1501. "type": "string"
  1502. },
  1503. "version": {
  1504. "type": "string"
  1505. }
  1506. }
  1507. },
  1508. "api.UserPayload": {
  1509. "type": "object",
  1510. "properties": {
  1511. "email": {
  1512. "type": "string"
  1513. },
  1514. "info": {
  1515. "type": "object",
  1516. "additionalProperties": true
  1517. },
  1518. "is_admin": {
  1519. "type": "boolean"
  1520. },
  1521. "name": {
  1522. "type": "string"
  1523. },
  1524. "note": {
  1525. "type": "string"
  1526. },
  1527. "status": {
  1528. "type": "integer"
  1529. }
  1530. }
  1531. },
  1532. "model.AddressBookCollection": {
  1533. "type": "object",
  1534. "required": [
  1535. "name"
  1536. ],
  1537. "properties": {
  1538. "created_at": {
  1539. "type": "string"
  1540. },
  1541. "id": {
  1542. "type": "integer"
  1543. },
  1544. "name": {
  1545. "type": "string"
  1546. },
  1547. "updated_at": {
  1548. "type": "string"
  1549. },
  1550. "user_id": {
  1551. "type": "integer"
  1552. }
  1553. }
  1554. },
  1555. "model.Tag": {
  1556. "type": "object",
  1557. "properties": {
  1558. "collection": {
  1559. "$ref": "#/definitions/model.AddressBookCollection"
  1560. },
  1561. "collection_id": {
  1562. "type": "integer"
  1563. },
  1564. "color": {
  1565. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  1566. "type": "integer"
  1567. },
  1568. "created_at": {
  1569. "type": "string"
  1570. },
  1571. "id": {
  1572. "type": "integer"
  1573. },
  1574. "name": {
  1575. "type": "string"
  1576. },
  1577. "updated_at": {
  1578. "type": "string"
  1579. },
  1580. "user_id": {
  1581. "type": "integer"
  1582. }
  1583. }
  1584. },
  1585. "model.TagList": {
  1586. "type": "object",
  1587. "properties": {
  1588. "list": {
  1589. "type": "array",
  1590. "items": {
  1591. "$ref": "#/definitions/model.Tag"
  1592. }
  1593. },
  1594. "page": {
  1595. "type": "integer"
  1596. },
  1597. "page_size": {
  1598. "type": "integer"
  1599. },
  1600. "total": {
  1601. "type": "integer"
  1602. }
  1603. }
  1604. },
  1605. "response.DataResponse": {
  1606. "type": "object",
  1607. "properties": {
  1608. "data": {},
  1609. "total": {
  1610. "type": "integer"
  1611. }
  1612. }
  1613. },
  1614. "response.ErrorResponse": {
  1615. "type": "object",
  1616. "properties": {
  1617. "error": {
  1618. "type": "string"
  1619. }
  1620. }
  1621. },
  1622. "response.Response": {
  1623. "type": "object",
  1624. "properties": {
  1625. "code": {
  1626. "type": "integer"
  1627. },
  1628. "data": {},
  1629. "message": {
  1630. "type": "string"
  1631. }
  1632. }
  1633. }
  1634. },
  1635. "securityDefinitions": {
  1636. "BearerAuth": {
  1637. "type": "apiKey",
  1638. "name": "Authorization",
  1639. "in": "header"
  1640. },
  1641. "token": {
  1642. "type": "apiKey",
  1643. "name": "api-token",
  1644. "in": "header"
  1645. }
  1646. }
  1647. }`
  1648. // SwaggerInfoapi holds exported Swagger Info so clients can modify it
  1649. var SwaggerInfoapi = &swag.Spec{
  1650. Version: "1.0",
  1651. Host: "",
  1652. BasePath: "/api",
  1653. Schemes: []string{},
  1654. Title: "管理系统API",
  1655. Description: "接口",
  1656. InfoInstanceName: "api",
  1657. SwaggerTemplate: docTemplateapi,
  1658. LeftDelim: "{{",
  1659. RightDelim: "}}",
  1660. }
  1661. func init() {
  1662. swag.Register(SwaggerInfoapi.InstanceName(), SwaggerInfoapi)
  1663. }