docs.go 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. // Package docs 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. "/exist": {
  17. "post": {
  18. "description": "get ip if id exist",
  19. "consumes": [
  20. "application/json"
  21. ],
  22. "produces": [
  23. "application/json"
  24. ],
  25. "tags": [
  26. "Safeline"
  27. ],
  28. "summary": "get ip if id exist",
  29. "parameters": [
  30. {
  31. "description": "body",
  32. "name": "body",
  33. "in": "body",
  34. "required": true,
  35. "schema": {
  36. "$ref": "#/definitions/handler.ExistReq"
  37. }
  38. }
  39. ],
  40. "responses": {
  41. "200": {
  42. "description": "OK",
  43. "schema": {
  44. "type": "string"
  45. }
  46. }
  47. }
  48. }
  49. },
  50. "/repos/discussions": {
  51. "get": {
  52. "description": "get discussions from GitHub",
  53. "consumes": [
  54. "application/json"
  55. ],
  56. "produces": [
  57. "application/json"
  58. ],
  59. "tags": [
  60. "GitHub"
  61. ],
  62. "summary": "get discussions",
  63. "parameters": [
  64. {
  65. "type": "string",
  66. "description": "search by",
  67. "name": "q",
  68. "in": "query"
  69. }
  70. ],
  71. "responses": {
  72. "200": {
  73. "description": "OK",
  74. "schema": {
  75. "type": "array",
  76. "items": {
  77. "$ref": "#/definitions/service.Discussion"
  78. }
  79. }
  80. }
  81. }
  82. }
  83. },
  84. "/repos/info": {
  85. "get": {
  86. "description": "get repo info from GitHub",
  87. "consumes": [
  88. "application/json"
  89. ],
  90. "produces": [
  91. "application/json"
  92. ],
  93. "tags": [
  94. "GitHub"
  95. ],
  96. "summary": "get repo info",
  97. "responses": {
  98. "200": {
  99. "description": "OK",
  100. "schema": {
  101. "$ref": "#/definitions/service.Repo"
  102. }
  103. }
  104. }
  105. }
  106. },
  107. "/repos/issues": {
  108. "get": {
  109. "description": "get issues from GitHub",
  110. "consumes": [
  111. "application/json"
  112. ],
  113. "produces": [
  114. "application/json"
  115. ],
  116. "tags": [
  117. "GitHub"
  118. ],
  119. "summary": "get issues",
  120. "parameters": [
  121. {
  122. "type": "string",
  123. "description": "search by",
  124. "name": "q",
  125. "in": "query"
  126. }
  127. ],
  128. "responses": {
  129. "200": {
  130. "description": "OK",
  131. "schema": {
  132. "type": "array",
  133. "items": {
  134. "$ref": "#/definitions/service.Issue"
  135. }
  136. }
  137. }
  138. }
  139. }
  140. },
  141. "/safeline/count": {
  142. "get": {
  143. "description": "get installer count",
  144. "consumes": [
  145. "application/json"
  146. ],
  147. "produces": [
  148. "application/json"
  149. ],
  150. "tags": [
  151. "Safeline"
  152. ],
  153. "summary": "get installer count",
  154. "responses": {
  155. "200": {
  156. "description": "OK",
  157. "schema": {
  158. "$ref": "#/definitions/service.InstallerCount"
  159. }
  160. }
  161. }
  162. }
  163. }
  164. },
  165. "definitions": {
  166. "handler.ExistReq": {
  167. "type": "object",
  168. "properties": {
  169. "id": {
  170. "type": "string"
  171. },
  172. "token": {
  173. "type": "string"
  174. }
  175. }
  176. },
  177. "service.Category": {
  178. "type": "object",
  179. "properties": {
  180. "emoji": {
  181. "type": "string"
  182. },
  183. "emoji_html": {
  184. "type": "string"
  185. },
  186. "id": {
  187. "type": "string"
  188. },
  189. "name": {
  190. "type": "string"
  191. }
  192. }
  193. },
  194. "service.Discussion": {
  195. "type": "object",
  196. "properties": {
  197. "author": {
  198. "$ref": "#/definitions/service.User"
  199. },
  200. "category": {
  201. "$ref": "#/definitions/service.Category"
  202. },
  203. "comment_count": {
  204. "type": "integer"
  205. },
  206. "comment_users": {
  207. "type": "array",
  208. "items": {
  209. "$ref": "#/definitions/service.User"
  210. }
  211. },
  212. "created_at": {
  213. "type": "integer"
  214. },
  215. "id": {
  216. "type": "string"
  217. },
  218. "is_answered": {
  219. "type": "boolean"
  220. },
  221. "labels": {
  222. "type": "array",
  223. "items": {
  224. "$ref": "#/definitions/service.Label"
  225. }
  226. },
  227. "thumbs_up": {
  228. "type": "integer"
  229. },
  230. "title": {
  231. "type": "string"
  232. },
  233. "upvote_count": {
  234. "type": "integer"
  235. },
  236. "url": {
  237. "type": "string"
  238. }
  239. }
  240. },
  241. "service.InstallerCount": {
  242. "type": "object",
  243. "properties": {
  244. "total": {
  245. "type": "integer"
  246. }
  247. }
  248. },
  249. "service.Issue": {
  250. "type": "object",
  251. "properties": {
  252. "author": {
  253. "$ref": "#/definitions/service.User"
  254. },
  255. "comment_count": {
  256. "type": "integer"
  257. },
  258. "created_at": {
  259. "type": "integer"
  260. },
  261. "id": {
  262. "type": "string"
  263. },
  264. "labels": {
  265. "type": "array",
  266. "items": {
  267. "$ref": "#/definitions/service.Label"
  268. }
  269. },
  270. "thumbs_up": {
  271. "type": "integer"
  272. },
  273. "title": {
  274. "type": "string"
  275. },
  276. "url": {
  277. "type": "string"
  278. }
  279. }
  280. },
  281. "service.Label": {
  282. "type": "object",
  283. "properties": {
  284. "color": {
  285. "type": "string"
  286. },
  287. "name": {
  288. "type": "string"
  289. }
  290. }
  291. },
  292. "service.Repo": {
  293. "type": "object",
  294. "properties": {
  295. "id": {
  296. "type": "string"
  297. },
  298. "star_count": {
  299. "type": "integer"
  300. }
  301. }
  302. },
  303. "service.User": {
  304. "type": "object",
  305. "properties": {
  306. "avatar_url": {
  307. "type": "string"
  308. },
  309. "login": {
  310. "type": "string"
  311. }
  312. }
  313. }
  314. }
  315. }`
  316. // SwaggerInfo holds exported Swagger Info so clients can modify it
  317. var SwaggerInfo = &swag.Spec{
  318. Version: "",
  319. Host: "",
  320. BasePath: "",
  321. Schemes: []string{},
  322. Title: "",
  323. Description: "",
  324. InfoInstanceName: "swagger",
  325. SwaggerTemplate: docTemplate,
  326. LeftDelim: "{{",
  327. RightDelim: "}}",
  328. }
  329. func init() {
  330. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  331. }