diff options
Diffstat (limited to '')
| -rw-r--r-- | docs/docs.go | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/docs/docs.go b/docs/docs.go index caa64bf..40bae17 100644 --- a/docs/docs.go +++ b/docs/docs.go | |||
| @@ -20,6 +20,40 @@ const docTemplate = `{ | |||
| 20 | "host": "{{.Host}}", | 20 | "host": "{{.Host}}", |
| 21 | "basePath": "{{.BasePath}}", | 21 | "basePath": "{{.BasePath}}", |
| 22 | "paths": { | 22 | "paths": { |
| 23 | "/demo": { | ||
| 24 | "get": { | ||
| 25 | "consumes": [ | ||
| 26 | "application/json" | ||
| 27 | ], | ||
| 28 | "produces": [ | ||
| 29 | "application/octet-stream" | ||
| 30 | ], | ||
| 31 | "summary": "Get demo with specified demo uuid.", | ||
| 32 | "parameters": [ | ||
| 33 | { | ||
| 34 | "type": "integer", | ||
| 35 | "description": "Demo UUID", | ||
| 36 | "name": "uuid", | ||
| 37 | "in": "path", | ||
| 38 | "required": true | ||
| 39 | } | ||
| 40 | ], | ||
| 41 | "responses": { | ||
| 42 | "200": { | ||
| 43 | "description": "Demo File", | ||
| 44 | "schema": { | ||
| 45 | "type": "file" | ||
| 46 | } | ||
| 47 | }, | ||
| 48 | "400": { | ||
| 49 | "description": "Bad Request", | ||
| 50 | "schema": { | ||
| 51 | "$ref": "#/definitions/models.Response" | ||
| 52 | } | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
| 56 | }, | ||
| 23 | "/login": { | 57 | "/login": { |
| 24 | "get": { | 58 | "get": { |
| 25 | "consumes": [ | 59 | "consumes": [ |
| @@ -57,6 +91,135 @@ const docTemplate = `{ | |||
| 57 | } | 91 | } |
| 58 | } | 92 | } |
| 59 | }, | 93 | }, |
| 94 | "/maps/{id}": { | ||
| 95 | "get": { | ||
| 96 | "consumes": [ | ||
| 97 | "application/json" | ||
| 98 | ], | ||
| 99 | "produces": [ | ||
| 100 | "application/json" | ||
| 101 | ], | ||
| 102 | "summary": "Get map page with specified id.", | ||
| 103 | "parameters": [ | ||
| 104 | { | ||
| 105 | "type": "integer", | ||
| 106 | "description": "Map ID", | ||
| 107 | "name": "id", | ||
| 108 | "in": "path", | ||
| 109 | "required": true | ||
| 110 | } | ||
| 111 | ], | ||
| 112 | "responses": { | ||
| 113 | "200": { | ||
| 114 | "description": "OK", | ||
| 115 | "schema": { | ||
| 116 | "allOf": [ | ||
| 117 | { | ||
| 118 | "$ref": "#/definitions/models.Response" | ||
| 119 | }, | ||
| 120 | { | ||
| 121 | "type": "object", | ||
| 122 | "properties": { | ||
| 123 | "data": { | ||
| 124 | "$ref": "#/definitions/models.Map" | ||
| 125 | } | ||
| 126 | } | ||
| 127 | } | ||
| 128 | ] | ||
| 129 | } | ||
| 130 | }, | ||
| 131 | "400": { | ||
| 132 | "description": "Bad Request", | ||
| 133 | "schema": { | ||
| 134 | "$ref": "#/definitions/models.Response" | ||
| 135 | } | ||
| 136 | } | ||
| 137 | } | ||
| 138 | } | ||
| 139 | }, | ||
| 140 | "/maps/{id}/record": { | ||
| 141 | "post": { | ||
| 142 | "consumes": [ | ||
| 143 | "multipart/form-data" | ||
| 144 | ], | ||
| 145 | "produces": [ | ||
| 146 | "application/json" | ||
| 147 | ], | ||
| 148 | "summary": "Post record with demo of a specific map.", | ||
| 149 | "parameters": [ | ||
| 150 | { | ||
| 151 | "type": "array", | ||
| 152 | "items": { | ||
| 153 | "type": "file" | ||
| 154 | }, | ||
| 155 | "description": "Demos", | ||
| 156 | "name": "demos", | ||
| 157 | "in": "formData", | ||
| 158 | "required": true | ||
| 159 | }, | ||
| 160 | { | ||
| 161 | "type": "integer", | ||
| 162 | "description": "Score Count", | ||
| 163 | "name": "score_count", | ||
| 164 | "in": "formData", | ||
| 165 | "required": true | ||
| 166 | }, | ||
| 167 | { | ||
| 168 | "type": "integer", | ||
| 169 | "description": "Score Time", | ||
| 170 | "name": "score_time", | ||
| 171 | "in": "formData", | ||
| 172 | "required": true | ||
| 173 | }, | ||
| 174 | { | ||
| 175 | "type": "boolean", | ||
| 176 | "description": "Is Partner Orange", | ||
| 177 | "name": "is_partner_orange", | ||
| 178 | "in": "formData", | ||
| 179 | "required": true | ||
| 180 | }, | ||
| 181 | { | ||
| 182 | "type": "string", | ||
| 183 | "description": "Partner ID", | ||
| 184 | "name": "partner_id", | ||
| 185 | "in": "formData", | ||
| 186 | "required": true | ||
| 187 | } | ||
| 188 | ], | ||
| 189 | "responses": { | ||
| 190 | "200": { | ||
| 191 | "description": "OK", | ||
| 192 | "schema": { | ||
| 193 | "allOf": [ | ||
| 194 | { | ||
| 195 | "$ref": "#/definitions/models.Response" | ||
| 196 | }, | ||
| 197 | { | ||
| 198 | "type": "object", | ||
| 199 | "properties": { | ||
| 200 | "data": { | ||
| 201 | "$ref": "#/definitions/models.RecordRequest" | ||
| 202 | } | ||
| 203 | } | ||
| 204 | } | ||
| 205 | ] | ||
| 206 | } | ||
| 207 | }, | ||
| 208 | "400": { | ||
| 209 | "description": "Bad Request", | ||
| 210 | "schema": { | ||
| 211 | "$ref": "#/definitions/models.Response" | ||
| 212 | } | ||
| 213 | }, | ||
| 214 | "401": { | ||
| 215 | "description": "Unauthorized", | ||
| 216 | "schema": { | ||
| 217 | "$ref": "#/definitions/models.Response" | ||
| 218 | } | ||
| 219 | } | ||
| 220 | } | ||
| 221 | } | ||
| 222 | }, | ||
| 60 | "/profile": { | 223 | "/profile": { |
| 61 | "get": { | 224 | "get": { |
| 62 | "consumes": [ | 225 | "consumes": [ |
| @@ -253,6 +416,27 @@ const docTemplate = `{ | |||
| 253 | } | 416 | } |
| 254 | } | 417 | } |
| 255 | }, | 418 | }, |
| 419 | "models.Map": { | ||
| 420 | "type": "object", | ||
| 421 | "properties": { | ||
| 422 | "id": { | ||
| 423 | "type": "integer" | ||
| 424 | }, | ||
| 425 | "is_coop": { | ||
| 426 | "type": "boolean" | ||
| 427 | }, | ||
| 428 | "name": { | ||
| 429 | "type": "string" | ||
| 430 | }, | ||
| 431 | "records": {}, | ||
| 432 | "wr_score": { | ||
| 433 | "type": "integer" | ||
| 434 | }, | ||
| 435 | "wr_time": { | ||
| 436 | "type": "integer" | ||
| 437 | } | ||
| 438 | } | ||
| 439 | }, | ||
| 256 | "models.ProfileResponse": { | 440 | "models.ProfileResponse": { |
| 257 | "type": "object", | 441 | "type": "object", |
| 258 | "properties": { | 442 | "properties": { |
| @@ -285,6 +469,29 @@ const docTemplate = `{ | |||
| 285 | } | 469 | } |
| 286 | } | 470 | } |
| 287 | }, | 471 | }, |
| 472 | "models.RecordRequest": { | ||
| 473 | "type": "object", | ||
| 474 | "required": [ | ||
| 475 | "is_partner_orange", | ||
| 476 | "partner_id", | ||
| 477 | "score_count", | ||
| 478 | "score_time" | ||
| 479 | ], | ||
| 480 | "properties": { | ||
| 481 | "is_partner_orange": { | ||
| 482 | "type": "boolean" | ||
| 483 | }, | ||
| 484 | "partner_id": { | ||
| 485 | "type": "string" | ||
| 486 | }, | ||
| 487 | "score_count": { | ||
| 488 | "type": "integer" | ||
| 489 | }, | ||
| 490 | "score_time": { | ||
| 491 | "type": "integer" | ||
| 492 | } | ||
| 493 | } | ||
| 494 | }, | ||
| 288 | "models.Response": { | 495 | "models.Response": { |
| 289 | "type": "object", | 496 | "type": "object", |
| 290 | "properties": { | 497 | "properties": { |