├── .env ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Makefile ├── Note App.postman_collection.json ├── README.md ├── docker-compose.yml ├── migrations ├── 20230123154041_init.down.sql └── 20230123154041_init.up.sql └── src ├── handler.rs ├── main.rs ├── model.rs └── schema.rs /.env: -------------------------------------------------------------------------------- 1 | POSTGRES_HOST=127.0.0.1 2 | POSTGRES_PORT=6500 3 | POSTGRES_USER=admin 4 | POSTGRES_PASSWORD=password123 5 | POSTGRES_DB=rust_sqlx 6 | 7 | DATABASE_URL=postgresql://admin:password123@localhost:6500/rust_sqlx?schema=public 8 | 9 | PGADMIN_DEFAULT_EMAIL=admin@admin.com 10 | PGADMIN_DEFAULT_PASSWORD=password123 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "actix-codec" 7 | version = "0.5.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" 10 | dependencies = [ 11 | "bitflags", 12 | "bytes", 13 | "futures-core", 14 | "futures-sink", 15 | "log", 16 | "memchr", 17 | "pin-project-lite", 18 | "tokio", 19 | "tokio-util", 20 | ] 21 | 22 | [[package]] 23 | name = "actix-cors" 24 | version = "0.6.4" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "b340e9cfa5b08690aae90fb61beb44e9b06f44fe3d0f93781aaa58cfba86245e" 27 | dependencies = [ 28 | "actix-utils", 29 | "actix-web", 30 | "derive_more", 31 | "futures-util", 32 | "log", 33 | "once_cell", 34 | "smallvec", 35 | ] 36 | 37 | [[package]] 38 | name = "actix-http" 39 | version = "3.2.2" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724" 42 | dependencies = [ 43 | "actix-codec", 44 | "actix-rt", 45 | "actix-service", 46 | "actix-utils", 47 | "ahash", 48 | "base64", 49 | "bitflags", 50 | "brotli", 51 | "bytes", 52 | "bytestring", 53 | "derive_more", 54 | "encoding_rs", 55 | "flate2", 56 | "futures-core", 57 | "h2", 58 | "http", 59 | "httparse", 60 | "httpdate", 61 | "itoa", 62 | "language-tags", 63 | "local-channel", 64 | "mime", 65 | "percent-encoding", 66 | "pin-project-lite", 67 | "rand", 68 | "sha1", 69 | "smallvec", 70 | "tracing", 71 | "zstd", 72 | ] 73 | 74 | [[package]] 75 | name = "actix-macros" 76 | version = "0.2.3" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" 79 | dependencies = [ 80 | "quote", 81 | "syn", 82 | ] 83 | 84 | [[package]] 85 | name = "actix-router" 86 | version = "0.5.1" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" 89 | dependencies = [ 90 | "bytestring", 91 | "http", 92 | "regex", 93 | "serde", 94 | "tracing", 95 | ] 96 | 97 | [[package]] 98 | name = "actix-rt" 99 | version = "2.7.0" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" 102 | dependencies = [ 103 | "futures-core", 104 | "tokio", 105 | ] 106 | 107 | [[package]] 108 | name = "actix-server" 109 | version = "2.1.1" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" 112 | dependencies = [ 113 | "actix-rt", 114 | "actix-service", 115 | "actix-utils", 116 | "futures-core", 117 | "futures-util", 118 | "mio", 119 | "num_cpus", 120 | "socket2", 121 | "tokio", 122 | "tracing", 123 | ] 124 | 125 | [[package]] 126 | name = "actix-service" 127 | version = "2.0.2" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" 130 | dependencies = [ 131 | "futures-core", 132 | "paste", 133 | "pin-project-lite", 134 | ] 135 | 136 | [[package]] 137 | name = "actix-utils" 138 | version = "3.0.1" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" 141 | dependencies = [ 142 | "local-waker", 143 | "pin-project-lite", 144 | ] 145 | 146 | [[package]] 147 | name = "actix-web" 148 | version = "4.2.1" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9" 151 | dependencies = [ 152 | "actix-codec", 153 | "actix-http", 154 | "actix-macros", 155 | "actix-router", 156 | "actix-rt", 157 | "actix-server", 158 | "actix-service", 159 | "actix-utils", 160 | "actix-web-codegen", 161 | "ahash", 162 | "bytes", 163 | "bytestring", 164 | "cfg-if", 165 | "cookie", 166 | "derive_more", 167 | "encoding_rs", 168 | "futures-core", 169 | "futures-util", 170 | "http", 171 | "itoa", 172 | "language-tags", 173 | "log", 174 | "mime", 175 | "once_cell", 176 | "pin-project-lite", 177 | "regex", 178 | "serde", 179 | "serde_json", 180 | "serde_urlencoded", 181 | "smallvec", 182 | "socket2", 183 | "time 0.3.17", 184 | "url", 185 | ] 186 | 187 | [[package]] 188 | name = "actix-web-codegen" 189 | version = "4.1.0" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" 192 | dependencies = [ 193 | "actix-router", 194 | "proc-macro2", 195 | "quote", 196 | "syn", 197 | ] 198 | 199 | [[package]] 200 | name = "adler" 201 | version = "1.0.2" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 204 | 205 | [[package]] 206 | name = "ahash" 207 | version = "0.7.6" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 210 | dependencies = [ 211 | "getrandom", 212 | "once_cell", 213 | "version_check", 214 | ] 215 | 216 | [[package]] 217 | name = "aho-corasick" 218 | version = "0.7.20" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 221 | dependencies = [ 222 | "memchr", 223 | ] 224 | 225 | [[package]] 226 | name = "alloc-no-stdlib" 227 | version = "2.0.4" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 230 | 231 | [[package]] 232 | name = "alloc-stdlib" 233 | version = "0.2.2" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 236 | dependencies = [ 237 | "alloc-no-stdlib", 238 | ] 239 | 240 | [[package]] 241 | name = "android_system_properties" 242 | version = "0.1.5" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 245 | dependencies = [ 246 | "libc", 247 | ] 248 | 249 | [[package]] 250 | name = "async-channel" 251 | version = "1.8.0" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" 254 | dependencies = [ 255 | "concurrent-queue", 256 | "event-listener", 257 | "futures-core", 258 | ] 259 | 260 | [[package]] 261 | name = "async-executor" 262 | version = "1.5.0" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" 265 | dependencies = [ 266 | "async-lock", 267 | "async-task", 268 | "concurrent-queue", 269 | "fastrand", 270 | "futures-lite", 271 | "slab", 272 | ] 273 | 274 | [[package]] 275 | name = "async-global-executor" 276 | version = "2.3.1" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" 279 | dependencies = [ 280 | "async-channel", 281 | "async-executor", 282 | "async-io", 283 | "async-lock", 284 | "blocking", 285 | "futures-lite", 286 | "once_cell", 287 | ] 288 | 289 | [[package]] 290 | name = "async-io" 291 | version = "1.12.0" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" 294 | dependencies = [ 295 | "async-lock", 296 | "autocfg", 297 | "concurrent-queue", 298 | "futures-lite", 299 | "libc", 300 | "log", 301 | "parking", 302 | "polling", 303 | "slab", 304 | "socket2", 305 | "waker-fn", 306 | "windows-sys", 307 | ] 308 | 309 | [[package]] 310 | name = "async-lock" 311 | version = "2.6.0" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" 314 | dependencies = [ 315 | "event-listener", 316 | "futures-lite", 317 | ] 318 | 319 | [[package]] 320 | name = "async-native-tls" 321 | version = "0.4.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "d57d4cec3c647232e1094dc013546c0b33ce785d8aeb251e1f20dfaf8a9a13fe" 324 | dependencies = [ 325 | "futures-util", 326 | "native-tls", 327 | "thiserror", 328 | "url", 329 | ] 330 | 331 | [[package]] 332 | name = "async-process" 333 | version = "1.6.0" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" 336 | dependencies = [ 337 | "async-io", 338 | "async-lock", 339 | "autocfg", 340 | "blocking", 341 | "cfg-if", 342 | "event-listener", 343 | "futures-lite", 344 | "libc", 345 | "signal-hook", 346 | "windows-sys", 347 | ] 348 | 349 | [[package]] 350 | name = "async-std" 351 | version = "1.12.0" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" 354 | dependencies = [ 355 | "async-channel", 356 | "async-global-executor", 357 | "async-io", 358 | "async-lock", 359 | "async-process", 360 | "crossbeam-utils", 361 | "futures-channel", 362 | "futures-core", 363 | "futures-io", 364 | "futures-lite", 365 | "gloo-timers", 366 | "kv-log-macro", 367 | "log", 368 | "memchr", 369 | "once_cell", 370 | "pin-project-lite", 371 | "pin-utils", 372 | "slab", 373 | "wasm-bindgen-futures", 374 | ] 375 | 376 | [[package]] 377 | name = "async-task" 378 | version = "4.3.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" 381 | 382 | [[package]] 383 | name = "atoi" 384 | version = "1.0.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" 387 | dependencies = [ 388 | "num-traits", 389 | ] 390 | 391 | [[package]] 392 | name = "atomic-waker" 393 | version = "1.1.0" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" 396 | 397 | [[package]] 398 | name = "autocfg" 399 | version = "1.1.0" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 402 | 403 | [[package]] 404 | name = "base64" 405 | version = "0.13.1" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 408 | 409 | [[package]] 410 | name = "bitflags" 411 | version = "1.3.2" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 414 | 415 | [[package]] 416 | name = "block-buffer" 417 | version = "0.10.3" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 420 | dependencies = [ 421 | "generic-array", 422 | ] 423 | 424 | [[package]] 425 | name = "blocking" 426 | version = "1.3.0" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" 429 | dependencies = [ 430 | "async-channel", 431 | "async-lock", 432 | "async-task", 433 | "atomic-waker", 434 | "fastrand", 435 | "futures-lite", 436 | ] 437 | 438 | [[package]] 439 | name = "brotli" 440 | version = "3.3.4" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" 443 | dependencies = [ 444 | "alloc-no-stdlib", 445 | "alloc-stdlib", 446 | "brotli-decompressor", 447 | ] 448 | 449 | [[package]] 450 | name = "brotli-decompressor" 451 | version = "2.3.4" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" 454 | dependencies = [ 455 | "alloc-no-stdlib", 456 | "alloc-stdlib", 457 | ] 458 | 459 | [[package]] 460 | name = "bumpalo" 461 | version = "3.12.0" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 464 | 465 | [[package]] 466 | name = "byteorder" 467 | version = "1.4.3" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 470 | 471 | [[package]] 472 | name = "bytes" 473 | version = "1.3.0" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" 476 | 477 | [[package]] 478 | name = "bytestring" 479 | version = "1.2.0" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "f7f83e57d9154148e355404702e2694463241880b939570d7c97c014da7a69a1" 482 | dependencies = [ 483 | "bytes", 484 | ] 485 | 486 | [[package]] 487 | name = "cc" 488 | version = "1.0.78" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" 491 | dependencies = [ 492 | "jobserver", 493 | ] 494 | 495 | [[package]] 496 | name = "cfg-if" 497 | version = "1.0.0" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 500 | 501 | [[package]] 502 | name = "chrono" 503 | version = "0.4.23" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" 506 | dependencies = [ 507 | "iana-time-zone", 508 | "js-sys", 509 | "num-integer", 510 | "num-traits", 511 | "serde", 512 | "time 0.1.45", 513 | "wasm-bindgen", 514 | "winapi", 515 | ] 516 | 517 | [[package]] 518 | name = "codespan-reporting" 519 | version = "0.11.1" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 522 | dependencies = [ 523 | "termcolor", 524 | "unicode-width", 525 | ] 526 | 527 | [[package]] 528 | name = "concurrent-queue" 529 | version = "2.1.0" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" 532 | dependencies = [ 533 | "crossbeam-utils", 534 | ] 535 | 536 | [[package]] 537 | name = "convert_case" 538 | version = "0.4.0" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 541 | 542 | [[package]] 543 | name = "cookie" 544 | version = "0.16.2" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" 547 | dependencies = [ 548 | "percent-encoding", 549 | "time 0.3.17", 550 | "version_check", 551 | ] 552 | 553 | [[package]] 554 | name = "core-foundation" 555 | version = "0.9.3" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 558 | dependencies = [ 559 | "core-foundation-sys", 560 | "libc", 561 | ] 562 | 563 | [[package]] 564 | name = "core-foundation-sys" 565 | version = "0.8.3" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 568 | 569 | [[package]] 570 | name = "cpufeatures" 571 | version = "0.2.5" 572 | source = "registry+https://github.com/rust-lang/crates.io-index" 573 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 574 | dependencies = [ 575 | "libc", 576 | ] 577 | 578 | [[package]] 579 | name = "crc" 580 | version = "3.0.0" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" 583 | dependencies = [ 584 | "crc-catalog", 585 | ] 586 | 587 | [[package]] 588 | name = "crc-catalog" 589 | version = "2.2.0" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" 592 | 593 | [[package]] 594 | name = "crc32fast" 595 | version = "1.3.2" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 598 | dependencies = [ 599 | "cfg-if", 600 | ] 601 | 602 | [[package]] 603 | name = "crossbeam-queue" 604 | version = "0.3.8" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" 607 | dependencies = [ 608 | "cfg-if", 609 | "crossbeam-utils", 610 | ] 611 | 612 | [[package]] 613 | name = "crossbeam-utils" 614 | version = "0.8.14" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" 617 | dependencies = [ 618 | "cfg-if", 619 | ] 620 | 621 | [[package]] 622 | name = "crypto-common" 623 | version = "0.1.6" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 626 | dependencies = [ 627 | "generic-array", 628 | "typenum", 629 | ] 630 | 631 | [[package]] 632 | name = "ctor" 633 | version = "0.1.26" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" 636 | dependencies = [ 637 | "quote", 638 | "syn", 639 | ] 640 | 641 | [[package]] 642 | name = "cxx" 643 | version = "1.0.87" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e" 646 | dependencies = [ 647 | "cc", 648 | "cxxbridge-flags", 649 | "cxxbridge-macro", 650 | "link-cplusplus", 651 | ] 652 | 653 | [[package]] 654 | name = "cxx-build" 655 | version = "1.0.87" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200" 658 | dependencies = [ 659 | "cc", 660 | "codespan-reporting", 661 | "once_cell", 662 | "proc-macro2", 663 | "quote", 664 | "scratch", 665 | "syn", 666 | ] 667 | 668 | [[package]] 669 | name = "cxxbridge-flags" 670 | version = "1.0.87" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea" 673 | 674 | [[package]] 675 | name = "cxxbridge-macro" 676 | version = "1.0.87" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e" 679 | dependencies = [ 680 | "proc-macro2", 681 | "quote", 682 | "syn", 683 | ] 684 | 685 | [[package]] 686 | name = "derive_more" 687 | version = "0.99.17" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 690 | dependencies = [ 691 | "convert_case", 692 | "proc-macro2", 693 | "quote", 694 | "rustc_version", 695 | "syn", 696 | ] 697 | 698 | [[package]] 699 | name = "digest" 700 | version = "0.10.6" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 703 | dependencies = [ 704 | "block-buffer", 705 | "crypto-common", 706 | "subtle", 707 | ] 708 | 709 | [[package]] 710 | name = "dirs" 711 | version = "4.0.0" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 714 | dependencies = [ 715 | "dirs-sys", 716 | ] 717 | 718 | [[package]] 719 | name = "dirs-sys" 720 | version = "0.3.7" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 723 | dependencies = [ 724 | "libc", 725 | "redox_users", 726 | "winapi", 727 | ] 728 | 729 | [[package]] 730 | name = "dotenv" 731 | version = "0.15.0" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 734 | 735 | [[package]] 736 | name = "dotenvy" 737 | version = "0.15.6" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" 740 | 741 | [[package]] 742 | name = "either" 743 | version = "1.8.0" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 746 | 747 | [[package]] 748 | name = "encoding_rs" 749 | version = "0.8.31" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" 752 | dependencies = [ 753 | "cfg-if", 754 | ] 755 | 756 | [[package]] 757 | name = "env_logger" 758 | version = "0.10.0" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" 761 | dependencies = [ 762 | "humantime", 763 | "is-terminal", 764 | "log", 765 | "regex", 766 | "termcolor", 767 | ] 768 | 769 | [[package]] 770 | name = "errno" 771 | version = "0.2.8" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" 774 | dependencies = [ 775 | "errno-dragonfly", 776 | "libc", 777 | "winapi", 778 | ] 779 | 780 | [[package]] 781 | name = "errno-dragonfly" 782 | version = "0.1.2" 783 | source = "registry+https://github.com/rust-lang/crates.io-index" 784 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 785 | dependencies = [ 786 | "cc", 787 | "libc", 788 | ] 789 | 790 | [[package]] 791 | name = "event-listener" 792 | version = "2.5.3" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 795 | 796 | [[package]] 797 | name = "fastrand" 798 | version = "1.8.0" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 801 | dependencies = [ 802 | "instant", 803 | ] 804 | 805 | [[package]] 806 | name = "flate2" 807 | version = "1.0.25" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" 810 | dependencies = [ 811 | "crc32fast", 812 | "miniz_oxide", 813 | ] 814 | 815 | [[package]] 816 | name = "fnv" 817 | version = "1.0.7" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 820 | 821 | [[package]] 822 | name = "foreign-types" 823 | version = "0.3.2" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 826 | dependencies = [ 827 | "foreign-types-shared", 828 | ] 829 | 830 | [[package]] 831 | name = "foreign-types-shared" 832 | version = "0.1.1" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 835 | 836 | [[package]] 837 | name = "form_urlencoded" 838 | version = "1.1.0" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 841 | dependencies = [ 842 | "percent-encoding", 843 | ] 844 | 845 | [[package]] 846 | name = "futures-channel" 847 | version = "0.3.25" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" 850 | dependencies = [ 851 | "futures-core", 852 | "futures-sink", 853 | ] 854 | 855 | [[package]] 856 | name = "futures-core" 857 | version = "0.3.25" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" 860 | 861 | [[package]] 862 | name = "futures-intrusive" 863 | version = "0.4.2" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" 866 | dependencies = [ 867 | "futures-core", 868 | "lock_api", 869 | "parking_lot 0.11.2", 870 | ] 871 | 872 | [[package]] 873 | name = "futures-io" 874 | version = "0.3.25" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" 877 | 878 | [[package]] 879 | name = "futures-lite" 880 | version = "1.12.0" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" 883 | dependencies = [ 884 | "fastrand", 885 | "futures-core", 886 | "futures-io", 887 | "memchr", 888 | "parking", 889 | "pin-project-lite", 890 | "waker-fn", 891 | ] 892 | 893 | [[package]] 894 | name = "futures-macro" 895 | version = "0.3.25" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" 898 | dependencies = [ 899 | "proc-macro2", 900 | "quote", 901 | "syn", 902 | ] 903 | 904 | [[package]] 905 | name = "futures-sink" 906 | version = "0.3.25" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" 909 | 910 | [[package]] 911 | name = "futures-task" 912 | version = "0.3.25" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" 915 | 916 | [[package]] 917 | name = "futures-util" 918 | version = "0.3.25" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" 921 | dependencies = [ 922 | "futures-core", 923 | "futures-io", 924 | "futures-macro", 925 | "futures-sink", 926 | "futures-task", 927 | "memchr", 928 | "pin-project-lite", 929 | "pin-utils", 930 | "slab", 931 | ] 932 | 933 | [[package]] 934 | name = "generic-array" 935 | version = "0.14.6" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 938 | dependencies = [ 939 | "typenum", 940 | "version_check", 941 | ] 942 | 943 | [[package]] 944 | name = "getrandom" 945 | version = "0.2.8" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 948 | dependencies = [ 949 | "cfg-if", 950 | "libc", 951 | "wasi 0.11.0+wasi-snapshot-preview1", 952 | ] 953 | 954 | [[package]] 955 | name = "gloo-timers" 956 | version = "0.2.6" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" 959 | dependencies = [ 960 | "futures-channel", 961 | "futures-core", 962 | "js-sys", 963 | "wasm-bindgen", 964 | ] 965 | 966 | [[package]] 967 | name = "h2" 968 | version = "0.3.15" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" 971 | dependencies = [ 972 | "bytes", 973 | "fnv", 974 | "futures-core", 975 | "futures-sink", 976 | "futures-util", 977 | "http", 978 | "indexmap", 979 | "slab", 980 | "tokio", 981 | "tokio-util", 982 | "tracing", 983 | ] 984 | 985 | [[package]] 986 | name = "hashbrown" 987 | version = "0.12.3" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 990 | dependencies = [ 991 | "ahash", 992 | ] 993 | 994 | [[package]] 995 | name = "hashlink" 996 | version = "0.8.1" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" 999 | dependencies = [ 1000 | "hashbrown", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "heck" 1005 | version = "0.4.0" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 1008 | dependencies = [ 1009 | "unicode-segmentation", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "hermit-abi" 1014 | version = "0.2.6" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 1017 | dependencies = [ 1018 | "libc", 1019 | ] 1020 | 1021 | [[package]] 1022 | name = "hex" 1023 | version = "0.4.3" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1026 | 1027 | [[package]] 1028 | name = "hkdf" 1029 | version = "0.12.3" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" 1032 | dependencies = [ 1033 | "hmac", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "hmac" 1038 | version = "0.12.1" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1041 | dependencies = [ 1042 | "digest", 1043 | ] 1044 | 1045 | [[package]] 1046 | name = "http" 1047 | version = "0.2.8" 1048 | source = "registry+https://github.com/rust-lang/crates.io-index" 1049 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" 1050 | dependencies = [ 1051 | "bytes", 1052 | "fnv", 1053 | "itoa", 1054 | ] 1055 | 1056 | [[package]] 1057 | name = "httparse" 1058 | version = "1.8.0" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 1061 | 1062 | [[package]] 1063 | name = "httpdate" 1064 | version = "1.0.2" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 1067 | 1068 | [[package]] 1069 | name = "humantime" 1070 | version = "2.1.0" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1073 | 1074 | [[package]] 1075 | name = "iana-time-zone" 1076 | version = "0.1.53" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" 1079 | dependencies = [ 1080 | "android_system_properties", 1081 | "core-foundation-sys", 1082 | "iana-time-zone-haiku", 1083 | "js-sys", 1084 | "wasm-bindgen", 1085 | "winapi", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "iana-time-zone-haiku" 1090 | version = "0.1.1" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 1093 | dependencies = [ 1094 | "cxx", 1095 | "cxx-build", 1096 | ] 1097 | 1098 | [[package]] 1099 | name = "idna" 1100 | version = "0.3.0" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 1103 | dependencies = [ 1104 | "unicode-bidi", 1105 | "unicode-normalization", 1106 | ] 1107 | 1108 | [[package]] 1109 | name = "indexmap" 1110 | version = "1.9.2" 1111 | source = "registry+https://github.com/rust-lang/crates.io-index" 1112 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" 1113 | dependencies = [ 1114 | "autocfg", 1115 | "hashbrown", 1116 | ] 1117 | 1118 | [[package]] 1119 | name = "instant" 1120 | version = "0.1.12" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1123 | dependencies = [ 1124 | "cfg-if", 1125 | ] 1126 | 1127 | [[package]] 1128 | name = "io-lifetimes" 1129 | version = "1.0.4" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" 1132 | dependencies = [ 1133 | "libc", 1134 | "windows-sys", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "is-terminal" 1139 | version = "0.4.2" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" 1142 | dependencies = [ 1143 | "hermit-abi", 1144 | "io-lifetimes", 1145 | "rustix", 1146 | "windows-sys", 1147 | ] 1148 | 1149 | [[package]] 1150 | name = "itertools" 1151 | version = "0.10.5" 1152 | source = "registry+https://github.com/rust-lang/crates.io-index" 1153 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1154 | dependencies = [ 1155 | "either", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "itoa" 1160 | version = "1.0.5" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" 1163 | 1164 | [[package]] 1165 | name = "jobserver" 1166 | version = "0.1.25" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" 1169 | dependencies = [ 1170 | "libc", 1171 | ] 1172 | 1173 | [[package]] 1174 | name = "js-sys" 1175 | version = "0.3.60" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 1178 | dependencies = [ 1179 | "wasm-bindgen", 1180 | ] 1181 | 1182 | [[package]] 1183 | name = "kv-log-macro" 1184 | version = "1.0.7" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 1187 | dependencies = [ 1188 | "log", 1189 | ] 1190 | 1191 | [[package]] 1192 | name = "language-tags" 1193 | version = "0.3.2" 1194 | source = "registry+https://github.com/rust-lang/crates.io-index" 1195 | checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 1196 | 1197 | [[package]] 1198 | name = "lazy_static" 1199 | version = "1.4.0" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1202 | 1203 | [[package]] 1204 | name = "libc" 1205 | version = "0.2.139" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" 1208 | 1209 | [[package]] 1210 | name = "link-cplusplus" 1211 | version = "1.0.8" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 1214 | dependencies = [ 1215 | "cc", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "linux-raw-sys" 1220 | version = "0.1.4" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" 1223 | 1224 | [[package]] 1225 | name = "local-channel" 1226 | version = "0.1.3" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" 1229 | dependencies = [ 1230 | "futures-core", 1231 | "futures-sink", 1232 | "futures-util", 1233 | "local-waker", 1234 | ] 1235 | 1236 | [[package]] 1237 | name = "local-waker" 1238 | version = "0.1.3" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" 1241 | 1242 | [[package]] 1243 | name = "lock_api" 1244 | version = "0.4.9" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 1247 | dependencies = [ 1248 | "autocfg", 1249 | "scopeguard", 1250 | ] 1251 | 1252 | [[package]] 1253 | name = "log" 1254 | version = "0.4.17" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1257 | dependencies = [ 1258 | "cfg-if", 1259 | "value-bag", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "md-5" 1264 | version = "0.10.5" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" 1267 | dependencies = [ 1268 | "digest", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "memchr" 1273 | version = "2.5.0" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1276 | 1277 | [[package]] 1278 | name = "mime" 1279 | version = "0.3.16" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 1282 | 1283 | [[package]] 1284 | name = "minimal-lexical" 1285 | version = "0.2.1" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1288 | 1289 | [[package]] 1290 | name = "miniz_oxide" 1291 | version = "0.6.2" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 1294 | dependencies = [ 1295 | "adler", 1296 | ] 1297 | 1298 | [[package]] 1299 | name = "mio" 1300 | version = "0.8.5" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 1303 | dependencies = [ 1304 | "libc", 1305 | "log", 1306 | "wasi 0.11.0+wasi-snapshot-preview1", 1307 | "windows-sys", 1308 | ] 1309 | 1310 | [[package]] 1311 | name = "native-tls" 1312 | version = "0.2.11" 1313 | source = "registry+https://github.com/rust-lang/crates.io-index" 1314 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 1315 | dependencies = [ 1316 | "lazy_static", 1317 | "libc", 1318 | "log", 1319 | "openssl", 1320 | "openssl-probe", 1321 | "openssl-sys", 1322 | "schannel", 1323 | "security-framework", 1324 | "security-framework-sys", 1325 | "tempfile", 1326 | ] 1327 | 1328 | [[package]] 1329 | name = "nom" 1330 | version = "7.1.3" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1333 | dependencies = [ 1334 | "memchr", 1335 | "minimal-lexical", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "num-integer" 1340 | version = "0.1.45" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1343 | dependencies = [ 1344 | "autocfg", 1345 | "num-traits", 1346 | ] 1347 | 1348 | [[package]] 1349 | name = "num-traits" 1350 | version = "0.2.15" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1353 | dependencies = [ 1354 | "autocfg", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "num_cpus" 1359 | version = "1.15.0" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 1362 | dependencies = [ 1363 | "hermit-abi", 1364 | "libc", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "once_cell" 1369 | version = "1.17.0" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" 1372 | 1373 | [[package]] 1374 | name = "openssl" 1375 | version = "0.10.45" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" 1378 | dependencies = [ 1379 | "bitflags", 1380 | "cfg-if", 1381 | "foreign-types", 1382 | "libc", 1383 | "once_cell", 1384 | "openssl-macros", 1385 | "openssl-sys", 1386 | ] 1387 | 1388 | [[package]] 1389 | name = "openssl-macros" 1390 | version = "0.1.0" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 1393 | dependencies = [ 1394 | "proc-macro2", 1395 | "quote", 1396 | "syn", 1397 | ] 1398 | 1399 | [[package]] 1400 | name = "openssl-probe" 1401 | version = "0.1.5" 1402 | source = "registry+https://github.com/rust-lang/crates.io-index" 1403 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 1404 | 1405 | [[package]] 1406 | name = "openssl-sys" 1407 | version = "0.9.80" 1408 | source = "registry+https://github.com/rust-lang/crates.io-index" 1409 | checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" 1410 | dependencies = [ 1411 | "autocfg", 1412 | "cc", 1413 | "libc", 1414 | "pkg-config", 1415 | "vcpkg", 1416 | ] 1417 | 1418 | [[package]] 1419 | name = "parking" 1420 | version = "2.0.0" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" 1423 | 1424 | [[package]] 1425 | name = "parking_lot" 1426 | version = "0.11.2" 1427 | source = "registry+https://github.com/rust-lang/crates.io-index" 1428 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1429 | dependencies = [ 1430 | "instant", 1431 | "lock_api", 1432 | "parking_lot_core 0.8.6", 1433 | ] 1434 | 1435 | [[package]] 1436 | name = "parking_lot" 1437 | version = "0.12.1" 1438 | source = "registry+https://github.com/rust-lang/crates.io-index" 1439 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1440 | dependencies = [ 1441 | "lock_api", 1442 | "parking_lot_core 0.9.6", 1443 | ] 1444 | 1445 | [[package]] 1446 | name = "parking_lot_core" 1447 | version = "0.8.6" 1448 | source = "registry+https://github.com/rust-lang/crates.io-index" 1449 | checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" 1450 | dependencies = [ 1451 | "cfg-if", 1452 | "instant", 1453 | "libc", 1454 | "redox_syscall", 1455 | "smallvec", 1456 | "winapi", 1457 | ] 1458 | 1459 | [[package]] 1460 | name = "parking_lot_core" 1461 | version = "0.9.6" 1462 | source = "registry+https://github.com/rust-lang/crates.io-index" 1463 | checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" 1464 | dependencies = [ 1465 | "cfg-if", 1466 | "libc", 1467 | "redox_syscall", 1468 | "smallvec", 1469 | "windows-sys", 1470 | ] 1471 | 1472 | [[package]] 1473 | name = "paste" 1474 | version = "1.0.11" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" 1477 | 1478 | [[package]] 1479 | name = "percent-encoding" 1480 | version = "2.2.0" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1483 | 1484 | [[package]] 1485 | name = "pin-project-lite" 1486 | version = "0.2.9" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1489 | 1490 | [[package]] 1491 | name = "pin-utils" 1492 | version = "0.1.0" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1495 | 1496 | [[package]] 1497 | name = "pkg-config" 1498 | version = "0.3.26" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 1501 | 1502 | [[package]] 1503 | name = "polling" 1504 | version = "2.5.2" 1505 | source = "registry+https://github.com/rust-lang/crates.io-index" 1506 | checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" 1507 | dependencies = [ 1508 | "autocfg", 1509 | "cfg-if", 1510 | "libc", 1511 | "log", 1512 | "wepoll-ffi", 1513 | "windows-sys", 1514 | ] 1515 | 1516 | [[package]] 1517 | name = "ppv-lite86" 1518 | version = "0.2.17" 1519 | source = "registry+https://github.com/rust-lang/crates.io-index" 1520 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1521 | 1522 | [[package]] 1523 | name = "proc-macro2" 1524 | version = "1.0.50" 1525 | source = "registry+https://github.com/rust-lang/crates.io-index" 1526 | checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" 1527 | dependencies = [ 1528 | "unicode-ident", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "quote" 1533 | version = "1.0.23" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" 1536 | dependencies = [ 1537 | "proc-macro2", 1538 | ] 1539 | 1540 | [[package]] 1541 | name = "rand" 1542 | version = "0.8.5" 1543 | source = "registry+https://github.com/rust-lang/crates.io-index" 1544 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1545 | dependencies = [ 1546 | "libc", 1547 | "rand_chacha", 1548 | "rand_core", 1549 | ] 1550 | 1551 | [[package]] 1552 | name = "rand_chacha" 1553 | version = "0.3.1" 1554 | source = "registry+https://github.com/rust-lang/crates.io-index" 1555 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1556 | dependencies = [ 1557 | "ppv-lite86", 1558 | "rand_core", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "rand_core" 1563 | version = "0.6.4" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1566 | dependencies = [ 1567 | "getrandom", 1568 | ] 1569 | 1570 | [[package]] 1571 | name = "redox_syscall" 1572 | version = "0.2.16" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1575 | dependencies = [ 1576 | "bitflags", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "redox_users" 1581 | version = "0.4.3" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1584 | dependencies = [ 1585 | "getrandom", 1586 | "redox_syscall", 1587 | "thiserror", 1588 | ] 1589 | 1590 | [[package]] 1591 | name = "regex" 1592 | version = "1.7.1" 1593 | source = "registry+https://github.com/rust-lang/crates.io-index" 1594 | checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" 1595 | dependencies = [ 1596 | "aho-corasick", 1597 | "memchr", 1598 | "regex-syntax", 1599 | ] 1600 | 1601 | [[package]] 1602 | name = "regex-syntax" 1603 | version = "0.6.28" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" 1606 | 1607 | [[package]] 1608 | name = "remove_dir_all" 1609 | version = "0.5.3" 1610 | source = "registry+https://github.com/rust-lang/crates.io-index" 1611 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1612 | dependencies = [ 1613 | "winapi", 1614 | ] 1615 | 1616 | [[package]] 1617 | name = "rust-postgres-crud-sqlx" 1618 | version = "0.1.0" 1619 | dependencies = [ 1620 | "actix-cors", 1621 | "actix-web", 1622 | "chrono", 1623 | "dotenv", 1624 | "env_logger", 1625 | "serde", 1626 | "serde_json", 1627 | "sqlx", 1628 | "uuid", 1629 | ] 1630 | 1631 | [[package]] 1632 | name = "rustc_version" 1633 | version = "0.4.0" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1636 | dependencies = [ 1637 | "semver", 1638 | ] 1639 | 1640 | [[package]] 1641 | name = "rustix" 1642 | version = "0.36.7" 1643 | source = "registry+https://github.com/rust-lang/crates.io-index" 1644 | checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" 1645 | dependencies = [ 1646 | "bitflags", 1647 | "errno", 1648 | "io-lifetimes", 1649 | "libc", 1650 | "linux-raw-sys", 1651 | "windows-sys", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "ryu" 1656 | version = "1.0.12" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" 1659 | 1660 | [[package]] 1661 | name = "schannel" 1662 | version = "0.1.21" 1663 | source = "registry+https://github.com/rust-lang/crates.io-index" 1664 | checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" 1665 | dependencies = [ 1666 | "windows-sys", 1667 | ] 1668 | 1669 | [[package]] 1670 | name = "scopeguard" 1671 | version = "1.1.0" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1674 | 1675 | [[package]] 1676 | name = "scratch" 1677 | version = "1.0.3" 1678 | source = "registry+https://github.com/rust-lang/crates.io-index" 1679 | checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" 1680 | 1681 | [[package]] 1682 | name = "security-framework" 1683 | version = "2.8.0" 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" 1685 | checksum = "645926f31b250a2dca3c232496c2d898d91036e45ca0e97e0e2390c54e11be36" 1686 | dependencies = [ 1687 | "bitflags", 1688 | "core-foundation", 1689 | "core-foundation-sys", 1690 | "libc", 1691 | "security-framework-sys", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "security-framework-sys" 1696 | version = "2.8.0" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" 1699 | dependencies = [ 1700 | "core-foundation-sys", 1701 | "libc", 1702 | ] 1703 | 1704 | [[package]] 1705 | name = "semver" 1706 | version = "1.0.16" 1707 | source = "registry+https://github.com/rust-lang/crates.io-index" 1708 | checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" 1709 | 1710 | [[package]] 1711 | name = "serde" 1712 | version = "1.0.152" 1713 | source = "registry+https://github.com/rust-lang/crates.io-index" 1714 | checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" 1715 | dependencies = [ 1716 | "serde_derive", 1717 | ] 1718 | 1719 | [[package]] 1720 | name = "serde_derive" 1721 | version = "1.0.152" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" 1724 | dependencies = [ 1725 | "proc-macro2", 1726 | "quote", 1727 | "syn", 1728 | ] 1729 | 1730 | [[package]] 1731 | name = "serde_json" 1732 | version = "1.0.91" 1733 | source = "registry+https://github.com/rust-lang/crates.io-index" 1734 | checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" 1735 | dependencies = [ 1736 | "itoa", 1737 | "ryu", 1738 | "serde", 1739 | ] 1740 | 1741 | [[package]] 1742 | name = "serde_urlencoded" 1743 | version = "0.7.1" 1744 | source = "registry+https://github.com/rust-lang/crates.io-index" 1745 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1746 | dependencies = [ 1747 | "form_urlencoded", 1748 | "itoa", 1749 | "ryu", 1750 | "serde", 1751 | ] 1752 | 1753 | [[package]] 1754 | name = "sha1" 1755 | version = "0.10.5" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1758 | dependencies = [ 1759 | "cfg-if", 1760 | "cpufeatures", 1761 | "digest", 1762 | ] 1763 | 1764 | [[package]] 1765 | name = "sha2" 1766 | version = "0.10.6" 1767 | source = "registry+https://github.com/rust-lang/crates.io-index" 1768 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 1769 | dependencies = [ 1770 | "cfg-if", 1771 | "cpufeatures", 1772 | "digest", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "signal-hook" 1777 | version = "0.3.14" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" 1780 | dependencies = [ 1781 | "libc", 1782 | "signal-hook-registry", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "signal-hook-registry" 1787 | version = "1.4.0" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 1790 | dependencies = [ 1791 | "libc", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "slab" 1796 | version = "0.4.7" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 1799 | dependencies = [ 1800 | "autocfg", 1801 | ] 1802 | 1803 | [[package]] 1804 | name = "smallvec" 1805 | version = "1.10.0" 1806 | source = "registry+https://github.com/rust-lang/crates.io-index" 1807 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1808 | 1809 | [[package]] 1810 | name = "socket2" 1811 | version = "0.4.7" 1812 | source = "registry+https://github.com/rust-lang/crates.io-index" 1813 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" 1814 | dependencies = [ 1815 | "libc", 1816 | "winapi", 1817 | ] 1818 | 1819 | [[package]] 1820 | name = "sqlformat" 1821 | version = "0.2.1" 1822 | source = "registry+https://github.com/rust-lang/crates.io-index" 1823 | checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" 1824 | dependencies = [ 1825 | "itertools", 1826 | "nom", 1827 | "unicode_categories", 1828 | ] 1829 | 1830 | [[package]] 1831 | name = "sqlx" 1832 | version = "0.6.2" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "9249290c05928352f71c077cc44a464d880c63f26f7534728cca008e135c0428" 1835 | dependencies = [ 1836 | "sqlx-core", 1837 | "sqlx-macros", 1838 | ] 1839 | 1840 | [[package]] 1841 | name = "sqlx-core" 1842 | version = "0.6.2" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" 1845 | dependencies = [ 1846 | "ahash", 1847 | "atoi", 1848 | "base64", 1849 | "bitflags", 1850 | "byteorder", 1851 | "bytes", 1852 | "chrono", 1853 | "crc", 1854 | "crossbeam-queue", 1855 | "dirs", 1856 | "dotenvy", 1857 | "either", 1858 | "event-listener", 1859 | "futures-channel", 1860 | "futures-core", 1861 | "futures-intrusive", 1862 | "futures-util", 1863 | "hashlink", 1864 | "hex", 1865 | "hkdf", 1866 | "hmac", 1867 | "indexmap", 1868 | "itoa", 1869 | "libc", 1870 | "log", 1871 | "md-5", 1872 | "memchr", 1873 | "once_cell", 1874 | "paste", 1875 | "percent-encoding", 1876 | "rand", 1877 | "serde", 1878 | "serde_json", 1879 | "sha1", 1880 | "sha2", 1881 | "smallvec", 1882 | "sqlformat", 1883 | "sqlx-rt", 1884 | "stringprep", 1885 | "thiserror", 1886 | "url", 1887 | "uuid", 1888 | "whoami", 1889 | ] 1890 | 1891 | [[package]] 1892 | name = "sqlx-macros" 1893 | version = "0.6.2" 1894 | source = "registry+https://github.com/rust-lang/crates.io-index" 1895 | checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9" 1896 | dependencies = [ 1897 | "dotenvy", 1898 | "either", 1899 | "heck", 1900 | "once_cell", 1901 | "proc-macro2", 1902 | "quote", 1903 | "sha2", 1904 | "sqlx-core", 1905 | "sqlx-rt", 1906 | "syn", 1907 | "url", 1908 | ] 1909 | 1910 | [[package]] 1911 | name = "sqlx-rt" 1912 | version = "0.6.2" 1913 | source = "registry+https://github.com/rust-lang/crates.io-index" 1914 | checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" 1915 | dependencies = [ 1916 | "async-native-tls", 1917 | "async-std", 1918 | "native-tls", 1919 | ] 1920 | 1921 | [[package]] 1922 | name = "stringprep" 1923 | version = "0.1.2" 1924 | source = "registry+https://github.com/rust-lang/crates.io-index" 1925 | checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" 1926 | dependencies = [ 1927 | "unicode-bidi", 1928 | "unicode-normalization", 1929 | ] 1930 | 1931 | [[package]] 1932 | name = "subtle" 1933 | version = "2.4.1" 1934 | source = "registry+https://github.com/rust-lang/crates.io-index" 1935 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 1936 | 1937 | [[package]] 1938 | name = "syn" 1939 | version = "1.0.107" 1940 | source = "registry+https://github.com/rust-lang/crates.io-index" 1941 | checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" 1942 | dependencies = [ 1943 | "proc-macro2", 1944 | "quote", 1945 | "unicode-ident", 1946 | ] 1947 | 1948 | [[package]] 1949 | name = "tempfile" 1950 | version = "3.3.0" 1951 | source = "registry+https://github.com/rust-lang/crates.io-index" 1952 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 1953 | dependencies = [ 1954 | "cfg-if", 1955 | "fastrand", 1956 | "libc", 1957 | "redox_syscall", 1958 | "remove_dir_all", 1959 | "winapi", 1960 | ] 1961 | 1962 | [[package]] 1963 | name = "termcolor" 1964 | version = "1.2.0" 1965 | source = "registry+https://github.com/rust-lang/crates.io-index" 1966 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 1967 | dependencies = [ 1968 | "winapi-util", 1969 | ] 1970 | 1971 | [[package]] 1972 | name = "thiserror" 1973 | version = "1.0.38" 1974 | source = "registry+https://github.com/rust-lang/crates.io-index" 1975 | checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" 1976 | dependencies = [ 1977 | "thiserror-impl", 1978 | ] 1979 | 1980 | [[package]] 1981 | name = "thiserror-impl" 1982 | version = "1.0.38" 1983 | source = "registry+https://github.com/rust-lang/crates.io-index" 1984 | checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" 1985 | dependencies = [ 1986 | "proc-macro2", 1987 | "quote", 1988 | "syn", 1989 | ] 1990 | 1991 | [[package]] 1992 | name = "time" 1993 | version = "0.1.45" 1994 | source = "registry+https://github.com/rust-lang/crates.io-index" 1995 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" 1996 | dependencies = [ 1997 | "libc", 1998 | "wasi 0.10.0+wasi-snapshot-preview1", 1999 | "winapi", 2000 | ] 2001 | 2002 | [[package]] 2003 | name = "time" 2004 | version = "0.3.17" 2005 | source = "registry+https://github.com/rust-lang/crates.io-index" 2006 | checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" 2007 | dependencies = [ 2008 | "itoa", 2009 | "serde", 2010 | "time-core", 2011 | "time-macros", 2012 | ] 2013 | 2014 | [[package]] 2015 | name = "time-core" 2016 | version = "0.1.0" 2017 | source = "registry+https://github.com/rust-lang/crates.io-index" 2018 | checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" 2019 | 2020 | [[package]] 2021 | name = "time-macros" 2022 | version = "0.2.6" 2023 | source = "registry+https://github.com/rust-lang/crates.io-index" 2024 | checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" 2025 | dependencies = [ 2026 | "time-core", 2027 | ] 2028 | 2029 | [[package]] 2030 | name = "tinyvec" 2031 | version = "1.6.0" 2032 | source = "registry+https://github.com/rust-lang/crates.io-index" 2033 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2034 | dependencies = [ 2035 | "tinyvec_macros", 2036 | ] 2037 | 2038 | [[package]] 2039 | name = "tinyvec_macros" 2040 | version = "0.1.0" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2043 | 2044 | [[package]] 2045 | name = "tokio" 2046 | version = "1.24.2" 2047 | source = "registry+https://github.com/rust-lang/crates.io-index" 2048 | checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" 2049 | dependencies = [ 2050 | "autocfg", 2051 | "bytes", 2052 | "libc", 2053 | "memchr", 2054 | "mio", 2055 | "parking_lot 0.12.1", 2056 | "pin-project-lite", 2057 | "signal-hook-registry", 2058 | "socket2", 2059 | "windows-sys", 2060 | ] 2061 | 2062 | [[package]] 2063 | name = "tokio-util" 2064 | version = "0.7.4" 2065 | source = "registry+https://github.com/rust-lang/crates.io-index" 2066 | checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" 2067 | dependencies = [ 2068 | "bytes", 2069 | "futures-core", 2070 | "futures-sink", 2071 | "pin-project-lite", 2072 | "tokio", 2073 | "tracing", 2074 | ] 2075 | 2076 | [[package]] 2077 | name = "tracing" 2078 | version = "0.1.37" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 2081 | dependencies = [ 2082 | "cfg-if", 2083 | "log", 2084 | "pin-project-lite", 2085 | "tracing-core", 2086 | ] 2087 | 2088 | [[package]] 2089 | name = "tracing-core" 2090 | version = "0.1.30" 2091 | source = "registry+https://github.com/rust-lang/crates.io-index" 2092 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 2093 | dependencies = [ 2094 | "once_cell", 2095 | ] 2096 | 2097 | [[package]] 2098 | name = "typenum" 2099 | version = "1.16.0" 2100 | source = "registry+https://github.com/rust-lang/crates.io-index" 2101 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 2102 | 2103 | [[package]] 2104 | name = "unicode-bidi" 2105 | version = "0.3.10" 2106 | source = "registry+https://github.com/rust-lang/crates.io-index" 2107 | checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" 2108 | 2109 | [[package]] 2110 | name = "unicode-ident" 2111 | version = "1.0.6" 2112 | source = "registry+https://github.com/rust-lang/crates.io-index" 2113 | checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" 2114 | 2115 | [[package]] 2116 | name = "unicode-normalization" 2117 | version = "0.1.22" 2118 | source = "registry+https://github.com/rust-lang/crates.io-index" 2119 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 2120 | dependencies = [ 2121 | "tinyvec", 2122 | ] 2123 | 2124 | [[package]] 2125 | name = "unicode-segmentation" 2126 | version = "1.10.0" 2127 | source = "registry+https://github.com/rust-lang/crates.io-index" 2128 | checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" 2129 | 2130 | [[package]] 2131 | name = "unicode-width" 2132 | version = "0.1.10" 2133 | source = "registry+https://github.com/rust-lang/crates.io-index" 2134 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 2135 | 2136 | [[package]] 2137 | name = "unicode_categories" 2138 | version = "0.1.1" 2139 | source = "registry+https://github.com/rust-lang/crates.io-index" 2140 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 2141 | 2142 | [[package]] 2143 | name = "url" 2144 | version = "2.3.1" 2145 | source = "registry+https://github.com/rust-lang/crates.io-index" 2146 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 2147 | dependencies = [ 2148 | "form_urlencoded", 2149 | "idna", 2150 | "percent-encoding", 2151 | ] 2152 | 2153 | [[package]] 2154 | name = "uuid" 2155 | version = "1.2.2" 2156 | source = "registry+https://github.com/rust-lang/crates.io-index" 2157 | checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" 2158 | dependencies = [ 2159 | "getrandom", 2160 | "serde", 2161 | ] 2162 | 2163 | [[package]] 2164 | name = "value-bag" 2165 | version = "1.0.0-alpha.9" 2166 | source = "registry+https://github.com/rust-lang/crates.io-index" 2167 | checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" 2168 | dependencies = [ 2169 | "ctor", 2170 | "version_check", 2171 | ] 2172 | 2173 | [[package]] 2174 | name = "vcpkg" 2175 | version = "0.2.15" 2176 | source = "registry+https://github.com/rust-lang/crates.io-index" 2177 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2178 | 2179 | [[package]] 2180 | name = "version_check" 2181 | version = "0.9.4" 2182 | source = "registry+https://github.com/rust-lang/crates.io-index" 2183 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2184 | 2185 | [[package]] 2186 | name = "waker-fn" 2187 | version = "1.1.0" 2188 | source = "registry+https://github.com/rust-lang/crates.io-index" 2189 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 2190 | 2191 | [[package]] 2192 | name = "wasi" 2193 | version = "0.10.0+wasi-snapshot-preview1" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 2196 | 2197 | [[package]] 2198 | name = "wasi" 2199 | version = "0.11.0+wasi-snapshot-preview1" 2200 | source = "registry+https://github.com/rust-lang/crates.io-index" 2201 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2202 | 2203 | [[package]] 2204 | name = "wasm-bindgen" 2205 | version = "0.2.83" 2206 | source = "registry+https://github.com/rust-lang/crates.io-index" 2207 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 2208 | dependencies = [ 2209 | "cfg-if", 2210 | "wasm-bindgen-macro", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "wasm-bindgen-backend" 2215 | version = "0.2.83" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 2218 | dependencies = [ 2219 | "bumpalo", 2220 | "log", 2221 | "once_cell", 2222 | "proc-macro2", 2223 | "quote", 2224 | "syn", 2225 | "wasm-bindgen-shared", 2226 | ] 2227 | 2228 | [[package]] 2229 | name = "wasm-bindgen-futures" 2230 | version = "0.4.33" 2231 | source = "registry+https://github.com/rust-lang/crates.io-index" 2232 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" 2233 | dependencies = [ 2234 | "cfg-if", 2235 | "js-sys", 2236 | "wasm-bindgen", 2237 | "web-sys", 2238 | ] 2239 | 2240 | [[package]] 2241 | name = "wasm-bindgen-macro" 2242 | version = "0.2.83" 2243 | source = "registry+https://github.com/rust-lang/crates.io-index" 2244 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 2245 | dependencies = [ 2246 | "quote", 2247 | "wasm-bindgen-macro-support", 2248 | ] 2249 | 2250 | [[package]] 2251 | name = "wasm-bindgen-macro-support" 2252 | version = "0.2.83" 2253 | source = "registry+https://github.com/rust-lang/crates.io-index" 2254 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 2255 | dependencies = [ 2256 | "proc-macro2", 2257 | "quote", 2258 | "syn", 2259 | "wasm-bindgen-backend", 2260 | "wasm-bindgen-shared", 2261 | ] 2262 | 2263 | [[package]] 2264 | name = "wasm-bindgen-shared" 2265 | version = "0.2.83" 2266 | source = "registry+https://github.com/rust-lang/crates.io-index" 2267 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 2268 | 2269 | [[package]] 2270 | name = "web-sys" 2271 | version = "0.3.60" 2272 | source = "registry+https://github.com/rust-lang/crates.io-index" 2273 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 2274 | dependencies = [ 2275 | "js-sys", 2276 | "wasm-bindgen", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "wepoll-ffi" 2281 | version = "0.1.2" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" 2284 | dependencies = [ 2285 | "cc", 2286 | ] 2287 | 2288 | [[package]] 2289 | name = "whoami" 2290 | version = "1.3.0" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3" 2293 | dependencies = [ 2294 | "wasm-bindgen", 2295 | "web-sys", 2296 | ] 2297 | 2298 | [[package]] 2299 | name = "winapi" 2300 | version = "0.3.9" 2301 | source = "registry+https://github.com/rust-lang/crates.io-index" 2302 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2303 | dependencies = [ 2304 | "winapi-i686-pc-windows-gnu", 2305 | "winapi-x86_64-pc-windows-gnu", 2306 | ] 2307 | 2308 | [[package]] 2309 | name = "winapi-i686-pc-windows-gnu" 2310 | version = "0.4.0" 2311 | source = "registry+https://github.com/rust-lang/crates.io-index" 2312 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2313 | 2314 | [[package]] 2315 | name = "winapi-util" 2316 | version = "0.1.5" 2317 | source = "registry+https://github.com/rust-lang/crates.io-index" 2318 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2319 | dependencies = [ 2320 | "winapi", 2321 | ] 2322 | 2323 | [[package]] 2324 | name = "winapi-x86_64-pc-windows-gnu" 2325 | version = "0.4.0" 2326 | source = "registry+https://github.com/rust-lang/crates.io-index" 2327 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2328 | 2329 | [[package]] 2330 | name = "windows-sys" 2331 | version = "0.42.0" 2332 | source = "registry+https://github.com/rust-lang/crates.io-index" 2333 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 2334 | dependencies = [ 2335 | "windows_aarch64_gnullvm", 2336 | "windows_aarch64_msvc", 2337 | "windows_i686_gnu", 2338 | "windows_i686_msvc", 2339 | "windows_x86_64_gnu", 2340 | "windows_x86_64_gnullvm", 2341 | "windows_x86_64_msvc", 2342 | ] 2343 | 2344 | [[package]] 2345 | name = "windows_aarch64_gnullvm" 2346 | version = "0.42.1" 2347 | source = "registry+https://github.com/rust-lang/crates.io-index" 2348 | checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" 2349 | 2350 | [[package]] 2351 | name = "windows_aarch64_msvc" 2352 | version = "0.42.1" 2353 | source = "registry+https://github.com/rust-lang/crates.io-index" 2354 | checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" 2355 | 2356 | [[package]] 2357 | name = "windows_i686_gnu" 2358 | version = "0.42.1" 2359 | source = "registry+https://github.com/rust-lang/crates.io-index" 2360 | checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" 2361 | 2362 | [[package]] 2363 | name = "windows_i686_msvc" 2364 | version = "0.42.1" 2365 | source = "registry+https://github.com/rust-lang/crates.io-index" 2366 | checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" 2367 | 2368 | [[package]] 2369 | name = "windows_x86_64_gnu" 2370 | version = "0.42.1" 2371 | source = "registry+https://github.com/rust-lang/crates.io-index" 2372 | checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" 2373 | 2374 | [[package]] 2375 | name = "windows_x86_64_gnullvm" 2376 | version = "0.42.1" 2377 | source = "registry+https://github.com/rust-lang/crates.io-index" 2378 | checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" 2379 | 2380 | [[package]] 2381 | name = "windows_x86_64_msvc" 2382 | version = "0.42.1" 2383 | source = "registry+https://github.com/rust-lang/crates.io-index" 2384 | checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" 2385 | 2386 | [[package]] 2387 | name = "zstd" 2388 | version = "0.11.2+zstd.1.5.2" 2389 | source = "registry+https://github.com/rust-lang/crates.io-index" 2390 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 2391 | dependencies = [ 2392 | "zstd-safe", 2393 | ] 2394 | 2395 | [[package]] 2396 | name = "zstd-safe" 2397 | version = "5.0.2+zstd.1.5.2" 2398 | source = "registry+https://github.com/rust-lang/crates.io-index" 2399 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 2400 | dependencies = [ 2401 | "libc", 2402 | "zstd-sys", 2403 | ] 2404 | 2405 | [[package]] 2406 | name = "zstd-sys" 2407 | version = "2.0.5+zstd.1.5.2" 2408 | source = "registry+https://github.com/rust-lang/crates.io-index" 2409 | checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596" 2410 | dependencies = [ 2411 | "cc", 2412 | "libc", 2413 | "pkg-config", 2414 | ] 2415 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-postgres-crud-sqlx" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | actix-cors = "0.6.4" 10 | actix-web = "4.2.1" 11 | chrono = { version = "0.4.23", features = ["serde"] } 12 | dotenv = "0.15.0" 13 | env_logger = "0.10.0" 14 | serde = { version = "1.0.152", features = ["derive"] } 15 | serde_json = "1.0.91" 16 | sqlx = { version = "0.6.2", features = ["runtime-async-std-native-tls", "postgres", "uuid", "chrono"] } 17 | uuid = { version = "1.2.2", features = ["serde", "v4"] } 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | dev: 2 | docker-compose up -d 3 | 4 | dev-down: 5 | docker-compose down 6 | 7 | migrate-up: 8 | sqlx migrate run 9 | 10 | migrate-down: 11 | sqlx migrate revert 12 | 13 | start-server: 14 | cargo watch -q -c -w src/ -x run 15 | 16 | install: 17 | cargo add actix-web 18 | cargo add actix-cors 19 | cargo add serde_json 20 | cargo add serde --features derive 21 | cargo add chrono --features serde 22 | cargo add env_logger 23 | cargo add dotenv 24 | cargo add uuid --features "serde v4" 25 | cargo add sqlx --features "runtime-async-std-native-tls postgres chrono uuid" 26 | # HotReload 27 | cargo install cargo-watch 28 | # SQLX-CLI 29 | cargo install sqlx-cli -------------------------------------------------------------------------------- /Note App.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "5a0ef1af-7659-43bc-8ecb-aeffd04c6a6c", 4 | "name": "Note App", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", 6 | "_exporter_id": "14791724" 7 | }, 8 | "item": [ 9 | { 10 | "name": "Create Note", 11 | "request": { 12 | "method": "POST", 13 | "header": [], 14 | "body": { 15 | "mode": "raw", 16 | "raw": "{\r\n \"title\": \"You'll learn how to build a CRUD API with FastAPI\",\r\n \"content\": \"Fastapi is really easy to use\",\r\n \"category\": \"FastAPI\"\r\n}", 17 | "options": { 18 | "raw": { 19 | "language": "json" 20 | } 21 | } 22 | }, 23 | "url": { 24 | "raw": "http://localhost:8000/api/notes/", 25 | "protocol": "http", 26 | "host": [ 27 | "localhost" 28 | ], 29 | "port": "8000", 30 | "path": [ 31 | "api", 32 | "notes", 33 | "" 34 | ] 35 | } 36 | }, 37 | "response": [] 38 | }, 39 | { 40 | "name": "Get Note", 41 | "request": { 42 | "method": "GET", 43 | "header": [], 44 | "url": { 45 | "raw": "http://localhost:8000/api/notes/cc5ff528-5352-4ba3-9b75-962dc5dacf2f", 46 | "protocol": "http", 47 | "host": [ 48 | "localhost" 49 | ], 50 | "port": "8000", 51 | "path": [ 52 | "api", 53 | "notes", 54 | "cc5ff528-5352-4ba3-9b75-962dc5dacf2f" 55 | ] 56 | } 57 | }, 58 | "response": [] 59 | }, 60 | { 61 | "name": "Health Checker", 62 | "request": { 63 | "method": "GET", 64 | "header": [], 65 | "url": { 66 | "raw": "http://localhost:8000/api/healthchecker", 67 | "protocol": "http", 68 | "host": [ 69 | "localhost" 70 | ], 71 | "port": "8000", 72 | "path": [ 73 | "api", 74 | "healthchecker" 75 | ] 76 | } 77 | }, 78 | "response": [] 79 | }, 80 | { 81 | "name": "Update Note", 82 | "request": { 83 | "method": "PATCH", 84 | "header": [], 85 | "body": { 86 | "mode": "raw", 87 | "raw": "{\r\n \"title\": \"✅✅👇👇This article will teach Django REST framework\"\r\n}", 88 | "options": { 89 | "raw": { 90 | "language": "json" 91 | } 92 | } 93 | }, 94 | "url": { 95 | "raw": "http://localhost:8000/api/notes/77a9ac3c-7e3b-40c1-b2d4-30729c931d3d", 96 | "protocol": "http", 97 | "host": [ 98 | "localhost" 99 | ], 100 | "port": "8000", 101 | "path": [ 102 | "api", 103 | "notes", 104 | "77a9ac3c-7e3b-40c1-b2d4-30729c931d3d" 105 | ] 106 | } 107 | }, 108 | "response": [] 109 | }, 110 | { 111 | "name": "Delete Note", 112 | "request": { 113 | "method": "DELETE", 114 | "header": [], 115 | "url": { 116 | "raw": "http://localhost:8000/api/notes/04aae95f-de90-4a39-9610-83b84485a042", 117 | "protocol": "http", 118 | "host": [ 119 | "localhost" 120 | ], 121 | "port": "8000", 122 | "path": [ 123 | "api", 124 | "notes", 125 | "04aae95f-de90-4a39-9610-83b84485a042" 126 | ] 127 | } 128 | }, 129 | "response": [] 130 | }, 131 | { 132 | "name": "Get All Notes", 133 | "request": { 134 | "method": "GET", 135 | "header": [], 136 | "url": { 137 | "raw": "http://localhost:8000/api/notes?page=1&limit=10", 138 | "protocol": "http", 139 | "host": [ 140 | "localhost" 141 | ], 142 | "port": "8000", 143 | "path": [ 144 | "api", 145 | "notes" 146 | ], 147 | "query": [ 148 | { 149 | "key": "page", 150 | "value": "1" 151 | }, 152 | { 153 | "key": "limit", 154 | "value": "10" 155 | } 156 | ] 157 | } 158 | }, 159 | "response": [] 160 | } 161 | ] 162 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rust - Build a CRUD API with SQLX and PostgreSQL 2 | 3 | In this article, you'll learn how to build a CRUD API in Rust using SQLX, Actix-web, and PostgreSQL. Learning how to build a CRUD API as a developer will equip you with valuable skills for building robust, maintainable, and scalable applications. 4 | 5 | ![Rust - Build a CRUD API with SQLX and PostgreSQL](https://codevoweb.com/wp-content/uploads/2023/01/Rust-Build-a-CRUD-API-with-SQLX-and-PostgreSQL.webp) 6 | 7 | ## Topics Covered 8 | 9 | - Run the Rust SQLX Project Locally 10 | - Run the Rust SQLX API with a React.js App 11 | - Setup the Rust Project 12 | - Setup PostgreSQL and pgAdmin with Docker 13 | - Create and Migrate the Database Queries 14 | - Create the SQLX Database Model 15 | - Create the Validation Schemas 16 | - Create CRUD Route Functions 17 | - Fetch All Records 18 | - Add New Record 19 | - Retrieve a Single Record 20 | - Edit an Existing Record 21 | - Delete a Record 22 | - Merge the Route Functions 23 | - Register the Routes and Add CORS 24 | - Test the Rust CRUD API 25 | - Perform the CREATE Operation 26 | - Perform the UPDATE Operation 27 | - Perform the READ Operation 28 | - Perform the DELETE Operation 29 | 30 | 31 | Read the entire article here: [https://codevoweb.com/rust-build-a-crud-api-with-sqlx-and-postgresql/](https://codevoweb.com/rust-build-a-crud-api-with-sqlx-and-postgresql/) 32 | 33 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | postgres: 4 | image: postgres:latest 5 | container_name: postgres 6 | ports: 7 | - '6500:5432' 8 | volumes: 9 | - progresDB:/data/postgres 10 | env_file: 11 | - ./.env 12 | pgAdmin: 13 | image: dpage/pgadmin4 14 | container_name: pgAdmin 15 | env_file: 16 | - ./.env 17 | ports: 18 | - "5050:80" 19 | volumes: 20 | progresDB: 21 | -------------------------------------------------------------------------------- /migrations/20230123154041_init.down.sql: -------------------------------------------------------------------------------- 1 | -- Add down migration script here 2 | 3 | DROP TABLE IF EXISTS notes; -------------------------------------------------------------------------------- /migrations/20230123154041_init.up.sql: -------------------------------------------------------------------------------- 1 | -- Add migration script here 2 | 3 | CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; 4 | 5 | CREATE TABLE 6 | IF NOT EXISTS notes ( 7 | id UUID PRIMARY KEY NOT NULL DEFAULT (uuid_generate_v4()), 8 | title VARCHAR(255) NOT NULL UNIQUE, 9 | content TEXT NOT NULL, 10 | category VARCHAR(100), 11 | published BOOLEAN DEFAULT FALSE, 12 | created_at TIMESTAMP 13 | WITH 14 | TIME ZONE DEFAULT NOW(), 15 | updated_at TIMESTAMP 16 | WITH 17 | TIME ZONE DEFAULT NOW() 18 | ); -------------------------------------------------------------------------------- /src/handler.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | model::NoteModel, 3 | schema::{CreateNoteSchema, FilterOptions, UpdateNoteSchema}, 4 | AppState, 5 | }; 6 | use actix_web::{delete, get, patch, post, web, HttpResponse, Responder}; 7 | use chrono::prelude::*; 8 | use serde_json::json; 9 | 10 | #[get("/healthchecker")] 11 | async fn health_checker_handler() -> impl Responder { 12 | const MESSAGE: &str = "Build Simple CRUD API with Rust, SQLX, Postgres,and Actix Web"; 13 | 14 | HttpResponse::Ok().json(json!({"status": "success","message": MESSAGE})) 15 | } 16 | 17 | #[get("/notes")] 18 | pub async fn note_list_handler( 19 | opts: web::Query, 20 | data: web::Data, 21 | ) -> impl Responder { 22 | let limit = opts.limit.unwrap_or(10); 23 | let offset = (opts.page.unwrap_or(1) - 1) * limit; 24 | 25 | let query_result = sqlx::query_as!( 26 | NoteModel, 27 | "SELECT * FROM notes ORDER by id LIMIT $1 OFFSET $2", 28 | limit as i32, 29 | offset as i32 30 | ) 31 | .fetch_all(&data.db) 32 | .await; 33 | 34 | if query_result.is_err() { 35 | let message = "Something bad happened while fetching all note items"; 36 | return HttpResponse::InternalServerError() 37 | .json(json!({"status": "error","message": message})); 38 | } 39 | 40 | let notes = query_result.unwrap(); 41 | 42 | let json_response = serde_json::json!({ 43 | "status": "success", 44 | "results": notes.len(), 45 | "notes": notes 46 | }); 47 | HttpResponse::Ok().json(json_response) 48 | } 49 | 50 | #[post("/notes/")] 51 | async fn create_note_handler( 52 | body: web::Json, 53 | data: web::Data, 54 | ) -> impl Responder { 55 | let query_result = sqlx::query_as!( 56 | NoteModel, 57 | "INSERT INTO notes (title,content,category) VALUES ($1, $2, $3) RETURNING *", 58 | body.title.to_string(), 59 | body.content.to_string(), 60 | body.category.to_owned().unwrap_or("".to_string()) 61 | ) 62 | .fetch_one(&data.db) 63 | .await; 64 | 65 | match query_result { 66 | Ok(note) => { 67 | let note_response = serde_json::json!({"status": "success","data": serde_json::json!({ 68 | "note": note 69 | })}); 70 | 71 | return HttpResponse::Ok().json(note_response); 72 | } 73 | Err(e) => { 74 | if e.to_string() 75 | .contains("duplicate key value violates unique constraint") 76 | { 77 | return HttpResponse::BadRequest() 78 | .json(serde_json::json!({"status": "fail","message": "Note with that title already exists"})); 79 | } 80 | 81 | return HttpResponse::InternalServerError() 82 | .json(serde_json::json!({"status": "error","message": format!("{:?}", e)})); 83 | } 84 | } 85 | } 86 | 87 | #[get("/notes/{id}")] 88 | async fn get_note_handler( 89 | path: web::Path, 90 | data: web::Data, 91 | ) -> impl Responder { 92 | let note_id = path.into_inner(); 93 | let query_result = sqlx::query_as!(NoteModel, "SELECT * FROM notes WHERE id = $1", note_id) 94 | .fetch_one(&data.db) 95 | .await; 96 | 97 | match query_result { 98 | Ok(note) => { 99 | let note_response = serde_json::json!({"status": "success","data": serde_json::json!({ 100 | "note": note 101 | })}); 102 | 103 | return HttpResponse::Ok().json(note_response); 104 | } 105 | Err(_) => { 106 | let message = format!("Note with ID: {} not found", note_id); 107 | return HttpResponse::NotFound() 108 | .json(serde_json::json!({"status": "fail","message": message})); 109 | } 110 | } 111 | } 112 | 113 | #[patch("/notes/{id}")] 114 | async fn edit_note_handler( 115 | path: web::Path, 116 | body: web::Json, 117 | data: web::Data, 118 | ) -> impl Responder { 119 | let note_id = path.into_inner(); 120 | let query_result = sqlx::query_as!(NoteModel, "SELECT * FROM notes WHERE id = $1", note_id) 121 | .fetch_one(&data.db) 122 | .await; 123 | 124 | if query_result.is_err() { 125 | let message = format!("Note with ID: {} not found", note_id); 126 | return HttpResponse::NotFound() 127 | .json(serde_json::json!({"status": "fail","message": message})); 128 | } 129 | 130 | let now = Utc::now(); 131 | let note = query_result.unwrap(); 132 | 133 | let query_result = sqlx::query_as!( 134 | NoteModel, 135 | "UPDATE notes SET title = $1, content = $2, category = $3, published = $4, updated_at = $5 WHERE id = $6 RETURNING *", 136 | body.title.to_owned().unwrap_or(note.title), 137 | body.content.to_owned().unwrap_or(note.content), 138 | body.category.to_owned().unwrap_or(note.category.unwrap()), 139 | body.published.unwrap_or(note.published.unwrap()), 140 | now, 141 | note_id 142 | ) 143 | .fetch_one(&data.db) 144 | .await 145 | ; 146 | 147 | match query_result { 148 | Ok(note) => { 149 | let note_response = serde_json::json!({"status": "success","data": serde_json::json!({ 150 | "note": note 151 | })}); 152 | 153 | return HttpResponse::Ok().json(note_response); 154 | } 155 | Err(err) => { 156 | let message = format!("Error: {:?}", err); 157 | return HttpResponse::InternalServerError() 158 | .json(serde_json::json!({"status": "error","message": message})); 159 | } 160 | } 161 | } 162 | 163 | #[delete("/notes/{id}")] 164 | async fn delete_note_handler( 165 | path: web::Path, 166 | data: web::Data, 167 | ) -> impl Responder { 168 | let note_id = path.into_inner(); 169 | let rows_affected = sqlx::query!("DELETE FROM notes WHERE id = $1", note_id) 170 | .execute(&data.db) 171 | .await 172 | .unwrap() 173 | .rows_affected(); 174 | 175 | if rows_affected == 0 { 176 | let message = format!("Note with ID: {} not found", note_id); 177 | return HttpResponse::NotFound().json(json!({"status": "fail","message": message})); 178 | } 179 | 180 | HttpResponse::NoContent().finish() 181 | } 182 | 183 | pub fn config(conf: &mut web::ServiceConfig) { 184 | let scope = web::scope("/api") 185 | .service(health_checker_handler) 186 | .service(note_list_handler) 187 | .service(create_note_handler) 188 | .service(get_note_handler) 189 | .service(edit_note_handler) 190 | .service(delete_note_handler); 191 | 192 | conf.service(scope); 193 | } 194 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | mod handler; 2 | mod model; 3 | mod schema; 4 | 5 | use actix_cors::Cors; 6 | use actix_web::middleware::Logger; 7 | use actix_web::{http::header, web, App, HttpServer}; 8 | use dotenv::dotenv; 9 | use sqlx::{postgres::PgPoolOptions, Pool, Postgres}; 10 | 11 | pub struct AppState { 12 | db: Pool, 13 | } 14 | 15 | #[actix_web::main] 16 | async fn main() -> std::io::Result<()> { 17 | if std::env::var_os("RUST_LOG").is_none() { 18 | std::env::set_var("RUST_LOG", "actix_web=info"); 19 | } 20 | dotenv().ok(); 21 | env_logger::init(); 22 | 23 | let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set"); 24 | let pool = match PgPoolOptions::new() 25 | .max_connections(10) 26 | .connect(&database_url) 27 | .await 28 | { 29 | Ok(pool) => { 30 | println!("✅Connection to the database is successful!"); 31 | pool 32 | } 33 | Err(err) => { 34 | println!("🔥 Failed to connect to the database: {:?}", err); 35 | std::process::exit(1); 36 | } 37 | }; 38 | 39 | println!("🚀 Server started successfully"); 40 | 41 | HttpServer::new(move || { 42 | let cors = Cors::default() 43 | .allowed_origin("http://localhost:3000") 44 | .allowed_methods(vec!["GET", "POST", "PATCH", "DELETE"]) 45 | .allowed_headers(vec![ 46 | header::CONTENT_TYPE, 47 | header::AUTHORIZATION, 48 | header::ACCEPT, 49 | ]) 50 | .supports_credentials(); 51 | App::new() 52 | .app_data(web::Data::new(AppState { db: pool.clone() })) 53 | .configure(handler::config) 54 | .wrap(cors) 55 | .wrap(Logger::default()) 56 | }) 57 | .bind(("127.0.0.1", 8000))? 58 | .run() 59 | .await 60 | } 61 | -------------------------------------------------------------------------------- /src/model.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | use sqlx::FromRow; 3 | use uuid::Uuid; 4 | 5 | #[derive(Debug, FromRow, Deserialize, Serialize)] 6 | #[allow(non_snake_case)] 7 | pub struct NoteModel { 8 | pub id: Uuid, 9 | pub title: String, 10 | pub content: String, 11 | pub category: Option, 12 | pub published: Option, 13 | #[serde(rename = "createdAt")] 14 | pub created_at: Option>, 15 | #[serde(rename = "updatedAt")] 16 | pub updated_at: Option>, 17 | } 18 | -------------------------------------------------------------------------------- /src/schema.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Deserialize, Debug)] 4 | pub struct FilterOptions { 5 | pub page: Option, 6 | pub limit: Option, 7 | } 8 | 9 | #[derive(Deserialize, Debug)] 10 | pub struct ParamOptions { 11 | pub id: String, 12 | } 13 | 14 | #[derive(Serialize, Deserialize, Debug)] 15 | pub struct CreateNoteSchema { 16 | pub title: String, 17 | pub content: String, 18 | #[serde(skip_serializing_if = "Option::is_none")] 19 | pub category: Option, 20 | #[serde(skip_serializing_if = "Option::is_none")] 21 | pub published: Option, 22 | } 23 | 24 | #[derive(Serialize, Deserialize, Debug)] 25 | pub struct UpdateNoteSchema { 26 | pub title: Option, 27 | pub content: Option, 28 | pub category: Option, 29 | pub published: Option, 30 | } 31 | --------------------------------------------------------------------------------