├── .DS_Store
├── .env
├── .gitignore
├── .idea
├── .gitignore
├── codeStyles
│ └── codeStyleConfig.xml
├── modules.xml
├── notely_rust.iml
└── vcs.xml
├── Cargo.lock
├── Cargo.toml
├── README.md
├── diesel.toml
├── migrations
├── .gitkeep
├── 00000000000000_diesel_initial_setup
│ ├── down.sql
│ └── up.sql
└── 2020-03-09-134857_create_employees
│ ├── down.sql
│ └── up.sql
└── src
├── db.rs
├── employees
├── mod.rs
├── model.rs
└── routes.rs
├── error_handler.rs
├── main.rs
└── schema.rs
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamhabbeboy/rest-api-actix-web/dd50dd83ae6672e941be702b1c809ed8a4e65baa/.DS_Store
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | RUST_LOG=rest_api=info,actix=info,diesel_migrations=info
2 | DATABASE_URL=postgres://postgres:password@localhost/notes_api
3 | HOST=127.0.0.1
4 | PORT=5000
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/notely_rust.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Cargo.lock:
--------------------------------------------------------------------------------
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.2.0"
6 | source = "registry+https://github.com/rust-lang/crates.io-index"
7 | checksum = "09e55f0a5c2ca15795035d90c46bd0e73a5123b72f68f12596d6ba5282051380"
8 | dependencies = [
9 | "bitflags",
10 | "bytes",
11 | "futures-core",
12 | "futures-sink",
13 | "log",
14 | "tokio",
15 | "tokio-util",
16 | ]
17 |
18 | [[package]]
19 | name = "actix-connect"
20 | version = "1.0.2"
21 | source = "registry+https://github.com/rust-lang/crates.io-index"
22 | checksum = "c95cc9569221e9802bf4c377f6c18b90ef10227d787611decf79fd47d2a8e76c"
23 | dependencies = [
24 | "actix-codec",
25 | "actix-rt",
26 | "actix-service",
27 | "actix-utils",
28 | "derive_more",
29 | "either",
30 | "futures",
31 | "http",
32 | "log",
33 | "trust-dns-proto",
34 | "trust-dns-resolver",
35 | ]
36 |
37 | [[package]]
38 | name = "actix-http"
39 | version = "1.0.1"
40 | source = "registry+https://github.com/rust-lang/crates.io-index"
41 | checksum = "c16664cc4fdea8030837ad5a845eb231fb93fc3c5c171edfefb52fad92ce9019"
42 | dependencies = [
43 | "actix-codec",
44 | "actix-connect",
45 | "actix-rt",
46 | "actix-service",
47 | "actix-threadpool",
48 | "actix-utils",
49 | "base64",
50 | "bitflags",
51 | "brotli2",
52 | "bytes",
53 | "chrono",
54 | "copyless",
55 | "derive_more",
56 | "either",
57 | "encoding_rs",
58 | "failure",
59 | "flate2",
60 | "futures-channel",
61 | "futures-core",
62 | "futures-util",
63 | "fxhash",
64 | "h2",
65 | "http",
66 | "httparse",
67 | "indexmap",
68 | "language-tags",
69 | "lazy_static",
70 | "log",
71 | "mime",
72 | "percent-encoding",
73 | "pin-project",
74 | "rand 0.7.3",
75 | "regex 1.3.4",
76 | "serde",
77 | "serde_json",
78 | "serde_urlencoded",
79 | "sha1",
80 | "slab",
81 | "time",
82 | ]
83 |
84 | [[package]]
85 | name = "actix-macros"
86 | version = "0.1.1"
87 | source = "registry+https://github.com/rust-lang/crates.io-index"
88 | checksum = "21705adc76bbe4bc98434890e73a89cd00c6015e5704a60bb6eea6c3b72316b6"
89 | dependencies = [
90 | "quote 1.0.2",
91 | "syn 1.0.16",
92 | ]
93 |
94 | [[package]]
95 | name = "actix-router"
96 | version = "0.2.4"
97 | source = "registry+https://github.com/rust-lang/crates.io-index"
98 | checksum = "9d7a10ca4d94e8c8e7a87c5173aba1b97ba9a6563ca02b0e1cd23531093d3ec8"
99 | dependencies = [
100 | "bytestring",
101 | "http",
102 | "log",
103 | "regex 1.3.4",
104 | "serde",
105 | ]
106 |
107 | [[package]]
108 | name = "actix-rt"
109 | version = "1.0.0"
110 | source = "registry+https://github.com/rust-lang/crates.io-index"
111 | checksum = "3f6a0a55507046441a496b2f0d26a84a65e67c8cafffe279072412f624b5fb6d"
112 | dependencies = [
113 | "actix-macros",
114 | "actix-threadpool",
115 | "copyless",
116 | "futures",
117 | "tokio",
118 | ]
119 |
120 | [[package]]
121 | name = "actix-server"
122 | version = "1.0.2"
123 | source = "registry+https://github.com/rust-lang/crates.io-index"
124 | checksum = "582a7173c281a4f46b5aa168a11e7f37183dcb71177a39312cc2264da7a632c9"
125 | dependencies = [
126 | "actix-codec",
127 | "actix-rt",
128 | "actix-service",
129 | "actix-utils",
130 | "futures",
131 | "log",
132 | "mio",
133 | "mio-uds",
134 | "net2",
135 | "num_cpus",
136 | "slab",
137 | ]
138 |
139 | [[package]]
140 | name = "actix-service"
141 | version = "1.0.5"
142 | source = "registry+https://github.com/rust-lang/crates.io-index"
143 | checksum = "d3e4fc95dfa7e24171b2d0bb46b85f8ab0e8499e4e3caec691fc4ea65c287564"
144 | dependencies = [
145 | "futures-util",
146 | "pin-project",
147 | ]
148 |
149 | [[package]]
150 | name = "actix-testing"
151 | version = "1.0.0"
152 | source = "registry+https://github.com/rust-lang/crates.io-index"
153 | checksum = "48494745b72d0ea8ff0cf874aaf9b622a3ee03d7081ee0c04edea4f26d32c911"
154 | dependencies = [
155 | "actix-macros",
156 | "actix-rt",
157 | "actix-server",
158 | "actix-service",
159 | "futures",
160 | "log",
161 | "net2",
162 | ]
163 |
164 | [[package]]
165 | name = "actix-threadpool"
166 | version = "0.3.1"
167 | source = "registry+https://github.com/rust-lang/crates.io-index"
168 | checksum = "cf4082192601de5f303013709ff84d81ca6a1bc4af7fb24f367a500a23c6e84e"
169 | dependencies = [
170 | "derive_more",
171 | "futures-channel",
172 | "lazy_static",
173 | "log",
174 | "num_cpus",
175 | "parking_lot",
176 | "threadpool",
177 | ]
178 |
179 | [[package]]
180 | name = "actix-tls"
181 | version = "1.0.0"
182 | source = "registry+https://github.com/rust-lang/crates.io-index"
183 | checksum = "a4e5b4faaf105e9a6d389c606c298dcdb033061b00d532af9df56ff3a54995a8"
184 | dependencies = [
185 | "actix-codec",
186 | "actix-rt",
187 | "actix-service",
188 | "actix-utils",
189 | "derive_more",
190 | "either",
191 | "futures",
192 | "log",
193 | ]
194 |
195 | [[package]]
196 | name = "actix-utils"
197 | version = "1.0.6"
198 | source = "registry+https://github.com/rust-lang/crates.io-index"
199 | checksum = "fcf8f5631bf01adec2267808f00e228b761c60c0584cc9fa0b5364f41d147f4e"
200 | dependencies = [
201 | "actix-codec",
202 | "actix-rt",
203 | "actix-service",
204 | "bitflags",
205 | "bytes",
206 | "either",
207 | "futures",
208 | "log",
209 | "pin-project",
210 | "slab",
211 | ]
212 |
213 | [[package]]
214 | name = "actix-web"
215 | version = "2.0.0"
216 | source = "registry+https://github.com/rust-lang/crates.io-index"
217 | checksum = "3158e822461040822f0dbf1735b9c2ce1f95f93b651d7a7aded00b1efbb1f635"
218 | dependencies = [
219 | "actix-codec",
220 | "actix-http",
221 | "actix-macros",
222 | "actix-router",
223 | "actix-rt",
224 | "actix-server",
225 | "actix-service",
226 | "actix-testing",
227 | "actix-threadpool",
228 | "actix-tls",
229 | "actix-utils",
230 | "actix-web-codegen",
231 | "awc",
232 | "bytes",
233 | "derive_more",
234 | "encoding_rs",
235 | "futures",
236 | "fxhash",
237 | "log",
238 | "mime",
239 | "net2",
240 | "pin-project",
241 | "regex 1.3.4",
242 | "serde",
243 | "serde_json",
244 | "serde_urlencoded",
245 | "time",
246 | "url",
247 | ]
248 |
249 | [[package]]
250 | name = "actix-web-codegen"
251 | version = "0.2.1"
252 | source = "registry+https://github.com/rust-lang/crates.io-index"
253 | checksum = "4f00371942083469785f7e28c540164af1913ee7c96a4534acb9cea92c39f057"
254 | dependencies = [
255 | "proc-macro2 1.0.9",
256 | "quote 1.0.2",
257 | "syn 1.0.16",
258 | ]
259 |
260 | [[package]]
261 | name = "adler32"
262 | version = "1.0.4"
263 | source = "registry+https://github.com/rust-lang/crates.io-index"
264 | checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2"
265 |
266 | [[package]]
267 | name = "aho-corasick"
268 | version = "0.6.10"
269 | source = "registry+https://github.com/rust-lang/crates.io-index"
270 | checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5"
271 | dependencies = [
272 | "memchr",
273 | ]
274 |
275 | [[package]]
276 | name = "aho-corasick"
277 | version = "0.7.9"
278 | source = "registry+https://github.com/rust-lang/crates.io-index"
279 | checksum = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec"
280 | dependencies = [
281 | "memchr",
282 | ]
283 |
284 | [[package]]
285 | name = "arc-swap"
286 | version = "0.4.4"
287 | source = "registry+https://github.com/rust-lang/crates.io-index"
288 | checksum = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff"
289 |
290 | [[package]]
291 | name = "async-trait"
292 | version = "0.1.24"
293 | source = "registry+https://github.com/rust-lang/crates.io-index"
294 | checksum = "750b1c38a1dfadd108da0f01c08f4cdc7ff1bb39b325f9c82cc972361780a6e1"
295 | dependencies = [
296 | "proc-macro2 1.0.9",
297 | "quote 1.0.2",
298 | "syn 1.0.16",
299 | ]
300 |
301 | [[package]]
302 | name = "atty"
303 | version = "0.2.14"
304 | source = "registry+https://github.com/rust-lang/crates.io-index"
305 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
306 | dependencies = [
307 | "hermit-abi",
308 | "libc",
309 | "winapi 0.3.8",
310 | ]
311 |
312 | [[package]]
313 | name = "autocfg"
314 | version = "1.0.0"
315 | source = "registry+https://github.com/rust-lang/crates.io-index"
316 | checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
317 |
318 | [[package]]
319 | name = "awc"
320 | version = "1.0.1"
321 | source = "registry+https://github.com/rust-lang/crates.io-index"
322 | checksum = "d7601d4d1d7ef2335d6597a41b5fe069f6ab799b85f53565ab390e7b7065aac5"
323 | dependencies = [
324 | "actix-codec",
325 | "actix-http",
326 | "actix-rt",
327 | "actix-service",
328 | "base64",
329 | "bytes",
330 | "derive_more",
331 | "futures-core",
332 | "log",
333 | "mime",
334 | "percent-encoding",
335 | "rand 0.7.3",
336 | "serde",
337 | "serde_json",
338 | "serde_urlencoded",
339 | ]
340 |
341 | [[package]]
342 | name = "backtrace"
343 | version = "0.3.44"
344 | source = "registry+https://github.com/rust-lang/crates.io-index"
345 | checksum = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536"
346 | dependencies = [
347 | "backtrace-sys",
348 | "cfg-if",
349 | "libc",
350 | "rustc-demangle",
351 | ]
352 |
353 | [[package]]
354 | name = "backtrace-sys"
355 | version = "0.1.32"
356 | source = "registry+https://github.com/rust-lang/crates.io-index"
357 | checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491"
358 | dependencies = [
359 | "cc",
360 | "libc",
361 | ]
362 |
363 | [[package]]
364 | name = "base64"
365 | version = "0.11.0"
366 | source = "registry+https://github.com/rust-lang/crates.io-index"
367 | checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
368 |
369 | [[package]]
370 | name = "bitflags"
371 | version = "1.2.1"
372 | source = "registry+https://github.com/rust-lang/crates.io-index"
373 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
374 |
375 | [[package]]
376 | name = "brotli-sys"
377 | version = "0.3.2"
378 | source = "registry+https://github.com/rust-lang/crates.io-index"
379 | checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd"
380 | dependencies = [
381 | "cc",
382 | "libc",
383 | ]
384 |
385 | [[package]]
386 | name = "brotli2"
387 | version = "0.3.2"
388 | source = "registry+https://github.com/rust-lang/crates.io-index"
389 | checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e"
390 | dependencies = [
391 | "brotli-sys",
392 | "libc",
393 | ]
394 |
395 | [[package]]
396 | name = "byteorder"
397 | version = "1.3.4"
398 | source = "registry+https://github.com/rust-lang/crates.io-index"
399 | checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
400 |
401 | [[package]]
402 | name = "bytes"
403 | version = "0.5.4"
404 | source = "registry+https://github.com/rust-lang/crates.io-index"
405 | checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
406 |
407 | [[package]]
408 | name = "bytestring"
409 | version = "0.1.4"
410 | source = "registry+https://github.com/rust-lang/crates.io-index"
411 | checksum = "fc267467f58ef6cc8874064c62a0423eb0d099362c8a23edd1c6d044f46eead4"
412 | dependencies = [
413 | "bytes",
414 | ]
415 |
416 | [[package]]
417 | name = "c2-chacha"
418 | version = "0.2.3"
419 | source = "registry+https://github.com/rust-lang/crates.io-index"
420 | checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb"
421 | dependencies = [
422 | "ppv-lite86",
423 | ]
424 |
425 | [[package]]
426 | name = "cc"
427 | version = "1.0.50"
428 | source = "registry+https://github.com/rust-lang/crates.io-index"
429 | checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
430 |
431 | [[package]]
432 | name = "cfg-if"
433 | version = "0.1.10"
434 | source = "registry+https://github.com/rust-lang/crates.io-index"
435 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
436 |
437 | [[package]]
438 | name = "chrono"
439 | version = "0.4.10"
440 | source = "registry+https://github.com/rust-lang/crates.io-index"
441 | checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
442 | dependencies = [
443 | "num-integer",
444 | "num-traits",
445 | "serde",
446 | "time",
447 | ]
448 |
449 | [[package]]
450 | name = "cloudabi"
451 | version = "0.0.3"
452 | source = "registry+https://github.com/rust-lang/crates.io-index"
453 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
454 | dependencies = [
455 | "bitflags",
456 | ]
457 |
458 | [[package]]
459 | name = "copyless"
460 | version = "0.1.4"
461 | source = "registry+https://github.com/rust-lang/crates.io-index"
462 | checksum = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127"
463 |
464 | [[package]]
465 | name = "crc32fast"
466 | version = "1.2.0"
467 | source = "registry+https://github.com/rust-lang/crates.io-index"
468 | checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
469 | dependencies = [
470 | "cfg-if",
471 | ]
472 |
473 | [[package]]
474 | name = "derive-error-chain"
475 | version = "0.11.2"
476 | source = "registry+https://github.com/rust-lang/crates.io-index"
477 | checksum = "d5f8006bdd4c5b90d4571abe68285c6e9863122a5ee695ff3583e8e1dee8f28a"
478 | dependencies = [
479 | "proc-macro2 0.4.30",
480 | "quote 0.6.13",
481 | "syn 0.14.9",
482 | "syntex_fmt_macros",
483 | ]
484 |
485 | [[package]]
486 | name = "derive_more"
487 | version = "0.99.3"
488 | source = "registry+https://github.com/rust-lang/crates.io-index"
489 | checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c"
490 | dependencies = [
491 | "proc-macro2 1.0.9",
492 | "quote 1.0.2",
493 | "syn 1.0.16",
494 | ]
495 |
496 | [[package]]
497 | name = "diesel"
498 | version = "1.4.3"
499 | source = "registry+https://github.com/rust-lang/crates.io-index"
500 | checksum = "9d7cc03b910de9935007861dce440881f69102aaaedfd4bc5a6f40340ca5840c"
501 | dependencies = [
502 | "bitflags",
503 | "byteorder",
504 | "chrono",
505 | "diesel_derives",
506 | "pq-sys",
507 | "r2d2",
508 | "uuid",
509 | ]
510 |
511 | [[package]]
512 | name = "diesel_derives"
513 | version = "1.4.1"
514 | source = "registry+https://github.com/rust-lang/crates.io-index"
515 | checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3"
516 | dependencies = [
517 | "proc-macro2 1.0.9",
518 | "quote 1.0.2",
519 | "syn 1.0.16",
520 | ]
521 |
522 | [[package]]
523 | name = "diesel_migrations"
524 | version = "1.4.0"
525 | source = "registry+https://github.com/rust-lang/crates.io-index"
526 | checksum = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c"
527 | dependencies = [
528 | "migrations_internals",
529 | "migrations_macros",
530 | ]
531 |
532 | [[package]]
533 | name = "dotenv"
534 | version = "0.11.0"
535 | source = "registry+https://github.com/rust-lang/crates.io-index"
536 | checksum = "a70de3c590ce18df70743cace1cf12565637a0b26fd8b04ef10c7d33fdc66cdc"
537 | dependencies = [
538 | "derive-error-chain",
539 | "error-chain",
540 | "regex 0.2.11",
541 | ]
542 |
543 | [[package]]
544 | name = "dtoa"
545 | version = "0.4.5"
546 | source = "registry+https://github.com/rust-lang/crates.io-index"
547 | checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3"
548 |
549 | [[package]]
550 | name = "either"
551 | version = "1.5.3"
552 | source = "registry+https://github.com/rust-lang/crates.io-index"
553 | checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
554 |
555 | [[package]]
556 | name = "encoding_rs"
557 | version = "0.8.22"
558 | source = "registry+https://github.com/rust-lang/crates.io-index"
559 | checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28"
560 | dependencies = [
561 | "cfg-if",
562 | ]
563 |
564 | [[package]]
565 | name = "enum-as-inner"
566 | version = "0.3.1"
567 | source = "registry+https://github.com/rust-lang/crates.io-index"
568 | checksum = "eaeb00c3d7e5eed0e7c15a2ff045d76800a2e34b93f790bc38c8e3f9bfafef2b"
569 | dependencies = [
570 | "heck",
571 | "proc-macro2 1.0.9",
572 | "quote 1.0.2",
573 | "syn 1.0.16",
574 | ]
575 |
576 | [[package]]
577 | name = "env_logger"
578 | version = "0.6.2"
579 | source = "registry+https://github.com/rust-lang/crates.io-index"
580 | checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
581 | dependencies = [
582 | "atty",
583 | "humantime",
584 | "log",
585 | "regex 1.3.4",
586 | "termcolor",
587 | ]
588 |
589 | [[package]]
590 | name = "error-chain"
591 | version = "0.11.0"
592 | source = "registry+https://github.com/rust-lang/crates.io-index"
593 | checksum = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
594 | dependencies = [
595 | "backtrace",
596 | ]
597 |
598 | [[package]]
599 | name = "failure"
600 | version = "0.1.6"
601 | source = "registry+https://github.com/rust-lang/crates.io-index"
602 | checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
603 | dependencies = [
604 | "backtrace",
605 | "failure_derive",
606 | ]
607 |
608 | [[package]]
609 | name = "failure_derive"
610 | version = "0.1.6"
611 | source = "registry+https://github.com/rust-lang/crates.io-index"
612 | checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
613 | dependencies = [
614 | "proc-macro2 1.0.9",
615 | "quote 1.0.2",
616 | "syn 1.0.16",
617 | "synstructure",
618 | ]
619 |
620 | [[package]]
621 | name = "flate2"
622 | version = "1.0.13"
623 | source = "registry+https://github.com/rust-lang/crates.io-index"
624 | checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f"
625 | dependencies = [
626 | "cfg-if",
627 | "crc32fast",
628 | "libc",
629 | "miniz_oxide",
630 | ]
631 |
632 | [[package]]
633 | name = "fnv"
634 | version = "1.0.6"
635 | source = "registry+https://github.com/rust-lang/crates.io-index"
636 | checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
637 |
638 | [[package]]
639 | name = "fuchsia-cprng"
640 | version = "0.1.1"
641 | source = "registry+https://github.com/rust-lang/crates.io-index"
642 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
643 |
644 | [[package]]
645 | name = "fuchsia-zircon"
646 | version = "0.3.3"
647 | source = "registry+https://github.com/rust-lang/crates.io-index"
648 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
649 | dependencies = [
650 | "bitflags",
651 | "fuchsia-zircon-sys",
652 | ]
653 |
654 | [[package]]
655 | name = "fuchsia-zircon-sys"
656 | version = "0.3.3"
657 | source = "registry+https://github.com/rust-lang/crates.io-index"
658 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
659 |
660 | [[package]]
661 | name = "futures"
662 | version = "0.3.4"
663 | source = "registry+https://github.com/rust-lang/crates.io-index"
664 | checksum = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780"
665 | dependencies = [
666 | "futures-channel",
667 | "futures-core",
668 | "futures-executor",
669 | "futures-io",
670 | "futures-sink",
671 | "futures-task",
672 | "futures-util",
673 | ]
674 |
675 | [[package]]
676 | name = "futures-channel"
677 | version = "0.3.4"
678 | source = "registry+https://github.com/rust-lang/crates.io-index"
679 | checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8"
680 | dependencies = [
681 | "futures-core",
682 | "futures-sink",
683 | ]
684 |
685 | [[package]]
686 | name = "futures-core"
687 | version = "0.3.4"
688 | source = "registry+https://github.com/rust-lang/crates.io-index"
689 | checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a"
690 |
691 | [[package]]
692 | name = "futures-executor"
693 | version = "0.3.4"
694 | source = "registry+https://github.com/rust-lang/crates.io-index"
695 | checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba"
696 | dependencies = [
697 | "futures-core",
698 | "futures-task",
699 | "futures-util",
700 | ]
701 |
702 | [[package]]
703 | name = "futures-io"
704 | version = "0.3.4"
705 | source = "registry+https://github.com/rust-lang/crates.io-index"
706 | checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6"
707 |
708 | [[package]]
709 | name = "futures-macro"
710 | version = "0.3.4"
711 | source = "registry+https://github.com/rust-lang/crates.io-index"
712 | checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"
713 | dependencies = [
714 | "proc-macro-hack",
715 | "proc-macro2 1.0.9",
716 | "quote 1.0.2",
717 | "syn 1.0.16",
718 | ]
719 |
720 | [[package]]
721 | name = "futures-sink"
722 | version = "0.3.4"
723 | source = "registry+https://github.com/rust-lang/crates.io-index"
724 | checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6"
725 |
726 | [[package]]
727 | name = "futures-task"
728 | version = "0.3.4"
729 | source = "registry+https://github.com/rust-lang/crates.io-index"
730 | checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27"
731 |
732 | [[package]]
733 | name = "futures-util"
734 | version = "0.3.4"
735 | source = "registry+https://github.com/rust-lang/crates.io-index"
736 | checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5"
737 | dependencies = [
738 | "futures-channel",
739 | "futures-core",
740 | "futures-io",
741 | "futures-macro",
742 | "futures-sink",
743 | "futures-task",
744 | "memchr",
745 | "pin-utils",
746 | "proc-macro-hack",
747 | "proc-macro-nested",
748 | "slab",
749 | ]
750 |
751 | [[package]]
752 | name = "fxhash"
753 | version = "0.2.1"
754 | source = "registry+https://github.com/rust-lang/crates.io-index"
755 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
756 | dependencies = [
757 | "byteorder",
758 | ]
759 |
760 | [[package]]
761 | name = "getrandom"
762 | version = "0.1.14"
763 | source = "registry+https://github.com/rust-lang/crates.io-index"
764 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
765 | dependencies = [
766 | "cfg-if",
767 | "libc",
768 | "wasi",
769 | ]
770 |
771 | [[package]]
772 | name = "h2"
773 | version = "0.2.1"
774 | source = "registry+https://github.com/rust-lang/crates.io-index"
775 | checksum = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1"
776 | dependencies = [
777 | "bytes",
778 | "fnv",
779 | "futures-core",
780 | "futures-sink",
781 | "futures-util",
782 | "http",
783 | "indexmap",
784 | "log",
785 | "slab",
786 | "tokio",
787 | "tokio-util",
788 | ]
789 |
790 | [[package]]
791 | name = "heck"
792 | version = "0.3.1"
793 | source = "registry+https://github.com/rust-lang/crates.io-index"
794 | checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
795 | dependencies = [
796 | "unicode-segmentation",
797 | ]
798 |
799 | [[package]]
800 | name = "hermit-abi"
801 | version = "0.1.8"
802 | source = "registry+https://github.com/rust-lang/crates.io-index"
803 | checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8"
804 | dependencies = [
805 | "libc",
806 | ]
807 |
808 | [[package]]
809 | name = "hostname"
810 | version = "0.1.5"
811 | source = "registry+https://github.com/rust-lang/crates.io-index"
812 | checksum = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e"
813 | dependencies = [
814 | "libc",
815 | "winutil",
816 | ]
817 |
818 | [[package]]
819 | name = "http"
820 | version = "0.2.0"
821 | source = "registry+https://github.com/rust-lang/crates.io-index"
822 | checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b"
823 | dependencies = [
824 | "bytes",
825 | "fnv",
826 | "itoa",
827 | ]
828 |
829 | [[package]]
830 | name = "httparse"
831 | version = "1.3.4"
832 | source = "registry+https://github.com/rust-lang/crates.io-index"
833 | checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
834 |
835 | [[package]]
836 | name = "humantime"
837 | version = "1.3.0"
838 | source = "registry+https://github.com/rust-lang/crates.io-index"
839 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
840 | dependencies = [
841 | "quick-error",
842 | ]
843 |
844 | [[package]]
845 | name = "idna"
846 | version = "0.2.0"
847 | source = "registry+https://github.com/rust-lang/crates.io-index"
848 | checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
849 | dependencies = [
850 | "matches",
851 | "unicode-bidi",
852 | "unicode-normalization",
853 | ]
854 |
855 | [[package]]
856 | name = "indexmap"
857 | version = "1.3.2"
858 | source = "registry+https://github.com/rust-lang/crates.io-index"
859 | checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292"
860 | dependencies = [
861 | "autocfg",
862 | ]
863 |
864 | [[package]]
865 | name = "iovec"
866 | version = "0.1.4"
867 | source = "registry+https://github.com/rust-lang/crates.io-index"
868 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
869 | dependencies = [
870 | "libc",
871 | ]
872 |
873 | [[package]]
874 | name = "ipconfig"
875 | version = "0.2.1"
876 | source = "registry+https://github.com/rust-lang/crates.io-index"
877 | checksum = "aa79fa216fbe60834a9c0737d7fcd30425b32d1c58854663e24d4c4b328ed83f"
878 | dependencies = [
879 | "socket2",
880 | "widestring",
881 | "winapi 0.3.8",
882 | "winreg",
883 | ]
884 |
885 | [[package]]
886 | name = "itoa"
887 | version = "0.4.5"
888 | source = "registry+https://github.com/rust-lang/crates.io-index"
889 | checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
890 |
891 | [[package]]
892 | name = "kernel32-sys"
893 | version = "0.2.2"
894 | source = "registry+https://github.com/rust-lang/crates.io-index"
895 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
896 | dependencies = [
897 | "winapi 0.2.8",
898 | "winapi-build",
899 | ]
900 |
901 | [[package]]
902 | name = "language-tags"
903 | version = "0.2.2"
904 | source = "registry+https://github.com/rust-lang/crates.io-index"
905 | checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
906 |
907 | [[package]]
908 | name = "lazy_static"
909 | version = "1.4.0"
910 | source = "registry+https://github.com/rust-lang/crates.io-index"
911 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
912 |
913 | [[package]]
914 | name = "libc"
915 | version = "0.2.67"
916 | source = "registry+https://github.com/rust-lang/crates.io-index"
917 | checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
918 |
919 | [[package]]
920 | name = "linked-hash-map"
921 | version = "0.5.2"
922 | source = "registry+https://github.com/rust-lang/crates.io-index"
923 | checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
924 |
925 | [[package]]
926 | name = "listenfd"
927 | version = "0.3.3"
928 | source = "registry+https://github.com/rust-lang/crates.io-index"
929 | checksum = "492158e732f2e2de81c592f0a2427e57e12cd3d59877378fe7af624b6bbe0ca1"
930 | dependencies = [
931 | "libc",
932 | "uuid",
933 | "winapi 0.3.8",
934 | ]
935 |
936 | [[package]]
937 | name = "lock_api"
938 | version = "0.3.3"
939 | source = "registry+https://github.com/rust-lang/crates.io-index"
940 | checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b"
941 | dependencies = [
942 | "scopeguard",
943 | ]
944 |
945 | [[package]]
946 | name = "log"
947 | version = "0.4.8"
948 | source = "registry+https://github.com/rust-lang/crates.io-index"
949 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
950 | dependencies = [
951 | "cfg-if",
952 | ]
953 |
954 | [[package]]
955 | name = "lru-cache"
956 | version = "0.1.2"
957 | source = "registry+https://github.com/rust-lang/crates.io-index"
958 | checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
959 | dependencies = [
960 | "linked-hash-map",
961 | ]
962 |
963 | [[package]]
964 | name = "matches"
965 | version = "0.1.8"
966 | source = "registry+https://github.com/rust-lang/crates.io-index"
967 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
968 |
969 | [[package]]
970 | name = "memchr"
971 | version = "2.3.3"
972 | source = "registry+https://github.com/rust-lang/crates.io-index"
973 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
974 |
975 | [[package]]
976 | name = "migrations_internals"
977 | version = "1.4.0"
978 | source = "registry+https://github.com/rust-lang/crates.io-index"
979 | checksum = "8089920229070f914b9ce9b07ef60e175b2b9bc2d35c3edd8bf4433604e863b9"
980 | dependencies = [
981 | "diesel",
982 | ]
983 |
984 | [[package]]
985 | name = "migrations_macros"
986 | version = "1.4.1"
987 | source = "registry+https://github.com/rust-lang/crates.io-index"
988 | checksum = "719ef0bc7f531428764c9b70661c14abd50a7f3d21f355752d9985aa21251c9e"
989 | dependencies = [
990 | "migrations_internals",
991 | "proc-macro2 1.0.9",
992 | "quote 1.0.2",
993 | "syn 1.0.16",
994 | ]
995 |
996 | [[package]]
997 | name = "mime"
998 | version = "0.3.16"
999 | source = "registry+https://github.com/rust-lang/crates.io-index"
1000 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
1001 |
1002 | [[package]]
1003 | name = "miniz_oxide"
1004 | version = "0.3.6"
1005 | source = "registry+https://github.com/rust-lang/crates.io-index"
1006 | checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5"
1007 | dependencies = [
1008 | "adler32",
1009 | ]
1010 |
1011 | [[package]]
1012 | name = "mio"
1013 | version = "0.6.21"
1014 | source = "registry+https://github.com/rust-lang/crates.io-index"
1015 | checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
1016 | dependencies = [
1017 | "cfg-if",
1018 | "fuchsia-zircon",
1019 | "fuchsia-zircon-sys",
1020 | "iovec",
1021 | "kernel32-sys",
1022 | "libc",
1023 | "log",
1024 | "miow",
1025 | "net2",
1026 | "slab",
1027 | "winapi 0.2.8",
1028 | ]
1029 |
1030 | [[package]]
1031 | name = "mio-uds"
1032 | version = "0.6.7"
1033 | source = "registry+https://github.com/rust-lang/crates.io-index"
1034 | checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125"
1035 | dependencies = [
1036 | "iovec",
1037 | "libc",
1038 | "mio",
1039 | ]
1040 |
1041 | [[package]]
1042 | name = "miow"
1043 | version = "0.2.1"
1044 | source = "registry+https://github.com/rust-lang/crates.io-index"
1045 | checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
1046 | dependencies = [
1047 | "kernel32-sys",
1048 | "net2",
1049 | "winapi 0.2.8",
1050 | "ws2_32-sys",
1051 | ]
1052 |
1053 | [[package]]
1054 | name = "net2"
1055 | version = "0.2.33"
1056 | source = "registry+https://github.com/rust-lang/crates.io-index"
1057 | checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
1058 | dependencies = [
1059 | "cfg-if",
1060 | "libc",
1061 | "winapi 0.3.8",
1062 | ]
1063 |
1064 | [[package]]
1065 | name = "notely_rust"
1066 | version = "0.1.0"
1067 | dependencies = [
1068 | "actix-rt",
1069 | "actix-web",
1070 | "chrono",
1071 | "diesel",
1072 | "diesel_migrations",
1073 | "dotenv",
1074 | "env_logger",
1075 | "lazy_static",
1076 | "listenfd",
1077 | "log",
1078 | "r2d2",
1079 | "serde",
1080 | "serde_json",
1081 | "uuid",
1082 | ]
1083 |
1084 | [[package]]
1085 | name = "num-integer"
1086 | version = "0.1.42"
1087 | source = "registry+https://github.com/rust-lang/crates.io-index"
1088 | checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba"
1089 | dependencies = [
1090 | "autocfg",
1091 | "num-traits",
1092 | ]
1093 |
1094 | [[package]]
1095 | name = "num-traits"
1096 | version = "0.2.11"
1097 | source = "registry+https://github.com/rust-lang/crates.io-index"
1098 | checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
1099 | dependencies = [
1100 | "autocfg",
1101 | ]
1102 |
1103 | [[package]]
1104 | name = "num_cpus"
1105 | version = "1.12.0"
1106 | source = "registry+https://github.com/rust-lang/crates.io-index"
1107 | checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6"
1108 | dependencies = [
1109 | "hermit-abi",
1110 | "libc",
1111 | ]
1112 |
1113 | [[package]]
1114 | name = "parking_lot"
1115 | version = "0.10.0"
1116 | source = "registry+https://github.com/rust-lang/crates.io-index"
1117 | checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc"
1118 | dependencies = [
1119 | "lock_api",
1120 | "parking_lot_core",
1121 | ]
1122 |
1123 | [[package]]
1124 | name = "parking_lot_core"
1125 | version = "0.7.0"
1126 | source = "registry+https://github.com/rust-lang/crates.io-index"
1127 | checksum = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1"
1128 | dependencies = [
1129 | "cfg-if",
1130 | "cloudabi",
1131 | "libc",
1132 | "redox_syscall",
1133 | "smallvec",
1134 | "winapi 0.3.8",
1135 | ]
1136 |
1137 | [[package]]
1138 | name = "percent-encoding"
1139 | version = "2.1.0"
1140 | source = "registry+https://github.com/rust-lang/crates.io-index"
1141 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
1142 |
1143 | [[package]]
1144 | name = "pin-project"
1145 | version = "0.4.8"
1146 | source = "registry+https://github.com/rust-lang/crates.io-index"
1147 | checksum = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c"
1148 | dependencies = [
1149 | "pin-project-internal",
1150 | ]
1151 |
1152 | [[package]]
1153 | name = "pin-project-internal"
1154 | version = "0.4.8"
1155 | source = "registry+https://github.com/rust-lang/crates.io-index"
1156 | checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
1157 | dependencies = [
1158 | "proc-macro2 1.0.9",
1159 | "quote 1.0.2",
1160 | "syn 1.0.16",
1161 | ]
1162 |
1163 | [[package]]
1164 | name = "pin-project-lite"
1165 | version = "0.1.4"
1166 | source = "registry+https://github.com/rust-lang/crates.io-index"
1167 | checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"
1168 |
1169 | [[package]]
1170 | name = "pin-utils"
1171 | version = "0.1.0-alpha.4"
1172 | source = "registry+https://github.com/rust-lang/crates.io-index"
1173 | checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
1174 |
1175 | [[package]]
1176 | name = "ppv-lite86"
1177 | version = "0.2.6"
1178 | source = "registry+https://github.com/rust-lang/crates.io-index"
1179 | checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
1180 |
1181 | [[package]]
1182 | name = "pq-sys"
1183 | version = "0.4.6"
1184 | source = "registry+https://github.com/rust-lang/crates.io-index"
1185 | checksum = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda"
1186 | dependencies = [
1187 | "vcpkg",
1188 | ]
1189 |
1190 | [[package]]
1191 | name = "proc-macro-hack"
1192 | version = "0.5.11"
1193 | source = "registry+https://github.com/rust-lang/crates.io-index"
1194 | checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
1195 | dependencies = [
1196 | "proc-macro2 1.0.9",
1197 | "quote 1.0.2",
1198 | "syn 1.0.16",
1199 | ]
1200 |
1201 | [[package]]
1202 | name = "proc-macro-nested"
1203 | version = "0.1.3"
1204 | source = "registry+https://github.com/rust-lang/crates.io-index"
1205 | checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
1206 |
1207 | [[package]]
1208 | name = "proc-macro2"
1209 | version = "0.4.30"
1210 | source = "registry+https://github.com/rust-lang/crates.io-index"
1211 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
1212 | dependencies = [
1213 | "unicode-xid 0.1.0",
1214 | ]
1215 |
1216 | [[package]]
1217 | name = "proc-macro2"
1218 | version = "1.0.9"
1219 | source = "registry+https://github.com/rust-lang/crates.io-index"
1220 | checksum = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435"
1221 | dependencies = [
1222 | "unicode-xid 0.2.0",
1223 | ]
1224 |
1225 | [[package]]
1226 | name = "quick-error"
1227 | version = "1.2.3"
1228 | source = "registry+https://github.com/rust-lang/crates.io-index"
1229 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
1230 |
1231 | [[package]]
1232 | name = "quote"
1233 | version = "0.6.13"
1234 | source = "registry+https://github.com/rust-lang/crates.io-index"
1235 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
1236 | dependencies = [
1237 | "proc-macro2 0.4.30",
1238 | ]
1239 |
1240 | [[package]]
1241 | name = "quote"
1242 | version = "1.0.2"
1243 | source = "registry+https://github.com/rust-lang/crates.io-index"
1244 | checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
1245 | dependencies = [
1246 | "proc-macro2 1.0.9",
1247 | ]
1248 |
1249 | [[package]]
1250 | name = "r2d2"
1251 | version = "0.8.8"
1252 | source = "registry+https://github.com/rust-lang/crates.io-index"
1253 | checksum = "1497e40855348e4a8a40767d8e55174bce1e445a3ac9254ad44ad468ee0485af"
1254 | dependencies = [
1255 | "log",
1256 | "parking_lot",
1257 | "scheduled-thread-pool",
1258 | ]
1259 |
1260 | [[package]]
1261 | name = "rand"
1262 | version = "0.4.6"
1263 | source = "registry+https://github.com/rust-lang/crates.io-index"
1264 | checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
1265 | dependencies = [
1266 | "fuchsia-cprng",
1267 | "libc",
1268 | "rand_core 0.3.1",
1269 | "rdrand",
1270 | "winapi 0.3.8",
1271 | ]
1272 |
1273 | [[package]]
1274 | name = "rand"
1275 | version = "0.7.3"
1276 | source = "registry+https://github.com/rust-lang/crates.io-index"
1277 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
1278 | dependencies = [
1279 | "getrandom",
1280 | "libc",
1281 | "rand_chacha",
1282 | "rand_core 0.5.1",
1283 | "rand_hc",
1284 | ]
1285 |
1286 | [[package]]
1287 | name = "rand_chacha"
1288 | version = "0.2.1"
1289 | source = "registry+https://github.com/rust-lang/crates.io-index"
1290 | checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
1291 | dependencies = [
1292 | "c2-chacha",
1293 | "rand_core 0.5.1",
1294 | ]
1295 |
1296 | [[package]]
1297 | name = "rand_core"
1298 | version = "0.3.1"
1299 | source = "registry+https://github.com/rust-lang/crates.io-index"
1300 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
1301 | dependencies = [
1302 | "rand_core 0.4.2",
1303 | ]
1304 |
1305 | [[package]]
1306 | name = "rand_core"
1307 | version = "0.4.2"
1308 | source = "registry+https://github.com/rust-lang/crates.io-index"
1309 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
1310 |
1311 | [[package]]
1312 | name = "rand_core"
1313 | version = "0.5.1"
1314 | source = "registry+https://github.com/rust-lang/crates.io-index"
1315 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
1316 | dependencies = [
1317 | "getrandom",
1318 | ]
1319 |
1320 | [[package]]
1321 | name = "rand_hc"
1322 | version = "0.2.0"
1323 | source = "registry+https://github.com/rust-lang/crates.io-index"
1324 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
1325 | dependencies = [
1326 | "rand_core 0.5.1",
1327 | ]
1328 |
1329 | [[package]]
1330 | name = "rdrand"
1331 | version = "0.4.0"
1332 | source = "registry+https://github.com/rust-lang/crates.io-index"
1333 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
1334 | dependencies = [
1335 | "rand_core 0.3.1",
1336 | ]
1337 |
1338 | [[package]]
1339 | name = "redox_syscall"
1340 | version = "0.1.56"
1341 | source = "registry+https://github.com/rust-lang/crates.io-index"
1342 | checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
1343 |
1344 | [[package]]
1345 | name = "regex"
1346 | version = "0.2.11"
1347 | source = "registry+https://github.com/rust-lang/crates.io-index"
1348 | checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
1349 | dependencies = [
1350 | "aho-corasick 0.6.10",
1351 | "memchr",
1352 | "regex-syntax 0.5.6",
1353 | "thread_local 0.3.6",
1354 | "utf8-ranges",
1355 | ]
1356 |
1357 | [[package]]
1358 | name = "regex"
1359 | version = "1.3.4"
1360 | source = "registry+https://github.com/rust-lang/crates.io-index"
1361 | checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8"
1362 | dependencies = [
1363 | "aho-corasick 0.7.9",
1364 | "memchr",
1365 | "regex-syntax 0.6.16",
1366 | "thread_local 1.0.1",
1367 | ]
1368 |
1369 | [[package]]
1370 | name = "regex-syntax"
1371 | version = "0.5.6"
1372 | source = "registry+https://github.com/rust-lang/crates.io-index"
1373 | checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
1374 | dependencies = [
1375 | "ucd-util",
1376 | ]
1377 |
1378 | [[package]]
1379 | name = "regex-syntax"
1380 | version = "0.6.16"
1381 | source = "registry+https://github.com/rust-lang/crates.io-index"
1382 | checksum = "1132f845907680735a84409c3bebc64d1364a5683ffbce899550cd09d5eaefc1"
1383 |
1384 | [[package]]
1385 | name = "resolv-conf"
1386 | version = "0.6.2"
1387 | source = "registry+https://github.com/rust-lang/crates.io-index"
1388 | checksum = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb"
1389 | dependencies = [
1390 | "hostname",
1391 | "quick-error",
1392 | ]
1393 |
1394 | [[package]]
1395 | name = "rustc-demangle"
1396 | version = "0.1.16"
1397 | source = "registry+https://github.com/rust-lang/crates.io-index"
1398 | checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
1399 |
1400 | [[package]]
1401 | name = "ryu"
1402 | version = "1.0.2"
1403 | source = "registry+https://github.com/rust-lang/crates.io-index"
1404 | checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
1405 |
1406 | [[package]]
1407 | name = "scheduled-thread-pool"
1408 | version = "0.2.3"
1409 | source = "registry+https://github.com/rust-lang/crates.io-index"
1410 | checksum = "f5de7bc31f28f8e6c28df5e1bf3d10610f5fdc14cc95f272853512c70a2bd779"
1411 | dependencies = [
1412 | "parking_lot",
1413 | ]
1414 |
1415 | [[package]]
1416 | name = "scopeguard"
1417 | version = "1.1.0"
1418 | source = "registry+https://github.com/rust-lang/crates.io-index"
1419 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
1420 |
1421 | [[package]]
1422 | name = "serde"
1423 | version = "1.0.104"
1424 | source = "registry+https://github.com/rust-lang/crates.io-index"
1425 | checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
1426 | dependencies = [
1427 | "serde_derive",
1428 | ]
1429 |
1430 | [[package]]
1431 | name = "serde_derive"
1432 | version = "1.0.104"
1433 | source = "registry+https://github.com/rust-lang/crates.io-index"
1434 | checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
1435 | dependencies = [
1436 | "proc-macro2 1.0.9",
1437 | "quote 1.0.2",
1438 | "syn 1.0.16",
1439 | ]
1440 |
1441 | [[package]]
1442 | name = "serde_json"
1443 | version = "1.0.48"
1444 | source = "registry+https://github.com/rust-lang/crates.io-index"
1445 | checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
1446 | dependencies = [
1447 | "itoa",
1448 | "ryu",
1449 | "serde",
1450 | ]
1451 |
1452 | [[package]]
1453 | name = "serde_urlencoded"
1454 | version = "0.6.1"
1455 | source = "registry+https://github.com/rust-lang/crates.io-index"
1456 | checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97"
1457 | dependencies = [
1458 | "dtoa",
1459 | "itoa",
1460 | "serde",
1461 | "url",
1462 | ]
1463 |
1464 | [[package]]
1465 | name = "sha1"
1466 | version = "0.6.0"
1467 | source = "registry+https://github.com/rust-lang/crates.io-index"
1468 | checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
1469 |
1470 | [[package]]
1471 | name = "signal-hook-registry"
1472 | version = "1.2.0"
1473 | source = "registry+https://github.com/rust-lang/crates.io-index"
1474 | checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41"
1475 | dependencies = [
1476 | "arc-swap",
1477 | "libc",
1478 | ]
1479 |
1480 | [[package]]
1481 | name = "slab"
1482 | version = "0.4.2"
1483 | source = "registry+https://github.com/rust-lang/crates.io-index"
1484 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
1485 |
1486 | [[package]]
1487 | name = "smallvec"
1488 | version = "1.2.0"
1489 | source = "registry+https://github.com/rust-lang/crates.io-index"
1490 | checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc"
1491 |
1492 | [[package]]
1493 | name = "socket2"
1494 | version = "0.3.11"
1495 | source = "registry+https://github.com/rust-lang/crates.io-index"
1496 | checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
1497 | dependencies = [
1498 | "cfg-if",
1499 | "libc",
1500 | "redox_syscall",
1501 | "winapi 0.3.8",
1502 | ]
1503 |
1504 | [[package]]
1505 | name = "syn"
1506 | version = "0.14.9"
1507 | source = "registry+https://github.com/rust-lang/crates.io-index"
1508 | checksum = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741"
1509 | dependencies = [
1510 | "proc-macro2 0.4.30",
1511 | "quote 0.6.13",
1512 | "unicode-xid 0.1.0",
1513 | ]
1514 |
1515 | [[package]]
1516 | name = "syn"
1517 | version = "1.0.16"
1518 | source = "registry+https://github.com/rust-lang/crates.io-index"
1519 | checksum = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859"
1520 | dependencies = [
1521 | "proc-macro2 1.0.9",
1522 | "quote 1.0.2",
1523 | "unicode-xid 0.2.0",
1524 | ]
1525 |
1526 | [[package]]
1527 | name = "synstructure"
1528 | version = "0.12.3"
1529 | source = "registry+https://github.com/rust-lang/crates.io-index"
1530 | checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
1531 | dependencies = [
1532 | "proc-macro2 1.0.9",
1533 | "quote 1.0.2",
1534 | "syn 1.0.16",
1535 | "unicode-xid 0.2.0",
1536 | ]
1537 |
1538 | [[package]]
1539 | name = "syntex_fmt_macros"
1540 | version = "0.5.0"
1541 | source = "registry+https://github.com/rust-lang/crates.io-index"
1542 | checksum = "5e5386bdc48758d136af85b3880548e1f3a9fad8d7dc2b38bdb48c36a9cdefc0"
1543 | dependencies = [
1544 | "unicode-xid 0.2.0",
1545 | ]
1546 |
1547 | [[package]]
1548 | name = "termcolor"
1549 | version = "1.1.0"
1550 | source = "registry+https://github.com/rust-lang/crates.io-index"
1551 | checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
1552 | dependencies = [
1553 | "winapi-util",
1554 | ]
1555 |
1556 | [[package]]
1557 | name = "thread_local"
1558 | version = "0.3.6"
1559 | source = "registry+https://github.com/rust-lang/crates.io-index"
1560 | checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
1561 | dependencies = [
1562 | "lazy_static",
1563 | ]
1564 |
1565 | [[package]]
1566 | name = "thread_local"
1567 | version = "1.0.1"
1568 | source = "registry+https://github.com/rust-lang/crates.io-index"
1569 | checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
1570 | dependencies = [
1571 | "lazy_static",
1572 | ]
1573 |
1574 | [[package]]
1575 | name = "threadpool"
1576 | version = "1.7.1"
1577 | source = "registry+https://github.com/rust-lang/crates.io-index"
1578 | checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865"
1579 | dependencies = [
1580 | "num_cpus",
1581 | ]
1582 |
1583 | [[package]]
1584 | name = "time"
1585 | version = "0.1.42"
1586 | source = "registry+https://github.com/rust-lang/crates.io-index"
1587 | checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
1588 | dependencies = [
1589 | "libc",
1590 | "redox_syscall",
1591 | "winapi 0.3.8",
1592 | ]
1593 |
1594 | [[package]]
1595 | name = "tokio"
1596 | version = "0.2.13"
1597 | source = "registry+https://github.com/rust-lang/crates.io-index"
1598 | checksum = "0fa5e81d6bc4e67fe889d5783bd2a128ab2e0cfa487e0be16b6a8d177b101616"
1599 | dependencies = [
1600 | "bytes",
1601 | "fnv",
1602 | "futures-core",
1603 | "iovec",
1604 | "lazy_static",
1605 | "libc",
1606 | "memchr",
1607 | "mio",
1608 | "mio-uds",
1609 | "pin-project-lite",
1610 | "signal-hook-registry",
1611 | "slab",
1612 | "winapi 0.3.8",
1613 | ]
1614 |
1615 | [[package]]
1616 | name = "tokio-util"
1617 | version = "0.2.0"
1618 | source = "registry+https://github.com/rust-lang/crates.io-index"
1619 | checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"
1620 | dependencies = [
1621 | "bytes",
1622 | "futures-core",
1623 | "futures-sink",
1624 | "log",
1625 | "pin-project-lite",
1626 | "tokio",
1627 | ]
1628 |
1629 | [[package]]
1630 | name = "trust-dns-proto"
1631 | version = "0.18.0-alpha.2"
1632 | source = "registry+https://github.com/rust-lang/crates.io-index"
1633 | checksum = "2a7f3a2ab8a919f5eca52a468866a67ed7d3efa265d48a652a9a3452272b413f"
1634 | dependencies = [
1635 | "async-trait",
1636 | "enum-as-inner",
1637 | "failure",
1638 | "futures",
1639 | "idna",
1640 | "lazy_static",
1641 | "log",
1642 | "rand 0.7.3",
1643 | "smallvec",
1644 | "socket2",
1645 | "tokio",
1646 | "url",
1647 | ]
1648 |
1649 | [[package]]
1650 | name = "trust-dns-resolver"
1651 | version = "0.18.0-alpha.2"
1652 | source = "registry+https://github.com/rust-lang/crates.io-index"
1653 | checksum = "6f90b1502b226f8b2514c6d5b37bafa8c200d7ca4102d57dc36ee0f3b7a04a2f"
1654 | dependencies = [
1655 | "cfg-if",
1656 | "failure",
1657 | "futures",
1658 | "ipconfig",
1659 | "lazy_static",
1660 | "log",
1661 | "lru-cache",
1662 | "resolv-conf",
1663 | "smallvec",
1664 | "tokio",
1665 | "trust-dns-proto",
1666 | ]
1667 |
1668 | [[package]]
1669 | name = "ucd-util"
1670 | version = "0.1.7"
1671 | source = "registry+https://github.com/rust-lang/crates.io-index"
1672 | checksum = "5ccdc2daea7cf8bc50cd8710d170a9d816678e54943829c5082bb1594312cf8e"
1673 |
1674 | [[package]]
1675 | name = "unicode-bidi"
1676 | version = "0.3.4"
1677 | source = "registry+https://github.com/rust-lang/crates.io-index"
1678 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
1679 | dependencies = [
1680 | "matches",
1681 | ]
1682 |
1683 | [[package]]
1684 | name = "unicode-normalization"
1685 | version = "0.1.12"
1686 | source = "registry+https://github.com/rust-lang/crates.io-index"
1687 | checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4"
1688 | dependencies = [
1689 | "smallvec",
1690 | ]
1691 |
1692 | [[package]]
1693 | name = "unicode-segmentation"
1694 | version = "1.6.0"
1695 | source = "registry+https://github.com/rust-lang/crates.io-index"
1696 | checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
1697 |
1698 | [[package]]
1699 | name = "unicode-xid"
1700 | version = "0.1.0"
1701 | source = "registry+https://github.com/rust-lang/crates.io-index"
1702 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
1703 |
1704 | [[package]]
1705 | name = "unicode-xid"
1706 | version = "0.2.0"
1707 | source = "registry+https://github.com/rust-lang/crates.io-index"
1708 | checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
1709 |
1710 | [[package]]
1711 | name = "url"
1712 | version = "2.1.1"
1713 | source = "registry+https://github.com/rust-lang/crates.io-index"
1714 | checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb"
1715 | dependencies = [
1716 | "idna",
1717 | "matches",
1718 | "percent-encoding",
1719 | ]
1720 |
1721 | [[package]]
1722 | name = "utf8-ranges"
1723 | version = "1.0.4"
1724 | source = "registry+https://github.com/rust-lang/crates.io-index"
1725 | checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba"
1726 |
1727 | [[package]]
1728 | name = "uuid"
1729 | version = "0.6.5"
1730 | source = "registry+https://github.com/rust-lang/crates.io-index"
1731 | checksum = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363"
1732 | dependencies = [
1733 | "cfg-if",
1734 | "rand 0.4.6",
1735 | "serde",
1736 | ]
1737 |
1738 | [[package]]
1739 | name = "vcpkg"
1740 | version = "0.2.8"
1741 | source = "registry+https://github.com/rust-lang/crates.io-index"
1742 | checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168"
1743 |
1744 | [[package]]
1745 | name = "wasi"
1746 | version = "0.9.0+wasi-snapshot-preview1"
1747 | source = "registry+https://github.com/rust-lang/crates.io-index"
1748 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
1749 |
1750 | [[package]]
1751 | name = "widestring"
1752 | version = "0.4.0"
1753 | source = "registry+https://github.com/rust-lang/crates.io-index"
1754 | checksum = "effc0e4ff8085673ea7b9b2e3c73f6bd4d118810c9009ed8f1e16bd96c331db6"
1755 |
1756 | [[package]]
1757 | name = "winapi"
1758 | version = "0.2.8"
1759 | source = "registry+https://github.com/rust-lang/crates.io-index"
1760 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
1761 |
1762 | [[package]]
1763 | name = "winapi"
1764 | version = "0.3.8"
1765 | source = "registry+https://github.com/rust-lang/crates.io-index"
1766 | checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
1767 | dependencies = [
1768 | "winapi-i686-pc-windows-gnu",
1769 | "winapi-x86_64-pc-windows-gnu",
1770 | ]
1771 |
1772 | [[package]]
1773 | name = "winapi-build"
1774 | version = "0.1.1"
1775 | source = "registry+https://github.com/rust-lang/crates.io-index"
1776 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
1777 |
1778 | [[package]]
1779 | name = "winapi-i686-pc-windows-gnu"
1780 | version = "0.4.0"
1781 | source = "registry+https://github.com/rust-lang/crates.io-index"
1782 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1783 |
1784 | [[package]]
1785 | name = "winapi-util"
1786 | version = "0.1.3"
1787 | source = "registry+https://github.com/rust-lang/crates.io-index"
1788 | checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80"
1789 | dependencies = [
1790 | "winapi 0.3.8",
1791 | ]
1792 |
1793 | [[package]]
1794 | name = "winapi-x86_64-pc-windows-gnu"
1795 | version = "0.4.0"
1796 | source = "registry+https://github.com/rust-lang/crates.io-index"
1797 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1798 |
1799 | [[package]]
1800 | name = "winreg"
1801 | version = "0.6.2"
1802 | source = "registry+https://github.com/rust-lang/crates.io-index"
1803 | checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9"
1804 | dependencies = [
1805 | "winapi 0.3.8",
1806 | ]
1807 |
1808 | [[package]]
1809 | name = "winutil"
1810 | version = "0.1.1"
1811 | source = "registry+https://github.com/rust-lang/crates.io-index"
1812 | checksum = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e"
1813 | dependencies = [
1814 | "winapi 0.3.8",
1815 | ]
1816 |
1817 | [[package]]
1818 | name = "ws2_32-sys"
1819 | version = "0.2.1"
1820 | source = "registry+https://github.com/rust-lang/crates.io-index"
1821 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
1822 | dependencies = [
1823 | "winapi 0.2.8",
1824 | "winapi-build",
1825 | ]
1826 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "employee"
3 | version = "0.1.0"
4 | authors = ["Ola John "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 | [dependencies]
9 | actix-web = "3.0"
10 | actix-rt = "1.0"
11 | chrono = { version = "0.4", features = ["serde"] }
12 | dotenv = "0.11"
13 | diesel = { version = "1.4", features = ["postgres", "r2d2", "uuid", "chrono"] }
14 | diesel_migrations = "1.4"
15 | env_logger = "0.6"
16 | lazy_static = "1.4"
17 | listenfd = "0.3"
18 | log = "0.4"
19 | serde = "1.0"
20 | serde_json = "1.0"
21 | r2d2 = "0.8"
22 | uuid = { version = "0.6", features = ["serde", "v4"] }
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # rest-api-actix-web
2 |
3 | # Setup
4 |
5 | - Clone to your local env
6 | - Install Postgresql https://www.postgresql.org/download
7 | - Create Database
8 | - Setup Diesel https://diesel.rs/
9 | - type `cargo watch` or `systemfd --no-pid -s http::5000 -- cargo watch -x run` in the project folder
10 |
--------------------------------------------------------------------------------
/diesel.toml:
--------------------------------------------------------------------------------
1 | # For documentation on how to configure this file,
2 | # see diesel.rs/guides/configuring-diesel-cli
3 |
4 | [print_schema]
5 | file = "src/schema.rs"
6 |
--------------------------------------------------------------------------------
/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamhabbeboy/rest-api-actix-web/dd50dd83ae6672e941be702b1c809ed8a4e65baa/migrations/.gitkeep
--------------------------------------------------------------------------------
/migrations/00000000000000_diesel_initial_setup/down.sql:
--------------------------------------------------------------------------------
1 | -- This file was automatically created by Diesel to setup helper functions
2 | -- and other internal bookkeeping. This file is safe to edit, any future
3 | -- changes will be added to existing projects as new migrations.
4 |
5 | DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass);
6 | DROP FUNCTION IF EXISTS diesel_set_updated_at();
7 |
--------------------------------------------------------------------------------
/migrations/00000000000000_diesel_initial_setup/up.sql:
--------------------------------------------------------------------------------
1 | -- This file was automatically created by Diesel to setup helper functions
2 | -- and other internal bookkeeping. This file is safe to edit, any future
3 | -- changes will be added to existing projects as new migrations.
4 |
5 |
6 |
7 |
8 | -- Sets up a trigger for the given table to automatically set a column called
9 | -- `updated_at` whenever the row is modified (unless `updated_at` was included
10 | -- in the modified columns)
11 | --
12 | -- # Example
13 | --
14 | -- ```sql
15 | -- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW());
16 | --
17 | -- SELECT diesel_manage_updated_at('users');
18 | -- ```
19 | CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$
20 | BEGIN
21 | EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s
22 | FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl);
23 | END;
24 | $$ LANGUAGE plpgsql;
25 |
26 | CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$
27 | BEGIN
28 | IF (
29 | NEW IS DISTINCT FROM OLD AND
30 | NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at
31 | ) THEN
32 | NEW.updated_at := current_timestamp;
33 | END IF;
34 | RETURN NEW;
35 | END;
36 | $$ LANGUAGE plpgsql;
37 |
--------------------------------------------------------------------------------
/migrations/2020-03-09-134857_create_employees/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE employees
--------------------------------------------------------------------------------
/migrations/2020-03-09-134857_create_employees/up.sql:
--------------------------------------------------------------------------------
1 |
2 | CREATE TABLE "employees"
3 | (
4 | id SERIAL PRIMARY KEY,
5 | first_name VARCHAR NOT NULL,
6 | last_name VARCHAR NOT NULL,
7 | department VARCHAR NOT NULL,
8 | salary INT NOT NULL,
9 | age INT NOT NULL
10 |
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/src/db.rs:
--------------------------------------------------------------------------------
1 | use crate::error_handler::CustomError;
2 | use diesel::pg::PgConnection;
3 | use diesel::r2d2::ConnectionManager;
4 | use lazy_static::lazy_static;
5 | use r2d2;
6 | use std::env;
7 |
8 | type Pool = r2d2::Pool>;
9 | pub type DbConnection = r2d2::PooledConnection>;
10 |
11 | embed_migrations!();
12 |
13 | lazy_static! {
14 | static ref POOL: Pool = {
15 | let db_url = env::var("DATABASE_URL").expect("Database url not set");
16 | let manager = ConnectionManager::::new(db_url);
17 | Pool::new(manager).expect("Failed to create db pool")
18 | };
19 | }
20 |
21 | pub fn init() {
22 | lazy_static::initialize(&POOL);
23 | let conn = connection().expect("Failed to get db connection");
24 | embedded_migrations::run(&conn).unwrap();
25 | }
26 |
27 | pub fn connection() -> Result {
28 | POOL.get()
29 | .map_err(|e| CustomError::new(500, format!("Failed getting db connection: {}", e)))
30 | }
31 |
--------------------------------------------------------------------------------
/src/employees/mod.rs:
--------------------------------------------------------------------------------
1 | mod model;
2 | mod routes;
3 |
4 | pub use model::*;
5 | pub use routes::init_routes;
6 |
--------------------------------------------------------------------------------
/src/employees/model.rs:
--------------------------------------------------------------------------------
1 | use crate::db;
2 | use crate::error_handler::CustomError;
3 | use crate::schema::employees;
4 | use diesel::prelude::*;
5 | use serde::{Deserialize, Serialize};
6 |
7 | #[derive(Serialize, Deserialize, AsChangeset, Insertable)]
8 | #[table_name = "employees"]
9 | pub struct Employee {
10 | pub first_name: String,
11 | pub last_name: String,
12 | pub department: String,
13 | pub salary: i32,
14 | pub age: i32,
15 | }
16 |
17 | #[derive(Serialize, Deserialize, Queryable)]
18 | pub struct Employees {
19 | pub id: i32,
20 | pub first_name: String,
21 | pub last_name: String,
22 | pub department: String,
23 | pub salary: i32,
24 | pub age: i32,
25 | }
26 |
27 | impl Employees {
28 | pub fn find_all() -> Result, CustomError> {
29 | let conn = db::connection()?;
30 | let employees = employees::table.load::(&conn)?;
31 | Ok(employees)
32 | }
33 |
34 | pub fn find(id: i32) -> Result {
35 | let conn = db::connection()?;
36 | let employee = employees::table.filter(employees::id.eq(id)).first(&conn)?;
37 | Ok(employee)
38 | }
39 |
40 | pub fn create(employee: Employee) -> Result {
41 | let conn = db::connection()?;
42 | let employee = Employee::from(employee);
43 | let employee = diesel::insert_into(employees::table)
44 | .values(employee)
45 | .get_result(&conn)?;
46 | Ok(employee)
47 | }
48 |
49 | pub fn update(id: i32, employee: Employee) -> Result {
50 | let conn = db::connection()?;
51 | let employee = diesel::update(employees::table)
52 | .filter(employees::id.eq(id))
53 | .set(employee)
54 | .get_result(&conn)?;
55 | Ok(employee)
56 | }
57 |
58 | pub fn delete(id: i32) -> Result {
59 | let conn = db::connection()?;
60 | let res = diesel::delete(employees::table.filter(employees::id.eq(id))).execute(&conn)?;
61 | Ok(res)
62 | }
63 | }
64 |
65 | impl Employee {
66 | fn from(employee: Employee) -> Employee {
67 | Employee {
68 | first_name: employee.first_name,
69 | last_name: employee.last_name,
70 | department: employee.department,
71 | salary: employee.salary,
72 | age: employee.age,
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/employees/routes.rs:
--------------------------------------------------------------------------------
1 | use crate::employees::{Employee, Employees};
2 | use crate::error_handler::CustomError;
3 | use actix_web::{delete, get, post, put, web, HttpResponse};
4 | use serde_json::json;
5 |
6 | #[get("/employees")]
7 | async fn find_all() -> Result {
8 | let employees = web::block(|| Employees::find_all()).await.unwrap();
9 | Ok(HttpResponse::Ok().json(employees))
10 | }
11 |
12 | #[get("/employees/{id}")]
13 | async fn find(id: web::Path) -> Result {
14 | let employee = Employees::find(id.into_inner())?;
15 | Ok(HttpResponse::Ok().json(employee))
16 | }
17 |
18 | #[post("/employees")]
19 | async fn create(employee: web::Json) -> Result {
20 | let employee = Employees::create(employee.into_inner())?;
21 | Ok(HttpResponse::Ok().json(employee))
22 | }
23 |
24 | #[put("/employees/{id}")]
25 | async fn update(
26 | id: web::Path,
27 | employee: web::Json,
28 | ) -> Result {
29 | let employee = Employees::update(id.into_inner(), employee.into_inner())?;
30 | Ok(HttpResponse::Ok().json(employee))
31 | }
32 |
33 | #[delete("/employees/{id}")]
34 | async fn delete(id: web::Path) -> Result {
35 | let deleted_employee = Employees::delete(id.into_inner())?;
36 | Ok(HttpResponse::Ok().json(json!({ "deleted": deleted_employee })))
37 | }
38 |
39 | pub fn init_routes(config: &mut web::ServiceConfig) {
40 | config.service(find_all);
41 | config.service(find);
42 | config.service(create);
43 | config.service(update);
44 | config.service(delete);
45 | }
46 |
--------------------------------------------------------------------------------
/src/error_handler.rs:
--------------------------------------------------------------------------------
1 | use actix_web::http::StatusCode;
2 | use actix_web::{HttpResponse, ResponseError};
3 | use diesel::result::Error as DieselError;
4 | use serde::Deserialize;
5 | use serde_json::json;
6 | use std::fmt;
7 |
8 | #[derive(Debug, Deserialize)]
9 | pub struct CustomError {
10 | pub error_status_code: u16,
11 | pub error_message: String,
12 | }
13 |
14 | impl CustomError {
15 | pub fn new(error_status_code: u16, error_message: String) -> CustomError {
16 | CustomError {
17 | error_status_code,
18 | error_message,
19 | }
20 | }
21 | }
22 |
23 | impl fmt::Display for CustomError {
24 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
25 | f.write_str(self.error_message.as_str())
26 | }
27 | }
28 |
29 | impl From for CustomError {
30 | fn from(error: DieselError) -> CustomError {
31 | match error {
32 | DieselError::DatabaseError(_, err) => CustomError::new(409, err.message().to_string()),
33 | DieselError::NotFound => {
34 | CustomError::new(404, "The employee record not found".to_string())
35 | }
36 | err => CustomError::new(500, format!("Unknown Diesel error: {}", err)),
37 | }
38 | }
39 | }
40 |
41 | impl ResponseError for CustomError {
42 | fn error_response(&self) -> HttpResponse {
43 | let status_code = match StatusCode::from_u16(self.error_status_code) {
44 | Ok(status_code) => status_code,
45 | Err(_) => StatusCode::INTERNAL_SERVER_ERROR,
46 | };
47 |
48 | let error_message = match status_code.as_u16() < 500 {
49 | true => self.error_message.clone(),
50 | false => "Internal server error".to_string(),
51 | };
52 |
53 | HttpResponse::build(status_code).json(json!({ "message": error_message }))
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main.rs:
--------------------------------------------------------------------------------
1 | #[macro_use]
2 | extern crate diesel;
3 | #[macro_use]
4 | extern crate diesel_migrations;
5 |
6 | use actix_web::{App, HttpServer};
7 | use dotenv::dotenv;
8 | use listenfd::ListenFd;
9 | use std::env;
10 |
11 | mod db;
12 | mod employees;
13 | mod error_handler;
14 | mod schema;
15 |
16 | #[actix_rt::main]
17 | async fn main() -> std::io::Result<()> {
18 | dotenv().ok();
19 | db::init();
20 |
21 | let mut listenfd = ListenFd::from_env();
22 | let mut server = HttpServer::new(|| App::new().configure(employees::init_routes));
23 |
24 | server = match listenfd.take_tcp_listener(0)? {
25 | Some(listener) => server.listen(listener)?,
26 | None => {
27 | let host = env::var("HOST").expect("Please set host in .env");
28 | let port = env::var("PORT").expect("Please set port in .env");
29 | server.bind(format!("{}:{}", host, port))?
30 | }
31 | };
32 |
33 | server.run().await
34 | }
35 |
--------------------------------------------------------------------------------
/src/schema.rs:
--------------------------------------------------------------------------------
1 | table! {
2 | employees (id) {
3 | id -> Int4,
4 | first_name -> Varchar,
5 | last_name -> Varchar,
6 | department -> Varchar,
7 | salary -> Int4,
8 | age -> Int4,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------