api_docs.go 35 KB

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