You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989
  1. // Code generated by swaggo/swag. DO NOT EDIT.
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  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. "/api/v1/admin/bot/create": {
  17. "post": {
  18. "security": [
  19. {
  20. "ApiKeyAuth": []
  21. }
  22. ],
  23. "description": "Create a new bot",
  24. "produces": [
  25. "application/json"
  26. ],
  27. "tags": [
  28. "bot"
  29. ],
  30. "summary": "CreateBot",
  31. "parameters": [
  32. {
  33. "description": "CreateBotParams",
  34. "name": "data",
  35. "in": "body",
  36. "required": true,
  37. "schema": {
  38. "$ref": "#/definitions/requestparams.CreateBotParams"
  39. }
  40. }
  41. ],
  42. "responses": {
  43. "200": {
  44. "description": "Success",
  45. "schema": {
  46. "allOf": [
  47. {
  48. "$ref": "#/definitions/response.Response"
  49. },
  50. {
  51. "type": "object",
  52. "properties": {
  53. "msg": {
  54. "type": "string"
  55. }
  56. }
  57. }
  58. ]
  59. }
  60. }
  61. }
  62. }
  63. },
  64. "/api/v1/admin/bot/delete": {
  65. "post": {
  66. "security": [
  67. {
  68. "ApiKeyAuth": []
  69. }
  70. ],
  71. "description": "delete bot",
  72. "tags": [
  73. "bot"
  74. ],
  75. "summary": "DeleteBot",
  76. "responses": {
  77. "200": {
  78. "description": "Success",
  79. "schema": {
  80. "allOf": [
  81. {
  82. "$ref": "#/definitions/response.Response"
  83. },
  84. {
  85. "type": "object",
  86. "properties": {
  87. "msg": {
  88. "type": "string"
  89. }
  90. }
  91. }
  92. ]
  93. }
  94. }
  95. }
  96. }
  97. },
  98. "/api/v1/admin/bot/list": {
  99. "post": {
  100. "security": [
  101. {
  102. "ApiKeyAuth": []
  103. }
  104. ],
  105. "description": "get community bot info",
  106. "tags": [
  107. "bot"
  108. ],
  109. "summary": "ListBot",
  110. "responses": {
  111. "200": {
  112. "description": "Success",
  113. "schema": {
  114. "allOf": [
  115. {
  116. "$ref": "#/definitions/response.Response"
  117. },
  118. {
  119. "type": "object",
  120. "properties": {
  121. "msg": {
  122. "type": "string"
  123. }
  124. }
  125. }
  126. ]
  127. }
  128. }
  129. }
  130. }
  131. },
  132. "/api/v1/admin/bot/update": {
  133. "post": {
  134. "security": [
  135. {
  136. "ApiKeyAuth": []
  137. }
  138. ],
  139. "description": "update bot info",
  140. "tags": [
  141. "bot"
  142. ],
  143. "summary": "UpdateBot",
  144. "responses": {
  145. "200": {
  146. "description": "Success",
  147. "schema": {
  148. "allOf": [
  149. {
  150. "$ref": "#/definitions/response.Response"
  151. },
  152. {
  153. "type": "object",
  154. "properties": {
  155. "msg": {
  156. "type": "string"
  157. }
  158. }
  159. }
  160. ]
  161. }
  162. }
  163. }
  164. }
  165. },
  166. "/api/v1/admin/staff/create": {
  167. "post": {
  168. "security": [
  169. {
  170. "ApiKeyAuth": []
  171. }
  172. ],
  173. "description": "Create a new staff",
  174. "produces": [
  175. "application/json"
  176. ],
  177. "tags": [
  178. "user"
  179. ],
  180. "summary": "CreateStaff",
  181. "parameters": [
  182. {
  183. "description": "RegisterStaffParams",
  184. "name": "data",
  185. "in": "body",
  186. "required": true,
  187. "schema": {
  188. "$ref": "#/definitions/requestparams.RegisterStaffParams"
  189. }
  190. }
  191. ],
  192. "responses": {
  193. "200": {
  194. "description": "Success",
  195. "schema": {
  196. "allOf": [
  197. {
  198. "$ref": "#/definitions/response.Response"
  199. },
  200. {
  201. "type": "object",
  202. "properties": {
  203. "msg": {
  204. "type": "string"
  205. }
  206. }
  207. }
  208. ]
  209. }
  210. }
  211. }
  212. }
  213. },
  214. "/api/v1/admin/staff/delete": {
  215. "post": {
  216. "description": "Delete a new staff",
  217. "produces": [
  218. "application/json"
  219. ],
  220. "tags": [
  221. "user"
  222. ],
  223. "summary": "DeleteStaff",
  224. "parameters": [
  225. {
  226. "description": "DeleteUserParams",
  227. "name": "data",
  228. "in": "body",
  229. "required": true,
  230. "schema": {
  231. "$ref": "#/definitions/requestparams.DeleteUserParams"
  232. }
  233. }
  234. ],
  235. "responses": {
  236. "200": {
  237. "description": "Success",
  238. "schema": {
  239. "allOf": [
  240. {
  241. "$ref": "#/definitions/response.Response"
  242. },
  243. {
  244. "type": "object",
  245. "properties": {
  246. "msg": {
  247. "type": "string"
  248. }
  249. }
  250. }
  251. ]
  252. }
  253. }
  254. }
  255. }
  256. },
  257. "/api/v1/common/file/upload": {
  258. "post": {
  259. "description": "upload a file",
  260. "produces": [
  261. "application/json"
  262. ],
  263. "tags": [
  264. "common"
  265. ],
  266. "summary": "UploadFile",
  267. "parameters": [
  268. {
  269. "type": "file",
  270. "description": "file",
  271. "name": "file",
  272. "in": "formData",
  273. "required": true
  274. }
  275. ],
  276. "responses": {
  277. "200": {
  278. "description": "Success",
  279. "schema": {
  280. "allOf": [
  281. {
  282. "$ref": "#/definitions/response.Response"
  283. },
  284. {
  285. "type": "object",
  286. "properties": {
  287. "msg": {
  288. "type": "string"
  289. }
  290. }
  291. }
  292. ]
  293. }
  294. }
  295. }
  296. }
  297. },
  298. "/api/v1/community/create": {
  299. "post": {
  300. "description": "Create a new community",
  301. "produces": [
  302. "application/json"
  303. ],
  304. "tags": [
  305. "community"
  306. ],
  307. "summary": "CreateCommunity",
  308. "parameters": [
  309. {
  310. "description": "Community",
  311. "name": "data",
  312. "in": "body",
  313. "required": true,
  314. "schema": {
  315. "$ref": "#/definitions/requestparams.CommunityParams"
  316. }
  317. }
  318. ],
  319. "responses": {
  320. "200": {
  321. "description": "Success",
  322. "schema": {
  323. "allOf": [
  324. {
  325. "$ref": "#/definitions/response.Response"
  326. },
  327. {
  328. "type": "object",
  329. "properties": {
  330. "msg": {
  331. "type": "string"
  332. }
  333. }
  334. }
  335. ]
  336. }
  337. }
  338. }
  339. }
  340. },
  341. "/api/v1/community/info": {
  342. "post": {
  343. "description": "get community info",
  344. "produces": [
  345. "application/json"
  346. ],
  347. "tags": [
  348. "community"
  349. ],
  350. "summary": "GetCommunityInfo",
  351. "parameters": [
  352. {
  353. "description": "GetCommunityInfoParams",
  354. "name": "data",
  355. "in": "body",
  356. "required": true,
  357. "schema": {
  358. "$ref": "#/definitions/requestparams.GetCommunityInfoParams"
  359. }
  360. }
  361. ],
  362. "responses": {
  363. "200": {
  364. "description": "Success",
  365. "schema": {
  366. "allOf": [
  367. {
  368. "$ref": "#/definitions/response.Response"
  369. },
  370. {
  371. "type": "object",
  372. "properties": {
  373. "msg": {
  374. "type": "string"
  375. }
  376. }
  377. }
  378. ]
  379. }
  380. }
  381. }
  382. }
  383. },
  384. "/api/v1/community/me": {
  385. "get": {
  386. "security": [
  387. {
  388. "ApiKeyAuth": []
  389. }
  390. ],
  391. "description": "get my community info",
  392. "produces": [
  393. "application/json"
  394. ],
  395. "tags": [
  396. "community"
  397. ],
  398. "summary": "GetMyCommunityInfo",
  399. "responses": {
  400. "200": {
  401. "description": "Success",
  402. "schema": {
  403. "allOf": [
  404. {
  405. "$ref": "#/definitions/response.Response"
  406. },
  407. {
  408. "type": "object",
  409. "properties": {
  410. "msg": {
  411. "type": "string"
  412. }
  413. }
  414. }
  415. ]
  416. }
  417. }
  418. }
  419. }
  420. },
  421. "/api/v1/community/update": {
  422. "post": {
  423. "security": [
  424. {
  425. "ApiKeyAuth": []
  426. }
  427. ],
  428. "description": "get my community info",
  429. "produces": [
  430. "application/json"
  431. ],
  432. "tags": [
  433. "community"
  434. ],
  435. "summary": "GetMyCommunityInfo",
  436. "responses": {
  437. "200": {
  438. "description": "Success",
  439. "schema": {
  440. "allOf": [
  441. {
  442. "$ref": "#/definitions/response.Response"
  443. },
  444. {
  445. "type": "object",
  446. "properties": {
  447. "msg": {
  448. "type": "string"
  449. }
  450. }
  451. }
  452. ]
  453. }
  454. }
  455. }
  456. }
  457. },
  458. "/api/v1/email/code": {
  459. "post": {
  460. "description": "Use email to send verification code",
  461. "produces": [
  462. "application/json"
  463. ],
  464. "tags": [
  465. "mail"
  466. ],
  467. "summary": "SendCode",
  468. "parameters": [
  469. {
  470. "description": "Email address",
  471. "name": "data",
  472. "in": "body",
  473. "required": true,
  474. "schema": {
  475. "$ref": "#/definitions/requestparams.SendToParams"
  476. }
  477. }
  478. ],
  479. "responses": {
  480. "200": {
  481. "description": "Success",
  482. "schema": {
  483. "allOf": [
  484. {
  485. "$ref": "#/definitions/response.Response"
  486. },
  487. {
  488. "type": "object",
  489. "properties": {
  490. "msg": {
  491. "type": "string"
  492. }
  493. }
  494. }
  495. ]
  496. }
  497. }
  498. }
  499. }
  500. },
  501. "/api/v1/login/account": {
  502. "post": {
  503. "description": "login with account",
  504. "produces": [
  505. "application/json"
  506. ],
  507. "tags": [
  508. "user"
  509. ],
  510. "summary": "AccountLogin",
  511. "parameters": [
  512. {
  513. "description": "LoginParamsWithAccount",
  514. "name": "data",
  515. "in": "body",
  516. "required": true,
  517. "schema": {
  518. "$ref": "#/definitions/requestparams.LoginParamsWithAccount"
  519. }
  520. }
  521. ],
  522. "responses": {
  523. "200": {
  524. "description": "Success",
  525. "schema": {
  526. "allOf": [
  527. {
  528. "$ref": "#/definitions/response.Response"
  529. },
  530. {
  531. "type": "object",
  532. "properties": {
  533. "msg": {
  534. "type": "string"
  535. }
  536. }
  537. }
  538. ]
  539. }
  540. }
  541. }
  542. }
  543. },
  544. "/api/v1/openim/callback": {
  545. "post": {
  546. "description": "Support OpenIM callback",
  547. "produces": [
  548. "application/json"
  549. ],
  550. "tags": [
  551. "openim"
  552. ],
  553. "summary": "OpenIMCallback",
  554. "responses": {
  555. "200": {
  556. "description": "Success",
  557. "schema": {
  558. "allOf": [
  559. {
  560. "$ref": "#/definitions/response.Response"
  561. },
  562. {
  563. "type": "object",
  564. "properties": {
  565. "msg": {
  566. "type": "string"
  567. }
  568. }
  569. }
  570. ]
  571. }
  572. }
  573. }
  574. }
  575. },
  576. "/api/v1/register/admin": {
  577. "post": {
  578. "description": "Create a new admin",
  579. "produces": [
  580. "application/json"
  581. ],
  582. "tags": [
  583. "user"
  584. ],
  585. "summary": "AdminRegister",
  586. "parameters": [
  587. {
  588. "description": "RegisterAdminParams",
  589. "name": "data",
  590. "in": "body",
  591. "required": true,
  592. "schema": {
  593. "$ref": "#/definitions/requestparams.RegisterAdminParams"
  594. }
  595. }
  596. ],
  597. "responses": {
  598. "200": {
  599. "description": "Success",
  600. "schema": {
  601. "allOf": [
  602. {
  603. "$ref": "#/definitions/response.Response"
  604. },
  605. {
  606. "type": "object",
  607. "properties": {
  608. "msg": {
  609. "type": "string"
  610. }
  611. }
  612. }
  613. ]
  614. }
  615. }
  616. }
  617. }
  618. },
  619. "/api/v1/user/info": {
  620. "post": {
  621. "security": [
  622. {
  623. "ApiKeyAuth": []
  624. }
  625. ],
  626. "description": "get user info",
  627. "tags": [
  628. "user"
  629. ],
  630. "summary": "GetUserInfo",
  631. "responses": {
  632. "200": {
  633. "description": "Success",
  634. "schema": {
  635. "allOf": [
  636. {
  637. "$ref": "#/definitions/response.Response"
  638. },
  639. {
  640. "type": "object",
  641. "properties": {
  642. "msg": {
  643. "type": "string"
  644. }
  645. }
  646. }
  647. ]
  648. }
  649. }
  650. }
  651. }
  652. },
  653. "/api/v1/user/me": {
  654. "get": {
  655. "security": [
  656. {
  657. "ApiKeyAuth": []
  658. }
  659. ],
  660. "description": "get my user info",
  661. "tags": [
  662. "user"
  663. ],
  664. "summary": "GetMyInfo",
  665. "responses": {
  666. "200": {
  667. "description": "Success",
  668. "schema": {
  669. "allOf": [
  670. {
  671. "$ref": "#/definitions/response.Response"
  672. },
  673. {
  674. "type": "object",
  675. "properties": {
  676. "msg": {
  677. "type": "string"
  678. }
  679. }
  680. }
  681. ]
  682. }
  683. }
  684. }
  685. }
  686. },
  687. "/api/v1/user/update": {
  688. "post": {
  689. "security": [
  690. {
  691. "ApiKeyAuth": []
  692. }
  693. ],
  694. "description": "update user info",
  695. "tags": [
  696. "user"
  697. ],
  698. "summary": "UpdateInfo",
  699. "responses": {
  700. "200": {
  701. "description": "Success",
  702. "schema": {
  703. "allOf": [
  704. {
  705. "$ref": "#/definitions/response.Response"
  706. },
  707. {
  708. "type": "object",
  709. "properties": {
  710. "msg": {
  711. "type": "string"
  712. }
  713. }
  714. }
  715. ]
  716. }
  717. }
  718. }
  719. }
  720. },
  721. "/api/v1/user/update-password": {
  722. "post": {
  723. "security": [
  724. {
  725. "ApiKeyAuth": []
  726. }
  727. ],
  728. "description": "update user password",
  729. "tags": [
  730. "user"
  731. ],
  732. "summary": "UpdatePassword",
  733. "responses": {
  734. "200": {
  735. "description": "Success",
  736. "schema": {
  737. "allOf": [
  738. {
  739. "$ref": "#/definitions/response.Response"
  740. },
  741. {
  742. "type": "object",
  743. "properties": {
  744. "msg": {
  745. "type": "string"
  746. }
  747. }
  748. }
  749. ]
  750. }
  751. }
  752. }
  753. }
  754. },
  755. "/api/v1/user/userlist": {
  756. "post": {
  757. "security": [
  758. {
  759. "ApiKeyAuth": []
  760. }
  761. ],
  762. "description": "get community user info",
  763. "tags": [
  764. "user"
  765. ],
  766. "summary": "GetCommunityUserList",
  767. "responses": {
  768. "200": {
  769. "description": "Success",
  770. "schema": {
  771. "allOf": [
  772. {
  773. "$ref": "#/definitions/response.Response"
  774. },
  775. {
  776. "type": "object",
  777. "properties": {
  778. "msg": {
  779. "type": "string"
  780. }
  781. }
  782. }
  783. ]
  784. }
  785. }
  786. }
  787. }
  788. }
  789. },
  790. "definitions": {
  791. "requestparams.CommunityParams": {
  792. "type": "object",
  793. "required": [
  794. "avatar",
  795. "email",
  796. "name"
  797. ],
  798. "properties": {
  799. "avatar": {
  800. "description": "Avatar is optional.",
  801. "type": "string"
  802. },
  803. "description": {
  804. "description": "Description is optional.",
  805. "type": "string"
  806. },
  807. "email": {
  808. "type": "string"
  809. },
  810. "name": {
  811. "type": "string"
  812. }
  813. }
  814. },
  815. "requestparams.CreateBotParams": {
  816. "type": "object",
  817. "required": [
  818. "avatar",
  819. "bot_addr",
  820. "bot_port",
  821. "bot_token",
  822. "description",
  823. "nickname"
  824. ],
  825. "properties": {
  826. "avatar": {
  827. "type": "string"
  828. },
  829. "bot_addr": {
  830. "type": "string"
  831. },
  832. "bot_port": {
  833. "type": "integer"
  834. },
  835. "bot_token": {
  836. "type": "string"
  837. },
  838. "description": {
  839. "type": "string"
  840. },
  841. "nickname": {
  842. "type": "string"
  843. }
  844. }
  845. },
  846. "requestparams.CreateUserParams": {
  847. "type": "object",
  848. "required": [
  849. "avatar",
  850. "email",
  851. "nickname",
  852. "password"
  853. ],
  854. "properties": {
  855. "avatar": {
  856. "description": "Avatar is optional.",
  857. "type": "string"
  858. },
  859. "email": {
  860. "type": "string"
  861. },
  862. "nickname": {
  863. "type": "string"
  864. },
  865. "password": {
  866. "type": "string"
  867. }
  868. }
  869. },
  870. "requestparams.DeleteUserParams": {
  871. "type": "object",
  872. "required": [
  873. "uuid"
  874. ],
  875. "properties": {
  876. "uuid": {
  877. "type": "string"
  878. }
  879. }
  880. },
  881. "requestparams.GetCommunityInfoParams": {
  882. "type": "object",
  883. "required": [
  884. "uuid"
  885. ],
  886. "properties": {
  887. "uuid": {
  888. "type": "string"
  889. }
  890. }
  891. },
  892. "requestparams.LoginParamsWithAccount": {
  893. "type": "object",
  894. "required": [
  895. "email",
  896. "password"
  897. ],
  898. "properties": {
  899. "email": {
  900. "type": "string"
  901. },
  902. "password": {
  903. "type": "string"
  904. }
  905. }
  906. },
  907. "requestparams.RegisterAdminParams": {
  908. "type": "object",
  909. "required": [
  910. "code",
  911. "community_info",
  912. "user_info"
  913. ],
  914. "properties": {
  915. "code": {
  916. "type": "string"
  917. },
  918. "community_info": {
  919. "$ref": "#/definitions/requestparams.CommunityParams"
  920. },
  921. "user_info": {
  922. "$ref": "#/definitions/requestparams.CreateUserParams"
  923. }
  924. }
  925. },
  926. "requestparams.RegisterStaffParams": {
  927. "type": "object",
  928. "required": [
  929. "user_info"
  930. ],
  931. "properties": {
  932. "user_info": {
  933. "$ref": "#/definitions/requestparams.CreateUserParams"
  934. }
  935. }
  936. },
  937. "requestparams.SendToParams": {
  938. "type": "object",
  939. "required": [
  940. "email"
  941. ],
  942. "properties": {
  943. "email": {
  944. "type": "string"
  945. }
  946. }
  947. },
  948. "response.Response": {
  949. "type": "object",
  950. "properties": {
  951. "code": {
  952. "type": "integer"
  953. },
  954. "data": {},
  955. "msg": {
  956. "type": "string"
  957. }
  958. }
  959. }
  960. },
  961. "securityDefinitions": {
  962. "ApiKeyAuth": {
  963. "type": "apiKey",
  964. "name": "Authorization",
  965. "in": "header"
  966. }
  967. }
  968. }`
  969. // SwaggerInfo holds exported Swagger Info so clients can modify it
  970. var SwaggerInfo = &swag.Spec{
  971. Version: "v0.2.0",
  972. Host: "",
  973. BasePath: "",
  974. Schemes: []string{},
  975. Title: "OpenKF Server",
  976. Description: "OpenKF Server API Docs.",
  977. InfoInstanceName: "swagger",
  978. SwaggerTemplate: docTemplate,
  979. LeftDelim: "{{",
  980. RightDelim: "}}",
  981. }
  982. func init() {
  983. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  984. }