api_swagger.json 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "接口",
  5. "title": "管理系统API",
  6. "contact": {},
  7. "version": "1.0"
  8. },
  9. "basePath": "/api",
  10. "paths": {
  11. "/": {
  12. "get": {
  13. "description": "首页",
  14. "consumes": [
  15. "application/json"
  16. ],
  17. "produces": [
  18. "application/json"
  19. ],
  20. "tags": [
  21. "首页"
  22. ],
  23. "summary": "首页",
  24. "responses": {
  25. "200": {
  26. "description": "OK",
  27. "schema": {
  28. "$ref": "#/definitions/response.Response"
  29. }
  30. },
  31. "500": {
  32. "description": "Internal Server Error",
  33. "schema": {
  34. "$ref": "#/definitions/response.Response"
  35. }
  36. }
  37. }
  38. }
  39. },
  40. "/ab": {
  41. "get": {
  42. "security": [
  43. {
  44. "BearerAuth": []
  45. }
  46. ],
  47. "description": "地址列表",
  48. "consumes": [
  49. "application/json"
  50. ],
  51. "produces": [
  52. "application/json"
  53. ],
  54. "tags": [
  55. "地址"
  56. ],
  57. "summary": "地址列表",
  58. "responses": {
  59. "200": {
  60. "description": "OK",
  61. "schema": {
  62. "$ref": "#/definitions/response.Response"
  63. }
  64. },
  65. "500": {
  66. "description": "Internal Server Error",
  67. "schema": {
  68. "$ref": "#/definitions/response.ErrorResponse"
  69. }
  70. }
  71. }
  72. },
  73. "post": {
  74. "security": [
  75. {
  76. "BearerAuth": []
  77. }
  78. ],
  79. "description": "地址更新",
  80. "consumes": [
  81. "application/json"
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "地址"
  88. ],
  89. "summary": "地址更新",
  90. "parameters": [
  91. {
  92. "description": "地址表单",
  93. "name": "body",
  94. "in": "body",
  95. "required": true,
  96. "schema": {
  97. "$ref": "#/definitions/api.AddressBookForm"
  98. }
  99. }
  100. ],
  101. "responses": {
  102. "200": {
  103. "description": "null",
  104. "schema": {
  105. "type": "string"
  106. }
  107. },
  108. "500": {
  109. "description": "Internal Server Error",
  110. "schema": {
  111. "$ref": "#/definitions/response.ErrorResponse"
  112. }
  113. }
  114. }
  115. }
  116. },
  117. "/ab/add": {
  118. "post": {
  119. "security": [
  120. {
  121. "BearerAuth": []
  122. }
  123. ],
  124. "description": "标签",
  125. "consumes": [
  126. "application/json"
  127. ],
  128. "produces": [
  129. "application/json"
  130. ],
  131. "tags": [
  132. "地址"
  133. ],
  134. "summary": "标签添加",
  135. "responses": {
  136. "200": {
  137. "description": "OK",
  138. "schema": {
  139. "type": "string"
  140. }
  141. },
  142. "500": {
  143. "description": "Internal Server Error",
  144. "schema": {
  145. "$ref": "#/definitions/response.ErrorResponse"
  146. }
  147. }
  148. }
  149. }
  150. },
  151. "/ab/peer/add/{id}": {
  152. "post": {
  153. "security": [
  154. {
  155. "BearerAuth": []
  156. }
  157. ],
  158. "description": "添加地址",
  159. "consumes": [
  160. "application/json"
  161. ],
  162. "produces": [
  163. "application/json"
  164. ],
  165. "tags": [
  166. "地址[Personal]"
  167. ],
  168. "summary": "添加地址",
  169. "parameters": [
  170. {
  171. "type": "string",
  172. "description": "id",
  173. "name": "id",
  174. "in": "path",
  175. "required": true
  176. }
  177. ],
  178. "responses": {
  179. "200": {
  180. "description": "OK",
  181. "schema": {
  182. "type": "string"
  183. }
  184. },
  185. "500": {
  186. "description": "Internal Server Error",
  187. "schema": {
  188. "$ref": "#/definitions/response.ErrorResponse"
  189. }
  190. }
  191. }
  192. }
  193. },
  194. "/ab/peers": {
  195. "post": {
  196. "security": [
  197. {
  198. "BearerAuth": []
  199. }
  200. ],
  201. "description": "地址",
  202. "consumes": [
  203. "application/json"
  204. ],
  205. "produces": [
  206. "application/json"
  207. ],
  208. "tags": [
  209. "地址[Personal]"
  210. ],
  211. "summary": "地址列表",
  212. "parameters": [
  213. {
  214. "description": "string valid",
  215. "name": "string",
  216. "in": "body",
  217. "schema": {
  218. "type": "string"
  219. }
  220. }
  221. ],
  222. "responses": {
  223. "200": {
  224. "description": "OK",
  225. "schema": {
  226. "$ref": "#/definitions/response.Response"
  227. }
  228. },
  229. "500": {
  230. "description": "Internal Server Error",
  231. "schema": {
  232. "$ref": "#/definitions/response.Response"
  233. }
  234. }
  235. }
  236. }
  237. },
  238. "/ab/personal": {
  239. "post": {
  240. "security": [
  241. {
  242. "BearerAuth": []
  243. }
  244. ],
  245. "description": "个人地址",
  246. "consumes": [
  247. "application/json"
  248. ],
  249. "produces": [
  250. "application/json"
  251. ],
  252. "tags": [
  253. "地址[Personal]"
  254. ],
  255. "summary": "个人地址",
  256. "parameters": [
  257. {
  258. "description": "string valid",
  259. "name": "string",
  260. "in": "body",
  261. "schema": {
  262. "type": "string"
  263. }
  264. }
  265. ],
  266. "responses": {
  267. "200": {
  268. "description": "OK",
  269. "schema": {
  270. "$ref": "#/definitions/response.Response"
  271. }
  272. },
  273. "500": {
  274. "description": "Internal Server Error",
  275. "schema": {
  276. "$ref": "#/definitions/response.Response"
  277. }
  278. }
  279. }
  280. }
  281. },
  282. "/ab/settings": {
  283. "post": {
  284. "security": [
  285. {
  286. "BearerAuth": []
  287. }
  288. ],
  289. "description": "设置",
  290. "consumes": [
  291. "application/json"
  292. ],
  293. "produces": [
  294. "application/json"
  295. ],
  296. "tags": [
  297. "地址[Personal]"
  298. ],
  299. "summary": "设置",
  300. "parameters": [
  301. {
  302. "description": "string valid",
  303. "name": "string",
  304. "in": "body",
  305. "schema": {
  306. "type": "string"
  307. }
  308. }
  309. ],
  310. "responses": {
  311. "200": {
  312. "description": "OK",
  313. "schema": {
  314. "$ref": "#/definitions/response.Response"
  315. }
  316. },
  317. "500": {
  318. "description": "Internal Server Error",
  319. "schema": {
  320. "$ref": "#/definitions/response.Response"
  321. }
  322. }
  323. }
  324. }
  325. },
  326. "/ab/shared/profiles": {
  327. "post": {
  328. "security": [
  329. {
  330. "BearerAuth": []
  331. }
  332. ],
  333. "description": "共享",
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "地址[Personal]"
  342. ],
  343. "summary": "共享地址簿",
  344. "parameters": [
  345. {
  346. "description": "string valid",
  347. "name": "string",
  348. "in": "body",
  349. "schema": {
  350. "type": "string"
  351. }
  352. }
  353. ],
  354. "responses": {
  355. "200": {
  356. "description": "OK",
  357. "schema": {
  358. "$ref": "#/definitions/response.Response"
  359. }
  360. },
  361. "500": {
  362. "description": "Internal Server Error",
  363. "schema": {
  364. "$ref": "#/definitions/response.Response"
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "/ab/tags/{id}": {
  371. "post": {
  372. "security": [
  373. {
  374. "BearerAuth": []
  375. }
  376. ],
  377. "description": "标签",
  378. "consumes": [
  379. "application/json"
  380. ],
  381. "produces": [
  382. "application/json"
  383. ],
  384. "tags": [
  385. "地址[Personal]"
  386. ],
  387. "summary": "标签",
  388. "parameters": [
  389. {
  390. "type": "string",
  391. "description": "id",
  392. "name": "id",
  393. "in": "path",
  394. "required": true
  395. }
  396. ],
  397. "responses": {
  398. "200": {
  399. "description": "OK",
  400. "schema": {
  401. "$ref": "#/definitions/model.TagList"
  402. }
  403. },
  404. "500": {
  405. "description": "Internal Server Error",
  406. "schema": {
  407. "$ref": "#/definitions/response.ErrorResponse"
  408. }
  409. }
  410. }
  411. }
  412. },
  413. "/api": {
  414. "get": {
  415. "security": [
  416. {
  417. "token": []
  418. }
  419. ],
  420. "description": "用户信息",
  421. "consumes": [
  422. "application/json"
  423. ],
  424. "produces": [
  425. "application/json"
  426. ],
  427. "tags": [
  428. "用户"
  429. ],
  430. "summary": "用户信息",
  431. "responses": {
  432. "200": {
  433. "description": "OK",
  434. "schema": {
  435. "$ref": "#/definitions/api.UserPayload"
  436. }
  437. },
  438. "500": {
  439. "description": "Internal Server Error",
  440. "schema": {
  441. "$ref": "#/definitions/response.Response"
  442. }
  443. }
  444. }
  445. }
  446. },
  447. "/heartbeat": {
  448. "post": {
  449. "description": "心跳",
  450. "consumes": [
  451. "application/json"
  452. ],
  453. "produces": [
  454. "application/json"
  455. ],
  456. "tags": [
  457. "首页"
  458. ],
  459. "summary": "心跳",
  460. "responses": {
  461. "200": {
  462. "description": "OK"
  463. },
  464. "500": {
  465. "description": "Internal Server Error",
  466. "schema": {
  467. "$ref": "#/definitions/response.Response"
  468. }
  469. }
  470. }
  471. }
  472. },
  473. "/login": {
  474. "post": {
  475. "description": "登录",
  476. "consumes": [
  477. "application/json"
  478. ],
  479. "produces": [
  480. "application/json"
  481. ],
  482. "tags": [
  483. "登录"
  484. ],
  485. "summary": "登录",
  486. "parameters": [
  487. {
  488. "description": "登录表单",
  489. "name": "body",
  490. "in": "body",
  491. "required": true,
  492. "schema": {
  493. "$ref": "#/definitions/api.LoginForm"
  494. }
  495. }
  496. ],
  497. "responses": {
  498. "200": {
  499. "description": "OK",
  500. "schema": {
  501. "$ref": "#/definitions/api.LoginRes"
  502. }
  503. },
  504. "500": {
  505. "description": "Internal Server Error",
  506. "schema": {
  507. "$ref": "#/definitions/response.ErrorResponse"
  508. }
  509. }
  510. }
  511. }
  512. },
  513. "/login-options": {
  514. "post": {
  515. "description": "登录选项",
  516. "consumes": [
  517. "application/json"
  518. ],
  519. "produces": [
  520. "application/json"
  521. ],
  522. "tags": [
  523. "登录"
  524. ],
  525. "summary": "登录选项",
  526. "responses": {
  527. "200": {
  528. "description": "OK",
  529. "schema": {
  530. "type": "array",
  531. "items": {
  532. "type": "string"
  533. }
  534. }
  535. },
  536. "500": {
  537. "description": "Internal Server Error",
  538. "schema": {
  539. "$ref": "#/definitions/response.ErrorResponse"
  540. }
  541. }
  542. }
  543. }
  544. },
  545. "/logout": {
  546. "post": {
  547. "description": "登出",
  548. "consumes": [
  549. "application/json"
  550. ],
  551. "produces": [
  552. "application/json"
  553. ],
  554. "tags": [
  555. "登录"
  556. ],
  557. "summary": "登出",
  558. "responses": {
  559. "200": {
  560. "description": "OK",
  561. "schema": {
  562. "type": "string"
  563. }
  564. },
  565. "500": {
  566. "description": "Internal Server Error",
  567. "schema": {
  568. "$ref": "#/definitions/response.ErrorResponse"
  569. }
  570. }
  571. }
  572. }
  573. },
  574. "/oauth/callback": {
  575. "get": {
  576. "description": "OauthCallback",
  577. "consumes": [
  578. "application/json"
  579. ],
  580. "produces": [
  581. "application/json"
  582. ],
  583. "tags": [
  584. "Oauth"
  585. ],
  586. "summary": "OauthCallback",
  587. "responses": {
  588. "200": {
  589. "description": "OK",
  590. "schema": {
  591. "$ref": "#/definitions/api.LoginRes"
  592. }
  593. },
  594. "500": {
  595. "description": "Internal Server Error",
  596. "schema": {
  597. "$ref": "#/definitions/response.ErrorResponse"
  598. }
  599. }
  600. }
  601. }
  602. },
  603. "/oidc/auth": {
  604. "post": {
  605. "description": "OidcAuth",
  606. "consumes": [
  607. "application/json"
  608. ],
  609. "produces": [
  610. "application/json"
  611. ],
  612. "tags": [
  613. "Oauth"
  614. ],
  615. "summary": "OidcAuth",
  616. "responses": {
  617. "200": {
  618. "description": "OK",
  619. "schema": {
  620. "$ref": "#/definitions/api.LoginRes"
  621. }
  622. },
  623. "500": {
  624. "description": "Internal Server Error",
  625. "schema": {
  626. "$ref": "#/definitions/response.ErrorResponse"
  627. }
  628. }
  629. }
  630. }
  631. },
  632. "/oidc/auth-query": {
  633. "get": {
  634. "description": "OidcAuthQuery",
  635. "consumes": [
  636. "application/json"
  637. ],
  638. "produces": [
  639. "application/json"
  640. ],
  641. "tags": [
  642. "Oauth"
  643. ],
  644. "summary": "OidcAuthQuery",
  645. "responses": {
  646. "200": {
  647. "description": "OK",
  648. "schema": {
  649. "$ref": "#/definitions/api.LoginRes"
  650. }
  651. },
  652. "500": {
  653. "description": "Internal Server Error",
  654. "schema": {
  655. "$ref": "#/definitions/response.ErrorResponse"
  656. }
  657. }
  658. }
  659. }
  660. },
  661. "/peers": {
  662. "get": {
  663. "security": [
  664. {
  665. "BearerAuth": []
  666. }
  667. ],
  668. "description": "机器",
  669. "consumes": [
  670. "application/json"
  671. ],
  672. "produces": [
  673. "application/json"
  674. ],
  675. "tags": [
  676. "群组"
  677. ],
  678. "summary": "机器",
  679. "parameters": [
  680. {
  681. "type": "integer",
  682. "description": "页码",
  683. "name": "page",
  684. "in": "query"
  685. },
  686. {
  687. "type": "integer",
  688. "description": "每页数量",
  689. "name": "pageSize",
  690. "in": "query"
  691. },
  692. {
  693. "type": "integer",
  694. "description": "状态",
  695. "name": "status",
  696. "in": "query"
  697. },
  698. {
  699. "type": "string",
  700. "description": "accessible",
  701. "name": "accessible",
  702. "in": "query"
  703. }
  704. ],
  705. "responses": {
  706. "200": {
  707. "description": "OK",
  708. "schema": {
  709. "$ref": "#/definitions/response.DataResponse"
  710. }
  711. },
  712. "500": {
  713. "description": "Internal Server Error",
  714. "schema": {
  715. "$ref": "#/definitions/response.Response"
  716. }
  717. }
  718. }
  719. }
  720. },
  721. "/server-config": {
  722. "get": {
  723. "security": [
  724. {
  725. "token": []
  726. }
  727. ],
  728. "description": "服务配置,给webclient提供api-server",
  729. "consumes": [
  730. "application/json"
  731. ],
  732. "produces": [
  733. "application/json"
  734. ],
  735. "tags": [
  736. "WEBCLIENT"
  737. ],
  738. "summary": "服务配置",
  739. "responses": {
  740. "200": {
  741. "description": "OK",
  742. "schema": {
  743. "$ref": "#/definitions/response.Response"
  744. }
  745. },
  746. "500": {
  747. "description": "Internal Server Error",
  748. "schema": {
  749. "$ref": "#/definitions/response.Response"
  750. }
  751. }
  752. }
  753. }
  754. },
  755. "/sysinfo": {
  756. "post": {
  757. "security": [
  758. {
  759. "BearerAuth": []
  760. }
  761. ],
  762. "description": "提交系统信息",
  763. "consumes": [
  764. "application/json"
  765. ],
  766. "produces": [
  767. "application/json"
  768. ],
  769. "tags": [
  770. "地址"
  771. ],
  772. "summary": "提交系统信息",
  773. "parameters": [
  774. {
  775. "description": "系统信息表单",
  776. "name": "body",
  777. "in": "body",
  778. "required": true,
  779. "schema": {
  780. "$ref": "#/definitions/api.PeerForm"
  781. }
  782. }
  783. ],
  784. "responses": {
  785. "200": {
  786. "description": "SYSINFO_UPDATED,ID_NOT_FOUND",
  787. "schema": {
  788. "type": "string"
  789. }
  790. },
  791. "500": {
  792. "description": "Internal Server Error",
  793. "schema": {
  794. "$ref": "#/definitions/response.ErrorResponse"
  795. }
  796. }
  797. }
  798. }
  799. },
  800. "/tags": {
  801. "post": {
  802. "security": [
  803. {
  804. "BearerAuth": []
  805. }
  806. ],
  807. "description": "标签",
  808. "consumes": [
  809. "application/json"
  810. ],
  811. "produces": [
  812. "application/json"
  813. ],
  814. "tags": [
  815. "地址"
  816. ],
  817. "summary": "标签",
  818. "responses": {
  819. "200": {
  820. "description": "OK",
  821. "schema": {
  822. "type": "array",
  823. "items": {
  824. "$ref": "#/definitions/model.Tag"
  825. }
  826. }
  827. },
  828. "500": {
  829. "description": "Internal Server Error",
  830. "schema": {
  831. "$ref": "#/definitions/response.ErrorResponse"
  832. }
  833. }
  834. }
  835. }
  836. },
  837. "/users": {
  838. "get": {
  839. "security": [
  840. {
  841. "BearerAuth": []
  842. }
  843. ],
  844. "description": "用户列表",
  845. "consumes": [
  846. "application/json"
  847. ],
  848. "produces": [
  849. "application/json"
  850. ],
  851. "tags": [
  852. "群组"
  853. ],
  854. "summary": "用户列表",
  855. "parameters": [
  856. {
  857. "type": "integer",
  858. "description": "页码",
  859. "name": "page",
  860. "in": "query"
  861. },
  862. {
  863. "type": "integer",
  864. "description": "每页数量",
  865. "name": "pageSize",
  866. "in": "query"
  867. },
  868. {
  869. "type": "integer",
  870. "description": "状态",
  871. "name": "status",
  872. "in": "query"
  873. },
  874. {
  875. "type": "string",
  876. "description": "accessible",
  877. "name": "accessible",
  878. "in": "query"
  879. }
  880. ],
  881. "responses": {
  882. "200": {
  883. "description": "OK",
  884. "schema": {
  885. "allOf": [
  886. {
  887. "$ref": "#/definitions/response.DataResponse"
  888. },
  889. {
  890. "type": "object",
  891. "properties": {
  892. "data": {
  893. "type": "array",
  894. "items": {
  895. "$ref": "#/definitions/api.UserPayload"
  896. }
  897. }
  898. }
  899. }
  900. ]
  901. }
  902. },
  903. "500": {
  904. "description": "Internal Server Error",
  905. "schema": {
  906. "$ref": "#/definitions/response.ErrorResponse"
  907. }
  908. }
  909. }
  910. }
  911. }
  912. },
  913. "definitions": {
  914. "api.AddressBookForm": {
  915. "type": "object",
  916. "properties": {
  917. "data": {
  918. "type": "string",
  919. "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}\"}"
  920. }
  921. }
  922. },
  923. "api.DeviceInfoInLogin": {
  924. "type": "object",
  925. "properties": {
  926. "name": {
  927. "type": "string"
  928. },
  929. "os": {
  930. "type": "string"
  931. },
  932. "type": {
  933. "type": "string"
  934. }
  935. }
  936. },
  937. "api.LoginForm": {
  938. "type": "object",
  939. "required": [
  940. "username"
  941. ],
  942. "properties": {
  943. "autoLogin": {
  944. "type": "boolean"
  945. },
  946. "deviceInfo": {
  947. "$ref": "#/definitions/api.DeviceInfoInLogin"
  948. },
  949. "id": {
  950. "type": "string"
  951. },
  952. "password": {
  953. "type": "string",
  954. "maxLength": 20,
  955. "minLength": 4
  956. },
  957. "type": {
  958. "type": "string"
  959. },
  960. "username": {
  961. "type": "string",
  962. "maxLength": 10,
  963. "minLength": 4
  964. },
  965. "uuid": {
  966. "type": "string"
  967. }
  968. }
  969. },
  970. "api.LoginRes": {
  971. "type": "object",
  972. "properties": {
  973. "access_token": {
  974. "type": "string"
  975. },
  976. "secret": {
  977. "type": "string"
  978. },
  979. "tfa_type": {
  980. "type": "string"
  981. },
  982. "type": {
  983. "type": "string"
  984. },
  985. "user": {
  986. "$ref": "#/definitions/api.UserPayload"
  987. }
  988. }
  989. },
  990. "api.PeerForm": {
  991. "type": "object",
  992. "properties": {
  993. "cpu": {
  994. "type": "string"
  995. },
  996. "hostname": {
  997. "type": "string"
  998. },
  999. "id": {
  1000. "type": "string"
  1001. },
  1002. "memory": {
  1003. "type": "string"
  1004. },
  1005. "os": {
  1006. "type": "string"
  1007. },
  1008. "username": {
  1009. "type": "string"
  1010. },
  1011. "uuid": {
  1012. "type": "string"
  1013. },
  1014. "version": {
  1015. "type": "string"
  1016. }
  1017. }
  1018. },
  1019. "api.UserPayload": {
  1020. "type": "object",
  1021. "properties": {
  1022. "email": {
  1023. "type": "string"
  1024. },
  1025. "info": {
  1026. "type": "object",
  1027. "additionalProperties": true
  1028. },
  1029. "is_admin": {
  1030. "type": "boolean"
  1031. },
  1032. "name": {
  1033. "type": "string"
  1034. },
  1035. "note": {
  1036. "type": "string"
  1037. },
  1038. "status": {
  1039. "type": "integer"
  1040. }
  1041. }
  1042. },
  1043. "model.Tag": {
  1044. "type": "object",
  1045. "properties": {
  1046. "color": {
  1047. "description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba",
  1048. "type": "integer"
  1049. },
  1050. "created_at": {
  1051. "type": "string"
  1052. },
  1053. "id": {
  1054. "type": "integer"
  1055. },
  1056. "name": {
  1057. "type": "string"
  1058. },
  1059. "updated_at": {
  1060. "type": "string"
  1061. },
  1062. "user_id": {
  1063. "type": "integer"
  1064. }
  1065. }
  1066. },
  1067. "model.TagList": {
  1068. "type": "object",
  1069. "properties": {
  1070. "list": {
  1071. "type": "array",
  1072. "items": {
  1073. "$ref": "#/definitions/model.Tag"
  1074. }
  1075. },
  1076. "page": {
  1077. "type": "integer"
  1078. },
  1079. "page_size": {
  1080. "type": "integer"
  1081. },
  1082. "total": {
  1083. "type": "integer"
  1084. }
  1085. }
  1086. },
  1087. "response.DataResponse": {
  1088. "type": "object",
  1089. "properties": {
  1090. "data": {},
  1091. "total": {
  1092. "type": "integer"
  1093. }
  1094. }
  1095. },
  1096. "response.ErrorResponse": {
  1097. "type": "object",
  1098. "properties": {
  1099. "error": {
  1100. "type": "string"
  1101. }
  1102. }
  1103. },
  1104. "response.Response": {
  1105. "type": "object",
  1106. "properties": {
  1107. "code": {
  1108. "type": "integer"
  1109. },
  1110. "data": {},
  1111. "message": {
  1112. "type": "string"
  1113. }
  1114. }
  1115. }
  1116. },
  1117. "securityDefinitions": {
  1118. "BearerAuth": {
  1119. "type": "apiKey",
  1120. "name": "Authorization",
  1121. "in": "header"
  1122. },
  1123. "token": {
  1124. "type": "apiKey",
  1125. "name": "api-token",
  1126. "in": "header"
  1127. }
  1128. }
  1129. }