diff options
author | Akshay <[email protected]> | 2020-10-04 08:53:46 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-04 08:53:46 +0100 |
commit | 057382f8d138c63cdc48b0facd9bf4a4a229057a (patch) | |
tree | b30ba227c49918e0e65fc14068307cf11a9248bc |
init
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Cargo.lock | 2114 | ||||
-rw-r--r-- | Cargo.toml | 24 | ||||
-rw-r--r-- | default.nix | 18 | ||||
-rw-r--r-- | diesel.toml | 5 | ||||
-rw-r--r-- | migrations/.gitkeep | 0 | ||||
-rw-r--r-- | migrations/2020-09-22-104623_create_users/down.sql | 3 | ||||
-rw-r--r-- | migrations/2020-09-22-104623_create_users/up.sql | 8 | ||||
-rw-r--r-- | nix/sources.json | 50 | ||||
-rw-r--r-- | nix/sources.nix | 148 | ||||
l--------- | result | 1 | ||||
-rw-r--r-- | rustfmt.toml | 15 | ||||
-rw-r--r-- | shell.nix | 31 | ||||
-rw-r--r-- | src/bin/server.rs | 44 | ||||
-rw-r--r-- | src/handlers/mod.rs | 2 | ||||
-rw-r--r-- | src/handlers/smoke.rs | 15 | ||||
-rw-r--r-- | src/handlers/users.rs | 106 | ||||
-rw-r--r-- | src/handlers/users.rs.html | 137 | ||||
-rw-r--r-- | src/lib.rs | 10 | ||||
-rw-r--r-- | src/models.rs | 21 | ||||
-rw-r--r-- | src/schema.rs | 9 |
21 files changed, 2763 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46b5d68 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | /target | ||
2 | .envrc | ||
diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..3dcd7dd --- /dev/null +++ b/Cargo.lock | |||
@@ -0,0 +1,2114 @@ | |||
1 | # This file is automatically @generated by Cargo. | ||
2 | # It is not intended for manual editing. | ||
3 | [[package]] | ||
4 | name = "actix-codec" | ||
5 | version = "0.3.0" | ||
6 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
7 | checksum = "78d1833b3838dbe990df0f1f87baf640cf6146e898166afe401839d1b001e570" | ||
8 | dependencies = [ | ||
9 | "bitflags", | ||
10 | "bytes", | ||
11 | "futures-core", | ||
12 | "futures-sink", | ||
13 | "log", | ||
14 | "pin-project", | ||
15 | "tokio", | ||
16 | "tokio-util", | ||
17 | ] | ||
18 | |||
19 | [[package]] | ||
20 | name = "actix-connect" | ||
21 | version = "2.0.0" | ||
22 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
23 | checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" | ||
24 | dependencies = [ | ||
25 | "actix-codec", | ||
26 | "actix-rt", | ||
27 | "actix-service", | ||
28 | "actix-utils", | ||
29 | "derive_more", | ||
30 | "either", | ||
31 | "futures-util", | ||
32 | "http", | ||
33 | "log", | ||
34 | "trust-dns-proto", | ||
35 | "trust-dns-resolver", | ||
36 | ] | ||
37 | |||
38 | [[package]] | ||
39 | name = "actix-cors" | ||
40 | version = "0.4.0" | ||
41 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
42 | checksum = "d88ea83af46935098feec2e19a28c919b54eb3cbf0e239b330298e2e69d4b76b" | ||
43 | dependencies = [ | ||
44 | "actix-service", | ||
45 | "actix-web", | ||
46 | "derive_more", | ||
47 | "futures-util", | ||
48 | ] | ||
49 | |||
50 | [[package]] | ||
51 | name = "actix-http" | ||
52 | version = "2.0.0" | ||
53 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
54 | checksum = "05dd80ba8f27c4a34357c07e338c8f5c38f8520e6d626ca1727d8fecc41b0cab" | ||
55 | dependencies = [ | ||
56 | "actix-codec", | ||
57 | "actix-connect", | ||
58 | "actix-rt", | ||
59 | "actix-service", | ||
60 | "actix-threadpool", | ||
61 | "actix-utils", | ||
62 | "base64", | ||
63 | "bitflags", | ||
64 | "brotli2", | ||
65 | "bytes", | ||
66 | "cookie", | ||
67 | "copyless", | ||
68 | "derive_more", | ||
69 | "either", | ||
70 | "encoding_rs", | ||
71 | "flate2", | ||
72 | "futures-channel", | ||
73 | "futures-core", | ||
74 | "futures-util", | ||
75 | "fxhash", | ||
76 | "h2", | ||
77 | "http", | ||
78 | "httparse", | ||
79 | "indexmap", | ||
80 | "itoa", | ||
81 | "language-tags", | ||
82 | "lazy_static", | ||
83 | "log", | ||
84 | "mime", | ||
85 | "percent-encoding 2.1.0", | ||
86 | "pin-project", | ||
87 | "rand", | ||
88 | "regex", | ||
89 | "serde", | ||
90 | "serde_json", | ||
91 | "serde_urlencoded", | ||
92 | "sha-1", | ||
93 | "slab", | ||
94 | "time", | ||
95 | ] | ||
96 | |||
97 | [[package]] | ||
98 | name = "actix-identity" | ||
99 | version = "0.3.1" | ||
100 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
101 | checksum = "3263fe74cf505c6f9e18209c89fbdba5569cfd3905a7e907b42aa1c85c18fae5" | ||
102 | dependencies = [ | ||
103 | "actix-service", | ||
104 | "actix-web", | ||
105 | "futures-util", | ||
106 | "serde", | ||
107 | "serde_json", | ||
108 | "time", | ||
109 | ] | ||
110 | |||
111 | [[package]] | ||
112 | name = "actix-macros" | ||
113 | version = "0.1.2" | ||
114 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
115 | checksum = "a60f9ba7c4e6df97f3aacb14bb5c0cd7d98a49dcbaed0d7f292912ad9a6a3ed2" | ||
116 | dependencies = [ | ||
117 | "quote", | ||
118 | "syn", | ||
119 | ] | ||
120 | |||
121 | [[package]] | ||
122 | name = "actix-router" | ||
123 | version = "0.2.5" | ||
124 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
125 | checksum = "bbd1f7dbda1645bf7da33554db60891755f6c01c1b2169e2f4c492098d30c235" | ||
126 | dependencies = [ | ||
127 | "bytestring", | ||
128 | "http", | ||
129 | "log", | ||
130 | "regex", | ||
131 | "serde", | ||
132 | ] | ||
133 | |||
134 | [[package]] | ||
135 | name = "actix-rt" | ||
136 | version = "1.1.1" | ||
137 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
138 | checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" | ||
139 | dependencies = [ | ||
140 | "actix-macros", | ||
141 | "actix-threadpool", | ||
142 | "copyless", | ||
143 | "futures-channel", | ||
144 | "futures-util", | ||
145 | "smallvec", | ||
146 | "tokio", | ||
147 | ] | ||
148 | |||
149 | [[package]] | ||
150 | name = "actix-server" | ||
151 | version = "1.0.4" | ||
152 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
153 | checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" | ||
154 | dependencies = [ | ||
155 | "actix-codec", | ||
156 | "actix-rt", | ||
157 | "actix-service", | ||
158 | "actix-utils", | ||
159 | "futures-channel", | ||
160 | "futures-util", | ||
161 | "log", | ||
162 | "mio", | ||
163 | "mio-uds", | ||
164 | "num_cpus", | ||
165 | "slab", | ||
166 | "socket2", | ||
167 | ] | ||
168 | |||
169 | [[package]] | ||
170 | name = "actix-service" | ||
171 | version = "1.0.6" | ||
172 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
173 | checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" | ||
174 | dependencies = [ | ||
175 | "futures-util", | ||
176 | "pin-project", | ||
177 | ] | ||
178 | |||
179 | [[package]] | ||
180 | name = "actix-testing" | ||
181 | version = "1.0.1" | ||
182 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
183 | checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" | ||
184 | dependencies = [ | ||
185 | "actix-macros", | ||
186 | "actix-rt", | ||
187 | "actix-server", | ||
188 | "actix-service", | ||
189 | "log", | ||
190 | "socket2", | ||
191 | ] | ||
192 | |||
193 | [[package]] | ||
194 | name = "actix-threadpool" | ||
195 | version = "0.3.3" | ||
196 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
197 | checksum = "d209f04d002854b9afd3743032a27b066158817965bf5d036824d19ac2cc0e30" | ||
198 | dependencies = [ | ||
199 | "derive_more", | ||
200 | "futures-channel", | ||
201 | "lazy_static", | ||
202 | "log", | ||
203 | "num_cpus", | ||
204 | "parking_lot", | ||
205 | "threadpool", | ||
206 | ] | ||
207 | |||
208 | [[package]] | ||
209 | name = "actix-tls" | ||
210 | version = "2.0.0" | ||
211 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
212 | checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" | ||
213 | dependencies = [ | ||
214 | "actix-codec", | ||
215 | "actix-service", | ||
216 | "actix-utils", | ||
217 | "futures-util", | ||
218 | ] | ||
219 | |||
220 | [[package]] | ||
221 | name = "actix-utils" | ||
222 | version = "2.0.0" | ||
223 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
224 | checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" | ||
225 | dependencies = [ | ||
226 | "actix-codec", | ||
227 | "actix-rt", | ||
228 | "actix-service", | ||
229 | "bitflags", | ||
230 | "bytes", | ||
231 | "either", | ||
232 | "futures-channel", | ||
233 | "futures-sink", | ||
234 | "futures-util", | ||
235 | "log", | ||
236 | "pin-project", | ||
237 | "slab", | ||
238 | ] | ||
239 | |||
240 | [[package]] | ||
241 | name = "actix-web" | ||
242 | version = "3.0.2" | ||
243 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
244 | checksum = "36de80175eb1f0a5c518024ce0d23646b54a23008279e090ca1848f6f1448bf4" | ||
245 | dependencies = [ | ||
246 | "actix-codec", | ||
247 | "actix-http", | ||
248 | "actix-macros", | ||
249 | "actix-router", | ||
250 | "actix-rt", | ||
251 | "actix-server", | ||
252 | "actix-service", | ||
253 | "actix-testing", | ||
254 | "actix-threadpool", | ||
255 | "actix-tls", | ||
256 | "actix-utils", | ||
257 | "actix-web-codegen", | ||
258 | "awc", | ||
259 | "bytes", | ||
260 | "derive_more", | ||
261 | "encoding_rs", | ||
262 | "futures-channel", | ||
263 | "futures-core", | ||
264 | "futures-util", | ||
265 | "fxhash", | ||
266 | "log", | ||
267 | "mime", | ||
268 | "pin-project", | ||
269 | "regex", | ||
270 | "serde", | ||
271 | "serde_json", | ||
272 | "serde_urlencoded", | ||
273 | "socket2", | ||
274 | "time", | ||
275 | "tinyvec", | ||
276 | "url 2.1.1", | ||
277 | ] | ||
278 | |||
279 | [[package]] | ||
280 | name = "actix-web-codegen" | ||
281 | version = "0.3.0" | ||
282 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
283 | checksum = "750ca8fb60bbdc79491991650ba5d2ae7cd75f3fc00ead51390cfe9efda0d4d8" | ||
284 | dependencies = [ | ||
285 | "proc-macro2", | ||
286 | "quote", | ||
287 | "syn", | ||
288 | ] | ||
289 | |||
290 | [[package]] | ||
291 | name = "addr2line" | ||
292 | version = "0.13.0" | ||
293 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
294 | checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" | ||
295 | dependencies = [ | ||
296 | "gimli", | ||
297 | ] | ||
298 | |||
299 | [[package]] | ||
300 | name = "adler" | ||
301 | version = "0.2.3" | ||
302 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
303 | checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" | ||
304 | |||
305 | [[package]] | ||
306 | name = "aead" | ||
307 | version = "0.3.2" | ||
308 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
309 | checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" | ||
310 | dependencies = [ | ||
311 | "generic-array", | ||
312 | ] | ||
313 | |||
314 | [[package]] | ||
315 | name = "aes" | ||
316 | version = "0.4.0" | ||
317 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
318 | checksum = "f7001367fde4c768a19d1029f0a8be5abd9308e1119846d5bd9ad26297b8faf5" | ||
319 | dependencies = [ | ||
320 | "aes-soft", | ||
321 | "aesni", | ||
322 | "block-cipher 0.7.1", | ||
323 | ] | ||
324 | |||
325 | [[package]] | ||
326 | name = "aes-gcm" | ||
327 | version = "0.6.0" | ||
328 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
329 | checksum = "86f5007801316299f922a6198d1d09a0bae95786815d066d5880d13f7c45ead1" | ||
330 | dependencies = [ | ||
331 | "aead", | ||
332 | "aes", | ||
333 | "block-cipher 0.7.1", | ||
334 | "ghash", | ||
335 | "subtle", | ||
336 | ] | ||
337 | |||
338 | [[package]] | ||
339 | name = "aes-soft" | ||
340 | version = "0.4.0" | ||
341 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
342 | checksum = "4925647ee64e5056cf231608957ce7c81e12d6d6e316b9ce1404778cc1d35fa7" | ||
343 | dependencies = [ | ||
344 | "block-cipher 0.7.1", | ||
345 | "byteorder", | ||
346 | "opaque-debug 0.2.3", | ||
347 | ] | ||
348 | |||
349 | [[package]] | ||
350 | name = "aesni" | ||
351 | version = "0.7.0" | ||
352 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
353 | checksum = "d050d39b0b7688b3a3254394c3e30a9d66c41dcf9b05b0e2dbdc623f6505d264" | ||
354 | dependencies = [ | ||
355 | "block-cipher 0.7.1", | ||
356 | "opaque-debug 0.2.3", | ||
357 | ] | ||
358 | |||
359 | [[package]] | ||
360 | name = "aho-corasick" | ||
361 | version = "0.7.13" | ||
362 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
363 | checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" | ||
364 | dependencies = [ | ||
365 | "memchr", | ||
366 | ] | ||
367 | |||
368 | [[package]] | ||
369 | name = "arc-swap" | ||
370 | version = "0.4.7" | ||
371 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
372 | checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" | ||
373 | |||
374 | [[package]] | ||
375 | name = "async-trait" | ||
376 | version = "0.1.40" | ||
377 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
378 | checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" | ||
379 | dependencies = [ | ||
380 | "proc-macro2", | ||
381 | "quote", | ||
382 | "syn", | ||
383 | ] | ||
384 | |||
385 | [[package]] | ||
386 | name = "atty" | ||
387 | version = "0.2.14" | ||
388 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
389 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" | ||
390 | dependencies = [ | ||
391 | "hermit-abi", | ||
392 | "libc", | ||
393 | "winapi 0.3.9", | ||
394 | ] | ||
395 | |||
396 | [[package]] | ||
397 | name = "autocfg" | ||
398 | version = "1.0.1" | ||
399 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
400 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" | ||
401 | |||
402 | [[package]] | ||
403 | name = "awc" | ||
404 | version = "2.0.0" | ||
405 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
406 | checksum = "150e00c06683ab44c5f97d033950e5d87a7a042d06d77f5eecb443cbd23d0575" | ||
407 | dependencies = [ | ||
408 | "actix-codec", | ||
409 | "actix-http", | ||
410 | "actix-rt", | ||
411 | "actix-service", | ||
412 | "base64", | ||
413 | "bytes", | ||
414 | "derive_more", | ||
415 | "futures-core", | ||
416 | "log", | ||
417 | "mime", | ||
418 | "percent-encoding 2.1.0", | ||
419 | "rand", | ||
420 | "serde", | ||
421 | "serde_json", | ||
422 | "serde_urlencoded", | ||
423 | ] | ||
424 | |||
425 | [[package]] | ||
426 | name = "backtrace" | ||
427 | version = "0.3.50" | ||
428 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
429 | checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" | ||
430 | dependencies = [ | ||
431 | "addr2line", | ||
432 | "cfg-if", | ||
433 | "libc", | ||
434 | "miniz_oxide", | ||
435 | "object", | ||
436 | "rustc-demangle", | ||
437 | ] | ||
438 | |||
439 | [[package]] | ||
440 | name = "base-x" | ||
441 | version = "0.2.6" | ||
442 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
443 | checksum = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1" | ||
444 | |||
445 | [[package]] | ||
446 | name = "base64" | ||
447 | version = "0.12.3" | ||
448 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
449 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" | ||
450 | |||
451 | [[package]] | ||
452 | name = "bcrypt" | ||
453 | version = "0.8.2" | ||
454 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
455 | checksum = "e2cab630912253fb9dc92c0e2fabd0a7b51f5a5a4007177cfa31e517015b7204" | ||
456 | dependencies = [ | ||
457 | "base64", | ||
458 | "blowfish", | ||
459 | "byteorder", | ||
460 | "getrandom", | ||
461 | ] | ||
462 | |||
463 | [[package]] | ||
464 | name = "bitflags" | ||
465 | version = "1.2.1" | ||
466 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
467 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" | ||
468 | |||
469 | [[package]] | ||
470 | name = "block-buffer" | ||
471 | version = "0.9.0" | ||
472 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
473 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" | ||
474 | dependencies = [ | ||
475 | "generic-array", | ||
476 | ] | ||
477 | |||
478 | [[package]] | ||
479 | name = "block-cipher" | ||
480 | version = "0.7.1" | ||
481 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
482 | checksum = "fa136449e765dc7faa244561ccae839c394048667929af599b5d931ebe7b7f10" | ||
483 | dependencies = [ | ||
484 | "generic-array", | ||
485 | ] | ||
486 | |||
487 | [[package]] | ||
488 | name = "block-cipher" | ||
489 | version = "0.8.0" | ||
490 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
491 | checksum = "f337a3e6da609650eb74e02bc9fac7b735049f7623ab12f2e4c719316fcc7e80" | ||
492 | dependencies = [ | ||
493 | "generic-array", | ||
494 | ] | ||
495 | |||
496 | [[package]] | ||
497 | name = "blowfish" | ||
498 | version = "0.6.0" | ||
499 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
500 | checksum = "0f06850ba969bc59388b2cc0a4f186fc6d9d37208863b15b84ae3866ac90ac06" | ||
501 | dependencies = [ | ||
502 | "block-cipher 0.8.0", | ||
503 | "byteorder", | ||
504 | "opaque-debug 0.3.0", | ||
505 | ] | ||
506 | |||
507 | [[package]] | ||
508 | name = "brotli-sys" | ||
509 | version = "0.3.2" | ||
510 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
511 | checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" | ||
512 | dependencies = [ | ||
513 | "cc", | ||
514 | "libc", | ||
515 | ] | ||
516 | |||
517 | [[package]] | ||
518 | name = "brotli2" | ||
519 | version = "0.3.2" | ||
520 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
521 | checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" | ||
522 | dependencies = [ | ||
523 | "brotli-sys", | ||
524 | "libc", | ||
525 | ] | ||
526 | |||
527 | [[package]] | ||
528 | name = "bumpalo" | ||
529 | version = "3.4.0" | ||
530 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
531 | checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" | ||
532 | |||
533 | [[package]] | ||
534 | name = "byteorder" | ||
535 | version = "1.3.4" | ||
536 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
537 | checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" | ||
538 | |||
539 | [[package]] | ||
540 | name = "bytes" | ||
541 | version = "0.5.6" | ||
542 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
543 | checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" | ||
544 | |||
545 | [[package]] | ||
546 | name = "bytestring" | ||
547 | version = "0.1.5" | ||
548 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
549 | checksum = "fc7c05fa5172da78a62d9949d662d2ac89d4cc7355d7b49adee5163f1fb3f363" | ||
550 | dependencies = [ | ||
551 | "bytes", | ||
552 | ] | ||
553 | |||
554 | [[package]] | ||
555 | name = "cc" | ||
556 | version = "1.0.60" | ||
557 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
558 | checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c" | ||
559 | |||
560 | [[package]] | ||
561 | name = "cfg-if" | ||
562 | version = "0.1.10" | ||
563 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
564 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" | ||
565 | |||
566 | [[package]] | ||
567 | name = "cloudabi" | ||
568 | version = "0.1.0" | ||
569 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
570 | checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" | ||
571 | dependencies = [ | ||
572 | "bitflags", | ||
573 | ] | ||
574 | |||
575 | [[package]] | ||
576 | name = "const_fn" | ||
577 | version = "0.4.2" | ||
578 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
579 | checksum = "ce90df4c658c62f12d78f7508cf92f9173e5184a539c10bfe54a3107b3ffd0f2" | ||
580 | |||
581 | [[package]] | ||
582 | name = "cookie" | ||
583 | version = "0.14.2" | ||
584 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
585 | checksum = "1373a16a4937bc34efec7b391f9c1500c30b8478a701a4f44c9165cc0475a6e0" | ||
586 | dependencies = [ | ||
587 | "aes-gcm", | ||
588 | "base64", | ||
589 | "hkdf", | ||
590 | "hmac", | ||
591 | "percent-encoding 2.1.0", | ||
592 | "rand", | ||
593 | "sha2", | ||
594 | "time", | ||
595 | "version_check", | ||
596 | ] | ||
597 | |||
598 | [[package]] | ||
599 | name = "copyless" | ||
600 | version = "0.1.5" | ||
601 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
602 | checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" | ||
603 | |||
604 | [[package]] | ||
605 | name = "cpuid-bool" | ||
606 | version = "0.1.2" | ||
607 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
608 | checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" | ||
609 | |||
610 | [[package]] | ||
611 | name = "crc32fast" | ||
612 | version = "1.2.0" | ||
613 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
614 | checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" | ||
615 | dependencies = [ | ||
616 | "cfg-if", | ||
617 | ] | ||
618 | |||
619 | [[package]] | ||
620 | name = "crypto-mac" | ||
621 | version = "0.8.0" | ||
622 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
623 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" | ||
624 | dependencies = [ | ||
625 | "generic-array", | ||
626 | "subtle", | ||
627 | ] | ||
628 | |||
629 | [[package]] | ||
630 | name = "derive_more" | ||
631 | version = "0.99.10" | ||
632 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
633 | checksum = "1dcfabdab475c16a93d669dddfc393027803e347d09663f524447f642fbb84ba" | ||
634 | dependencies = [ | ||
635 | "proc-macro2", | ||
636 | "quote", | ||
637 | "syn", | ||
638 | ] | ||
639 | |||
640 | [[package]] | ||
641 | name = "diesel" | ||
642 | version = "1.4.5" | ||
643 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
644 | checksum = "3e2de9deab977a153492a1468d1b1c0662c1cf39e5ea87d0c060ecd59ef18d8c" | ||
645 | dependencies = [ | ||
646 | "byteorder", | ||
647 | "diesel_derives", | ||
648 | "mysqlclient-sys", | ||
649 | "r2d2", | ||
650 | "url 1.7.2", | ||
651 | ] | ||
652 | |||
653 | [[package]] | ||
654 | name = "diesel_derives" | ||
655 | version = "1.4.1" | ||
656 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
657 | checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" | ||
658 | dependencies = [ | ||
659 | "proc-macro2", | ||
660 | "quote", | ||
661 | "syn", | ||
662 | ] | ||
663 | |||
664 | [[package]] | ||
665 | name = "digest" | ||
666 | version = "0.9.0" | ||
667 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
668 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" | ||
669 | dependencies = [ | ||
670 | "generic-array", | ||
671 | ] | ||
672 | |||
673 | [[package]] | ||
674 | name = "discard" | ||
675 | version = "1.0.4" | ||
676 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
677 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" | ||
678 | |||
679 | [[package]] | ||
680 | name = "dtoa" | ||
681 | version = "0.4.6" | ||
682 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
683 | checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" | ||
684 | |||
685 | [[package]] | ||
686 | name = "either" | ||
687 | version = "1.6.1" | ||
688 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
689 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" | ||
690 | |||
691 | [[package]] | ||
692 | name = "encoding_rs" | ||
693 | version = "0.8.24" | ||
694 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
695 | checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" | ||
696 | dependencies = [ | ||
697 | "cfg-if", | ||
698 | ] | ||
699 | |||
700 | [[package]] | ||
701 | name = "enum-as-inner" | ||
702 | version = "0.3.3" | ||
703 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
704 | checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" | ||
705 | dependencies = [ | ||
706 | "heck", | ||
707 | "proc-macro2", | ||
708 | "quote", | ||
709 | "syn", | ||
710 | ] | ||
711 | |||
712 | [[package]] | ||
713 | name = "env_logger" | ||
714 | version = "0.7.1" | ||
715 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
716 | checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" | ||
717 | dependencies = [ | ||
718 | "atty", | ||
719 | "humantime", | ||
720 | "log", | ||
721 | "regex", | ||
722 | "termcolor", | ||
723 | ] | ||
724 | |||
725 | [[package]] | ||
726 | name = "flate2" | ||
727 | version = "1.0.17" | ||
728 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
729 | checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" | ||
730 | dependencies = [ | ||
731 | "cfg-if", | ||
732 | "crc32fast", | ||
733 | "libc", | ||
734 | "miniz_oxide", | ||
735 | ] | ||
736 | |||
737 | [[package]] | ||
738 | name = "fnv" | ||
739 | version = "1.0.7" | ||
740 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
741 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" | ||
742 | |||
743 | [[package]] | ||
744 | name = "fuchsia-zircon" | ||
745 | version = "0.3.3" | ||
746 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
747 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" | ||
748 | dependencies = [ | ||
749 | "bitflags", | ||
750 | "fuchsia-zircon-sys", | ||
751 | ] | ||
752 | |||
753 | [[package]] | ||
754 | name = "fuchsia-zircon-sys" | ||
755 | version = "0.3.3" | ||
756 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
757 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" | ||
758 | |||
759 | [[package]] | ||
760 | name = "furby" | ||
761 | version = "0.1.0" | ||
762 | dependencies = [ | ||
763 | "actix-cors", | ||
764 | "actix-identity", | ||
765 | "actix-web", | ||
766 | "bcrypt", | ||
767 | "diesel", | ||
768 | "log", | ||
769 | "pretty_env_logger", | ||
770 | "rand", | ||
771 | "serde", | ||
772 | "serde_derive", | ||
773 | "serde_json", | ||
774 | ] | ||
775 | |||
776 | [[package]] | ||
777 | name = "futures" | ||
778 | version = "0.3.5" | ||
779 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
780 | checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" | ||
781 | dependencies = [ | ||
782 | "futures-channel", | ||
783 | "futures-core", | ||
784 | "futures-io", | ||
785 | "futures-sink", | ||
786 | "futures-task", | ||
787 | "futures-util", | ||
788 | ] | ||
789 | |||
790 | [[package]] | ||
791 | name = "futures-channel" | ||
792 | version = "0.3.5" | ||
793 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
794 | checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" | ||
795 | dependencies = [ | ||
796 | "futures-core", | ||
797 | "futures-sink", | ||
798 | ] | ||
799 | |||
800 | [[package]] | ||
801 | name = "futures-core" | ||
802 | version = "0.3.5" | ||
803 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
804 | checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" | ||
805 | |||
806 | [[package]] | ||
807 | name = "futures-io" | ||
808 | version = "0.3.5" | ||
809 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
810 | checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" | ||
811 | |||
812 | [[package]] | ||
813 | name = "futures-macro" | ||
814 | version = "0.3.5" | ||
815 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
816 | checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" | ||
817 | dependencies = [ | ||
818 | "proc-macro-hack", | ||
819 | "proc-macro2", | ||
820 | "quote", | ||
821 | "syn", | ||
822 | ] | ||
823 | |||
824 | [[package]] | ||
825 | name = "futures-sink" | ||
826 | version = "0.3.5" | ||
827 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
828 | checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" | ||
829 | |||
830 | [[package]] | ||
831 | name = "futures-task" | ||
832 | version = "0.3.5" | ||
833 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
834 | checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" | ||
835 | dependencies = [ | ||
836 | "once_cell", | ||
837 | ] | ||
838 | |||
839 | [[package]] | ||
840 | name = "futures-util" | ||
841 | version = "0.3.5" | ||
842 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
843 | checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" | ||
844 | dependencies = [ | ||
845 | "futures-channel", | ||
846 | "futures-core", | ||
847 | "futures-io", | ||
848 | "futures-macro", | ||
849 | "futures-sink", | ||
850 | "futures-task", | ||
851 | "memchr", | ||
852 | "pin-project", | ||
853 | "pin-utils", | ||
854 | "proc-macro-hack", | ||
855 | "proc-macro-nested", | ||
856 | "slab", | ||
857 | ] | ||
858 | |||
859 | [[package]] | ||
860 | name = "fxhash" | ||
861 | version = "0.2.1" | ||
862 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
863 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" | ||
864 | dependencies = [ | ||
865 | "byteorder", | ||
866 | ] | ||
867 | |||
868 | [[package]] | ||
869 | name = "generic-array" | ||
870 | version = "0.14.4" | ||
871 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
872 | checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" | ||
873 | dependencies = [ | ||
874 | "typenum", | ||
875 | "version_check", | ||
876 | ] | ||
877 | |||
878 | [[package]] | ||
879 | name = "getrandom" | ||
880 | version = "0.1.15" | ||
881 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
882 | checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" | ||
883 | dependencies = [ | ||
884 | "cfg-if", | ||
885 | "libc", | ||
886 | "wasi", | ||
887 | ] | ||
888 | |||
889 | [[package]] | ||
890 | name = "ghash" | ||
891 | version = "0.3.0" | ||
892 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
893 | checksum = "d6e27f0689a6e15944bdce7e45425efb87eaa8ab0c6e87f11d0987a9133e2531" | ||
894 | dependencies = [ | ||
895 | "polyval", | ||
896 | ] | ||
897 | |||
898 | [[package]] | ||
899 | name = "gimli" | ||
900 | version = "0.22.0" | ||
901 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
902 | checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" | ||
903 | |||
904 | [[package]] | ||
905 | name = "h2" | ||
906 | version = "0.2.6" | ||
907 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
908 | checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" | ||
909 | dependencies = [ | ||
910 | "bytes", | ||
911 | "fnv", | ||
912 | "futures-core", | ||
913 | "futures-sink", | ||
914 | "futures-util", | ||
915 | "http", | ||
916 | "indexmap", | ||
917 | "slab", | ||
918 | "tokio", | ||
919 | "tokio-util", | ||
920 | "tracing", | ||
921 | ] | ||
922 | |||
923 | [[package]] | ||
924 | name = "hashbrown" | ||
925 | version = "0.9.0" | ||
926 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
927 | checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" | ||
928 | |||
929 | [[package]] | ||
930 | name = "heck" | ||
931 | version = "0.3.1" | ||
932 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
933 | checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" | ||
934 | dependencies = [ | ||
935 | "unicode-segmentation", | ||
936 | ] | ||
937 | |||
938 | [[package]] | ||
939 | name = "hermit-abi" | ||
940 | version = "0.1.16" | ||
941 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
942 | checksum = "4c30f6d0bc6b00693347368a67d41b58f2fb851215ff1da49e90fe2c5c667151" | ||
943 | dependencies = [ | ||
944 | "libc", | ||
945 | ] | ||
946 | |||
947 | [[package]] | ||
948 | name = "hkdf" | ||
949 | version = "0.9.0" | ||
950 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
951 | checksum = "fe1149865383e4526a43aee8495f9a325f0b806c63ce6427d06336a590abbbc9" | ||
952 | dependencies = [ | ||
953 | "digest", | ||
954 | "hmac", | ||
955 | ] | ||
956 | |||
957 | [[package]] | ||
958 | name = "hmac" | ||
959 | version = "0.8.1" | ||
960 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
961 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" | ||
962 | dependencies = [ | ||
963 | "crypto-mac", | ||
964 | "digest", | ||
965 | ] | ||
966 | |||
967 | [[package]] | ||
968 | name = "hostname" | ||
969 | version = "0.3.1" | ||
970 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
971 | checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" | ||
972 | dependencies = [ | ||
973 | "libc", | ||
974 | "match_cfg", | ||
975 | "winapi 0.3.9", | ||
976 | ] | ||
977 | |||
978 | [[package]] | ||
979 | name = "http" | ||
980 | version = "0.2.1" | ||
981 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
982 | checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" | ||
983 | dependencies = [ | ||
984 | "bytes", | ||
985 | "fnv", | ||
986 | "itoa", | ||
987 | ] | ||
988 | |||
989 | [[package]] | ||
990 | name = "httparse" | ||
991 | version = "1.3.4" | ||
992 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
993 | checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" | ||
994 | |||
995 | [[package]] | ||
996 | name = "humantime" | ||
997 | version = "1.3.0" | ||
998 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
999 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" | ||
1000 | dependencies = [ | ||
1001 | "quick-error", | ||
1002 | ] | ||
1003 | |||
1004 | [[package]] | ||
1005 | name = "idna" | ||
1006 | version = "0.1.5" | ||
1007 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1008 | checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" | ||
1009 | dependencies = [ | ||
1010 | "matches", | ||
1011 | "unicode-bidi", | ||
1012 | "unicode-normalization", | ||
1013 | ] | ||
1014 | |||
1015 | [[package]] | ||
1016 | name = "idna" | ||
1017 | version = "0.2.0" | ||
1018 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1019 | checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" | ||
1020 | dependencies = [ | ||
1021 | "matches", | ||
1022 | "unicode-bidi", | ||
1023 | "unicode-normalization", | ||
1024 | ] | ||
1025 | |||
1026 | [[package]] | ||
1027 | name = "indexmap" | ||
1028 | version = "1.6.0" | ||
1029 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1030 | checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" | ||
1031 | dependencies = [ | ||
1032 | "autocfg", | ||
1033 | "hashbrown", | ||
1034 | ] | ||
1035 | |||
1036 | [[package]] | ||
1037 | name = "instant" | ||
1038 | version = "0.1.7" | ||
1039 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1040 | checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66" | ||
1041 | dependencies = [ | ||
1042 | "cfg-if", | ||
1043 | ] | ||
1044 | |||
1045 | [[package]] | ||
1046 | name = "iovec" | ||
1047 | version = "0.1.4" | ||
1048 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1049 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" | ||
1050 | dependencies = [ | ||
1051 | "libc", | ||
1052 | ] | ||
1053 | |||
1054 | [[package]] | ||
1055 | name = "ipconfig" | ||
1056 | version = "0.2.2" | ||
1057 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1058 | checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" | ||
1059 | dependencies = [ | ||
1060 | "socket2", | ||
1061 | "widestring", | ||
1062 | "winapi 0.3.9", | ||
1063 | "winreg", | ||
1064 | ] | ||
1065 | |||
1066 | [[package]] | ||
1067 | name = "itoa" | ||
1068 | version = "0.4.6" | ||
1069 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1070 | checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" | ||
1071 | |||
1072 | [[package]] | ||
1073 | name = "kernel32-sys" | ||
1074 | version = "0.2.2" | ||
1075 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1076 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" | ||
1077 | dependencies = [ | ||
1078 | "winapi 0.2.8", | ||
1079 | "winapi-build", | ||
1080 | ] | ||
1081 | |||
1082 | [[package]] | ||
1083 | name = "language-tags" | ||
1084 | version = "0.2.2" | ||
1085 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1086 | checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" | ||
1087 | |||
1088 | [[package]] | ||
1089 | name = "lazy_static" | ||
1090 | version = "1.4.0" | ||
1091 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1092 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | ||
1093 | |||
1094 | [[package]] | ||
1095 | name = "libc" | ||
1096 | version = "0.2.77" | ||
1097 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1098 | checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235" | ||
1099 | |||
1100 | [[package]] | ||
1101 | name = "linked-hash-map" | ||
1102 | version = "0.5.3" | ||
1103 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1104 | checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" | ||
1105 | |||
1106 | [[package]] | ||
1107 | name = "lock_api" | ||
1108 | version = "0.4.1" | ||
1109 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1110 | checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" | ||
1111 | dependencies = [ | ||
1112 | "scopeguard", | ||
1113 | ] | ||
1114 | |||
1115 | [[package]] | ||
1116 | name = "log" | ||
1117 | version = "0.4.11" | ||
1118 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1119 | checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" | ||
1120 | dependencies = [ | ||
1121 | "cfg-if", | ||
1122 | ] | ||
1123 | |||
1124 | [[package]] | ||
1125 | name = "lru-cache" | ||
1126 | version = "0.1.2" | ||
1127 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1128 | checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" | ||
1129 | dependencies = [ | ||
1130 | "linked-hash-map", | ||
1131 | ] | ||
1132 | |||
1133 | [[package]] | ||
1134 | name = "match_cfg" | ||
1135 | version = "0.1.0" | ||
1136 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1137 | checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" | ||
1138 | |||
1139 | [[package]] | ||
1140 | name = "matches" | ||
1141 | version = "0.1.8" | ||
1142 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1143 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" | ||
1144 | |||
1145 | [[package]] | ||
1146 | name = "memchr" | ||
1147 | version = "2.3.3" | ||
1148 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1149 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" | ||
1150 | |||
1151 | [[package]] | ||
1152 | name = "mime" | ||
1153 | version = "0.3.16" | ||
1154 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1155 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" | ||
1156 | |||
1157 | [[package]] | ||
1158 | name = "miniz_oxide" | ||
1159 | version = "0.4.2" | ||
1160 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1161 | checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" | ||
1162 | dependencies = [ | ||
1163 | "adler", | ||
1164 | "autocfg", | ||
1165 | ] | ||
1166 | |||
1167 | [[package]] | ||
1168 | name = "mio" | ||
1169 | version = "0.6.22" | ||
1170 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1171 | checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" | ||
1172 | dependencies = [ | ||
1173 | "cfg-if", | ||
1174 | "fuchsia-zircon", | ||
1175 | "fuchsia-zircon-sys", | ||
1176 | "iovec", | ||
1177 | "kernel32-sys", | ||
1178 | "libc", | ||
1179 | "log", | ||
1180 | "miow", | ||
1181 | "net2", | ||
1182 | "slab", | ||
1183 | "winapi 0.2.8", | ||
1184 | ] | ||
1185 | |||
1186 | [[package]] | ||
1187 | name = "mio-uds" | ||
1188 | version = "0.6.8" | ||
1189 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1190 | checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" | ||
1191 | dependencies = [ | ||
1192 | "iovec", | ||
1193 | "libc", | ||
1194 | "mio", | ||
1195 | ] | ||
1196 | |||
1197 | [[package]] | ||
1198 | name = "miow" | ||
1199 | version = "0.2.1" | ||
1200 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1201 | checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" | ||
1202 | dependencies = [ | ||
1203 | "kernel32-sys", | ||
1204 | "net2", | ||
1205 | "winapi 0.2.8", | ||
1206 | "ws2_32-sys", | ||
1207 | ] | ||
1208 | |||
1209 | [[package]] | ||
1210 | name = "mysqlclient-sys" | ||
1211 | version = "0.2.4" | ||
1212 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1213 | checksum = "7e9637d93448044078aaafea7419aed69d301b4a12bcc4aa0ae856eb169bef85" | ||
1214 | dependencies = [ | ||
1215 | "pkg-config", | ||
1216 | "vcpkg", | ||
1217 | ] | ||
1218 | |||
1219 | [[package]] | ||
1220 | name = "net2" | ||
1221 | version = "0.2.35" | ||
1222 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1223 | checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" | ||
1224 | dependencies = [ | ||
1225 | "cfg-if", | ||
1226 | "libc", | ||
1227 | "winapi 0.3.9", | ||
1228 | ] | ||
1229 | |||
1230 | [[package]] | ||
1231 | name = "num_cpus" | ||
1232 | version = "1.13.0" | ||
1233 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1234 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" | ||
1235 | dependencies = [ | ||
1236 | "hermit-abi", | ||
1237 | "libc", | ||
1238 | ] | ||
1239 | |||
1240 | [[package]] | ||
1241 | name = "object" | ||
1242 | version = "0.20.0" | ||
1243 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1244 | checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" | ||
1245 | |||
1246 | [[package]] | ||
1247 | name = "once_cell" | ||
1248 | version = "1.4.1" | ||
1249 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1250 | checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" | ||
1251 | |||
1252 | [[package]] | ||
1253 | name = "opaque-debug" | ||
1254 | version = "0.2.3" | ||
1255 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1256 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" | ||
1257 | |||
1258 | [[package]] | ||
1259 | name = "opaque-debug" | ||
1260 | version = "0.3.0" | ||
1261 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1262 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" | ||
1263 | |||
1264 | [[package]] | ||
1265 | name = "parking_lot" | ||
1266 | version = "0.11.0" | ||
1267 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1268 | checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" | ||
1269 | dependencies = [ | ||
1270 | "instant", | ||
1271 | "lock_api", | ||
1272 | "parking_lot_core", | ||
1273 | ] | ||
1274 | |||
1275 | [[package]] | ||
1276 | name = "parking_lot_core" | ||
1277 | version = "0.8.0" | ||
1278 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1279 | checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" | ||
1280 | dependencies = [ | ||
1281 | "cfg-if", | ||
1282 | "cloudabi", | ||
1283 | "instant", | ||
1284 | "libc", | ||
1285 | "redox_syscall", | ||
1286 | "smallvec", | ||
1287 | "winapi 0.3.9", | ||
1288 | ] | ||
1289 | |||
1290 | [[package]] | ||
1291 | name = "percent-encoding" | ||
1292 | version = "1.0.1" | ||
1293 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1294 | checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" | ||
1295 | |||
1296 | [[package]] | ||
1297 | name = "percent-encoding" | ||
1298 | version = "2.1.0" | ||
1299 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1300 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" | ||
1301 | |||
1302 | [[package]] | ||
1303 | name = "pin-project" | ||
1304 | version = "0.4.23" | ||
1305 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1306 | checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" | ||
1307 | dependencies = [ | ||
1308 | "pin-project-internal", | ||
1309 | ] | ||
1310 | |||
1311 | [[package]] | ||
1312 | name = "pin-project-internal" | ||
1313 | version = "0.4.23" | ||
1314 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1315 | checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" | ||
1316 | dependencies = [ | ||
1317 | "proc-macro2", | ||
1318 | "quote", | ||
1319 | "syn", | ||
1320 | ] | ||
1321 | |||
1322 | [[package]] | ||
1323 | name = "pin-project-lite" | ||
1324 | version = "0.1.7" | ||
1325 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1326 | checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" | ||
1327 | |||
1328 | [[package]] | ||
1329 | name = "pin-utils" | ||
1330 | version = "0.1.0" | ||
1331 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1332 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" | ||
1333 | |||
1334 | [[package]] | ||
1335 | name = "pkg-config" | ||
1336 | version = "0.3.18" | ||
1337 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1338 | checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" | ||
1339 | |||
1340 | [[package]] | ||
1341 | name = "polyval" | ||
1342 | version = "0.4.0" | ||
1343 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1344 | checksum = "d9a50142b55ab3ed0e9f68dfb3709f1d90d29da24e91033f28b96330643107dc" | ||
1345 | dependencies = [ | ||
1346 | "cfg-if", | ||
1347 | "universal-hash", | ||
1348 | ] | ||
1349 | |||
1350 | [[package]] | ||
1351 | name = "ppv-lite86" | ||
1352 | version = "0.2.9" | ||
1353 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1354 | checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" | ||
1355 | |||
1356 | [[package]] | ||
1357 | name = "pretty_env_logger" | ||
1358 | version = "0.4.0" | ||
1359 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1360 | checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" | ||
1361 | dependencies = [ | ||
1362 | "env_logger", | ||
1363 | "log", | ||
1364 | ] | ||
1365 | |||
1366 | [[package]] | ||
1367 | name = "proc-macro-hack" | ||
1368 | version = "0.5.18" | ||
1369 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1370 | checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" | ||
1371 | |||
1372 | [[package]] | ||
1373 | name = "proc-macro-nested" | ||
1374 | version = "0.1.6" | ||
1375 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1376 | checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" | ||
1377 | |||
1378 | [[package]] | ||
1379 | name = "proc-macro2" | ||
1380 | version = "1.0.21" | ||
1381 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1382 | checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c" | ||
1383 | dependencies = [ | ||
1384 | "unicode-xid", | ||
1385 | ] | ||
1386 | |||
1387 | [[package]] | ||
1388 | name = "quick-error" | ||
1389 | version = "1.2.3" | ||
1390 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1391 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" | ||
1392 | |||
1393 | [[package]] | ||
1394 | name = "quote" | ||
1395 | version = "1.0.7" | ||
1396 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1397 | checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" | ||
1398 | dependencies = [ | ||
1399 | "proc-macro2", | ||
1400 | ] | ||
1401 | |||
1402 | [[package]] | ||
1403 | name = "r2d2" | ||
1404 | version = "0.8.9" | ||
1405 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1406 | checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" | ||
1407 | dependencies = [ | ||
1408 | "log", | ||
1409 | "parking_lot", | ||
1410 | "scheduled-thread-pool", | ||
1411 | ] | ||
1412 | |||
1413 | [[package]] | ||
1414 | name = "rand" | ||
1415 | version = "0.7.3" | ||
1416 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1417 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" | ||
1418 | dependencies = [ | ||
1419 | "getrandom", | ||
1420 | "libc", | ||
1421 | "rand_chacha", | ||
1422 | "rand_core", | ||
1423 | "rand_hc", | ||
1424 | ] | ||
1425 | |||
1426 | [[package]] | ||
1427 | name = "rand_chacha" | ||
1428 | version = "0.2.2" | ||
1429 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1430 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" | ||
1431 | dependencies = [ | ||
1432 | "ppv-lite86", | ||
1433 | "rand_core", | ||
1434 | ] | ||
1435 | |||
1436 | [[package]] | ||
1437 | name = "rand_core" | ||
1438 | version = "0.5.1" | ||
1439 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1440 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" | ||
1441 | dependencies = [ | ||
1442 | "getrandom", | ||
1443 | ] | ||
1444 | |||
1445 | [[package]] | ||
1446 | name = "rand_hc" | ||
1447 | version = "0.2.0" | ||
1448 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1449 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" | ||
1450 | dependencies = [ | ||
1451 | "rand_core", | ||
1452 | ] | ||
1453 | |||
1454 | [[package]] | ||
1455 | name = "redox_syscall" | ||
1456 | version = "0.1.57" | ||
1457 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1458 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" | ||
1459 | |||
1460 | [[package]] | ||
1461 | name = "regex" | ||
1462 | version = "1.3.9" | ||
1463 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1464 | checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" | ||
1465 | dependencies = [ | ||
1466 | "aho-corasick", | ||
1467 | "memchr", | ||
1468 | "regex-syntax", | ||
1469 | "thread_local", | ||
1470 | ] | ||
1471 | |||
1472 | [[package]] | ||
1473 | name = "regex-syntax" | ||
1474 | version = "0.6.18" | ||
1475 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1476 | checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" | ||
1477 | |||
1478 | [[package]] | ||
1479 | name = "resolv-conf" | ||
1480 | version = "0.6.3" | ||
1481 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1482 | checksum = "11834e137f3b14e309437a8276714eed3a80d1ef894869e510f2c0c0b98b9f4a" | ||
1483 | dependencies = [ | ||
1484 | "hostname", | ||
1485 | "quick-error", | ||
1486 | ] | ||
1487 | |||
1488 | [[package]] | ||
1489 | name = "rustc-demangle" | ||
1490 | version = "0.1.16" | ||
1491 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1492 | checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" | ||
1493 | |||
1494 | [[package]] | ||
1495 | name = "rustc_version" | ||
1496 | version = "0.2.3" | ||
1497 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1498 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" | ||
1499 | dependencies = [ | ||
1500 | "semver", | ||
1501 | ] | ||
1502 | |||
1503 | [[package]] | ||
1504 | name = "ryu" | ||
1505 | version = "1.0.5" | ||
1506 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1507 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" | ||
1508 | |||
1509 | [[package]] | ||
1510 | name = "scheduled-thread-pool" | ||
1511 | version = "0.2.5" | ||
1512 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1513 | checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" | ||
1514 | dependencies = [ | ||
1515 | "parking_lot", | ||
1516 | ] | ||
1517 | |||
1518 | [[package]] | ||
1519 | name = "scopeguard" | ||
1520 | version = "1.1.0" | ||
1521 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1522 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" | ||
1523 | |||
1524 | [[package]] | ||
1525 | name = "semver" | ||
1526 | version = "0.9.0" | ||
1527 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1528 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" | ||
1529 | dependencies = [ | ||
1530 | "semver-parser", | ||
1531 | ] | ||
1532 | |||
1533 | [[package]] | ||
1534 | name = "semver-parser" | ||
1535 | version = "0.7.0" | ||
1536 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1537 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" | ||
1538 | |||
1539 | [[package]] | ||
1540 | name = "serde" | ||
1541 | version = "1.0.116" | ||
1542 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1543 | checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" | ||
1544 | dependencies = [ | ||
1545 | "serde_derive", | ||
1546 | ] | ||
1547 | |||
1548 | [[package]] | ||
1549 | name = "serde_derive" | ||
1550 | version = "1.0.116" | ||
1551 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1552 | checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" | ||
1553 | dependencies = [ | ||
1554 | "proc-macro2", | ||
1555 | "quote", | ||
1556 | "syn", | ||
1557 | ] | ||
1558 | |||
1559 | [[package]] | ||
1560 | name = "serde_json" | ||
1561 | version = "1.0.57" | ||
1562 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1563 | checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" | ||
1564 | dependencies = [ | ||
1565 | "itoa", | ||
1566 | "ryu", | ||
1567 | "serde", | ||
1568 | ] | ||
1569 | |||
1570 | [[package]] | ||
1571 | name = "serde_urlencoded" | ||
1572 | version = "0.6.1" | ||
1573 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1574 | checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" | ||
1575 | dependencies = [ | ||
1576 | "dtoa", | ||
1577 | "itoa", | ||
1578 | "serde", | ||
1579 | "url 2.1.1", | ||
1580 | ] | ||
1581 | |||
1582 | [[package]] | ||
1583 | name = "sha-1" | ||
1584 | version = "0.9.1" | ||
1585 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1586 | checksum = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770" | ||
1587 | dependencies = [ | ||
1588 | "block-buffer", | ||
1589 | "cfg-if", | ||
1590 | "cpuid-bool", | ||
1591 | "digest", | ||
1592 | "opaque-debug 0.3.0", | ||
1593 | ] | ||
1594 | |||
1595 | [[package]] | ||
1596 | name = "sha1" | ||
1597 | version = "0.6.0" | ||
1598 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1599 | checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" | ||
1600 | |||
1601 | [[package]] | ||
1602 | name = "sha2" | ||
1603 | version = "0.9.1" | ||
1604 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1605 | checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1" | ||
1606 | dependencies = [ | ||
1607 | "block-buffer", | ||
1608 | "cfg-if", | ||
1609 | "cpuid-bool", | ||
1610 | "digest", | ||
1611 | "opaque-debug 0.3.0", | ||
1612 | ] | ||
1613 | |||
1614 | [[package]] | ||
1615 | name = "signal-hook-registry" | ||
1616 | version = "1.2.1" | ||
1617 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1618 | checksum = "a3e12110bc539e657a646068aaf5eb5b63af9d0c1f7b29c97113fad80e15f035" | ||
1619 | dependencies = [ | ||
1620 | "arc-swap", | ||
1621 | "libc", | ||
1622 | ] | ||
1623 | |||
1624 | [[package]] | ||
1625 | name = "slab" | ||
1626 | version = "0.4.2" | ||
1627 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1628 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | ||
1629 | |||
1630 | [[package]] | ||
1631 | name = "smallvec" | ||
1632 | version = "1.4.2" | ||
1633 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1634 | checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" | ||
1635 | |||
1636 | [[package]] | ||
1637 | name = "socket2" | ||
1638 | version = "0.3.15" | ||
1639 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1640 | checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44" | ||
1641 | dependencies = [ | ||
1642 | "cfg-if", | ||
1643 | "libc", | ||
1644 | "redox_syscall", | ||
1645 | "winapi 0.3.9", | ||
1646 | ] | ||
1647 | |||
1648 | [[package]] | ||
1649 | name = "standback" | ||
1650 | version = "0.2.10" | ||
1651 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1652 | checksum = "33a71ea1ea5f8747d1af1979bfb7e65c3a025a70609f04ceb78425bc5adad8e6" | ||
1653 | dependencies = [ | ||
1654 | "version_check", | ||
1655 | ] | ||
1656 | |||
1657 | [[package]] | ||
1658 | name = "stdweb" | ||
1659 | version = "0.4.20" | ||
1660 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1661 | checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" | ||
1662 | dependencies = [ | ||
1663 | "discard", | ||
1664 | "rustc_version", | ||
1665 | "stdweb-derive", | ||
1666 | "stdweb-internal-macros", | ||
1667 | "stdweb-internal-runtime", | ||
1668 | "wasm-bindgen", | ||
1669 | ] | ||
1670 | |||
1671 | [[package]] | ||
1672 | name = "stdweb-derive" | ||
1673 | version = "0.5.3" | ||
1674 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1675 | checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" | ||
1676 | dependencies = [ | ||
1677 | "proc-macro2", | ||
1678 | "quote", | ||
1679 | "serde", | ||
1680 | "serde_derive", | ||
1681 | "syn", | ||
1682 | ] | ||
1683 | |||
1684 | [[package]] | ||
1685 | name = "stdweb-internal-macros" | ||
1686 | version = "0.2.9" | ||
1687 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1688 | checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" | ||
1689 | dependencies = [ | ||
1690 | "base-x", | ||
1691 | "proc-macro2", | ||
1692 | "quote", | ||
1693 | "serde", | ||
1694 | "serde_derive", | ||
1695 | "serde_json", | ||
1696 | "sha1", | ||
1697 | "syn", | ||
1698 | ] | ||
1699 | |||
1700 | [[package]] | ||
1701 | name = "stdweb-internal-runtime" | ||
1702 | version = "0.1.5" | ||
1703 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1704 | checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" | ||
1705 | |||
1706 | [[package]] | ||
1707 | name = "subtle" | ||
1708 | version = "2.3.0" | ||
1709 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1710 | checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" | ||
1711 | |||
1712 | [[package]] | ||
1713 | name = "syn" | ||
1714 | version = "1.0.41" | ||
1715 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1716 | checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b" | ||
1717 | dependencies = [ | ||
1718 | "proc-macro2", | ||
1719 | "quote", | ||
1720 | "unicode-xid", | ||
1721 | ] | ||
1722 | |||
1723 | [[package]] | ||
1724 | name = "termcolor" | ||
1725 | version = "1.1.0" | ||
1726 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1727 | checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" | ||
1728 | dependencies = [ | ||
1729 | "winapi-util", | ||
1730 | ] | ||
1731 | |||
1732 | [[package]] | ||
1733 | name = "thiserror" | ||
1734 | version = "1.0.20" | ||
1735 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1736 | checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" | ||
1737 | dependencies = [ | ||
1738 | "thiserror-impl", | ||
1739 | ] | ||
1740 | |||
1741 | [[package]] | ||
1742 | name = "thiserror-impl" | ||
1743 | version = "1.0.20" | ||
1744 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1745 | checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" | ||
1746 | dependencies = [ | ||
1747 | "proc-macro2", | ||
1748 | "quote", | ||
1749 | "syn", | ||
1750 | ] | ||
1751 | |||
1752 | [[package]] | ||
1753 | name = "thread_local" | ||
1754 | version = "1.0.1" | ||
1755 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1756 | checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" | ||
1757 | dependencies = [ | ||
1758 | "lazy_static", | ||
1759 | ] | ||
1760 | |||
1761 | [[package]] | ||
1762 | name = "threadpool" | ||
1763 | version = "1.8.1" | ||
1764 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1765 | checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" | ||
1766 | dependencies = [ | ||
1767 | "num_cpus", | ||
1768 | ] | ||
1769 | |||
1770 | [[package]] | ||
1771 | name = "time" | ||
1772 | version = "0.2.21" | ||
1773 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1774 | checksum = "2c2e31fb28e2a9f01f5ed6901b066c1ba2333c04b64dc61254142bafcb3feb2c" | ||
1775 | dependencies = [ | ||
1776 | "const_fn", | ||
1777 | "libc", | ||
1778 | "standback", | ||
1779 | "stdweb", | ||
1780 | "time-macros", | ||
1781 | "version_check", | ||
1782 | "winapi 0.3.9", | ||
1783 | ] | ||
1784 | |||
1785 | [[package]] | ||
1786 | name = "time-macros" | ||
1787 | version = "0.1.0" | ||
1788 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1789 | checksum = "9ae9b6e9f095bc105e183e3cd493d72579be3181ad4004fceb01adbe9eecab2d" | ||
1790 | dependencies = [ | ||
1791 | "proc-macro-hack", | ||
1792 | "time-macros-impl", | ||
1793 | ] | ||
1794 | |||
1795 | [[package]] | ||
1796 | name = "time-macros-impl" | ||
1797 | version = "0.1.1" | ||
1798 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1799 | checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" | ||
1800 | dependencies = [ | ||
1801 | "proc-macro-hack", | ||
1802 | "proc-macro2", | ||
1803 | "quote", | ||
1804 | "standback", | ||
1805 | "syn", | ||
1806 | ] | ||
1807 | |||
1808 | [[package]] | ||
1809 | name = "tinyvec" | ||
1810 | version = "0.3.4" | ||
1811 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1812 | checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" | ||
1813 | |||
1814 | [[package]] | ||
1815 | name = "tokio" | ||
1816 | version = "0.2.22" | ||
1817 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1818 | checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" | ||
1819 | dependencies = [ | ||
1820 | "bytes", | ||
1821 | "futures-core", | ||
1822 | "iovec", | ||
1823 | "lazy_static", | ||
1824 | "libc", | ||
1825 | "memchr", | ||
1826 | "mio", | ||
1827 | "mio-uds", | ||
1828 | "pin-project-lite", | ||
1829 | "signal-hook-registry", | ||
1830 | "slab", | ||
1831 | "winapi 0.3.9", | ||
1832 | ] | ||
1833 | |||
1834 | [[package]] | ||
1835 | name = "tokio-util" | ||
1836 | version = "0.3.1" | ||
1837 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1838 | checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" | ||
1839 | dependencies = [ | ||
1840 | "bytes", | ||
1841 | "futures-core", | ||
1842 | "futures-sink", | ||
1843 | "log", | ||
1844 | "pin-project-lite", | ||
1845 | "tokio", | ||
1846 | ] | ||
1847 | |||
1848 | [[package]] | ||
1849 | name = "tracing" | ||
1850 | version = "0.1.19" | ||
1851 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1852 | checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" | ||
1853 | dependencies = [ | ||
1854 | "cfg-if", | ||
1855 | "log", | ||
1856 | "tracing-core", | ||
1857 | ] | ||
1858 | |||
1859 | [[package]] | ||
1860 | name = "tracing-core" | ||
1861 | version = "0.1.16" | ||
1862 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1863 | checksum = "5bcf46c1f1f06aeea2d6b81f3c863d0930a596c86ad1920d4e5bad6dd1d7119a" | ||
1864 | dependencies = [ | ||
1865 | "lazy_static", | ||
1866 | ] | ||
1867 | |||
1868 | [[package]] | ||
1869 | name = "trust-dns-proto" | ||
1870 | version = "0.19.5" | ||
1871 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1872 | checksum = "cdd7061ba6f4d4d9721afedffbfd403f20f39a4301fee1b70d6fcd09cca69f28" | ||
1873 | dependencies = [ | ||
1874 | "async-trait", | ||
1875 | "backtrace", | ||
1876 | "enum-as-inner", | ||
1877 | "futures", | ||
1878 | "idna 0.2.0", | ||
1879 | "lazy_static", | ||
1880 | "log", | ||
1881 | "rand", | ||
1882 | "smallvec", | ||
1883 | "thiserror", | ||
1884 | "tokio", | ||
1885 | "url 2.1.1", | ||
1886 | ] | ||
1887 | |||
1888 | [[package]] | ||
1889 | name = "trust-dns-resolver" | ||
1890 | version = "0.19.5" | ||
1891 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1892 | checksum = "0f23cdfdc3d8300b3c50c9e84302d3bd6d860fb9529af84ace6cf9665f181b77" | ||
1893 | dependencies = [ | ||
1894 | "backtrace", | ||
1895 | "cfg-if", | ||
1896 | "futures", | ||
1897 | "ipconfig", | ||
1898 | "lazy_static", | ||
1899 | "log", | ||
1900 | "lru-cache", | ||
1901 | "resolv-conf", | ||
1902 | "smallvec", | ||
1903 | "thiserror", | ||
1904 | "tokio", | ||
1905 | "trust-dns-proto", | ||
1906 | ] | ||
1907 | |||
1908 | [[package]] | ||
1909 | name = "typenum" | ||
1910 | version = "1.12.0" | ||
1911 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1912 | checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" | ||
1913 | |||
1914 | [[package]] | ||
1915 | name = "unicode-bidi" | ||
1916 | version = "0.3.4" | ||
1917 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1918 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" | ||
1919 | dependencies = [ | ||
1920 | "matches", | ||
1921 | ] | ||
1922 | |||
1923 | [[package]] | ||
1924 | name = "unicode-normalization" | ||
1925 | version = "0.1.13" | ||
1926 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1927 | checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" | ||
1928 | dependencies = [ | ||
1929 | "tinyvec", | ||
1930 | ] | ||
1931 | |||
1932 | [[package]] | ||
1933 | name = "unicode-segmentation" | ||
1934 | version = "1.6.0" | ||
1935 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1936 | checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" | ||
1937 | |||
1938 | [[package]] | ||
1939 | name = "unicode-xid" | ||
1940 | version = "0.2.1" | ||
1941 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1942 | checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" | ||
1943 | |||
1944 | [[package]] | ||
1945 | name = "universal-hash" | ||
1946 | version = "0.4.0" | ||
1947 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1948 | checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" | ||
1949 | dependencies = [ | ||
1950 | "generic-array", | ||
1951 | "subtle", | ||
1952 | ] | ||
1953 | |||
1954 | [[package]] | ||
1955 | name = "url" | ||
1956 | version = "1.7.2" | ||
1957 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1958 | checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" | ||
1959 | dependencies = [ | ||
1960 | "idna 0.1.5", | ||
1961 | "matches", | ||
1962 | "percent-encoding 1.0.1", | ||
1963 | ] | ||
1964 | |||
1965 | [[package]] | ||
1966 | name = "url" | ||
1967 | version = "2.1.1" | ||
1968 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1969 | checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" | ||
1970 | dependencies = [ | ||
1971 | "idna 0.2.0", | ||
1972 | "matches", | ||
1973 | "percent-encoding 2.1.0", | ||
1974 | ] | ||
1975 | |||
1976 | [[package]] | ||
1977 | name = "vcpkg" | ||
1978 | version = "0.2.10" | ||
1979 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1980 | checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" | ||
1981 | |||
1982 | [[package]] | ||
1983 | name = "version_check" | ||
1984 | version = "0.9.2" | ||
1985 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1986 | checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" | ||
1987 | |||
1988 | [[package]] | ||
1989 | name = "wasi" | ||
1990 | version = "0.9.0+wasi-snapshot-preview1" | ||
1991 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1992 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" | ||
1993 | |||
1994 | [[package]] | ||
1995 | name = "wasm-bindgen" | ||
1996 | version = "0.2.68" | ||
1997 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1998 | checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" | ||
1999 | dependencies = [ | ||
2000 | "cfg-if", | ||
2001 | "wasm-bindgen-macro", | ||
2002 | ] | ||
2003 | |||
2004 | [[package]] | ||
2005 | name = "wasm-bindgen-backend" | ||
2006 | version = "0.2.68" | ||
2007 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2008 | checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" | ||
2009 | dependencies = [ | ||
2010 | "bumpalo", | ||
2011 | "lazy_static", | ||
2012 | "log", | ||
2013 | "proc-macro2", | ||
2014 | "quote", | ||
2015 | "syn", | ||
2016 | "wasm-bindgen-shared", | ||
2017 | ] | ||
2018 | |||
2019 | [[package]] | ||
2020 | name = "wasm-bindgen-macro" | ||
2021 | version = "0.2.68" | ||
2022 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2023 | checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" | ||
2024 | dependencies = [ | ||
2025 | "quote", | ||
2026 | "wasm-bindgen-macro-support", | ||
2027 | ] | ||
2028 | |||
2029 | [[package]] | ||
2030 | name = "wasm-bindgen-macro-support" | ||
2031 | version = "0.2.68" | ||
2032 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2033 | checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" | ||
2034 | dependencies = [ | ||
2035 | "proc-macro2", | ||
2036 | "quote", | ||
2037 | "syn", | ||
2038 | "wasm-bindgen-backend", | ||
2039 | "wasm-bindgen-shared", | ||
2040 | ] | ||
2041 | |||
2042 | [[package]] | ||
2043 | name = "wasm-bindgen-shared" | ||
2044 | version = "0.2.68" | ||
2045 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2046 | checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" | ||
2047 | |||
2048 | [[package]] | ||
2049 | name = "widestring" | ||
2050 | version = "0.4.2" | ||
2051 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2052 | checksum = "a763e303c0e0f23b0da40888724762e802a8ffefbc22de4127ef42493c2ea68c" | ||
2053 | |||
2054 | [[package]] | ||
2055 | name = "winapi" | ||
2056 | version = "0.2.8" | ||
2057 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2058 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" | ||
2059 | |||
2060 | [[package]] | ||
2061 | name = "winapi" | ||
2062 | version = "0.3.9" | ||
2063 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2064 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" | ||
2065 | dependencies = [ | ||
2066 | "winapi-i686-pc-windows-gnu", | ||
2067 | "winapi-x86_64-pc-windows-gnu", | ||
2068 | ] | ||
2069 | |||
2070 | [[package]] | ||
2071 | name = "winapi-build" | ||
2072 | version = "0.1.1" | ||
2073 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2074 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" | ||
2075 | |||
2076 | [[package]] | ||
2077 | name = "winapi-i686-pc-windows-gnu" | ||
2078 | version = "0.4.0" | ||
2079 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2080 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | ||
2081 | |||
2082 | [[package]] | ||
2083 | name = "winapi-util" | ||
2084 | version = "0.1.5" | ||
2085 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2086 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" | ||
2087 | dependencies = [ | ||
2088 | "winapi 0.3.9", | ||
2089 | ] | ||
2090 | |||
2091 | [[package]] | ||
2092 | name = "winapi-x86_64-pc-windows-gnu" | ||
2093 | version = "0.4.0" | ||
2094 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2095 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | ||
2096 | |||
2097 | [[package]] | ||
2098 | name = "winreg" | ||
2099 | version = "0.6.2" | ||
2100 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2101 | checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" | ||
2102 | dependencies = [ | ||
2103 | "winapi 0.3.9", | ||
2104 | ] | ||
2105 | |||
2106 | [[package]] | ||
2107 | name = "ws2_32-sys" | ||
2108 | version = "0.2.1" | ||
2109 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2110 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" | ||
2111 | dependencies = [ | ||
2112 | "winapi 0.2.8", | ||
2113 | "winapi-build", | ||
2114 | ] | ||
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..b7f1012 --- /dev/null +++ b/Cargo.toml | |||
@@ -0,0 +1,24 @@ | |||
1 | [package] | ||
2 | name = "furby" | ||
3 | version = "0.1.0" | ||
4 | authors = ["Akshay <[email protected]>"] | ||
5 | edition = "2018" | ||
6 | |||
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
8 | |||
9 | [dependencies] | ||
10 | actix-web = "3" | ||
11 | bcrypt = "0.8" | ||
12 | serde = "1.0" | ||
13 | serde_derive = "1.0" | ||
14 | serde_json = "1.0" | ||
15 | log = "0.4" | ||
16 | pretty_env_logger = "0.4" | ||
17 | actix-identity = "0.3.1" | ||
18 | actix-cors = "0.4.0" | ||
19 | rand = "0.7" | ||
20 | |||
21 | [dependencies.diesel] | ||
22 | version = "1.4" | ||
23 | features = ["mysql", "r2d2"] | ||
24 | default-features = false | ||
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..11d6ca7 --- /dev/null +++ b/default.nix | |||
@@ -0,0 +1,18 @@ | |||
1 | let | ||
2 | sources = import ./nix/sources.nix; | ||
3 | nixpkgs-mozilla = import sources.nixpkgs-mozilla; | ||
4 | pkgs = import sources.nixpkgs { | ||
5 | overlays = | ||
6 | [ | ||
7 | nixpkgs-mozilla | ||
8 | (self: super: | ||
9 | { | ||
10 | rustc = self.latest.rustChannels.nightly.rust; | ||
11 | cargo = self.latest.rustChannels.nightly.rust; | ||
12 | } | ||
13 | ) | ||
14 | ]; | ||
15 | }; | ||
16 | naersk = pkgs.callPackage sources.naersk {}; | ||
17 | in | ||
18 | naersk.buildPackage ./. | ||
diff --git a/diesel.toml b/diesel.toml new file mode 100644 index 0000000..92267c8 --- /dev/null +++ b/diesel.toml | |||
@@ -0,0 +1,5 @@ | |||
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" | ||
diff --git a/migrations/.gitkeep b/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/migrations/.gitkeep | |||
diff --git a/migrations/2020-09-22-104623_create_users/down.sql b/migrations/2020-09-22-104623_create_users/down.sql new file mode 100644 index 0000000..2c92cb7 --- /dev/null +++ b/migrations/2020-09-22-104623_create_users/down.sql | |||
@@ -0,0 +1,3 @@ | |||
1 | -- This file should undo anything in `up.sql` | ||
2 | |||
3 | DROP TABLE members; | ||
diff --git a/migrations/2020-09-22-104623_create_users/up.sql b/migrations/2020-09-22-104623_create_users/up.sql new file mode 100644 index 0000000..dfd27d9 --- /dev/null +++ b/migrations/2020-09-22-104623_create_users/up.sql | |||
@@ -0,0 +1,8 @@ | |||
1 | -- Your SQL goes here | ||
2 | CREATE TABLE members ( | ||
3 | id INTEGER PRIMARY KEY AUTO_INCREMENT, | ||
4 | username VARCHAR(255) NOT NULL UNIQUE, | ||
5 | password VARCHAR(255) NOT NULL, | ||
6 | phone_number VARCHAR(10) NOT NULL, | ||
7 | email_id VARCHAR(255) NOT NULL | ||
8 | ) | ||
diff --git a/nix/sources.json b/nix/sources.json new file mode 100644 index 0000000..e2299f7 --- /dev/null +++ b/nix/sources.json | |||
@@ -0,0 +1,50 @@ | |||
1 | { | ||
2 | "naersk": { | ||
3 | "branch": "master", | ||
4 | "description": "Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly.", | ||
5 | "homepage": "", | ||
6 | "owner": "nmattia", | ||
7 | "repo": "naersk", | ||
8 | "rev": "529e910a3f423a8211f8739290014b754b2555b6", | ||
9 | "sha256": "0bcy9nmyaan5jvp0wg80wkizc9j166ns685rdr1kbhkvdpywv46y", | ||
10 | "type": "tarball", | ||
11 | "url": "https://github.com/nmattia/naersk/archive/529e910a3f423a8211f8739290014b754b2555b6.tar.gz", | ||
12 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
13 | }, | ||
14 | "niv": { | ||
15 | "branch": "master", | ||
16 | "description": "Easy dependency management for Nix projects", | ||
17 | "homepage": "https://github.com/nmattia/niv", | ||
18 | "owner": "nmattia", | ||
19 | "repo": "niv", | ||
20 | "rev": "29ddaaf4e099c3ac0647f5b652469dfc79cd3b53", | ||
21 | "sha256": "1va6myp07gkspgxfch8z3rs9nyvys6jmgzkys6a2c4j09qxp1bs0", | ||
22 | "type": "tarball", | ||
23 | "url": "https://github.com/nmattia/niv/archive/29ddaaf4e099c3ac0647f5b652469dfc79cd3b53.tar.gz", | ||
24 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
25 | }, | ||
26 | "nixpkgs": { | ||
27 | "branch": "release-20.03", | ||
28 | "description": "Nix Packages collection", | ||
29 | "homepage": null, | ||
30 | "owner": "NixOS", | ||
31 | "repo": "nixpkgs", | ||
32 | "rev": "13a15f262a2b348d6aa976017f2cd88e3a18405d", | ||
33 | "sha256": "1xcfwqhvs8ai45dahlmqvvkhjf0gdk7nlnxrf7wvmzc50l90akgn", | ||
34 | "type": "tarball", | ||
35 | "url": "https://github.com/NixOS/nixpkgs/archive/13a15f262a2b348d6aa976017f2cd88e3a18405d.tar.gz", | ||
36 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
37 | }, | ||
38 | "nixpkgs-mozilla": { | ||
39 | "branch": "master", | ||
40 | "description": "mozilla related nixpkgs (extends nixos/nixpkgs repo)", | ||
41 | "homepage": null, | ||
42 | "owner": "mozilla", | ||
43 | "repo": "nixpkgs-mozilla", | ||
44 | "rev": "efda5b357451dbb0431f983cca679ae3cd9b9829", | ||
45 | "sha256": "11wqrg86g3qva67vnk81ynvqyfj0zxk83cbrf0p9hsvxiwxs8469", | ||
46 | "type": "tarball", | ||
47 | "url": "https://github.com/mozilla/nixpkgs-mozilla/archive/efda5b357451dbb0431f983cca679ae3cd9b9829.tar.gz", | ||
48 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
49 | } | ||
50 | } | ||
diff --git a/nix/sources.nix b/nix/sources.nix new file mode 100644 index 0000000..b64b8f8 --- /dev/null +++ b/nix/sources.nix | |||
@@ -0,0 +1,148 @@ | |||
1 | # This file has been generated by Niv. | ||
2 | |||
3 | let | ||
4 | |||
5 | # | ||
6 | # The fetchers. fetch_<type> fetches specs of type <type>. | ||
7 | # | ||
8 | |||
9 | fetch_file = pkgs: spec: | ||
10 | if spec.builtin or true then | ||
11 | builtins_fetchurl { inherit (spec) url sha256; } | ||
12 | else | ||
13 | pkgs.fetchurl { inherit (spec) url sha256; }; | ||
14 | |||
15 | fetch_tarball = pkgs: name: spec: | ||
16 | let | ||
17 | ok = str: ! builtins.isNull (builtins.match "[a-zA-Z0-9+-._?=]" str); | ||
18 | # sanitize the name, though nix will still fail if name starts with period | ||
19 | name' = stringAsChars (x: if ! ok x then "-" else x) "${name}-src"; | ||
20 | in | ||
21 | if spec.builtin or true then | ||
22 | builtins_fetchTarball { name = name'; inherit (spec) url sha256; } | ||
23 | else | ||
24 | pkgs.fetchzip { name = name'; inherit (spec) url sha256; }; | ||
25 | |||
26 | fetch_git = spec: | ||
27 | builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; }; | ||
28 | |||
29 | fetch_local = spec: spec.path; | ||
30 | |||
31 | fetch_builtin-tarball = name: throw | ||
32 | ''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`. | ||
33 | $ niv modify ${name} -a type=tarball -a builtin=true''; | ||
34 | |||
35 | fetch_builtin-url = name: throw | ||
36 | ''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`. | ||
37 | $ niv modify ${name} -a type=file -a builtin=true''; | ||
38 | |||
39 | # | ||
40 | # Various helpers | ||
41 | # | ||
42 | |||
43 | # The set of packages used when specs are fetched using non-builtins. | ||
44 | mkPkgs = sources: | ||
45 | let | ||
46 | sourcesNixpkgs = | ||
47 | import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {}; | ||
48 | hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath; | ||
49 | hasThisAsNixpkgsPath = <nixpkgs> == ./.; | ||
50 | in | ||
51 | if builtins.hasAttr "nixpkgs" sources | ||
52 | then sourcesNixpkgs | ||
53 | else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then | ||
54 | import <nixpkgs> {} | ||
55 | else | ||
56 | abort | ||
57 | '' | ||
58 | Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or | ||
59 | add a package called "nixpkgs" to your sources.json. | ||
60 | ''; | ||
61 | |||
62 | # The actual fetching function. | ||
63 | fetch = pkgs: name: spec: | ||
64 | |||
65 | if ! builtins.hasAttr "type" spec then | ||
66 | abort "ERROR: niv spec ${name} does not have a 'type' attribute" | ||
67 | else if spec.type == "file" then fetch_file pkgs spec | ||
68 | else if spec.type == "tarball" then fetch_tarball pkgs name spec | ||
69 | else if spec.type == "git" then fetch_git spec | ||
70 | else if spec.type == "local" then fetch_local spec | ||
71 | else if spec.type == "builtin-tarball" then fetch_builtin-tarball name | ||
72 | else if spec.type == "builtin-url" then fetch_builtin-url name | ||
73 | else | ||
74 | abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}"; | ||
75 | |||
76 | # If the environment variable NIV_OVERRIDE_${name} is set, then use | ||
77 | # the path directly as opposed to the fetched source. | ||
78 | replace = name: drv: | ||
79 | let | ||
80 | saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name; | ||
81 | ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}"; | ||
82 | in | ||
83 | if ersatz == "" then drv else ersatz; | ||
84 | |||
85 | # Ports of functions for older nix versions | ||
86 | |||
87 | # a Nix version of mapAttrs if the built-in doesn't exist | ||
88 | mapAttrs = builtins.mapAttrs or ( | ||
89 | f: set: with builtins; | ||
90 | listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set)) | ||
91 | ); | ||
92 | |||
93 | # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 | ||
94 | range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1); | ||
95 | |||
96 | # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 | ||
97 | stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); | ||
98 | |||
99 | # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 | ||
100 | stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); | ||
101 | concatStrings = builtins.concatStringsSep ""; | ||
102 | |||
103 | # fetchTarball version that is compatible between all the versions of Nix | ||
104 | builtins_fetchTarball = { url, name, sha256 }@attrs: | ||
105 | let | ||
106 | inherit (builtins) lessThan nixVersion fetchTarball; | ||
107 | in | ||
108 | if lessThan nixVersion "1.12" then | ||
109 | fetchTarball { inherit name url; } | ||
110 | else | ||
111 | fetchTarball attrs; | ||
112 | |||
113 | # fetchurl version that is compatible between all the versions of Nix | ||
114 | builtins_fetchurl = { url, sha256 }@attrs: | ||
115 | let | ||
116 | inherit (builtins) lessThan nixVersion fetchurl; | ||
117 | in | ||
118 | if lessThan nixVersion "1.12" then | ||
119 | fetchurl { inherit url; } | ||
120 | else | ||
121 | fetchurl attrs; | ||
122 | |||
123 | # Create the final "sources" from the config | ||
124 | mkSources = config: | ||
125 | mapAttrs ( | ||
126 | name: spec: | ||
127 | if builtins.hasAttr "outPath" spec | ||
128 | then abort | ||
129 | "The values in sources.json should not have an 'outPath' attribute" | ||
130 | else | ||
131 | spec // { outPath = replace name (fetch config.pkgs name spec); } | ||
132 | ) config.sources; | ||
133 | |||
134 | # The "config" used by the fetchers | ||
135 | mkConfig = | ||
136 | { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null | ||
137 | , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile) | ||
138 | , pkgs ? mkPkgs sources | ||
139 | }: rec { | ||
140 | # The sources, i.e. the attribute set of spec name to spec | ||
141 | inherit sources; | ||
142 | |||
143 | # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers | ||
144 | inherit pkgs; | ||
145 | }; | ||
146 | |||
147 | in | ||
148 | mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } | ||
@@ -0,0 +1 @@ | |||
/nix/store/kmgq2yng4785g1b6l06agg8jk5hwykxi-actix-tests-0.1.0 \ No newline at end of file | |||
diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..be4296e --- /dev/null +++ b/rustfmt.toml | |||
@@ -0,0 +1,15 @@ | |||
1 | max_width = 80 | ||
2 | hard_tabs = false | ||
3 | tab_spaces = 4 | ||
4 | newline_style = "Auto" | ||
5 | use_small_heuristics = "Default" | ||
6 | reorder_imports = true | ||
7 | reorder_modules = true | ||
8 | remove_nested_parens = true | ||
9 | fn_args_layout = "Tall" | ||
10 | edition = "2018" | ||
11 | merge_derives = true | ||
12 | use_try_shorthand = false | ||
13 | use_field_init_shorthand = false | ||
14 | force_explicit_abi = true | ||
15 | |||
diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5779d87 --- /dev/null +++ b/shell.nix | |||
@@ -0,0 +1,31 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: | ||
2 | |||
3 | let | ||
4 | sources = import ./nix/sources.nix; | ||
5 | nixpkgs-mozilla = import sources.nixpkgs-mozilla; | ||
6 | pkgs = import sources.nixpkgs { | ||
7 | overlays = | ||
8 | [ | ||
9 | nixpkgs-mozilla | ||
10 | (self: super: | ||
11 | { | ||
12 | rustc = self.latest.rustChannels.nightly.rust; | ||
13 | cargo = self.latest.rustChannels.nightly.rust; | ||
14 | } | ||
15 | ) | ||
16 | ]; | ||
17 | }; | ||
18 | in | ||
19 | pkgs.mkShell { | ||
20 | buildInputs = with pkgs; [ | ||
21 | cargo | ||
22 | rustc | ||
23 | rustfmt | ||
24 | pkg-config | ||
25 | openssl | ||
26 | httpie | ||
27 | curl | ||
28 | diesel-cli | ||
29 | libmysqlclient | ||
30 | ]; | ||
31 | } | ||
diff --git a/src/bin/server.rs b/src/bin/server.rs new file mode 100644 index 0000000..eb290db --- /dev/null +++ b/src/bin/server.rs | |||
@@ -0,0 +1,44 @@ | |||
1 | use actix_cors::Cors; | ||
2 | use actix_identity::{CookieIdentityPolicy, IdentityService}; | ||
3 | use actix_web::middleware; | ||
4 | use actix_web::{web, App, HttpServer}; | ||
5 | use diesel::r2d2::{ConnectionManager, Pool}; | ||
6 | use diesel::MysqlConnection; | ||
7 | use furby::handlers::smoke::manual_hello; | ||
8 | use furby::handlers::users; | ||
9 | use rand::Rng; | ||
10 | |||
11 | #[actix_web::main] | ||
12 | async fn main() -> std::io::Result<()> { | ||
13 | pretty_env_logger::init(); | ||
14 | |||
15 | let db_url = env!("DATABASE_URL"); | ||
16 | let manager = ConnectionManager::<MysqlConnection>::new(db_url); | ||
17 | let pool = Pool::builder() | ||
18 | .build(manager) | ||
19 | .expect("Failed to create pool."); | ||
20 | |||
21 | let private_key = rand::thread_rng().gen::<[u8; 32]>(); | ||
22 | HttpServer::new(move || { | ||
23 | App::new() | ||
24 | .wrap(IdentityService::new( | ||
25 | CookieIdentityPolicy::new(&private_key) | ||
26 | .name("user-login") | ||
27 | .secure(false), | ||
28 | )) | ||
29 | .wrap(Cors::new().supports_credentials().finish()) | ||
30 | .wrap(middleware::Logger::default()) | ||
31 | .data(pool.clone()) | ||
32 | .service( | ||
33 | web::scope("/user") | ||
34 | .route("/existing", web::post().to(users::name_exists)) | ||
35 | .route("/login", web::post().to(users::login)) | ||
36 | .route("/{uname}", web::get().to(users::user_details)) | ||
37 | .route("/new", web::post().to(users::new_user)), | ||
38 | ) | ||
39 | .route("/hey", web::get().to(manual_hello)) | ||
40 | }) | ||
41 | .bind("127.0.0.1:7878")? | ||
42 | .run() | ||
43 | .await | ||
44 | } | ||
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs new file mode 100644 index 0000000..65d3519 --- /dev/null +++ b/src/handlers/mod.rs | |||
@@ -0,0 +1,2 @@ | |||
1 | pub mod smoke; | ||
2 | pub mod users; | ||
diff --git a/src/handlers/smoke.rs b/src/handlers/smoke.rs new file mode 100644 index 0000000..d0a1038 --- /dev/null +++ b/src/handlers/smoke.rs | |||
@@ -0,0 +1,15 @@ | |||
1 | use actix_web::{get, post, HttpResponse, Responder}; | ||
2 | |||
3 | #[get("/")] | ||
4 | async fn hello() -> impl Responder { | ||
5 | HttpResponse::Ok().body("Hello world!") | ||
6 | } | ||
7 | |||
8 | #[post("/echo")] | ||
9 | async fn echo(req_body: String) -> impl Responder { | ||
10 | HttpResponse::Ok().body(req_body) | ||
11 | } | ||
12 | |||
13 | pub async fn manual_hello() -> impl Responder { | ||
14 | HttpResponse::Ok().body("Hey there!") | ||
15 | } | ||
diff --git a/src/handlers/users.rs b/src/handlers/users.rs new file mode 100644 index 0000000..e6b0415 --- /dev/null +++ b/src/handlers/users.rs | |||
@@ -0,0 +1,106 @@ | |||
1 | use crate::models::{Member, NewMember}; | ||
2 | use crate::schema::members::dsl::*; | ||
3 | use crate::TPool; | ||
4 | |||
5 | use actix_identity::Identity; | ||
6 | use actix_web::{web, HttpResponse, Responder}; | ||
7 | use bcrypt::{hash, verify, DEFAULT_COST}; | ||
8 | use diesel::prelude::*; | ||
9 | use log::{error, info}; | ||
10 | use serde::Deserialize; | ||
11 | |||
12 | pub async fn new_user( | ||
13 | pool: web::Data<TPool>, | ||
14 | item: web::Json<NewMember>, | ||
15 | ) -> impl Responder { | ||
16 | let conn = pool.get().unwrap(); | ||
17 | let hashed_item = NewMember { | ||
18 | password: hash(&item.password, DEFAULT_COST).unwrap(), | ||
19 | ..(item.into_inner()) | ||
20 | }; | ||
21 | diesel::insert_into(members) | ||
22 | .values(hashed_item) | ||
23 | .execute(&conn) | ||
24 | .expect("Coundn't connect to DB"); | ||
25 | HttpResponse::Ok().body("Inserted successfully!") | ||
26 | } | ||
27 | |||
28 | pub async fn name_exists( | ||
29 | pool: web::Data<TPool>, | ||
30 | item: String, | ||
31 | ) -> impl Responder { | ||
32 | let conn = pool.get().unwrap(); | ||
33 | info!("target: {:?}", item); | ||
34 | if (members | ||
35 | .filter(username.eq(&item)) | ||
36 | .limit(1) | ||
37 | .load::<Member>(&conn) | ||
38 | .expect("Coundn't connect to DB")) | ||
39 | .len() | ||
40 | > 0 | ||
41 | { | ||
42 | HttpResponse::Ok().body("true") | ||
43 | } else { | ||
44 | HttpResponse::Ok().body("false") | ||
45 | } | ||
46 | } | ||
47 | |||
48 | #[derive(Deserialize)] | ||
49 | pub struct Login { | ||
50 | username: String, | ||
51 | password: String, | ||
52 | } | ||
53 | |||
54 | pub async fn login( | ||
55 | pool: web::Data<TPool>, | ||
56 | cookie: Identity, | ||
57 | login_details: web::Json<Login>, | ||
58 | ) -> impl Responder { | ||
59 | info!("Login hit"); | ||
60 | let conn = pool.get().unwrap(); | ||
61 | let entered_pass = &login_details.password; | ||
62 | let selected_user = members | ||
63 | .filter(username.eq(&login_details.username)) | ||
64 | .limit(1) | ||
65 | .first::<Member>(&conn) | ||
66 | .expect("Couldn't connect to DB"); | ||
67 | let hashed_pass = selected_user.password; | ||
68 | if verify(entered_pass, &hashed_pass).unwrap() { | ||
69 | cookie.remember(login_details.username.clone()); | ||
70 | info!( | ||
71 | "Successful login: {} {}", | ||
72 | selected_user.username, selected_user.email_id | ||
73 | ); | ||
74 | HttpResponse::Ok().finish() | ||
75 | } else { | ||
76 | HttpResponse::Unauthorized().finish() | ||
77 | } | ||
78 | } | ||
79 | |||
80 | pub async fn logout(cookie: Identity) -> impl Responder { | ||
81 | cookie.forget(); | ||
82 | HttpResponse::Found().header("location", "/").finish() | ||
83 | } | ||
84 | |||
85 | pub async fn user_details( | ||
86 | uname: web::Path<String>, | ||
87 | pool: web::Data<TPool>, | ||
88 | ) -> impl Responder { | ||
89 | let conn = pool.get().unwrap(); | ||
90 | let uname = uname.into_inner(); | ||
91 | info!("Fetching info for: \"{}\"", uname); | ||
92 | let selected_user = members | ||
93 | .filter(username.eq(&uname)) | ||
94 | .limit(1) | ||
95 | .first::<Member>(&conn); | ||
96 | match selected_user { | ||
97 | Ok(m) => { | ||
98 | info!("Found user: {}", uname); | ||
99 | HttpResponse::Ok().json(m) | ||
100 | } | ||
101 | Err(_) => { | ||
102 | error!("User not found: {}", uname); | ||
103 | HttpResponse::NotFound().finish() | ||
104 | } | ||
105 | } | ||
106 | } | ||
diff --git a/src/handlers/users.rs.html b/src/handlers/users.rs.html new file mode 100644 index 0000000..a233b04 --- /dev/null +++ b/src/handlers/users.rs.html | |||
@@ -0,0 +1,137 @@ | |||
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
5 | <title>~/code/rust/actix-tests/src/handlers/users.rs.html</title> | ||
6 | <meta name="Generator" content="Vim/8.0"> | ||
7 | <meta name="plugin-version" content="vim8.1_v1"> | ||
8 | <meta name="syntax" content="rust"> | ||
9 | <meta name="settings" content="use_css,no_foldcolumn,expand_tabs,prevent_copy="> | ||
10 | <meta name="colorscheme" content="plain"> | ||
11 | <style type="text/css"> | ||
12 | <!-- | ||
13 | pre { font-family: monospace; color: #c0c0c0; background-color: #000000; } | ||
14 | body { font-family: monospace; color: #c0c0c0; background-color: #000000; } | ||
15 | * { font-size: 1em; } | ||
16 | .Statement { color: #c0c0c0; background-color: #000000; padding-bottom: 1px; font-weight: bold; } | ||
17 | .Normal { color: #c0c0c0; background-color: #000000; padding-bottom: 1px; } | ||
18 | .Function { color: #c0c0c0; font-weight: bold; } | ||
19 | .secondAccent { color: #c000c0; background-color: #000000; padding-bottom: 1px; } | ||
20 | .Noise { color: #8080ff; background-color: #000000; padding-bottom: 1px; } | ||
21 | .rustModPath { color: #ff40ff; background-color: #000000; padding-bottom: 1px; } | ||
22 | .Constant { color: #008080; background-color: #000000; padding-bottom: 1px; } | ||
23 | .StatusLine { color: #808080; background-color: #000000; padding-bottom: 1px; } | ||
24 | --> | ||
25 | </style> | ||
26 | </head> | ||
27 | <body> | ||
28 | <pre id='vimCodeElement'> | ||
29 | <span class="Noise">use</span> <span class="rustModPath">crate</span><span class="StatusLine">::</span><span class="rustModPath">models</span><span class="StatusLine">::</span>{Member, NewMember}; | ||
30 | <span class="Noise">use</span> <span class="rustModPath">crate</span><span class="StatusLine">::</span><span class="rustModPath">schema</span><span class="StatusLine">::</span><span class="rustModPath">members</span><span class="StatusLine">::</span><span class="rustModPath">dsl</span><span class="StatusLine">::</span><span class="Statement">*</span>; | ||
31 | <span class="Noise">use</span> <span class="rustModPath">crate</span><span class="StatusLine">::</span>TPool; | ||
32 | |||
33 | <span class="Noise">use</span> <span class="rustModPath">actix_identity</span><span class="StatusLine">::</span>Identity; | ||
34 | <span class="Noise">use</span> <span class="rustModPath">actix_web</span><span class="StatusLine">::</span>{web, HttpResponse, Responder}; | ||
35 | <span class="Noise">use</span> <span class="rustModPath">bcrypt</span><span class="StatusLine">::</span>{hash, verify, DEFAULT_COST}; | ||
36 | <span class="Noise">use</span> <span class="rustModPath">diesel</span><span class="StatusLine">::</span><span class="rustModPath">prelude</span><span class="StatusLine">::</span><span class="Statement">*</span>; | ||
37 | <span class="Noise">use</span> <span class="rustModPath">log</span><span class="StatusLine">::</span>{error, info}; | ||
38 | <span class="Noise">use</span> <span class="rustModPath">serde</span><span class="StatusLine">::</span>Deserialize; | ||
39 | |||
40 | <span class="Noise">pub</span> <span class="Noise">async</span> <span class="Noise">fn</span> <span class="Function">new_user</span>( | ||
41 | pool: <span class="rustModPath">web</span><span class="StatusLine">::</span>Data<span class="Noise"><</span>TPool<span class="Noise">></span>, | ||
42 | item: <span class="rustModPath">web</span><span class="StatusLine">::</span>Json<span class="Noise"><</span>NewMember<span class="Noise">></span>, | ||
43 | ) <span class="Noise">-></span> <span class="Noise">impl</span> Responder { | ||
44 | <span class="Noise">let</span> conn <span class="Noise">=</span> pool.<span class="Function">get</span>().<span class="Function">unwrap</span>(); | ||
45 | <span class="Noise">let</span> hashed_item <span class="Noise">=</span> NewMember { | ||
46 | password: <span class="Function">hash</span>(<span class="Statement">&</span>item.password, DEFAULT_COST).<span class="Function">unwrap</span>(), | ||
47 | ..(item.<span class="Function">into_inner</span>()) | ||
48 | }; | ||
49 | <span class="rustModPath">diesel</span><span class="StatusLine">::</span><span class="Function">insert_into</span>(members) | ||
50 | .<span class="Function">values</span>(hashed_item) | ||
51 | .<span class="Function">execute</span>(<span class="Statement">&</span>conn) | ||
52 | .<span class="Function">expect</span>(<span class="Constant">"</span><span class="Constant">Coundn't connect to DB</span><span class="Constant">"</span>); | ||
53 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Constant">Ok</span>().<span class="Function">body</span>(<span class="Constant">"</span><span class="Constant">Inserted successfully!</span><span class="Constant">"</span>) | ||
54 | } | ||
55 | |||
56 | <span class="Noise">pub</span> <span class="Noise">async</span> <span class="Noise">fn</span> <span class="Function">name_exists</span>( | ||
57 | pool: <span class="rustModPath">web</span><span class="StatusLine">::</span>Data<span class="Noise"><</span>TPool<span class="Noise">></span>, | ||
58 | item: <span class="Normal">String</span>, | ||
59 | ) <span class="Noise">-></span> <span class="Noise">impl</span> Responder { | ||
60 | <span class="Noise">let</span> conn <span class="Noise">=</span> pool.<span class="Function">get</span>().<span class="Function">unwrap</span>(); | ||
61 | <span class="secondAccent">info!</span>(<span class="Constant">"</span><span class="Constant">target: {:?}</span><span class="Constant">"</span>, item); | ||
62 | <span class="Statement">if</span> (members | ||
63 | .<span class="Function">filter</span>(username.<span class="Function">eq</span>(<span class="Statement">&</span>item)) | ||
64 | .<span class="Function">limit</span>(<span class="Constant">1</span>) | ||
65 | .<span class="Function">load</span><span class="StatusLine">::</span><span class="Noise"><</span>Member<span class="Noise">></span>(<span class="Statement">&</span>conn) | ||
66 | .<span class="Function">expect</span>(<span class="Constant">"</span><span class="Constant">Coundn't connect to DB</span><span class="Constant">"</span>)) | ||
67 | .<span class="Function">len</span>() | ||
68 | <span class="Noise">></span> <span class="Constant">0</span> | ||
69 | { | ||
70 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Constant">Ok</span>().<span class="Function">body</span>(<span class="Constant">"</span><span class="Constant">true</span><span class="Constant">"</span>) | ||
71 | } <span class="Statement">else</span> { | ||
72 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Constant">Ok</span>().<span class="Function">body</span>(<span class="Constant">"</span><span class="Constant">false</span><span class="Constant">"</span>) | ||
73 | } | ||
74 | } | ||
75 | |||
76 | <span class="secondAccent">#[</span><span class="secondAccent">derive(Deserialize)</span><span class="secondAccent">]</span> | ||
77 | <span class="Noise">pub</span> <span class="Statement">struct</span> <span class="Normal">Login</span> { | ||
78 | username: <span class="Normal">String</span>, | ||
79 | password: <span class="Normal">String</span>, | ||
80 | } | ||
81 | |||
82 | <span class="Noise">pub</span> <span class="Noise">async</span> <span class="Noise">fn</span> <span class="Function">login</span>( | ||
83 | pool: <span class="rustModPath">web</span><span class="StatusLine">::</span>Data<span class="Noise"><</span>TPool<span class="Noise">></span>, | ||
84 | cookie: Identity, | ||
85 | login_details: <span class="rustModPath">web</span><span class="StatusLine">::</span>Form<span class="Noise"><</span>Login<span class="Noise">></span>, | ||
86 | ) <span class="Noise">-></span> <span class="Noise">impl</span> Responder { | ||
87 | <span class="Noise">let</span> conn <span class="Noise">=</span> pool.<span class="Function">get</span>().<span class="Function">unwrap</span>(); | ||
88 | <span class="Noise">let</span> entered_pass <span class="Noise">=</span> <span class="Statement">&</span>login_details.password; | ||
89 | <span class="Noise">let</span> selected_user <span class="Noise">=</span> members | ||
90 | .<span class="Function">filter</span>(username.<span class="Function">eq</span>(<span class="Statement">&</span>login_details.username)) | ||
91 | .<span class="Function">limit</span>(<span class="Constant">1</span>) | ||
92 | .<span class="Function">first</span><span class="StatusLine">::</span><span class="Noise"><</span>Member<span class="Noise">></span>(<span class="Statement">&</span>conn) | ||
93 | .<span class="Function">expect</span>(<span class="Constant">"</span><span class="Constant">Couldn't connect to DB</span><span class="Constant">"</span>); | ||
94 | <span class="Noise">let</span> hashed_pass <span class="Noise">=</span> selected_user.password; | ||
95 | <span class="Statement">if</span> <span class="Function">verify</span>(entered_pass, <span class="Statement">&</span>hashed_pass).<span class="Function">unwrap</span>() { | ||
96 | cookie.<span class="Function">remember</span>(login_details.username.<span class="Function">clone</span>()); | ||
97 | <span class="secondAccent">info!</span>( | ||
98 | <span class="Constant">"</span><span class="Constant">Successful login: {} {}</span><span class="Constant">"</span>, | ||
99 | selected_user.username, selected_user.email_id | ||
100 | ); | ||
101 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Function">Found</span>().<span class="Function">header</span>(<span class="Constant">"</span><span class="Constant">location</span><span class="Constant">"</span>, <span class="Constant">"</span><span class="Constant">/</span><span class="Constant">"</span>).<span class="Function">finish</span>() | ||
102 | } <span class="Statement">else</span> { | ||
103 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Function">Unauthorized</span>().<span class="Function">finish</span>() | ||
104 | } | ||
105 | } | ||
106 | |||
107 | <span class="Noise">pub</span> <span class="Noise">async</span> <span class="Noise">fn</span> <span class="Function">logout</span>(cookie: Identity) <span class="Noise">-></span> <span class="Noise">impl</span> Responder { | ||
108 | cookie.<span class="Function">forget</span>(); | ||
109 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Function">Found</span>().<span class="Function">header</span>(<span class="Constant">"</span><span class="Constant">location</span><span class="Constant">"</span>, <span class="Constant">"</span><span class="Constant">/</span><span class="Constant">"</span>).<span class="Function">finish</span>() | ||
110 | } | ||
111 | |||
112 | <span class="Noise">pub</span> <span class="Noise">async</span> <span class="Noise">fn</span> <span class="Function">user_details</span>( | ||
113 | uname: <span class="rustModPath">web</span><span class="StatusLine">::</span>Path<span class="Noise"><</span><span class="Normal">String</span><span class="Noise">></span>, | ||
114 | pool: <span class="rustModPath">web</span><span class="StatusLine">::</span>Data<span class="Noise"><</span>TPool<span class="Noise">></span>, | ||
115 | ) <span class="Noise">-></span> <span class="Noise">impl</span> Responder { | ||
116 | <span class="Noise">let</span> conn <span class="Noise">=</span> pool.<span class="Function">get</span>().<span class="Function">unwrap</span>(); | ||
117 | <span class="Noise">let</span> uname <span class="Noise">=</span> uname.<span class="Function">into_inner</span>(); | ||
118 | <span class="secondAccent">info!</span>(<span class="Constant">"</span><span class="Constant">Fetching info for: </span><span class="StatusLine">\"</span><span class="Constant">{}</span><span class="StatusLine">\"</span><span class="Constant">"</span>, uname); | ||
119 | <span class="Noise">let</span> selected_user <span class="Noise">=</span> members | ||
120 | .<span class="Function">filter</span>(username.<span class="Function">eq</span>(<span class="Statement">&</span>uname)) | ||
121 | .<span class="Function">limit</span>(<span class="Constant">1</span>) | ||
122 | .<span class="Function">first</span><span class="StatusLine">::</span><span class="Noise"><</span>Member<span class="Noise">></span>(<span class="Statement">&</span>conn); | ||
123 | <span class="Statement">match</span> selected_user { | ||
124 | <span class="Constant">Ok</span>(m) <span class="Noise">=></span> { | ||
125 | <span class="secondAccent">info!</span>(<span class="Constant">"</span><span class="Constant">Found user: {}</span><span class="Constant">"</span>, uname); | ||
126 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Constant">Ok</span>().<span class="Function">json</span>(m) | ||
127 | } | ||
128 | <span class="Constant">Err</span>(_) <span class="Noise">=></span> { | ||
129 | <span class="secondAccent">error!</span>(<span class="Constant">"</span><span class="Constant">User not found: {}</span><span class="Constant">"</span>, uname); | ||
130 | <span class="rustModPath">HttpResponse</span><span class="StatusLine">::</span><span class="Function">NotFound</span>().<span class="Function">finish</span>() | ||
131 | } | ||
132 | } | ||
133 | } | ||
134 | </pre> | ||
135 | </body> | ||
136 | </html> | ||
137 | <!-- vim: set foldmethod=manual : --> | ||
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..d956a3f --- /dev/null +++ b/src/lib.rs | |||
@@ -0,0 +1,10 @@ | |||
1 | #[macro_use] | ||
2 | extern crate diesel; | ||
3 | |||
4 | pub mod handlers; | ||
5 | pub mod models; | ||
6 | pub mod schema; | ||
7 | |||
8 | use diesel::r2d2::{self, ConnectionManager}; | ||
9 | use diesel::MysqlConnection; | ||
10 | pub type TPool = r2d2::Pool<ConnectionManager<MysqlConnection>>; | ||
diff --git a/src/models.rs b/src/models.rs new file mode 100644 index 0000000..ce28ac8 --- /dev/null +++ b/src/models.rs | |||
@@ -0,0 +1,21 @@ | |||
1 | use super::schema::members; | ||
2 | use diesel::{Insertable, Queryable}; | ||
3 | use serde::{Deserialize, Serialize}; | ||
4 | |||
5 | #[derive(Queryable, Serialize)] | ||
6 | pub struct Member { | ||
7 | pub id: i32, | ||
8 | pub username: String, | ||
9 | pub password: String, | ||
10 | pub phone_number: String, | ||
11 | pub email_id: String, | ||
12 | } | ||
13 | |||
14 | #[derive(Insertable, Deserialize)] | ||
15 | #[table_name = "members"] | ||
16 | pub struct NewMember { | ||
17 | pub username: String, | ||
18 | pub password: String, | ||
19 | pub phone_number: String, | ||
20 | pub email_id: String, | ||
21 | } | ||
diff --git a/src/schema.rs b/src/schema.rs new file mode 100644 index 0000000..8ed6e58 --- /dev/null +++ b/src/schema.rs | |||
@@ -0,0 +1,9 @@ | |||
1 | table! { | ||
2 | members (id) { | ||
3 | id -> Integer, | ||
4 | username -> Varchar, | ||
5 | password -> Varchar, | ||
6 | phone_number -> Varchar, | ||
7 | email_id -> Varchar, | ||
8 | } | ||
9 | } | ||