├── .dockerignore ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE ├── README.md ├── diesel.toml ├── init_down.sql ├── init_up.sql ├── migrations ├── .gitkeep ├── 00000000000000_diesel_initial_setup │ ├── down.sql │ └── up.sql └── 2019-03-05-162403_create_myusers │ ├── down.sql │ └── up.sql └── src ├── db.rs ├── gql.rs ├── gql_types.rs ├── jwt.rs ├── lib.rs ├── main.rs ├── models.rs └── schema.rs /.dockerignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | .env 4 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "aho-corasick" 3 | version = "0.6.10" 4 | source = "registry+https://github.com/rust-lang/crates.io-index" 5 | dependencies = [ 6 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 7 | ] 8 | 9 | [[package]] 10 | name = "arrayvec" 11 | version = "0.4.10" 12 | source = "registry+https://github.com/rust-lang/crates.io-index" 13 | dependencies = [ 14 | "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 15 | ] 16 | 17 | [[package]] 18 | name = "atty" 19 | version = "0.2.11" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | dependencies = [ 22 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 23 | "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 24 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 25 | ] 26 | 27 | [[package]] 28 | name = "autocfg" 29 | version = "0.1.2" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | 32 | [[package]] 33 | name = "backtrace" 34 | version = "0.3.14" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | dependencies = [ 37 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 38 | "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", 39 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 40 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 41 | "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 42 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 43 | ] 44 | 45 | [[package]] 46 | name = "backtrace-sys" 47 | version = "0.1.28" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | dependencies = [ 50 | "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", 51 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 52 | ] 53 | 54 | [[package]] 55 | name = "base64" 56 | version = "0.9.3" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | dependencies = [ 59 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 60 | "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 61 | ] 62 | 63 | [[package]] 64 | name = "base64" 65 | version = "0.10.1" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | dependencies = [ 68 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 69 | ] 70 | 71 | [[package]] 72 | name = "bcrypt" 73 | version = "0.3.0" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | dependencies = [ 76 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 77 | "blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 78 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 79 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 80 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 81 | ] 82 | 83 | [[package]] 84 | name = "bitflags" 85 | version = "1.0.4" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | 88 | [[package]] 89 | name = "block-buffer" 90 | version = "0.7.0" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | dependencies = [ 93 | "block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 94 | "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 95 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 96 | "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 97 | ] 98 | 99 | [[package]] 100 | name = "block-cipher-trait" 101 | version = "0.6.2" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | dependencies = [ 104 | "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 105 | ] 106 | 107 | [[package]] 108 | name = "block-padding" 109 | version = "0.1.3" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | dependencies = [ 112 | "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 113 | ] 114 | 115 | [[package]] 116 | name = "blowfish" 117 | version = "0.4.0" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | dependencies = [ 120 | "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 121 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 122 | "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 123 | ] 124 | 125 | [[package]] 126 | name = "byte-tools" 127 | version = "0.3.1" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | 130 | [[package]] 131 | name = "byteorder" 132 | version = "1.3.1" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | 135 | [[package]] 136 | name = "bytes" 137 | version = "0.4.11" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | dependencies = [ 140 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 141 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 142 | ] 143 | 144 | [[package]] 145 | name = "cc" 146 | version = "1.0.29" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | 149 | [[package]] 150 | name = "cfg-if" 151 | version = "0.1.6" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | 154 | [[package]] 155 | name = "chrono" 156 | version = "0.4.6" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | dependencies = [ 159 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 160 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 161 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 162 | ] 163 | 164 | [[package]] 165 | name = "cloudabi" 166 | version = "0.0.3" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | dependencies = [ 169 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 170 | ] 171 | 172 | [[package]] 173 | name = "crossbeam" 174 | version = "0.6.0" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | dependencies = [ 177 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 179 | "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 181 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 182 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 183 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 184 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 185 | ] 186 | 187 | [[package]] 188 | name = "crossbeam-channel" 189 | version = "0.3.8" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | dependencies = [ 192 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 193 | "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", 194 | ] 195 | 196 | [[package]] 197 | name = "crossbeam-deque" 198 | version = "0.6.3" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | dependencies = [ 201 | "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 202 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 203 | ] 204 | 205 | [[package]] 206 | name = "crossbeam-epoch" 207 | version = "0.7.1" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | dependencies = [ 210 | "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 212 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 213 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 216 | ] 217 | 218 | [[package]] 219 | name = "crossbeam-utils" 220 | version = "0.6.5" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | dependencies = [ 223 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 224 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 225 | ] 226 | 227 | [[package]] 228 | name = "diesel" 229 | version = "1.4.1" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | dependencies = [ 232 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 233 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 234 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 235 | "diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 236 | "pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 237 | ] 238 | 239 | [[package]] 240 | name = "diesel_derives" 241 | version = "1.4.0" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | dependencies = [ 244 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 245 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 246 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 247 | ] 248 | 249 | [[package]] 250 | name = "digest" 251 | version = "0.8.0" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | dependencies = [ 254 | "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 255 | ] 256 | 257 | [[package]] 258 | name = "dotenv" 259 | version = "0.13.0" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | dependencies = [ 262 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 263 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 264 | "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 265 | ] 266 | 267 | [[package]] 268 | name = "dtoa" 269 | version = "0.4.3" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | 272 | [[package]] 273 | name = "env_logger" 274 | version = "0.6.0" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | dependencies = [ 277 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 278 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 279 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 280 | "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 281 | "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 282 | ] 283 | 284 | [[package]] 285 | name = "failure" 286 | version = "0.1.5" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | dependencies = [ 289 | "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 290 | "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 291 | ] 292 | 293 | [[package]] 294 | name = "failure_derive" 295 | version = "0.1.5" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | dependencies = [ 298 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 299 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 300 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 301 | "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 302 | ] 303 | 304 | [[package]] 305 | name = "fake-simd" 306 | version = "0.1.2" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | 309 | [[package]] 310 | name = "fnv" 311 | version = "1.0.6" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | 314 | [[package]] 315 | name = "fuchsia-cprng" 316 | version = "0.1.1" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | 319 | [[package]] 320 | name = "fuchsia-zircon" 321 | version = "0.3.3" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | dependencies = [ 324 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 325 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 326 | ] 327 | 328 | [[package]] 329 | name = "fuchsia-zircon-sys" 330 | version = "0.3.3" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | 333 | [[package]] 334 | name = "futures" 335 | version = "0.1.25" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | 338 | [[package]] 339 | name = "futures-cpupool" 340 | version = "0.1.8" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | dependencies = [ 343 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 344 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 345 | ] 346 | 347 | [[package]] 348 | name = "generic-array" 349 | version = "0.12.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | dependencies = [ 352 | "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 353 | ] 354 | 355 | [[package]] 356 | name = "h2" 357 | version = "0.1.16" 358 | source = "registry+https://github.com/rust-lang/crates.io-index" 359 | dependencies = [ 360 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 361 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 362 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 363 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 364 | "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 365 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 366 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 367 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 368 | "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 369 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 370 | ] 371 | 372 | [[package]] 373 | name = "headers" 374 | version = "0.2.1" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | dependencies = [ 377 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 378 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 379 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 380 | "headers-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 381 | "headers-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 382 | "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 383 | "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 384 | "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 385 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 386 | ] 387 | 388 | [[package]] 389 | name = "headers-core" 390 | version = "0.1.0" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | dependencies = [ 393 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 394 | "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 395 | ] 396 | 397 | [[package]] 398 | name = "headers-derive" 399 | version = "0.1.0" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | dependencies = [ 402 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 403 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 404 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 405 | ] 406 | 407 | [[package]] 408 | name = "http" 409 | version = "0.1.16" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | dependencies = [ 412 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 413 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 414 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 415 | ] 416 | 417 | [[package]] 418 | name = "httparse" 419 | version = "1.3.3" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | 422 | [[package]] 423 | name = "humantime" 424 | version = "1.2.0" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | dependencies = [ 427 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 428 | ] 429 | 430 | [[package]] 431 | name = "hyper" 432 | version = "0.12.24" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | dependencies = [ 435 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 436 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 437 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 438 | "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 439 | "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 440 | "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 441 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 442 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 443 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 444 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 445 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 446 | "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 447 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 448 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 449 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 450 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 451 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 452 | "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", 453 | "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 454 | ] 455 | 456 | [[package]] 457 | name = "idna" 458 | version = "0.1.5" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | dependencies = [ 461 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 462 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 463 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 464 | ] 465 | 466 | [[package]] 467 | name = "indexmap" 468 | version = "1.0.2" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | dependencies = [ 471 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 472 | ] 473 | 474 | [[package]] 475 | name = "input_buffer" 476 | version = "0.2.0" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | dependencies = [ 479 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 480 | ] 481 | 482 | [[package]] 483 | name = "iovec" 484 | version = "0.1.2" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | dependencies = [ 487 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 489 | ] 490 | 491 | [[package]] 492 | name = "itoa" 493 | version = "0.4.3" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | 496 | [[package]] 497 | name = "jsonwebtoken" 498 | version = "5.0.1" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | dependencies = [ 501 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 502 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 503 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 504 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 505 | "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 506 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 507 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 508 | ] 509 | 510 | [[package]] 511 | name = "juniper" 512 | version = "0.11.1" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | dependencies = [ 515 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 516 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 517 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 518 | "juniper_codegen 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 519 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 520 | "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 521 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 522 | "uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 523 | ] 524 | 525 | [[package]] 526 | name = "juniper_codegen" 527 | version = "0.11.1" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | dependencies = [ 530 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 531 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 532 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 533 | "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 534 | "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", 535 | ] 536 | 537 | [[package]] 538 | name = "kernel32-sys" 539 | version = "0.2.2" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | dependencies = [ 542 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 543 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 544 | ] 545 | 546 | [[package]] 547 | name = "lazy_static" 548 | version = "1.2.0" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | 551 | [[package]] 552 | name = "lazycell" 553 | version = "1.2.1" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | 556 | [[package]] 557 | name = "libc" 558 | version = "0.2.49" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | 561 | [[package]] 562 | name = "lock_api" 563 | version = "0.1.5" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | dependencies = [ 566 | "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 567 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 568 | ] 569 | 570 | [[package]] 571 | name = "log" 572 | version = "0.4.6" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | dependencies = [ 575 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 576 | ] 577 | 578 | [[package]] 579 | name = "matches" 580 | version = "0.1.8" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | 583 | [[package]] 584 | name = "memchr" 585 | version = "2.2.0" 586 | source = "registry+https://github.com/rust-lang/crates.io-index" 587 | 588 | [[package]] 589 | name = "memoffset" 590 | version = "0.2.1" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | 593 | [[package]] 594 | name = "mime" 595 | version = "0.3.13" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | dependencies = [ 598 | "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 599 | ] 600 | 601 | [[package]] 602 | name = "mime_guess" 603 | version = "2.0.0-alpha.6" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | dependencies = [ 606 | "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 607 | "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 608 | "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 609 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 610 | ] 611 | 612 | [[package]] 613 | name = "mio" 614 | version = "0.6.16" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | dependencies = [ 617 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 618 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 619 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 620 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 621 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 622 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 623 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 624 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 625 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 626 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 627 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 628 | ] 629 | 630 | [[package]] 631 | name = "mio-uds" 632 | version = "0.6.7" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | dependencies = [ 635 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 636 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 637 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 638 | ] 639 | 640 | [[package]] 641 | name = "miow" 642 | version = "0.2.1" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | dependencies = [ 645 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 646 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 647 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 648 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 649 | ] 650 | 651 | [[package]] 652 | name = "net2" 653 | version = "0.2.33" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | dependencies = [ 656 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 657 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 658 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 659 | ] 660 | 661 | [[package]] 662 | name = "nodrop" 663 | version = "0.1.13" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | 666 | [[package]] 667 | name = "num-integer" 668 | version = "0.1.39" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | dependencies = [ 671 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 672 | ] 673 | 674 | [[package]] 675 | name = "num-traits" 676 | version = "0.2.6" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | 679 | [[package]] 680 | name = "num_cpus" 681 | version = "1.10.0" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | dependencies = [ 684 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 685 | ] 686 | 687 | [[package]] 688 | name = "opaque-debug" 689 | version = "0.2.2" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | 692 | [[package]] 693 | name = "owning_ref" 694 | version = "0.4.0" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | dependencies = [ 697 | "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 698 | ] 699 | 700 | [[package]] 701 | name = "parking_lot" 702 | version = "0.7.1" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | dependencies = [ 705 | "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 706 | "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 707 | ] 708 | 709 | [[package]] 710 | name = "parking_lot_core" 711 | version = "0.4.0" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | dependencies = [ 714 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 715 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 716 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 717 | "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", 718 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 719 | ] 720 | 721 | [[package]] 722 | name = "percent-encoding" 723 | version = "1.0.1" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | 726 | [[package]] 727 | name = "phf" 728 | version = "0.7.24" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | dependencies = [ 731 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 732 | ] 733 | 734 | [[package]] 735 | name = "phf_codegen" 736 | version = "0.7.24" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | dependencies = [ 739 | "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 740 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 741 | ] 742 | 743 | [[package]] 744 | name = "phf_generator" 745 | version = "0.7.24" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | dependencies = [ 748 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 749 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 750 | ] 751 | 752 | [[package]] 753 | name = "phf_shared" 754 | version = "0.7.24" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | dependencies = [ 757 | "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 758 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 759 | ] 760 | 761 | [[package]] 762 | name = "pq-sys" 763 | version = "0.4.6" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | dependencies = [ 766 | "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 767 | ] 768 | 769 | [[package]] 770 | name = "pretty_env_logger" 771 | version = "0.3.0" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | dependencies = [ 774 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 775 | "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 776 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 777 | ] 778 | 779 | [[package]] 780 | name = "proc-macro2" 781 | version = "0.4.27" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | dependencies = [ 784 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 785 | ] 786 | 787 | [[package]] 788 | name = "quick-error" 789 | version = "1.2.2" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | 792 | [[package]] 793 | name = "quote" 794 | version = "0.6.11" 795 | source = "registry+https://github.com/rust-lang/crates.io-index" 796 | dependencies = [ 797 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 798 | ] 799 | 800 | [[package]] 801 | name = "rand" 802 | version = "0.5.6" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | dependencies = [ 805 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 806 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 807 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 808 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 809 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 810 | ] 811 | 812 | [[package]] 813 | name = "rand" 814 | version = "0.6.5" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | dependencies = [ 817 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 818 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 819 | "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 820 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 821 | "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 822 | "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 823 | "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 824 | "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 825 | "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 826 | "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 827 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 828 | ] 829 | 830 | [[package]] 831 | name = "rand_chacha" 832 | version = "0.1.1" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | dependencies = [ 835 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 836 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 837 | ] 838 | 839 | [[package]] 840 | name = "rand_core" 841 | version = "0.3.1" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | dependencies = [ 844 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 845 | ] 846 | 847 | [[package]] 848 | name = "rand_core" 849 | version = "0.4.0" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | 852 | [[package]] 853 | name = "rand_hc" 854 | version = "0.1.0" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | dependencies = [ 857 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 858 | ] 859 | 860 | [[package]] 861 | name = "rand_isaac" 862 | version = "0.1.1" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | dependencies = [ 865 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 866 | ] 867 | 868 | [[package]] 869 | name = "rand_jitter" 870 | version = "0.1.3" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | dependencies = [ 873 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 874 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 875 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 876 | ] 877 | 878 | [[package]] 879 | name = "rand_os" 880 | version = "0.1.2" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | dependencies = [ 883 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 884 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 885 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 886 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 887 | "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 888 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 889 | ] 890 | 891 | [[package]] 892 | name = "rand_pcg" 893 | version = "0.1.2" 894 | source = "registry+https://github.com/rust-lang/crates.io-index" 895 | dependencies = [ 896 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 897 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 898 | ] 899 | 900 | [[package]] 901 | name = "rand_xorshift" 902 | version = "0.1.1" 903 | source = "registry+https://github.com/rust-lang/crates.io-index" 904 | dependencies = [ 905 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 906 | ] 907 | 908 | [[package]] 909 | name = "rdrand" 910 | version = "0.4.0" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | dependencies = [ 913 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 914 | ] 915 | 916 | [[package]] 917 | name = "redox_syscall" 918 | version = "0.1.51" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | 921 | [[package]] 922 | name = "redox_termios" 923 | version = "0.1.1" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | dependencies = [ 926 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 927 | ] 928 | 929 | [[package]] 930 | name = "regex" 931 | version = "1.1.0" 932 | source = "registry+https://github.com/rust-lang/crates.io-index" 933 | dependencies = [ 934 | "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 935 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 936 | "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 937 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 938 | "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 939 | ] 940 | 941 | [[package]] 942 | name = "regex-syntax" 943 | version = "0.6.5" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | dependencies = [ 946 | "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 947 | ] 948 | 949 | [[package]] 950 | name = "ring" 951 | version = "0.13.5" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | dependencies = [ 954 | "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", 955 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 956 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 957 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 958 | ] 959 | 960 | [[package]] 961 | name = "rust_graphql_api_boilerplate" 962 | version = "0.1.0" 963 | dependencies = [ 964 | "bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 965 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 966 | "diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 967 | "dotenv 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", 968 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 969 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 970 | "jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 971 | "juniper 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 972 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 973 | "pretty_env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 974 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 975 | "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 976 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 977 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 978 | "warp 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 979 | ] 980 | 981 | [[package]] 982 | name = "rustc-demangle" 983 | version = "0.1.13" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | 986 | [[package]] 987 | name = "rustc_version" 988 | version = "0.2.3" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | dependencies = [ 991 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 992 | ] 993 | 994 | [[package]] 995 | name = "ryu" 996 | version = "0.2.7" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | 999 | [[package]] 1000 | name = "safemem" 1001 | version = "0.3.0" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | 1004 | [[package]] 1005 | name = "scoped-tls" 1006 | version = "0.1.2" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | 1009 | [[package]] 1010 | name = "scopeguard" 1011 | version = "0.3.3" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | 1014 | [[package]] 1015 | name = "semver" 1016 | version = "0.9.0" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | dependencies = [ 1019 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1020 | ] 1021 | 1022 | [[package]] 1023 | name = "semver-parser" 1024 | version = "0.7.0" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | 1027 | [[package]] 1028 | name = "serde" 1029 | version = "1.0.88" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | 1032 | [[package]] 1033 | name = "serde_derive" 1034 | version = "1.0.88" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | dependencies = [ 1037 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1038 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1039 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "serde_json" 1044 | version = "1.0.38" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | dependencies = [ 1047 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1048 | "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 1049 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "serde_urlencoded" 1054 | version = "0.5.4" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | dependencies = [ 1057 | "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1058 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1059 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 1060 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1061 | ] 1062 | 1063 | [[package]] 1064 | name = "sha-1" 1065 | version = "0.8.1" 1066 | source = "registry+https://github.com/rust-lang/crates.io-index" 1067 | dependencies = [ 1068 | "block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1069 | "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 1070 | "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1071 | "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1072 | ] 1073 | 1074 | [[package]] 1075 | name = "siphasher" 1076 | version = "0.2.3" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | 1079 | [[package]] 1080 | name = "slab" 1081 | version = "0.4.2" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | 1084 | [[package]] 1085 | name = "smallvec" 1086 | version = "0.6.9" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | 1089 | [[package]] 1090 | name = "stable_deref_trait" 1091 | version = "1.1.1" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | 1094 | [[package]] 1095 | name = "string" 1096 | version = "0.1.3" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | 1099 | [[package]] 1100 | name = "syn" 1101 | version = "0.14.9" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | dependencies = [ 1104 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1105 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1106 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1107 | ] 1108 | 1109 | [[package]] 1110 | name = "syn" 1111 | version = "0.15.26" 1112 | source = "registry+https://github.com/rust-lang/crates.io-index" 1113 | dependencies = [ 1114 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1115 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1116 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1117 | ] 1118 | 1119 | [[package]] 1120 | name = "synstructure" 1121 | version = "0.10.1" 1122 | source = "registry+https://github.com/rust-lang/crates.io-index" 1123 | dependencies = [ 1124 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1125 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1126 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 1127 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1128 | ] 1129 | 1130 | [[package]] 1131 | name = "termcolor" 1132 | version = "1.0.4" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | dependencies = [ 1135 | "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "termion" 1140 | version = "1.5.1" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | dependencies = [ 1143 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 1144 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1145 | "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1146 | ] 1147 | 1148 | [[package]] 1149 | name = "thread_local" 1150 | version = "0.3.6" 1151 | source = "registry+https://github.com/rust-lang/crates.io-index" 1152 | dependencies = [ 1153 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1154 | ] 1155 | 1156 | [[package]] 1157 | name = "time" 1158 | version = "0.1.42" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | dependencies = [ 1161 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 1162 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1163 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "tokio" 1168 | version = "0.1.15" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | dependencies = [ 1171 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1172 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1173 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1174 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 1175 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1176 | "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1177 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1178 | "tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1179 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1180 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1181 | "tokio-sync 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1182 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1183 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1184 | "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", 1185 | "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1186 | "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "tokio-codec" 1191 | version = "0.1.1" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | dependencies = [ 1194 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1195 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1196 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1197 | ] 1198 | 1199 | [[package]] 1200 | name = "tokio-current-thread" 1201 | version = "0.1.4" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | dependencies = [ 1204 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1205 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "tokio-executor" 1210 | version = "0.1.6" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | dependencies = [ 1213 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1214 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "tokio-fs" 1219 | version = "0.1.5" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | dependencies = [ 1222 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1223 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1224 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1225 | ] 1226 | 1227 | [[package]] 1228 | name = "tokio-io" 1229 | version = "0.1.11" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | dependencies = [ 1232 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1233 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1234 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1235 | ] 1236 | 1237 | [[package]] 1238 | name = "tokio-reactor" 1239 | version = "0.1.8" 1240 | source = "registry+https://github.com/rust-lang/crates.io-index" 1241 | dependencies = [ 1242 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1243 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1244 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1245 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1246 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1247 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 1248 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 1249 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1250 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1251 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "tokio-sync" 1256 | version = "0.1.2" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | dependencies = [ 1259 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "tokio-tcp" 1264 | version = "0.1.3" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | dependencies = [ 1267 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1268 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1269 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1270 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1271 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1272 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1273 | ] 1274 | 1275 | [[package]] 1276 | name = "tokio-threadpool" 1277 | version = "0.1.11" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | dependencies = [ 1280 | "crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 1281 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1282 | "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 1283 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1284 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1285 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1286 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 1287 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1288 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1289 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "tokio-timer" 1294 | version = "0.2.10" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | dependencies = [ 1297 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1298 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1299 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1300 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1301 | ] 1302 | 1303 | [[package]] 1304 | name = "tokio-udp" 1305 | version = "0.1.3" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | dependencies = [ 1308 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1309 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1310 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1311 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1312 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1313 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1314 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "tokio-uds" 1319 | version = "0.2.5" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | dependencies = [ 1322 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1323 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1324 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1325 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 1326 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1327 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1328 | "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", 1329 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1330 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1331 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1332 | ] 1333 | 1334 | [[package]] 1335 | name = "try-lock" 1336 | version = "0.2.2" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | 1339 | [[package]] 1340 | name = "tungstenite" 1341 | version = "0.6.1" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | dependencies = [ 1344 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 1345 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1346 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1347 | "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 1348 | "input_buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1349 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1350 | "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 1351 | "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 1352 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1353 | "utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", 1354 | ] 1355 | 1356 | [[package]] 1357 | name = "typenum" 1358 | version = "1.10.0" 1359 | source = "registry+https://github.com/rust-lang/crates.io-index" 1360 | 1361 | [[package]] 1362 | name = "ucd-util" 1363 | version = "0.1.3" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | 1366 | [[package]] 1367 | name = "unicase" 1368 | version = "1.4.2" 1369 | source = "registry+https://github.com/rust-lang/crates.io-index" 1370 | dependencies = [ 1371 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1372 | ] 1373 | 1374 | [[package]] 1375 | name = "unicase" 1376 | version = "2.2.0" 1377 | source = "registry+https://github.com/rust-lang/crates.io-index" 1378 | dependencies = [ 1379 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "unicode-bidi" 1384 | version = "0.3.4" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | dependencies = [ 1387 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1388 | ] 1389 | 1390 | [[package]] 1391 | name = "unicode-normalization" 1392 | version = "0.1.8" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | dependencies = [ 1395 | "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", 1396 | ] 1397 | 1398 | [[package]] 1399 | name = "unicode-xid" 1400 | version = "0.1.0" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | 1403 | [[package]] 1404 | name = "untrusted" 1405 | version = "0.6.2" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | 1408 | [[package]] 1409 | name = "url" 1410 | version = "1.7.2" 1411 | source = "registry+https://github.com/rust-lang/crates.io-index" 1412 | dependencies = [ 1413 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1414 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1415 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1416 | ] 1417 | 1418 | [[package]] 1419 | name = "urlencoding" 1420 | version = "1.0.0" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | 1423 | [[package]] 1424 | name = "utf-8" 1425 | version = "0.7.5" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | 1428 | [[package]] 1429 | name = "utf8-ranges" 1430 | version = "1.0.2" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | 1433 | [[package]] 1434 | name = "uuid" 1435 | version = "0.7.2" 1436 | source = "registry+https://github.com/rust-lang/crates.io-index" 1437 | 1438 | [[package]] 1439 | name = "vcpkg" 1440 | version = "0.2.6" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | 1443 | [[package]] 1444 | name = "version_check" 1445 | version = "0.1.5" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | 1448 | [[package]] 1449 | name = "want" 1450 | version = "0.0.6" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | dependencies = [ 1453 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1454 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1455 | "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1456 | ] 1457 | 1458 | [[package]] 1459 | name = "warp" 1460 | version = "0.1.13" 1461 | source = "registry+https://github.com/rust-lang/crates.io-index" 1462 | dependencies = [ 1463 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1464 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1465 | "headers 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1466 | "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 1467 | "hyper 0.12.24 (registry+https://github.com/rust-lang/crates.io-index)", 1468 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1469 | "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 1470 | "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", 1471 | "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1472 | "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", 1473 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 1474 | "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", 1475 | "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 1476 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1477 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1478 | "tungstenite 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 1479 | "urlencoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "winapi" 1484 | version = "0.2.8" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | 1487 | [[package]] 1488 | name = "winapi" 1489 | version = "0.3.6" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | dependencies = [ 1492 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1493 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1494 | ] 1495 | 1496 | [[package]] 1497 | name = "winapi-build" 1498 | version = "0.1.1" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | 1501 | [[package]] 1502 | name = "winapi-i686-pc-windows-gnu" 1503 | version = "0.4.0" 1504 | source = "registry+https://github.com/rust-lang/crates.io-index" 1505 | 1506 | [[package]] 1507 | name = "winapi-util" 1508 | version = "0.1.2" 1509 | source = "registry+https://github.com/rust-lang/crates.io-index" 1510 | dependencies = [ 1511 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1512 | ] 1513 | 1514 | [[package]] 1515 | name = "winapi-x86_64-pc-windows-gnu" 1516 | version = "0.4.0" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | 1519 | [[package]] 1520 | name = "wincolor" 1521 | version = "1.0.1" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | dependencies = [ 1524 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1525 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1526 | ] 1527 | 1528 | [[package]] 1529 | name = "ws2_32-sys" 1530 | version = "0.2.1" 1531 | source = "registry+https://github.com/rust-lang/crates.io-index" 1532 | dependencies = [ 1533 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1534 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1535 | ] 1536 | 1537 | [metadata] 1538 | "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" 1539 | "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" 1540 | "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 1541 | "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" 1542 | "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" 1543 | "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" 1544 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 1545 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 1546 | "checksum bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a426ab63025c1d21e4e12a218c915fa22097b89ab7ed5765fa803101e004b27" 1547 | "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 1548 | "checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d" 1549 | "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" 1550 | "checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" 1551 | "checksum blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aeb80d00f2688459b8542068abd974cfb101e7a82182414a99b5026c0d85cc3" 1552 | "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" 1553 | "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" 1554 | "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" 1555 | "checksum cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4390a3b5f4f6bce9c1d0c00128379df433e53777fdd30e92f16a529332baec4e" 1556 | "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 1557 | "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" 1558 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 1559 | "checksum crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad4c7ea749d9fb09e23c5cb17e3b70650860553a0e2744e38446b1803bf7db94" 1560 | "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" 1561 | "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" 1562 | "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" 1563 | "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" 1564 | "checksum diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2469cbcf1dfb9446e491cac4c493c2554133f87f7d041e892ac82e5cd36e863" 1565 | "checksum diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62a27666098617d52c487a41f70de23d44a1dc1f3aa5877ceba2790fb1f1cab4" 1566 | "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" 1567 | "checksum dotenv 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d0a1279c96732bc6800ce6337b6a614697b0e74ae058dc03c62ebeb78b4d86" 1568 | "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" 1569 | "checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" 1570 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" 1571 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" 1572 | "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" 1573 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 1574 | "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 1575 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1576 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1577 | "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" 1578 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 1579 | "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" 1580 | "checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" 1581 | "checksum headers 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6e2e51d356081258ef05ff4c648138b5d3fe64b7300aaad3b820554a2b7fb6" 1582 | "checksum headers-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ae5b0b5417559ee1d2733b21d33b0868ae9e406bd32eb1a51d613f66ed472a" 1583 | "checksum headers-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97c462e8066bca4f0968ddf8d12de64c40f2c2187b3b9a2fa994d06e8ad444a9" 1584 | "checksum http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fe67e3678f2827030e89cc4b9e7ecd16d52f132c0b940ab5005f88e821500f6a" 1585 | "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" 1586 | "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" 1587 | "checksum hyper 0.12.24 (registry+https://github.com/rust-lang/crates.io-index)" = "fdfa9b401ef6c4229745bb6e9b2529192d07b920eed624cdee2a82348cd550af" 1588 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 1589 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" 1590 | "checksum input_buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e1b822cc844905551931d6f81608ed5f50a79c1078a4e2b4d42dbc7c1eedfbf" 1591 | "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 1592 | "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" 1593 | "checksum jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d438ea707d465c230305963b67f8357a1d56fcfad9434797d7cb1c46c2e41df" 1594 | "checksum juniper 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d95deabb0bc5e15f508d48017b3791502e734a3d64c261d8ef9658899f04f351" 1595 | "checksum juniper_codegen 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f787e228fc7df6061a0b9474dc0223199c7b917a3fe2ba874272b077a1c8a46b" 1596 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1597 | "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" 1598 | "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 1599 | "checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" 1600 | "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" 1601 | "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 1602 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1603 | "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" 1604 | "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" 1605 | "checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" 1606 | "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" 1607 | "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" 1608 | "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" 1609 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1610 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1611 | "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" 1612 | "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" 1613 | "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" 1614 | "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" 1615 | "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" 1616 | "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" 1617 | "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" 1618 | "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" 1619 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1620 | "checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" 1621 | "checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" 1622 | "checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" 1623 | "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" 1624 | "checksum pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" 1625 | "checksum pretty_env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df8b3f4e0475def7d9c2e5de8e5a1306949849761e107b360d03e98eafaffd61" 1626 | "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" 1627 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1628 | "checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" 1629 | "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" 1630 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 1631 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 1632 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 1633 | "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" 1634 | "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 1635 | "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 1636 | "checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" 1637 | "checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" 1638 | "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 1639 | "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 1640 | "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 1641 | "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" 1642 | "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 1643 | "checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" 1644 | "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" 1645 | "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" 1646 | "checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" 1647 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1648 | "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" 1649 | "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" 1650 | "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" 1651 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 1652 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1653 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1654 | "checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" 1655 | "checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" 1656 | "checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" 1657 | "checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" 1658 | "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" 1659 | "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" 1660 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1661 | "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" 1662 | "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" 1663 | "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" 1664 | "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" 1665 | "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" 1666 | "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" 1667 | "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" 1668 | "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 1669 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1670 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1671 | "checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c" 1672 | "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" 1673 | "checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" 1674 | "checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" 1675 | "checksum tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9cbbc8a3698b7ab652340f46633364f9eaa928ddaaee79d8b8f356dd79a09d" 1676 | "checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" 1677 | "checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" 1678 | "checksum tokio-sync 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c73850a5ad497d73ccfcfc0ffb494a4502d93f35cb475cfeef4fcf2916d26040" 1679 | "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" 1680 | "checksum tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd86cb15547d02daa2b21aadaf4e37dee3368df38a526178a5afa3c034d2fb" 1681 | "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" 1682 | "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" 1683 | "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" 1684 | "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 1685 | "checksum tungstenite 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e9573852f935883137b7f0824832493ce7418bf290c8cf164b7aafc9b0a99aa0" 1686 | "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" 1687 | "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" 1688 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 1689 | "checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" 1690 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1691 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 1692 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1693 | "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 1694 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 1695 | "checksum urlencoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3df3561629a8bb4c57e5a2e4c43348d9e29c7c29d9b1c4c1f47166deca8f37ed" 1696 | "checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" 1697 | "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" 1698 | "checksum uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0238db0c5b605dd1cf51de0f21766f97fba2645897024461d6a00c036819a768" 1699 | "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" 1700 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1701 | "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" 1702 | "checksum warp 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2861682c6918c92c78d58edc336aaa1fdeda0167adce901bdf0c7057cb2d2ec1" 1703 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1704 | "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" 1705 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1706 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1707 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 1708 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1709 | "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" 1710 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1711 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_graphql_api_boilerplate" 3 | version = "0.1.0" 4 | authors = ["moondaddi "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | warp= "0.1.13" 9 | log = "0.4" 10 | pretty_env_logger = "0.3" 11 | juniper = "0.11.1" 12 | diesel = { version = "1.4.1", features = [ "postgres", "chrono" ] } 13 | dotenv = "0.13.0" 14 | chrono = "0.4.6" 15 | serde_json = "1.0.38" 16 | serde_derive = "1.0.88" 17 | failure = "0.1.5" 18 | futures = "0.1.25" 19 | serde = "1.0.88" 20 | tokio-threadpool = "0.1.11" 21 | bcrypt = "0.3.0" 22 | jsonwebtoken = "5.0.1" 23 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust as builder 2 | 3 | WORKDIR /usr/src/app 4 | RUN USER=root cargo init 5 | 6 | COPY Cargo.toml . 7 | COPY Cargo.lock . 8 | 9 | RUN cargo build --release 10 | 11 | COPY src src 12 | 13 | RUN cargo build --release 14 | 15 | FROM rust 16 | 17 | COPY --from=builder /usr/src/app/target/release/rust_graphql_api_boilerplate /bin/ 18 | 19 | EXPOSE 3030 20 | 21 | CMD rust_graphql_api_boilerplate 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Woonki Moon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rust GraphQL API Boilerplate 2 | 3 | This is a boilerplate built with Rust. 4 | 5 | ## Features 6 | 7 | - DB migration with Diesel 8 | - Sign up 9 | - Sign in 10 | - Change password 11 | - Profile Update 12 | - JSON web token authentication 13 | 14 | ## Stacks 15 | 16 | - Rust 17 | - [Warp](https://github.com/seanmonstar/warp) - Web server framework 18 | - [Juniper](https://github.com/graphql-rust/juniper) - GraphQL library 19 | - [Diesel](https://github.com/diesel-rs/diesel) - ORM 20 | - DB: Postgres 21 | - JSON Web Token : Authentication 22 | 23 | ## Run 24 | 25 | ### Without Docker 26 | 27 | ```shell 28 | $ git clone https://github.com/mattdamon108/rust_graphql_api_boilerplate 29 | $ cd rust_graphql_api_boilerplate 30 | $ echo DATABASE_URL=postgres://username:password@localhost/rust_boilerplate > .env 31 | $ diesel setup 32 | $ diesel migration run 33 | $ cargo run 34 | ``` 35 | 36 | ### Build with Docker 37 | 38 | ```shell 39 | $ docker build -t rust_gql . 40 | $ docker run --rm -d -p 3030:3030 --name running_rust_gql rust_gql 41 | ``` 42 | 43 | > Change the listening port from `127.0.0.1` to `0.0.0.0` in `main.rs`. Because rust GraphQL API in docker container needs to listen to `0.0.0.0` instead of local interface in order for host to access to the API. 44 | 45 | > GraphiQL : connect to 127.0.0.1:3030 with browser 46 | 47 | ## Schema 48 | 49 | ### Query 50 | 51 | ```graphql 52 | query { 53 | getMyProfile { 54 | ok 55 | error 56 | user { 57 | id 58 | email 59 | first_name 60 | last_name 61 | bio 62 | avatar 63 | } 64 | } 65 | } 66 | ``` 67 | 68 | > Note: JSON web token is needed to be sent as `authorization` in header. 69 | 70 | ### Mutation 71 | 72 | > Sign Up 73 | 74 | ```graphql 75 | mutation { 76 | signUp( 77 | email: "test@test.com" 78 | password: "12345678" 79 | firstName: "graphql" 80 | lastName: "rust" 81 | ) { 82 | ok 83 | error 84 | user { 85 | id 86 | email 87 | first_name 88 | last_name 89 | bio 90 | avatar 91 | } 92 | } 93 | } 94 | ``` 95 | 96 | > Sign In 97 | 98 | ```graphql 99 | mutation { 100 | signIn(email: "test@test.com", password: "12345678") { 101 | token 102 | } 103 | } 104 | ``` 105 | 106 | > Change Password 107 | 108 | Note: JSON web token is needed to be sent as `authorization` in header. 109 | 110 | ```graphql 111 | mutation { 112 | changePassword(password: "87654321") { 113 | ok 114 | error 115 | user { 116 | id 117 | email 118 | first_name 119 | last_name 120 | bio 121 | avatar 122 | } 123 | } 124 | } 125 | ``` 126 | 127 | > Change Profile 128 | 129 | Note: JSON web token is needed to be sent as `authorization` in header. 130 | 131 | ```graphql 132 | mutation { 133 | changeProfile(bio: "Rust fan") { 134 | ok 135 | error 136 | user { 137 | id 138 | email 139 | first_name 140 | last_name 141 | bio 142 | avatar 143 | } 144 | } 145 | } 146 | ``` 147 | 148 | ## Next to do 149 | 150 | - [x] User Sign up 151 | - [x] Hash User Password - with [bcrypt](https://github.com/Keats/rust-bcrypt) crate 152 | - [x] User Sign in based on Token authentication 153 | - [x] User profile Update 154 | - [x] ERROR HANDLING (important!) 155 | - [x] Deploy using Docker after compile 156 | - [ ] Optimizing the multithread 157 | 158 | ## References 159 | 160 | - http://alex.amiran.it/post/2018-08-16-rust-graphql-webserver-with-warp-juniper-and-mongodb.html 161 | - https://github.com/graphql-rust/juniper/tree/master/juniper_warp 162 | - https://blog.jawg.io/docker-multi-stage-build/ 163 | -------------------------------------------------------------------------------- /diesel.toml: -------------------------------------------------------------------------------- 1 | # For documentation on how to configure this file, 2 | # see diesel.rs/guides/configuring-diesel-cli 3 | 4 | [print_schema] 5 | file = "src/schema.rs" 6 | -------------------------------------------------------------------------------- /init_down.sql: -------------------------------------------------------------------------------- 1 | DROP TRIGGER set_updated_at ON myusers; 2 | DROP TABLE myusers; 3 | -------------------------------------------------------------------------------- /init_up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE myusers ( 2 | id SERIAL PRIMARY KEY, 3 | email VARCHAR(70) UNIQUE NOT NULL, 4 | first_name VARCHAR(50) NOT NULL, 5 | last_name VARCHAR(50) NOT NULL, 6 | password VARCHAR NOT NULL, 7 | bio TEXT, 8 | avatar VARCHAR, 9 | created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), 10 | updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() 11 | ); 12 | 13 | SELECT diesel_manage_updated_at('myusers'); 14 | -------------------------------------------------------------------------------- /migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mununki/rust_graphql_api_boilerplate/7895136341f71434e7d6c46d3288f4a2053d3a09/migrations/.gitkeep -------------------------------------------------------------------------------- /migrations/00000000000000_diesel_initial_setup/down.sql: -------------------------------------------------------------------------------- 1 | -- This file was automatically created by Diesel to setup helper functions 2 | -- and other internal bookkeeping. This file is safe to edit, any future 3 | -- changes will be added to existing projects as new migrations. 4 | 5 | DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass); 6 | DROP FUNCTION IF EXISTS diesel_set_updated_at(); 7 | -------------------------------------------------------------------------------- /migrations/00000000000000_diesel_initial_setup/up.sql: -------------------------------------------------------------------------------- 1 | -- This file was automatically created by Diesel to setup helper functions 2 | -- and other internal bookkeeping. This file is safe to edit, any future 3 | -- changes will be added to existing projects as new migrations. 4 | 5 | 6 | 7 | 8 | -- Sets up a trigger for the given table to automatically set a column called 9 | -- `updated_at` whenever the row is modified (unless `updated_at` was included 10 | -- in the modified columns) 11 | -- 12 | -- # Example 13 | -- 14 | -- ```sql 15 | -- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW()); 16 | -- 17 | -- SELECT diesel_manage_updated_at('users'); 18 | -- ``` 19 | CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$ 20 | BEGIN 21 | EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s 22 | FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl); 23 | END; 24 | $$ LANGUAGE plpgsql; 25 | 26 | CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$ 27 | BEGIN 28 | IF ( 29 | NEW IS DISTINCT FROM OLD AND 30 | NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at 31 | ) THEN 32 | NEW.updated_at := current_timestamp; 33 | END IF; 34 | RETURN NEW; 35 | END; 36 | $$ LANGUAGE plpgsql; 37 | -------------------------------------------------------------------------------- /migrations/2019-03-05-162403_create_myusers/down.sql: -------------------------------------------------------------------------------- 1 | DROP TRIGGER set_updated_at ON myusers; 2 | DROP TABLE myusers; 3 | -------------------------------------------------------------------------------- /migrations/2019-03-05-162403_create_myusers/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE myusers ( 2 | id SERIAL PRIMARY KEY, 3 | email VARCHAR(70) UNIQUE NOT NULL, 4 | first_name VARCHAR(50) NOT NULL, 5 | last_name VARCHAR(50) NOT NULL, 6 | password VARCHAR NOT NULL, 7 | bio TEXT, 8 | avatar VARCHAR, 9 | created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), 10 | updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() 11 | ); 12 | 13 | SELECT diesel_manage_updated_at('myusers'); 14 | -------------------------------------------------------------------------------- /src/db.rs: -------------------------------------------------------------------------------- 1 | extern crate diesel; 2 | extern crate dotenv; 3 | 4 | use diesel::pg::PgConnection; 5 | use diesel::prelude::*; 6 | use dotenv::dotenv; 7 | use std::env; 8 | 9 | pub fn establish_connection() -> PgConnection { 10 | dotenv().ok(); 11 | 12 | let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set."); 13 | PgConnection::establish(&database_url).expect(&format!("Error connecting to {}", database_url)) 14 | } 15 | -------------------------------------------------------------------------------- /src/gql.rs: -------------------------------------------------------------------------------- 1 | extern crate bcrypt; 2 | extern crate juniper; 3 | 4 | use super::db::*; 5 | use super::gql_types::*; 6 | use super::jwt::encode_jwt; 7 | use super::models::*; 8 | use bcrypt::{hash, verify}; 9 | use diesel::prelude::*; 10 | use juniper::FieldResult; 11 | 12 | #[derive(Clone, Debug)] 13 | pub struct Context { 14 | pub user_id: Option, 15 | } 16 | 17 | impl juniper::Context for Context {} 18 | 19 | pub struct Query; 20 | 21 | graphql_object!(Query:Context |&self|{ 22 | field getMyProfile(&executor) -> FieldResult{ 23 | use super::schema::myusers::dsl::*; 24 | 25 | let user_id = match executor.context().user_id{ 26 | Some(user_id) => user_id, 27 | None => return Ok(UserResponse{ok:false, error:Some("Login required".to_string()), user:None}), 28 | }; 29 | 30 | let connection = establish_connection(); 31 | 32 | match myusers.find(user_id).first(&connection){ 33 | Ok(user) => Ok(UserResponse{ok:true, error:None, user:Some(user)}), 34 | _ => Ok(UserResponse{ok:false, error:Some( "Not existing user".to_string() ), user:None}), 35 | } 36 | } 37 | }); 38 | 39 | pub struct Mutation; 40 | 41 | graphql_object!(Mutation:Context |&self|{ 42 | field signIn(email:String, password:String) -> FieldResult{ 43 | 44 | use super::schema::myusers; 45 | let connection = establish_connection(); 46 | 47 | let user = myusers::dsl::myusers.filter(myusers::dsl::email.eq(email)).load::(&connection)?; 48 | 49 | let valid = verify(password, &user[0].password)?; 50 | 51 | if valid { 52 | let token = match encode_jwt(user[0].id, 30){ 53 | Ok(t) => t, 54 | _ => return Ok(TokenResponse{token:None}), 55 | }; 56 | Ok(TokenResponse{token:Some(token)}) 57 | } else { 58 | Ok(TokenResponse{token:None}) 59 | } 60 | } 61 | 62 | field signUp(email:String, first_name:String, last_name:String, password:String, bio:Option, avatar:Option) -> FieldResult { 63 | use super::schema::myusers; 64 | let connection = establish_connection(); 65 | 66 | let hashed = hash(&password, 10)?; 67 | 68 | let hashed_new_user = NewUser{ 69 | email:email, 70 | first_name:first_name, 71 | last_name:last_name, 72 | password:hashed, 73 | bio:bio, 74 | avatar:avatar, 75 | }; 76 | 77 | match diesel::insert_into(myusers::table) 78 | .values(&hashed_new_user) 79 | .get_result(&connection){ 80 | Ok(user) => Ok(UserResponse{ok:true,error:None, user:Some(user)}), 81 | _ => Ok(UserResponse{ok:false, error:None, user:None}) 82 | } 83 | 84 | } 85 | 86 | field changePassword(&executor, password:String) -> FieldResult{ 87 | 88 | use super::schema::myusers; 89 | let connection = establish_connection(); 90 | 91 | let user_id = match executor.context().user_id{ 92 | Some(user_id) => user_id, 93 | None => return Ok(UserResponse{ok:false, error:Some("Login required".to_string()), user:None}), 94 | }; 95 | 96 | let hashed_new_password = match hash(&password, 10){ 97 | Ok(pw)=>pw, 98 | _ => return Ok(UserResponse{ok:false, error: Some("Error hashing password".to_string()), user:None}) 99 | }; 100 | 101 | match diesel::update(myusers::dsl::myusers.find(user_id)).set(myusers::dsl::password.eq(hashed_new_password)).get_result::(&connection){ 102 | Ok(user) => Ok(UserResponse{ok:true, error:None, user:Some(user)}), 103 | _ => Ok(UserResponse{ok:false, error: Some("Error".to_string()), user:None}) 104 | } 105 | } 106 | 107 | field changeProfile(&executor, bio:Option, avatar:Option) ->FieldResult{ 108 | 109 | use super::schema::myusers; 110 | let connection = establish_connection(); 111 | 112 | let user_id = match executor.context().user_id{ 113 | Some(user_id) => user_id, 114 | None => return Ok(UserResponse{ok:false, error:Some("Login required".to_string()), user:None}), 115 | }; 116 | 117 | match diesel::update(myusers::dsl::myusers.find(user_id)) 118 | .set(&UpdateUser { 119 | password:None, 120 | bio:bio, 121 | avatar:avatar, 122 | }).get_result::(&connection){ 123 | Ok(user) => Ok(UserResponse{ok:true, error:None, user:Some(user)}), 124 | _ => Ok(UserResponse{ok:false, error: Some("Error".to_string()), user:None}) 125 | } 126 | } 127 | }); 128 | 129 | #[cfg(test)] 130 | mod tests { 131 | use super::*; 132 | 133 | #[test] 134 | fn bench_bcrypt() { 135 | let hashed = hash("1234", 10); 136 | println!("hased_pw: {:?}", hashed) 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /src/gql_types.rs: -------------------------------------------------------------------------------- 1 | use super::models::MyUser; 2 | use super::schema::myusers; 3 | 4 | #[derive(Insertable, GraphQLInputObject)] 5 | #[table_name = "myusers"] 6 | pub struct NewUser { 7 | pub email: String, 8 | pub first_name: String, 9 | pub last_name: String, 10 | pub password: String, 11 | pub bio: Option, 12 | pub avatar: Option, 13 | } 14 | 15 | #[derive(AsChangeset)] 16 | // #[changeset_options(treat_none_as_null="true")] 17 | #[table_name = "myusers"] 18 | pub struct UpdateUser { 19 | pub password: Option, 20 | pub bio: Option, 21 | pub avatar: Option, 22 | } 23 | 24 | #[derive(GraphQLObject, Debug)] 25 | pub struct TokenResponse { 26 | pub token: Option, 27 | } 28 | 29 | #[derive(GraphQLObject, Debug)] 30 | pub struct UsersResponse { 31 | pub ok: bool, 32 | pub error: Option, 33 | pub users: Option>, 34 | } 35 | 36 | #[derive(GraphQLObject, Debug)] 37 | pub struct UserResponse { 38 | pub ok: bool, 39 | pub error: Option, 40 | pub user: Option, 41 | } 42 | -------------------------------------------------------------------------------- /src/jwt.rs: -------------------------------------------------------------------------------- 1 | extern crate jsonwebtoken as jwt; 2 | extern crate serde_derive; 3 | 4 | use jwt::{decode, encode, Header, Validation}; 5 | use std::time::{SystemTime, UNIX_EPOCH}; 6 | 7 | #[derive(Debug, Serialize, Deserialize)] 8 | pub struct Claims { 9 | pub user_id: i32, 10 | pub exp: i32, 11 | } 12 | 13 | struct SecretKey { 14 | key: &'static str, 15 | } 16 | 17 | impl SecretKey { 18 | fn get_secret_key() -> SecretKey { 19 | SecretKey { key: "secret" } 20 | } 21 | } 22 | 23 | pub fn encode_jwt(user_id: i32, exp_day: i32) -> Result { 24 | let exp = SystemTime::now() 25 | .duration_since(UNIX_EPOCH) 26 | .expect("Time went backwards") 27 | .as_secs() as i32 28 | + exp_day * 24 * 60 * 60; 29 | let jwt_secret_key = SecretKey::get_secret_key(); 30 | 31 | let my_claims = Claims { user_id, exp }; 32 | 33 | let token = encode(&Header::default(), &my_claims, jwt_secret_key.key.as_ref())?; 34 | 35 | Ok(token) 36 | } 37 | 38 | pub fn verify_jwt(token: String) -> Result, jwt::errors::Error> { 39 | let jwt_secret_key = SecretKey::get_secret_key(); 40 | 41 | let validation = Validation::default(); 42 | 43 | match decode::(&token, jwt_secret_key.key.as_ref(), &validation) { 44 | Ok(c) => Ok(c), 45 | Err(err) => Err(err), 46 | } 47 | } 48 | 49 | #[cfg(test)] 50 | mod tests { 51 | use super::*; 52 | 53 | #[test] 54 | fn verify_token() { 55 | let token = match encode_jwt(1, 30) { 56 | Ok(t) => t, 57 | _ => return println!("Test failed!"), 58 | }; 59 | println!("token: {:?}", &token); 60 | println!("output: {:?}", verify_jwt(token)) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate diesel; 3 | #[macro_use] 4 | extern crate juniper; 5 | #[macro_use] 6 | extern crate serde_derive; 7 | 8 | pub mod db; 9 | pub mod gql; 10 | pub mod gql_types; 11 | pub mod jwt; 12 | pub mod models; 13 | pub mod schema; 14 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![deny(warnings)] 2 | extern crate diesel; 3 | extern crate juniper; 4 | extern crate pretty_env_logger; 5 | extern crate rust_graphql_api_boilerplate; 6 | extern crate warp; 7 | 8 | use rust_graphql_api_boilerplate::gql::{Context, Mutation, Query}; 9 | use rust_graphql_api_boilerplate::jwt::verify_jwt; 10 | use std::sync::Arc; 11 | use warp::{filters::BoxedFilter, Filter}; 12 | 13 | type Schema = juniper::RootNode<'static, Query, Mutation>; 14 | 15 | fn main() { 16 | pretty_env_logger::init(); 17 | 18 | let schema = Schema::new(Query, Mutation); 19 | 20 | let gql_index = warp::get2().and(warp::path::end()).and_then(web_index); 21 | let gql_query = make_graphql_filter("query", schema); 22 | 23 | let routes = gql_index.or(gql_query); 24 | warp::serve(routes) 25 | .unstable_pipeline() 26 | .run(([127, 0, 0, 1], 3030)) // in case of using docker, 0,0,0,0 27 | } 28 | 29 | fn web_index() -> Result { 30 | Ok(warp::http::Response::builder() 31 | .header("content-type", "text/html; charset=utf-8") 32 | .body(juniper::graphiql::graphiql_source("/query")) 33 | .expect("response is valid")) 34 | } 35 | 36 | fn make_graphql_filter( 37 | path: &'static str, 38 | schema: juniper::RootNode<'static, Query, Mutation>, 39 | ) -> BoxedFilter<(impl warp::Reply,)> 40 | where 41 | Query: juniper::GraphQLType + Send + Sync + 'static, 42 | Mutation: juniper::GraphQLType + Send + Sync + 'static, 43 | { 44 | let schema = Arc::new(schema); 45 | 46 | let context_extractor = warp::any().and( 47 | warp::header::("authorization") 48 | .map(|token: String| -> Context { 49 | let token_data = match verify_jwt(token) { 50 | Ok(t) => t, 51 | Err(_) => return Context { user_id: None }, 52 | }; 53 | 54 | Context { 55 | user_id: Some(token_data.claims.user_id), 56 | } 57 | }) 58 | .or(warp::any().map(|| Context { user_id: None })) 59 | .unify(), 60 | ); 61 | 62 | let handle_request = move |context: Context, 63 | request: juniper::http::GraphQLRequest| 64 | -> Result, serde_json::Error> { 65 | serde_json::to_vec(&request.execute(&schema, &context)) 66 | }; 67 | 68 | warp::post2() 69 | .and(warp::path(path.into())) 70 | .and(context_extractor) 71 | .and(warp::body::json()) 72 | .map(handle_request) 73 | .map(build_response) 74 | .boxed() 75 | } 76 | 77 | fn build_response(response: Result, serde_json::Error>) -> warp::http::Response> { 78 | match response { 79 | Ok(body) => warp::http::Response::builder() 80 | .header("content-type", "application/json; charset=utf-8") 81 | .body(body) 82 | .expect("response is valid"), 83 | Err(_) => warp::http::Response::builder() 84 | .status(warp::http::StatusCode::INTERNAL_SERVER_ERROR) 85 | .body(Vec::new()) 86 | .expect("status code is valid"), 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/models.rs: -------------------------------------------------------------------------------- 1 | extern crate chrono; 2 | 3 | use chrono::prelude::*; 4 | 5 | #[derive(Queryable, GraphQLObject, Debug)] 6 | pub struct MyUser { 7 | pub id: i32, 8 | pub email: String, 9 | pub fist_name: String, 10 | pub last_name: String, 11 | pub password: String, 12 | pub bio: Option, 13 | pub avatar: Option, 14 | pub created_at: NaiveDateTime, 15 | pub updated_at: NaiveDateTime, 16 | } 17 | -------------------------------------------------------------------------------- /src/schema.rs: -------------------------------------------------------------------------------- 1 | table! { 2 | myusers (id) { 3 | id -> Int4, 4 | email -> Varchar, 5 | first_name -> Varchar, 6 | last_name -> Varchar, 7 | password -> Varchar, 8 | bio -> Nullable, 9 | avatar -> Nullable, 10 | created_at -> Timestamptz, 11 | updated_at -> Timestamptz, 12 | } 13 | } 14 | --------------------------------------------------------------------------------