├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── README.ko.md ├── README.md ├── deploy.sh ├── docs └── flowchart.png ├── init_database.sh └── src ├── config.rs ├── handlers.rs ├── main.rs ├── middlewares.rs ├── tasks.rs └── utils.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .env 3 | .idea 4 | sqlite3.db -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "allocator-api2" 22 | version = "0.2.21" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 25 | 26 | [[package]] 27 | name = "android-tzdata" 28 | version = "0.1.1" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 31 | 32 | [[package]] 33 | name = "android_system_properties" 34 | version = "0.1.5" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 37 | dependencies = [ 38 | "libc", 39 | ] 40 | 41 | [[package]] 42 | name = "async-compression" 43 | version = "0.4.18" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" 46 | dependencies = [ 47 | "flate2", 48 | "futures-core", 49 | "memchr", 50 | "pin-project-lite", 51 | "tokio", 52 | ] 53 | 54 | [[package]] 55 | name = "atoi" 56 | version = "2.0.0" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" 59 | dependencies = [ 60 | "num-traits", 61 | ] 62 | 63 | [[package]] 64 | name = "autocfg" 65 | version = "1.4.0" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 68 | 69 | [[package]] 70 | name = "axum" 71 | version = "0.8.1" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" 74 | dependencies = [ 75 | "axum-core", 76 | "bytes", 77 | "form_urlencoded", 78 | "futures-util", 79 | "http", 80 | "http-body", 81 | "http-body-util", 82 | "hyper", 83 | "hyper-util", 84 | "itoa", 85 | "matchit", 86 | "memchr", 87 | "mime", 88 | "percent-encoding", 89 | "pin-project-lite", 90 | "rustversion", 91 | "serde", 92 | "serde_json", 93 | "serde_path_to_error", 94 | "serde_urlencoded", 95 | "sync_wrapper", 96 | "tokio", 97 | "tower", 98 | "tower-layer", 99 | "tower-service", 100 | "tracing", 101 | ] 102 | 103 | [[package]] 104 | name = "axum-core" 105 | version = "0.5.0" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733" 108 | dependencies = [ 109 | "bytes", 110 | "futures-util", 111 | "http", 112 | "http-body", 113 | "http-body-util", 114 | "mime", 115 | "pin-project-lite", 116 | "rustversion", 117 | "sync_wrapper", 118 | "tower-layer", 119 | "tower-service", 120 | "tracing", 121 | ] 122 | 123 | [[package]] 124 | name = "backtrace" 125 | version = "0.3.74" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 128 | dependencies = [ 129 | "addr2line", 130 | "cfg-if", 131 | "libc", 132 | "miniz_oxide", 133 | "object", 134 | "rustc-demangle", 135 | "windows-targets 0.52.6", 136 | ] 137 | 138 | [[package]] 139 | name = "base64" 140 | version = "0.22.1" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 143 | 144 | [[package]] 145 | name = "base64ct" 146 | version = "1.6.0" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 149 | 150 | [[package]] 151 | name = "bitflags" 152 | version = "2.8.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" 155 | dependencies = [ 156 | "serde", 157 | ] 158 | 159 | [[package]] 160 | name = "block-buffer" 161 | version = "0.10.4" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 164 | dependencies = [ 165 | "generic-array", 166 | ] 167 | 168 | [[package]] 169 | name = "bumpalo" 170 | version = "3.17.0" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 173 | 174 | [[package]] 175 | name = "byteorder" 176 | version = "1.5.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 179 | 180 | [[package]] 181 | name = "bytes" 182 | version = "1.10.0" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" 185 | 186 | [[package]] 187 | name = "cc" 188 | version = "1.2.15" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" 191 | dependencies = [ 192 | "shlex", 193 | ] 194 | 195 | [[package]] 196 | name = "cfg-if" 197 | version = "1.0.0" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 200 | 201 | [[package]] 202 | name = "chrono" 203 | version = "0.4.39" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" 206 | dependencies = [ 207 | "android-tzdata", 208 | "iana-time-zone", 209 | "js-sys", 210 | "num-traits", 211 | "serde", 212 | "wasm-bindgen", 213 | "windows-targets 0.52.6", 214 | ] 215 | 216 | [[package]] 217 | name = "concurrent-queue" 218 | version = "2.5.0" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 221 | dependencies = [ 222 | "crossbeam-utils", 223 | ] 224 | 225 | [[package]] 226 | name = "const-oid" 227 | version = "0.9.6" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 230 | 231 | [[package]] 232 | name = "core-foundation" 233 | version = "0.9.4" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 236 | dependencies = [ 237 | "core-foundation-sys", 238 | "libc", 239 | ] 240 | 241 | [[package]] 242 | name = "core-foundation-sys" 243 | version = "0.8.7" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 246 | 247 | [[package]] 248 | name = "cpufeatures" 249 | version = "0.2.17" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 252 | dependencies = [ 253 | "libc", 254 | ] 255 | 256 | [[package]] 257 | name = "crc" 258 | version = "3.2.1" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" 261 | dependencies = [ 262 | "crc-catalog", 263 | ] 264 | 265 | [[package]] 266 | name = "crc-catalog" 267 | version = "2.4.0" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" 270 | 271 | [[package]] 272 | name = "crc32fast" 273 | version = "1.4.2" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 276 | dependencies = [ 277 | "cfg-if", 278 | ] 279 | 280 | [[package]] 281 | name = "crossbeam-queue" 282 | version = "0.3.12" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" 285 | dependencies = [ 286 | "crossbeam-utils", 287 | ] 288 | 289 | [[package]] 290 | name = "crossbeam-utils" 291 | version = "0.8.21" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 294 | 295 | [[package]] 296 | name = "crypto-common" 297 | version = "0.1.6" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 300 | dependencies = [ 301 | "generic-array", 302 | "typenum", 303 | ] 304 | 305 | [[package]] 306 | name = "darling" 307 | version = "0.20.10" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" 310 | dependencies = [ 311 | "darling_core", 312 | "darling_macro", 313 | ] 314 | 315 | [[package]] 316 | name = "darling_core" 317 | version = "0.20.10" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" 320 | dependencies = [ 321 | "fnv", 322 | "ident_case", 323 | "proc-macro2", 324 | "quote", 325 | "strsim", 326 | "syn", 327 | ] 328 | 329 | [[package]] 330 | name = "darling_macro" 331 | version = "0.20.10" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" 334 | dependencies = [ 335 | "darling_core", 336 | "quote", 337 | "syn", 338 | ] 339 | 340 | [[package]] 341 | name = "der" 342 | version = "0.7.9" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" 345 | dependencies = [ 346 | "const-oid", 347 | "pem-rfc7468", 348 | "zeroize", 349 | ] 350 | 351 | [[package]] 352 | name = "deranged" 353 | version = "0.3.11" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 356 | dependencies = [ 357 | "powerfmt", 358 | "serde", 359 | ] 360 | 361 | [[package]] 362 | name = "digest" 363 | version = "0.10.7" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 366 | dependencies = [ 367 | "block-buffer", 368 | "const-oid", 369 | "crypto-common", 370 | "subtle", 371 | ] 372 | 373 | [[package]] 374 | name = "displaydoc" 375 | version = "0.2.5" 376 | source = "registry+https://github.com/rust-lang/crates.io-index" 377 | checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 378 | dependencies = [ 379 | "proc-macro2", 380 | "quote", 381 | "syn", 382 | ] 383 | 384 | [[package]] 385 | name = "dotenv" 386 | version = "0.15.0" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 389 | 390 | [[package]] 391 | name = "dotenvy" 392 | version = "0.15.7" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" 395 | 396 | [[package]] 397 | name = "dyn-clone" 398 | version = "1.0.18" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" 401 | 402 | [[package]] 403 | name = "either" 404 | version = "1.13.0" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 407 | dependencies = [ 408 | "serde", 409 | ] 410 | 411 | [[package]] 412 | name = "equivalent" 413 | version = "1.0.2" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 416 | 417 | [[package]] 418 | name = "errno" 419 | version = "0.3.10" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 422 | dependencies = [ 423 | "libc", 424 | "windows-sys 0.59.0", 425 | ] 426 | 427 | [[package]] 428 | name = "etcetera" 429 | version = "0.8.0" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" 432 | dependencies = [ 433 | "cfg-if", 434 | "home", 435 | "windows-sys 0.48.0", 436 | ] 437 | 438 | [[package]] 439 | name = "event-listener" 440 | version = "5.4.0" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" 443 | dependencies = [ 444 | "concurrent-queue", 445 | "parking", 446 | "pin-project-lite", 447 | ] 448 | 449 | [[package]] 450 | name = "fastrand" 451 | version = "2.3.0" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 454 | 455 | [[package]] 456 | name = "flate2" 457 | version = "1.0.35" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" 460 | dependencies = [ 461 | "crc32fast", 462 | "miniz_oxide", 463 | ] 464 | 465 | [[package]] 466 | name = "flume" 467 | version = "0.11.1" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" 470 | dependencies = [ 471 | "futures-core", 472 | "futures-sink", 473 | "spin", 474 | ] 475 | 476 | [[package]] 477 | name = "fnv" 478 | version = "1.0.7" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 481 | 482 | [[package]] 483 | name = "foldhash" 484 | version = "0.1.4" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" 487 | 488 | [[package]] 489 | name = "foreign-types" 490 | version = "0.3.2" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 493 | dependencies = [ 494 | "foreign-types-shared", 495 | ] 496 | 497 | [[package]] 498 | name = "foreign-types-shared" 499 | version = "0.1.1" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 502 | 503 | [[package]] 504 | name = "form_urlencoded" 505 | version = "1.2.1" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 508 | dependencies = [ 509 | "percent-encoding", 510 | ] 511 | 512 | [[package]] 513 | name = "futures-channel" 514 | version = "0.3.31" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 517 | dependencies = [ 518 | "futures-core", 519 | "futures-sink", 520 | ] 521 | 522 | [[package]] 523 | name = "futures-core" 524 | version = "0.3.31" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 527 | 528 | [[package]] 529 | name = "futures-executor" 530 | version = "0.3.31" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 533 | dependencies = [ 534 | "futures-core", 535 | "futures-task", 536 | "futures-util", 537 | ] 538 | 539 | [[package]] 540 | name = "futures-intrusive" 541 | version = "0.5.0" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" 544 | dependencies = [ 545 | "futures-core", 546 | "lock_api", 547 | "parking_lot", 548 | ] 549 | 550 | [[package]] 551 | name = "futures-io" 552 | version = "0.3.31" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 555 | 556 | [[package]] 557 | name = "futures-sink" 558 | version = "0.3.31" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 561 | 562 | [[package]] 563 | name = "futures-task" 564 | version = "0.3.31" 565 | source = "registry+https://github.com/rust-lang/crates.io-index" 566 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 567 | 568 | [[package]] 569 | name = "futures-util" 570 | version = "0.3.31" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 573 | dependencies = [ 574 | "futures-core", 575 | "futures-io", 576 | "futures-sink", 577 | "futures-task", 578 | "memchr", 579 | "pin-project-lite", 580 | "pin-utils", 581 | "slab", 582 | ] 583 | 584 | [[package]] 585 | name = "generic-array" 586 | version = "0.14.7" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 589 | dependencies = [ 590 | "typenum", 591 | "version_check", 592 | ] 593 | 594 | [[package]] 595 | name = "getrandom" 596 | version = "0.2.15" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 599 | dependencies = [ 600 | "cfg-if", 601 | "js-sys", 602 | "libc", 603 | "wasi 0.11.0+wasi-snapshot-preview1", 604 | "wasm-bindgen", 605 | ] 606 | 607 | [[package]] 608 | name = "getrandom" 609 | version = "0.3.1" 610 | source = "registry+https://github.com/rust-lang/crates.io-index" 611 | checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" 612 | dependencies = [ 613 | "cfg-if", 614 | "libc", 615 | "wasi 0.13.3+wasi-0.2.2", 616 | "windows-targets 0.52.6", 617 | ] 618 | 619 | [[package]] 620 | name = "gimli" 621 | version = "0.31.1" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 624 | 625 | [[package]] 626 | name = "hashbrown" 627 | version = "0.12.3" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 630 | 631 | [[package]] 632 | name = "hashbrown" 633 | version = "0.15.2" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 636 | dependencies = [ 637 | "allocator-api2", 638 | "equivalent", 639 | "foldhash", 640 | ] 641 | 642 | [[package]] 643 | name = "hashlink" 644 | version = "0.10.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" 647 | dependencies = [ 648 | "hashbrown 0.15.2", 649 | ] 650 | 651 | [[package]] 652 | name = "heck" 653 | version = "0.5.0" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 656 | 657 | [[package]] 658 | name = "hex" 659 | version = "0.4.3" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 662 | 663 | [[package]] 664 | name = "hkdf" 665 | version = "0.12.4" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" 668 | dependencies = [ 669 | "hmac", 670 | ] 671 | 672 | [[package]] 673 | name = "hmac" 674 | version = "0.12.1" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 677 | dependencies = [ 678 | "digest", 679 | ] 680 | 681 | [[package]] 682 | name = "home" 683 | version = "0.5.11" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 686 | dependencies = [ 687 | "windows-sys 0.59.0", 688 | ] 689 | 690 | [[package]] 691 | name = "http" 692 | version = "1.2.0" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" 695 | dependencies = [ 696 | "bytes", 697 | "fnv", 698 | "itoa", 699 | ] 700 | 701 | [[package]] 702 | name = "http-body" 703 | version = "1.0.1" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 706 | dependencies = [ 707 | "bytes", 708 | "http", 709 | ] 710 | 711 | [[package]] 712 | name = "http-body-util" 713 | version = "0.1.2" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" 716 | dependencies = [ 717 | "bytes", 718 | "futures-util", 719 | "http", 720 | "http-body", 721 | "pin-project-lite", 722 | ] 723 | 724 | [[package]] 725 | name = "httparse" 726 | version = "1.10.0" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" 729 | 730 | [[package]] 731 | name = "httpdate" 732 | version = "1.0.3" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 735 | 736 | [[package]] 737 | name = "hyper" 738 | version = "1.6.0" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" 741 | dependencies = [ 742 | "bytes", 743 | "futures-channel", 744 | "futures-util", 745 | "http", 746 | "http-body", 747 | "httparse", 748 | "httpdate", 749 | "itoa", 750 | "pin-project-lite", 751 | "smallvec", 752 | "tokio", 753 | "want", 754 | ] 755 | 756 | [[package]] 757 | name = "hyper-tls" 758 | version = "0.6.0" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 761 | dependencies = [ 762 | "bytes", 763 | "http-body-util", 764 | "hyper", 765 | "hyper-util", 766 | "native-tls", 767 | "tokio", 768 | "tokio-native-tls", 769 | "tower-service", 770 | ] 771 | 772 | [[package]] 773 | name = "hyper-util" 774 | version = "0.1.10" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" 777 | dependencies = [ 778 | "bytes", 779 | "futures-channel", 780 | "futures-util", 781 | "http", 782 | "http-body", 783 | "hyper", 784 | "pin-project-lite", 785 | "socket2", 786 | "tokio", 787 | "tower-service", 788 | "tracing", 789 | ] 790 | 791 | [[package]] 792 | name = "iana-time-zone" 793 | version = "0.1.61" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 796 | dependencies = [ 797 | "android_system_properties", 798 | "core-foundation-sys", 799 | "iana-time-zone-haiku", 800 | "js-sys", 801 | "wasm-bindgen", 802 | "windows-core", 803 | ] 804 | 805 | [[package]] 806 | name = "iana-time-zone-haiku" 807 | version = "0.1.2" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 810 | dependencies = [ 811 | "cc", 812 | ] 813 | 814 | [[package]] 815 | name = "icu_collections" 816 | version = "1.5.0" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 819 | dependencies = [ 820 | "displaydoc", 821 | "yoke", 822 | "zerofrom", 823 | "zerovec", 824 | ] 825 | 826 | [[package]] 827 | name = "icu_locid" 828 | version = "1.5.0" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 831 | dependencies = [ 832 | "displaydoc", 833 | "litemap", 834 | "tinystr", 835 | "writeable", 836 | "zerovec", 837 | ] 838 | 839 | [[package]] 840 | name = "icu_locid_transform" 841 | version = "1.5.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 844 | dependencies = [ 845 | "displaydoc", 846 | "icu_locid", 847 | "icu_locid_transform_data", 848 | "icu_provider", 849 | "tinystr", 850 | "zerovec", 851 | ] 852 | 853 | [[package]] 854 | name = "icu_locid_transform_data" 855 | version = "1.5.0" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" 858 | 859 | [[package]] 860 | name = "icu_normalizer" 861 | version = "1.5.0" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 864 | dependencies = [ 865 | "displaydoc", 866 | "icu_collections", 867 | "icu_normalizer_data", 868 | "icu_properties", 869 | "icu_provider", 870 | "smallvec", 871 | "utf16_iter", 872 | "utf8_iter", 873 | "write16", 874 | "zerovec", 875 | ] 876 | 877 | [[package]] 878 | name = "icu_normalizer_data" 879 | version = "1.5.0" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" 882 | 883 | [[package]] 884 | name = "icu_properties" 885 | version = "1.5.1" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" 888 | dependencies = [ 889 | "displaydoc", 890 | "icu_collections", 891 | "icu_locid_transform", 892 | "icu_properties_data", 893 | "icu_provider", 894 | "tinystr", 895 | "zerovec", 896 | ] 897 | 898 | [[package]] 899 | name = "icu_properties_data" 900 | version = "1.5.0" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" 903 | 904 | [[package]] 905 | name = "icu_provider" 906 | version = "1.5.0" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 909 | dependencies = [ 910 | "displaydoc", 911 | "icu_locid", 912 | "icu_provider_macros", 913 | "stable_deref_trait", 914 | "tinystr", 915 | "writeable", 916 | "yoke", 917 | "zerofrom", 918 | "zerovec", 919 | ] 920 | 921 | [[package]] 922 | name = "icu_provider_macros" 923 | version = "1.5.0" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 926 | dependencies = [ 927 | "proc-macro2", 928 | "quote", 929 | "syn", 930 | ] 931 | 932 | [[package]] 933 | name = "ident_case" 934 | version = "1.0.1" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 937 | 938 | [[package]] 939 | name = "idna" 940 | version = "1.0.3" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 943 | dependencies = [ 944 | "idna_adapter", 945 | "smallvec", 946 | "utf8_iter", 947 | ] 948 | 949 | [[package]] 950 | name = "idna_adapter" 951 | version = "1.2.0" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" 954 | dependencies = [ 955 | "icu_normalizer", 956 | "icu_properties", 957 | ] 958 | 959 | [[package]] 960 | name = "indexmap" 961 | version = "1.9.3" 962 | source = "registry+https://github.com/rust-lang/crates.io-index" 963 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 964 | dependencies = [ 965 | "autocfg", 966 | "hashbrown 0.12.3", 967 | "serde", 968 | ] 969 | 970 | [[package]] 971 | name = "indexmap" 972 | version = "2.7.1" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" 975 | dependencies = [ 976 | "equivalent", 977 | "hashbrown 0.15.2", 978 | "serde", 979 | ] 980 | 981 | [[package]] 982 | name = "ipnet" 983 | version = "2.11.0" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 986 | 987 | [[package]] 988 | name = "itoa" 989 | version = "1.0.14" 990 | source = "registry+https://github.com/rust-lang/crates.io-index" 991 | checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" 992 | 993 | [[package]] 994 | name = "js-sys" 995 | version = "0.3.77" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 998 | dependencies = [ 999 | "once_cell", 1000 | "wasm-bindgen", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "jsonwebtoken" 1005 | version = "9.3.1" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" 1008 | dependencies = [ 1009 | "base64", 1010 | "js-sys", 1011 | "pem", 1012 | "ring", 1013 | "serde", 1014 | "serde_json", 1015 | "simple_asn1", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "lazy_static" 1020 | version = "1.5.0" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1023 | dependencies = [ 1024 | "spin", 1025 | ] 1026 | 1027 | [[package]] 1028 | name = "libc" 1029 | version = "0.2.170" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" 1032 | 1033 | [[package]] 1034 | name = "libm" 1035 | version = "0.2.11" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" 1038 | 1039 | [[package]] 1040 | name = "libsqlite3-sys" 1041 | version = "0.30.1" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" 1044 | dependencies = [ 1045 | "cc", 1046 | "pkg-config", 1047 | "vcpkg", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "linux-raw-sys" 1052 | version = "0.4.15" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 1055 | 1056 | [[package]] 1057 | name = "litemap" 1058 | version = "0.7.4" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" 1061 | 1062 | [[package]] 1063 | name = "lock_api" 1064 | version = "0.4.12" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1067 | dependencies = [ 1068 | "autocfg", 1069 | "scopeguard", 1070 | ] 1071 | 1072 | [[package]] 1073 | name = "log" 1074 | version = "0.4.26" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" 1077 | 1078 | [[package]] 1079 | name = "matchit" 1080 | version = "0.8.4" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 1083 | 1084 | [[package]] 1085 | name = "md-5" 1086 | version = "0.10.6" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 1089 | dependencies = [ 1090 | "cfg-if", 1091 | "digest", 1092 | ] 1093 | 1094 | [[package]] 1095 | name = "memchr" 1096 | version = "2.7.4" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 1099 | 1100 | [[package]] 1101 | name = "mime" 1102 | version = "0.3.17" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1105 | 1106 | [[package]] 1107 | name = "miniz_oxide" 1108 | version = "0.8.5" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" 1111 | dependencies = [ 1112 | "adler2", 1113 | ] 1114 | 1115 | [[package]] 1116 | name = "mio" 1117 | version = "1.0.3" 1118 | source = "registry+https://github.com/rust-lang/crates.io-index" 1119 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 1120 | dependencies = [ 1121 | "libc", 1122 | "wasi 0.11.0+wasi-snapshot-preview1", 1123 | "windows-sys 0.52.0", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "native-tls" 1128 | version = "0.2.14" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 1131 | dependencies = [ 1132 | "libc", 1133 | "log", 1134 | "openssl", 1135 | "openssl-probe", 1136 | "openssl-sys", 1137 | "schannel", 1138 | "security-framework", 1139 | "security-framework-sys", 1140 | "tempfile", 1141 | ] 1142 | 1143 | [[package]] 1144 | name = "nu-ansi-term" 1145 | version = "0.46.0" 1146 | source = "registry+https://github.com/rust-lang/crates.io-index" 1147 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1148 | dependencies = [ 1149 | "overload", 1150 | "winapi", 1151 | ] 1152 | 1153 | [[package]] 1154 | name = "num-bigint" 1155 | version = "0.4.6" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 1158 | dependencies = [ 1159 | "num-integer", 1160 | "num-traits", 1161 | ] 1162 | 1163 | [[package]] 1164 | name = "num-bigint-dig" 1165 | version = "0.8.4" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" 1168 | dependencies = [ 1169 | "byteorder", 1170 | "lazy_static", 1171 | "libm", 1172 | "num-integer", 1173 | "num-iter", 1174 | "num-traits", 1175 | "rand", 1176 | "smallvec", 1177 | "zeroize", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "num-conv" 1182 | version = "0.1.0" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1185 | 1186 | [[package]] 1187 | name = "num-integer" 1188 | version = "0.1.46" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1191 | dependencies = [ 1192 | "num-traits", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "num-iter" 1197 | version = "0.1.45" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 1200 | dependencies = [ 1201 | "autocfg", 1202 | "num-integer", 1203 | "num-traits", 1204 | ] 1205 | 1206 | [[package]] 1207 | name = "num-traits" 1208 | version = "0.2.19" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1211 | dependencies = [ 1212 | "autocfg", 1213 | "libm", 1214 | ] 1215 | 1216 | [[package]] 1217 | name = "object" 1218 | version = "0.36.7" 1219 | source = "registry+https://github.com/rust-lang/crates.io-index" 1220 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 1221 | dependencies = [ 1222 | "memchr", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "once_cell" 1227 | version = "1.20.3" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" 1230 | 1231 | [[package]] 1232 | name = "opensearch" 1233 | version = "2.3.0" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "a62b025c3503d3d53eaba3b6f14adb955af9f69fc71141b4d030a4e5331f5d42" 1236 | dependencies = [ 1237 | "base64", 1238 | "bytes", 1239 | "dyn-clone", 1240 | "lazy_static", 1241 | "percent-encoding", 1242 | "reqwest", 1243 | "rustc_version", 1244 | "serde", 1245 | "serde_json", 1246 | "serde_with", 1247 | "url", 1248 | "void", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "openssl" 1253 | version = "0.10.71" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" 1256 | dependencies = [ 1257 | "bitflags", 1258 | "cfg-if", 1259 | "foreign-types", 1260 | "libc", 1261 | "once_cell", 1262 | "openssl-macros", 1263 | "openssl-sys", 1264 | ] 1265 | 1266 | [[package]] 1267 | name = "openssl-macros" 1268 | version = "0.1.1" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 1271 | dependencies = [ 1272 | "proc-macro2", 1273 | "quote", 1274 | "syn", 1275 | ] 1276 | 1277 | [[package]] 1278 | name = "openssl-probe" 1279 | version = "0.1.6" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1282 | 1283 | [[package]] 1284 | name = "openssl-sys" 1285 | version = "0.9.106" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" 1288 | dependencies = [ 1289 | "cc", 1290 | "libc", 1291 | "pkg-config", 1292 | "vcpkg", 1293 | ] 1294 | 1295 | [[package]] 1296 | name = "overload" 1297 | version = "0.1.1" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1300 | 1301 | [[package]] 1302 | name = "parking" 1303 | version = "2.2.1" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 1306 | 1307 | [[package]] 1308 | name = "parking_lot" 1309 | version = "0.12.3" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1312 | dependencies = [ 1313 | "lock_api", 1314 | "parking_lot_core", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "parking_lot_core" 1319 | version = "0.9.10" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1322 | dependencies = [ 1323 | "cfg-if", 1324 | "libc", 1325 | "redox_syscall", 1326 | "smallvec", 1327 | "windows-targets 0.52.6", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "pem" 1332 | version = "3.0.5" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" 1335 | dependencies = [ 1336 | "base64", 1337 | "serde", 1338 | ] 1339 | 1340 | [[package]] 1341 | name = "pem-rfc7468" 1342 | version = "0.7.0" 1343 | source = "registry+https://github.com/rust-lang/crates.io-index" 1344 | checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 1345 | dependencies = [ 1346 | "base64ct", 1347 | ] 1348 | 1349 | [[package]] 1350 | name = "percent-encoding" 1351 | version = "2.3.1" 1352 | source = "registry+https://github.com/rust-lang/crates.io-index" 1353 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1354 | 1355 | [[package]] 1356 | name = "pin-project-lite" 1357 | version = "0.2.16" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1360 | 1361 | [[package]] 1362 | name = "pin-utils" 1363 | version = "0.1.0" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1366 | 1367 | [[package]] 1368 | name = "pkcs1" 1369 | version = "0.7.5" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" 1372 | dependencies = [ 1373 | "der", 1374 | "pkcs8", 1375 | "spki", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "pkcs8" 1380 | version = "0.10.2" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 1383 | dependencies = [ 1384 | "der", 1385 | "spki", 1386 | ] 1387 | 1388 | [[package]] 1389 | name = "pkg-config" 1390 | version = "0.3.31" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" 1393 | 1394 | [[package]] 1395 | name = "powerfmt" 1396 | version = "0.2.0" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1399 | 1400 | [[package]] 1401 | name = "ppv-lite86" 1402 | version = "0.2.20" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 1405 | dependencies = [ 1406 | "zerocopy", 1407 | ] 1408 | 1409 | [[package]] 1410 | name = "proc-macro2" 1411 | version = "1.0.93" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" 1414 | dependencies = [ 1415 | "unicode-ident", 1416 | ] 1417 | 1418 | [[package]] 1419 | name = "quote" 1420 | version = "1.0.38" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" 1423 | dependencies = [ 1424 | "proc-macro2", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "rand" 1429 | version = "0.8.5" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1432 | dependencies = [ 1433 | "libc", 1434 | "rand_chacha", 1435 | "rand_core", 1436 | ] 1437 | 1438 | [[package]] 1439 | name = "rand_chacha" 1440 | version = "0.3.1" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1443 | dependencies = [ 1444 | "ppv-lite86", 1445 | "rand_core", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "rand_core" 1450 | version = "0.6.4" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1453 | dependencies = [ 1454 | "getrandom 0.2.15", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "redox_syscall" 1459 | version = "0.5.9" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" 1462 | dependencies = [ 1463 | "bitflags", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "reqwest" 1468 | version = "0.12.12" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" 1471 | dependencies = [ 1472 | "async-compression", 1473 | "base64", 1474 | "bytes", 1475 | "futures-core", 1476 | "futures-util", 1477 | "http", 1478 | "http-body", 1479 | "http-body-util", 1480 | "hyper", 1481 | "hyper-tls", 1482 | "hyper-util", 1483 | "ipnet", 1484 | "js-sys", 1485 | "log", 1486 | "mime", 1487 | "native-tls", 1488 | "once_cell", 1489 | "percent-encoding", 1490 | "pin-project-lite", 1491 | "rustls-pemfile", 1492 | "serde", 1493 | "serde_json", 1494 | "serde_urlencoded", 1495 | "sync_wrapper", 1496 | "tokio", 1497 | "tokio-native-tls", 1498 | "tokio-util", 1499 | "tower", 1500 | "tower-service", 1501 | "url", 1502 | "wasm-bindgen", 1503 | "wasm-bindgen-futures", 1504 | "web-sys", 1505 | "windows-registry", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "ring" 1510 | version = "0.17.11" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" 1513 | dependencies = [ 1514 | "cc", 1515 | "cfg-if", 1516 | "getrandom 0.2.15", 1517 | "libc", 1518 | "untrusted", 1519 | "windows-sys 0.52.0", 1520 | ] 1521 | 1522 | [[package]] 1523 | name = "rsa" 1524 | version = "0.9.7" 1525 | source = "registry+https://github.com/rust-lang/crates.io-index" 1526 | checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" 1527 | dependencies = [ 1528 | "const-oid", 1529 | "digest", 1530 | "num-bigint-dig", 1531 | "num-integer", 1532 | "num-traits", 1533 | "pkcs1", 1534 | "pkcs8", 1535 | "rand_core", 1536 | "signature", 1537 | "spki", 1538 | "subtle", 1539 | "zeroize", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "rust-event-collector" 1544 | version = "0.1.0" 1545 | dependencies = [ 1546 | "axum", 1547 | "chrono", 1548 | "dotenv", 1549 | "jsonwebtoken", 1550 | "once_cell", 1551 | "opensearch", 1552 | "serde", 1553 | "serde_json", 1554 | "sqlx", 1555 | "tokio", 1556 | "tower-http", 1557 | "tracing", 1558 | "tracing-subscriber", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "rustc-demangle" 1563 | version = "0.1.24" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 1566 | 1567 | [[package]] 1568 | name = "rustc_version" 1569 | version = "0.4.1" 1570 | source = "registry+https://github.com/rust-lang/crates.io-index" 1571 | checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 1572 | dependencies = [ 1573 | "semver", 1574 | ] 1575 | 1576 | [[package]] 1577 | name = "rustix" 1578 | version = "0.38.44" 1579 | source = "registry+https://github.com/rust-lang/crates.io-index" 1580 | checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 1581 | dependencies = [ 1582 | "bitflags", 1583 | "errno", 1584 | "libc", 1585 | "linux-raw-sys", 1586 | "windows-sys 0.59.0", 1587 | ] 1588 | 1589 | [[package]] 1590 | name = "rustls-pemfile" 1591 | version = "2.2.0" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" 1594 | dependencies = [ 1595 | "rustls-pki-types", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "rustls-pki-types" 1600 | version = "1.11.0" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" 1603 | 1604 | [[package]] 1605 | name = "rustversion" 1606 | version = "1.0.19" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" 1609 | 1610 | [[package]] 1611 | name = "ryu" 1612 | version = "1.0.19" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" 1615 | 1616 | [[package]] 1617 | name = "schannel" 1618 | version = "0.1.27" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 1621 | dependencies = [ 1622 | "windows-sys 0.59.0", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "scopeguard" 1627 | version = "1.2.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1630 | 1631 | [[package]] 1632 | name = "security-framework" 1633 | version = "2.11.1" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1636 | dependencies = [ 1637 | "bitflags", 1638 | "core-foundation", 1639 | "core-foundation-sys", 1640 | "libc", 1641 | "security-framework-sys", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "security-framework-sys" 1646 | version = "2.14.0" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 1649 | dependencies = [ 1650 | "core-foundation-sys", 1651 | "libc", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "semver" 1656 | version = "1.0.25" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" 1659 | 1660 | [[package]] 1661 | name = "serde" 1662 | version = "1.0.218" 1663 | source = "registry+https://github.com/rust-lang/crates.io-index" 1664 | checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" 1665 | dependencies = [ 1666 | "serde_derive", 1667 | ] 1668 | 1669 | [[package]] 1670 | name = "serde_derive" 1671 | version = "1.0.218" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" 1674 | dependencies = [ 1675 | "proc-macro2", 1676 | "quote", 1677 | "syn", 1678 | ] 1679 | 1680 | [[package]] 1681 | name = "serde_json" 1682 | version = "1.0.139" 1683 | source = "registry+https://github.com/rust-lang/crates.io-index" 1684 | checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" 1685 | dependencies = [ 1686 | "itoa", 1687 | "memchr", 1688 | "ryu", 1689 | "serde", 1690 | ] 1691 | 1692 | [[package]] 1693 | name = "serde_path_to_error" 1694 | version = "0.1.16" 1695 | source = "registry+https://github.com/rust-lang/crates.io-index" 1696 | checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" 1697 | dependencies = [ 1698 | "itoa", 1699 | "serde", 1700 | ] 1701 | 1702 | [[package]] 1703 | name = "serde_urlencoded" 1704 | version = "0.7.1" 1705 | source = "registry+https://github.com/rust-lang/crates.io-index" 1706 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1707 | dependencies = [ 1708 | "form_urlencoded", 1709 | "itoa", 1710 | "ryu", 1711 | "serde", 1712 | ] 1713 | 1714 | [[package]] 1715 | name = "serde_with" 1716 | version = "3.12.0" 1717 | source = "registry+https://github.com/rust-lang/crates.io-index" 1718 | checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" 1719 | dependencies = [ 1720 | "base64", 1721 | "chrono", 1722 | "hex", 1723 | "indexmap 1.9.3", 1724 | "indexmap 2.7.1", 1725 | "serde", 1726 | "serde_derive", 1727 | "serde_json", 1728 | "serde_with_macros", 1729 | "time", 1730 | ] 1731 | 1732 | [[package]] 1733 | name = "serde_with_macros" 1734 | version = "3.12.0" 1735 | source = "registry+https://github.com/rust-lang/crates.io-index" 1736 | checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" 1737 | dependencies = [ 1738 | "darling", 1739 | "proc-macro2", 1740 | "quote", 1741 | "syn", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "sha1" 1746 | version = "0.10.6" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 1749 | dependencies = [ 1750 | "cfg-if", 1751 | "cpufeatures", 1752 | "digest", 1753 | ] 1754 | 1755 | [[package]] 1756 | name = "sha2" 1757 | version = "0.10.8" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1760 | dependencies = [ 1761 | "cfg-if", 1762 | "cpufeatures", 1763 | "digest", 1764 | ] 1765 | 1766 | [[package]] 1767 | name = "sharded-slab" 1768 | version = "0.1.7" 1769 | source = "registry+https://github.com/rust-lang/crates.io-index" 1770 | checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 1771 | dependencies = [ 1772 | "lazy_static", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "shlex" 1777 | version = "1.3.0" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1780 | 1781 | [[package]] 1782 | name = "signal-hook-registry" 1783 | version = "1.4.2" 1784 | source = "registry+https://github.com/rust-lang/crates.io-index" 1785 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 1786 | dependencies = [ 1787 | "libc", 1788 | ] 1789 | 1790 | [[package]] 1791 | name = "signature" 1792 | version = "2.2.0" 1793 | source = "registry+https://github.com/rust-lang/crates.io-index" 1794 | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1795 | dependencies = [ 1796 | "digest", 1797 | "rand_core", 1798 | ] 1799 | 1800 | [[package]] 1801 | name = "simple_asn1" 1802 | version = "0.6.3" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" 1805 | dependencies = [ 1806 | "num-bigint", 1807 | "num-traits", 1808 | "thiserror", 1809 | "time", 1810 | ] 1811 | 1812 | [[package]] 1813 | name = "slab" 1814 | version = "0.4.9" 1815 | source = "registry+https://github.com/rust-lang/crates.io-index" 1816 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1817 | dependencies = [ 1818 | "autocfg", 1819 | ] 1820 | 1821 | [[package]] 1822 | name = "smallvec" 1823 | version = "1.14.0" 1824 | source = "registry+https://github.com/rust-lang/crates.io-index" 1825 | checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" 1826 | dependencies = [ 1827 | "serde", 1828 | ] 1829 | 1830 | [[package]] 1831 | name = "socket2" 1832 | version = "0.5.8" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" 1835 | dependencies = [ 1836 | "libc", 1837 | "windows-sys 0.52.0", 1838 | ] 1839 | 1840 | [[package]] 1841 | name = "spin" 1842 | version = "0.9.8" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1845 | dependencies = [ 1846 | "lock_api", 1847 | ] 1848 | 1849 | [[package]] 1850 | name = "spki" 1851 | version = "0.7.3" 1852 | source = "registry+https://github.com/rust-lang/crates.io-index" 1853 | checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 1854 | dependencies = [ 1855 | "base64ct", 1856 | "der", 1857 | ] 1858 | 1859 | [[package]] 1860 | name = "sqlx" 1861 | version = "0.8.3" 1862 | source = "registry+https://github.com/rust-lang/crates.io-index" 1863 | checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" 1864 | dependencies = [ 1865 | "sqlx-core", 1866 | "sqlx-macros", 1867 | "sqlx-mysql", 1868 | "sqlx-postgres", 1869 | "sqlx-sqlite", 1870 | ] 1871 | 1872 | [[package]] 1873 | name = "sqlx-core" 1874 | version = "0.8.3" 1875 | source = "registry+https://github.com/rust-lang/crates.io-index" 1876 | checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" 1877 | dependencies = [ 1878 | "bytes", 1879 | "crc", 1880 | "crossbeam-queue", 1881 | "either", 1882 | "event-listener", 1883 | "futures-core", 1884 | "futures-intrusive", 1885 | "futures-io", 1886 | "futures-util", 1887 | "hashbrown 0.15.2", 1888 | "hashlink", 1889 | "indexmap 2.7.1", 1890 | "log", 1891 | "memchr", 1892 | "native-tls", 1893 | "once_cell", 1894 | "percent-encoding", 1895 | "serde", 1896 | "serde_json", 1897 | "sha2", 1898 | "smallvec", 1899 | "thiserror", 1900 | "tokio", 1901 | "tokio-stream", 1902 | "tracing", 1903 | "url", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "sqlx-macros" 1908 | version = "0.8.3" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" 1911 | dependencies = [ 1912 | "proc-macro2", 1913 | "quote", 1914 | "sqlx-core", 1915 | "sqlx-macros-core", 1916 | "syn", 1917 | ] 1918 | 1919 | [[package]] 1920 | name = "sqlx-macros-core" 1921 | version = "0.8.3" 1922 | source = "registry+https://github.com/rust-lang/crates.io-index" 1923 | checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" 1924 | dependencies = [ 1925 | "dotenvy", 1926 | "either", 1927 | "heck", 1928 | "hex", 1929 | "once_cell", 1930 | "proc-macro2", 1931 | "quote", 1932 | "serde", 1933 | "serde_json", 1934 | "sha2", 1935 | "sqlx-core", 1936 | "sqlx-mysql", 1937 | "sqlx-postgres", 1938 | "sqlx-sqlite", 1939 | "syn", 1940 | "tempfile", 1941 | "tokio", 1942 | "url", 1943 | ] 1944 | 1945 | [[package]] 1946 | name = "sqlx-mysql" 1947 | version = "0.8.3" 1948 | source = "registry+https://github.com/rust-lang/crates.io-index" 1949 | checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" 1950 | dependencies = [ 1951 | "atoi", 1952 | "base64", 1953 | "bitflags", 1954 | "byteorder", 1955 | "bytes", 1956 | "crc", 1957 | "digest", 1958 | "dotenvy", 1959 | "either", 1960 | "futures-channel", 1961 | "futures-core", 1962 | "futures-io", 1963 | "futures-util", 1964 | "generic-array", 1965 | "hex", 1966 | "hkdf", 1967 | "hmac", 1968 | "itoa", 1969 | "log", 1970 | "md-5", 1971 | "memchr", 1972 | "once_cell", 1973 | "percent-encoding", 1974 | "rand", 1975 | "rsa", 1976 | "serde", 1977 | "sha1", 1978 | "sha2", 1979 | "smallvec", 1980 | "sqlx-core", 1981 | "stringprep", 1982 | "thiserror", 1983 | "tracing", 1984 | "whoami", 1985 | ] 1986 | 1987 | [[package]] 1988 | name = "sqlx-postgres" 1989 | version = "0.8.3" 1990 | source = "registry+https://github.com/rust-lang/crates.io-index" 1991 | checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" 1992 | dependencies = [ 1993 | "atoi", 1994 | "base64", 1995 | "bitflags", 1996 | "byteorder", 1997 | "crc", 1998 | "dotenvy", 1999 | "etcetera", 2000 | "futures-channel", 2001 | "futures-core", 2002 | "futures-util", 2003 | "hex", 2004 | "hkdf", 2005 | "hmac", 2006 | "home", 2007 | "itoa", 2008 | "log", 2009 | "md-5", 2010 | "memchr", 2011 | "once_cell", 2012 | "rand", 2013 | "serde", 2014 | "serde_json", 2015 | "sha2", 2016 | "smallvec", 2017 | "sqlx-core", 2018 | "stringprep", 2019 | "thiserror", 2020 | "tracing", 2021 | "whoami", 2022 | ] 2023 | 2024 | [[package]] 2025 | name = "sqlx-sqlite" 2026 | version = "0.8.3" 2027 | source = "registry+https://github.com/rust-lang/crates.io-index" 2028 | checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" 2029 | dependencies = [ 2030 | "atoi", 2031 | "flume", 2032 | "futures-channel", 2033 | "futures-core", 2034 | "futures-executor", 2035 | "futures-intrusive", 2036 | "futures-util", 2037 | "libsqlite3-sys", 2038 | "log", 2039 | "percent-encoding", 2040 | "serde", 2041 | "serde_urlencoded", 2042 | "sqlx-core", 2043 | "tracing", 2044 | "url", 2045 | ] 2046 | 2047 | [[package]] 2048 | name = "stable_deref_trait" 2049 | version = "1.2.0" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 2052 | 2053 | [[package]] 2054 | name = "stringprep" 2055 | version = "0.1.5" 2056 | source = "registry+https://github.com/rust-lang/crates.io-index" 2057 | checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" 2058 | dependencies = [ 2059 | "unicode-bidi", 2060 | "unicode-normalization", 2061 | "unicode-properties", 2062 | ] 2063 | 2064 | [[package]] 2065 | name = "strsim" 2066 | version = "0.11.1" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2069 | 2070 | [[package]] 2071 | name = "subtle" 2072 | version = "2.6.1" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 2075 | 2076 | [[package]] 2077 | name = "syn" 2078 | version = "2.0.98" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" 2081 | dependencies = [ 2082 | "proc-macro2", 2083 | "quote", 2084 | "unicode-ident", 2085 | ] 2086 | 2087 | [[package]] 2088 | name = "sync_wrapper" 2089 | version = "1.0.2" 2090 | source = "registry+https://github.com/rust-lang/crates.io-index" 2091 | checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 2092 | dependencies = [ 2093 | "futures-core", 2094 | ] 2095 | 2096 | [[package]] 2097 | name = "synstructure" 2098 | version = "0.13.1" 2099 | source = "registry+https://github.com/rust-lang/crates.io-index" 2100 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 2101 | dependencies = [ 2102 | "proc-macro2", 2103 | "quote", 2104 | "syn", 2105 | ] 2106 | 2107 | [[package]] 2108 | name = "tempfile" 2109 | version = "3.17.1" 2110 | source = "registry+https://github.com/rust-lang/crates.io-index" 2111 | checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" 2112 | dependencies = [ 2113 | "cfg-if", 2114 | "fastrand", 2115 | "getrandom 0.3.1", 2116 | "once_cell", 2117 | "rustix", 2118 | "windows-sys 0.59.0", 2119 | ] 2120 | 2121 | [[package]] 2122 | name = "thiserror" 2123 | version = "2.0.11" 2124 | source = "registry+https://github.com/rust-lang/crates.io-index" 2125 | checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" 2126 | dependencies = [ 2127 | "thiserror-impl", 2128 | ] 2129 | 2130 | [[package]] 2131 | name = "thiserror-impl" 2132 | version = "2.0.11" 2133 | source = "registry+https://github.com/rust-lang/crates.io-index" 2134 | checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" 2135 | dependencies = [ 2136 | "proc-macro2", 2137 | "quote", 2138 | "syn", 2139 | ] 2140 | 2141 | [[package]] 2142 | name = "thread_local" 2143 | version = "1.1.8" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 2146 | dependencies = [ 2147 | "cfg-if", 2148 | "once_cell", 2149 | ] 2150 | 2151 | [[package]] 2152 | name = "time" 2153 | version = "0.3.37" 2154 | source = "registry+https://github.com/rust-lang/crates.io-index" 2155 | checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" 2156 | dependencies = [ 2157 | "deranged", 2158 | "itoa", 2159 | "num-conv", 2160 | "powerfmt", 2161 | "serde", 2162 | "time-core", 2163 | "time-macros", 2164 | ] 2165 | 2166 | [[package]] 2167 | name = "time-core" 2168 | version = "0.1.2" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 2171 | 2172 | [[package]] 2173 | name = "time-macros" 2174 | version = "0.2.19" 2175 | source = "registry+https://github.com/rust-lang/crates.io-index" 2176 | checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" 2177 | dependencies = [ 2178 | "num-conv", 2179 | "time-core", 2180 | ] 2181 | 2182 | [[package]] 2183 | name = "tinystr" 2184 | version = "0.7.6" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 2187 | dependencies = [ 2188 | "displaydoc", 2189 | "zerovec", 2190 | ] 2191 | 2192 | [[package]] 2193 | name = "tinyvec" 2194 | version = "1.8.1" 2195 | source = "registry+https://github.com/rust-lang/crates.io-index" 2196 | checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" 2197 | dependencies = [ 2198 | "tinyvec_macros", 2199 | ] 2200 | 2201 | [[package]] 2202 | name = "tinyvec_macros" 2203 | version = "0.1.1" 2204 | source = "registry+https://github.com/rust-lang/crates.io-index" 2205 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2206 | 2207 | [[package]] 2208 | name = "tokio" 2209 | version = "1.43.0" 2210 | source = "registry+https://github.com/rust-lang/crates.io-index" 2211 | checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" 2212 | dependencies = [ 2213 | "backtrace", 2214 | "bytes", 2215 | "libc", 2216 | "mio", 2217 | "parking_lot", 2218 | "pin-project-lite", 2219 | "signal-hook-registry", 2220 | "socket2", 2221 | "tokio-macros", 2222 | "windows-sys 0.52.0", 2223 | ] 2224 | 2225 | [[package]] 2226 | name = "tokio-macros" 2227 | version = "2.5.0" 2228 | source = "registry+https://github.com/rust-lang/crates.io-index" 2229 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 2230 | dependencies = [ 2231 | "proc-macro2", 2232 | "quote", 2233 | "syn", 2234 | ] 2235 | 2236 | [[package]] 2237 | name = "tokio-native-tls" 2238 | version = "0.3.1" 2239 | source = "registry+https://github.com/rust-lang/crates.io-index" 2240 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 2241 | dependencies = [ 2242 | "native-tls", 2243 | "tokio", 2244 | ] 2245 | 2246 | [[package]] 2247 | name = "tokio-stream" 2248 | version = "0.1.17" 2249 | source = "registry+https://github.com/rust-lang/crates.io-index" 2250 | checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" 2251 | dependencies = [ 2252 | "futures-core", 2253 | "pin-project-lite", 2254 | "tokio", 2255 | ] 2256 | 2257 | [[package]] 2258 | name = "tokio-util" 2259 | version = "0.7.13" 2260 | source = "registry+https://github.com/rust-lang/crates.io-index" 2261 | checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" 2262 | dependencies = [ 2263 | "bytes", 2264 | "futures-core", 2265 | "futures-sink", 2266 | "pin-project-lite", 2267 | "tokio", 2268 | ] 2269 | 2270 | [[package]] 2271 | name = "tower" 2272 | version = "0.5.2" 2273 | source = "registry+https://github.com/rust-lang/crates.io-index" 2274 | checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 2275 | dependencies = [ 2276 | "futures-core", 2277 | "futures-util", 2278 | "pin-project-lite", 2279 | "sync_wrapper", 2280 | "tokio", 2281 | "tower-layer", 2282 | "tower-service", 2283 | "tracing", 2284 | ] 2285 | 2286 | [[package]] 2287 | name = "tower-http" 2288 | version = "0.6.2" 2289 | source = "registry+https://github.com/rust-lang/crates.io-index" 2290 | checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" 2291 | dependencies = [ 2292 | "bitflags", 2293 | "bytes", 2294 | "http", 2295 | "http-body", 2296 | "pin-project-lite", 2297 | "tower-layer", 2298 | "tower-service", 2299 | "tracing", 2300 | ] 2301 | 2302 | [[package]] 2303 | name = "tower-layer" 2304 | version = "0.3.3" 2305 | source = "registry+https://github.com/rust-lang/crates.io-index" 2306 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 2307 | 2308 | [[package]] 2309 | name = "tower-service" 2310 | version = "0.3.3" 2311 | source = "registry+https://github.com/rust-lang/crates.io-index" 2312 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 2313 | 2314 | [[package]] 2315 | name = "tracing" 2316 | version = "0.1.41" 2317 | source = "registry+https://github.com/rust-lang/crates.io-index" 2318 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 2319 | dependencies = [ 2320 | "log", 2321 | "pin-project-lite", 2322 | "tracing-attributes", 2323 | "tracing-core", 2324 | ] 2325 | 2326 | [[package]] 2327 | name = "tracing-attributes" 2328 | version = "0.1.28" 2329 | source = "registry+https://github.com/rust-lang/crates.io-index" 2330 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 2331 | dependencies = [ 2332 | "proc-macro2", 2333 | "quote", 2334 | "syn", 2335 | ] 2336 | 2337 | [[package]] 2338 | name = "tracing-core" 2339 | version = "0.1.33" 2340 | source = "registry+https://github.com/rust-lang/crates.io-index" 2341 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 2342 | dependencies = [ 2343 | "once_cell", 2344 | "valuable", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "tracing-log" 2349 | version = "0.2.0" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 2352 | dependencies = [ 2353 | "log", 2354 | "once_cell", 2355 | "tracing-core", 2356 | ] 2357 | 2358 | [[package]] 2359 | name = "tracing-subscriber" 2360 | version = "0.3.19" 2361 | source = "registry+https://github.com/rust-lang/crates.io-index" 2362 | checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" 2363 | dependencies = [ 2364 | "nu-ansi-term", 2365 | "sharded-slab", 2366 | "smallvec", 2367 | "thread_local", 2368 | "tracing-core", 2369 | "tracing-log", 2370 | ] 2371 | 2372 | [[package]] 2373 | name = "try-lock" 2374 | version = "0.2.5" 2375 | source = "registry+https://github.com/rust-lang/crates.io-index" 2376 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2377 | 2378 | [[package]] 2379 | name = "typenum" 2380 | version = "1.18.0" 2381 | source = "registry+https://github.com/rust-lang/crates.io-index" 2382 | checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 2383 | 2384 | [[package]] 2385 | name = "unicode-bidi" 2386 | version = "0.3.18" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" 2389 | 2390 | [[package]] 2391 | name = "unicode-ident" 2392 | version = "1.0.17" 2393 | source = "registry+https://github.com/rust-lang/crates.io-index" 2394 | checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" 2395 | 2396 | [[package]] 2397 | name = "unicode-normalization" 2398 | version = "0.1.24" 2399 | source = "registry+https://github.com/rust-lang/crates.io-index" 2400 | checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" 2401 | dependencies = [ 2402 | "tinyvec", 2403 | ] 2404 | 2405 | [[package]] 2406 | name = "unicode-properties" 2407 | version = "0.1.3" 2408 | source = "registry+https://github.com/rust-lang/crates.io-index" 2409 | checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" 2410 | 2411 | [[package]] 2412 | name = "untrusted" 2413 | version = "0.9.0" 2414 | source = "registry+https://github.com/rust-lang/crates.io-index" 2415 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 2416 | 2417 | [[package]] 2418 | name = "url" 2419 | version = "2.5.4" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 2422 | dependencies = [ 2423 | "form_urlencoded", 2424 | "idna", 2425 | "percent-encoding", 2426 | ] 2427 | 2428 | [[package]] 2429 | name = "utf16_iter" 2430 | version = "1.0.5" 2431 | source = "registry+https://github.com/rust-lang/crates.io-index" 2432 | checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 2433 | 2434 | [[package]] 2435 | name = "utf8_iter" 2436 | version = "1.0.4" 2437 | source = "registry+https://github.com/rust-lang/crates.io-index" 2438 | checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2439 | 2440 | [[package]] 2441 | name = "valuable" 2442 | version = "0.1.1" 2443 | source = "registry+https://github.com/rust-lang/crates.io-index" 2444 | checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 2445 | 2446 | [[package]] 2447 | name = "vcpkg" 2448 | version = "0.2.15" 2449 | source = "registry+https://github.com/rust-lang/crates.io-index" 2450 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2451 | 2452 | [[package]] 2453 | name = "version_check" 2454 | version = "0.9.5" 2455 | source = "registry+https://github.com/rust-lang/crates.io-index" 2456 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2457 | 2458 | [[package]] 2459 | name = "void" 2460 | version = "1.0.2" 2461 | source = "registry+https://github.com/rust-lang/crates.io-index" 2462 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 2463 | 2464 | [[package]] 2465 | name = "want" 2466 | version = "0.3.1" 2467 | source = "registry+https://github.com/rust-lang/crates.io-index" 2468 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2469 | dependencies = [ 2470 | "try-lock", 2471 | ] 2472 | 2473 | [[package]] 2474 | name = "wasi" 2475 | version = "0.11.0+wasi-snapshot-preview1" 2476 | source = "registry+https://github.com/rust-lang/crates.io-index" 2477 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2478 | 2479 | [[package]] 2480 | name = "wasi" 2481 | version = "0.13.3+wasi-0.2.2" 2482 | source = "registry+https://github.com/rust-lang/crates.io-index" 2483 | checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" 2484 | dependencies = [ 2485 | "wit-bindgen-rt", 2486 | ] 2487 | 2488 | [[package]] 2489 | name = "wasite" 2490 | version = "0.1.0" 2491 | source = "registry+https://github.com/rust-lang/crates.io-index" 2492 | checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" 2493 | 2494 | [[package]] 2495 | name = "wasm-bindgen" 2496 | version = "0.2.100" 2497 | source = "registry+https://github.com/rust-lang/crates.io-index" 2498 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 2499 | dependencies = [ 2500 | "cfg-if", 2501 | "once_cell", 2502 | "rustversion", 2503 | "wasm-bindgen-macro", 2504 | ] 2505 | 2506 | [[package]] 2507 | name = "wasm-bindgen-backend" 2508 | version = "0.2.100" 2509 | source = "registry+https://github.com/rust-lang/crates.io-index" 2510 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2511 | dependencies = [ 2512 | "bumpalo", 2513 | "log", 2514 | "proc-macro2", 2515 | "quote", 2516 | "syn", 2517 | "wasm-bindgen-shared", 2518 | ] 2519 | 2520 | [[package]] 2521 | name = "wasm-bindgen-futures" 2522 | version = "0.4.50" 2523 | source = "registry+https://github.com/rust-lang/crates.io-index" 2524 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 2525 | dependencies = [ 2526 | "cfg-if", 2527 | "js-sys", 2528 | "once_cell", 2529 | "wasm-bindgen", 2530 | "web-sys", 2531 | ] 2532 | 2533 | [[package]] 2534 | name = "wasm-bindgen-macro" 2535 | version = "0.2.100" 2536 | source = "registry+https://github.com/rust-lang/crates.io-index" 2537 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2538 | dependencies = [ 2539 | "quote", 2540 | "wasm-bindgen-macro-support", 2541 | ] 2542 | 2543 | [[package]] 2544 | name = "wasm-bindgen-macro-support" 2545 | version = "0.2.100" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2548 | dependencies = [ 2549 | "proc-macro2", 2550 | "quote", 2551 | "syn", 2552 | "wasm-bindgen-backend", 2553 | "wasm-bindgen-shared", 2554 | ] 2555 | 2556 | [[package]] 2557 | name = "wasm-bindgen-shared" 2558 | version = "0.2.100" 2559 | source = "registry+https://github.com/rust-lang/crates.io-index" 2560 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2561 | dependencies = [ 2562 | "unicode-ident", 2563 | ] 2564 | 2565 | [[package]] 2566 | name = "web-sys" 2567 | version = "0.3.77" 2568 | source = "registry+https://github.com/rust-lang/crates.io-index" 2569 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 2570 | dependencies = [ 2571 | "js-sys", 2572 | "wasm-bindgen", 2573 | ] 2574 | 2575 | [[package]] 2576 | name = "whoami" 2577 | version = "1.5.2" 2578 | source = "registry+https://github.com/rust-lang/crates.io-index" 2579 | checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" 2580 | dependencies = [ 2581 | "redox_syscall", 2582 | "wasite", 2583 | ] 2584 | 2585 | [[package]] 2586 | name = "winapi" 2587 | version = "0.3.9" 2588 | source = "registry+https://github.com/rust-lang/crates.io-index" 2589 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2590 | dependencies = [ 2591 | "winapi-i686-pc-windows-gnu", 2592 | "winapi-x86_64-pc-windows-gnu", 2593 | ] 2594 | 2595 | [[package]] 2596 | name = "winapi-i686-pc-windows-gnu" 2597 | version = "0.4.0" 2598 | source = "registry+https://github.com/rust-lang/crates.io-index" 2599 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2600 | 2601 | [[package]] 2602 | name = "winapi-x86_64-pc-windows-gnu" 2603 | version = "0.4.0" 2604 | source = "registry+https://github.com/rust-lang/crates.io-index" 2605 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2606 | 2607 | [[package]] 2608 | name = "windows-core" 2609 | version = "0.52.0" 2610 | source = "registry+https://github.com/rust-lang/crates.io-index" 2611 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2612 | dependencies = [ 2613 | "windows-targets 0.52.6", 2614 | ] 2615 | 2616 | [[package]] 2617 | name = "windows-registry" 2618 | version = "0.2.0" 2619 | source = "registry+https://github.com/rust-lang/crates.io-index" 2620 | checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" 2621 | dependencies = [ 2622 | "windows-result", 2623 | "windows-strings", 2624 | "windows-targets 0.52.6", 2625 | ] 2626 | 2627 | [[package]] 2628 | name = "windows-result" 2629 | version = "0.2.0" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" 2632 | dependencies = [ 2633 | "windows-targets 0.52.6", 2634 | ] 2635 | 2636 | [[package]] 2637 | name = "windows-strings" 2638 | version = "0.1.0" 2639 | source = "registry+https://github.com/rust-lang/crates.io-index" 2640 | checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" 2641 | dependencies = [ 2642 | "windows-result", 2643 | "windows-targets 0.52.6", 2644 | ] 2645 | 2646 | [[package]] 2647 | name = "windows-sys" 2648 | version = "0.48.0" 2649 | source = "registry+https://github.com/rust-lang/crates.io-index" 2650 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2651 | dependencies = [ 2652 | "windows-targets 0.48.5", 2653 | ] 2654 | 2655 | [[package]] 2656 | name = "windows-sys" 2657 | version = "0.52.0" 2658 | source = "registry+https://github.com/rust-lang/crates.io-index" 2659 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2660 | dependencies = [ 2661 | "windows-targets 0.52.6", 2662 | ] 2663 | 2664 | [[package]] 2665 | name = "windows-sys" 2666 | version = "0.59.0" 2667 | source = "registry+https://github.com/rust-lang/crates.io-index" 2668 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2669 | dependencies = [ 2670 | "windows-targets 0.52.6", 2671 | ] 2672 | 2673 | [[package]] 2674 | name = "windows-targets" 2675 | version = "0.48.5" 2676 | source = "registry+https://github.com/rust-lang/crates.io-index" 2677 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2678 | dependencies = [ 2679 | "windows_aarch64_gnullvm 0.48.5", 2680 | "windows_aarch64_msvc 0.48.5", 2681 | "windows_i686_gnu 0.48.5", 2682 | "windows_i686_msvc 0.48.5", 2683 | "windows_x86_64_gnu 0.48.5", 2684 | "windows_x86_64_gnullvm 0.48.5", 2685 | "windows_x86_64_msvc 0.48.5", 2686 | ] 2687 | 2688 | [[package]] 2689 | name = "windows-targets" 2690 | version = "0.52.6" 2691 | source = "registry+https://github.com/rust-lang/crates.io-index" 2692 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2693 | dependencies = [ 2694 | "windows_aarch64_gnullvm 0.52.6", 2695 | "windows_aarch64_msvc 0.52.6", 2696 | "windows_i686_gnu 0.52.6", 2697 | "windows_i686_gnullvm", 2698 | "windows_i686_msvc 0.52.6", 2699 | "windows_x86_64_gnu 0.52.6", 2700 | "windows_x86_64_gnullvm 0.52.6", 2701 | "windows_x86_64_msvc 0.52.6", 2702 | ] 2703 | 2704 | [[package]] 2705 | name = "windows_aarch64_gnullvm" 2706 | version = "0.48.5" 2707 | source = "registry+https://github.com/rust-lang/crates.io-index" 2708 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2709 | 2710 | [[package]] 2711 | name = "windows_aarch64_gnullvm" 2712 | version = "0.52.6" 2713 | source = "registry+https://github.com/rust-lang/crates.io-index" 2714 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2715 | 2716 | [[package]] 2717 | name = "windows_aarch64_msvc" 2718 | version = "0.48.5" 2719 | source = "registry+https://github.com/rust-lang/crates.io-index" 2720 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2721 | 2722 | [[package]] 2723 | name = "windows_aarch64_msvc" 2724 | version = "0.52.6" 2725 | source = "registry+https://github.com/rust-lang/crates.io-index" 2726 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2727 | 2728 | [[package]] 2729 | name = "windows_i686_gnu" 2730 | version = "0.48.5" 2731 | source = "registry+https://github.com/rust-lang/crates.io-index" 2732 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2733 | 2734 | [[package]] 2735 | name = "windows_i686_gnu" 2736 | version = "0.52.6" 2737 | source = "registry+https://github.com/rust-lang/crates.io-index" 2738 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2739 | 2740 | [[package]] 2741 | name = "windows_i686_gnullvm" 2742 | version = "0.52.6" 2743 | source = "registry+https://github.com/rust-lang/crates.io-index" 2744 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2745 | 2746 | [[package]] 2747 | name = "windows_i686_msvc" 2748 | version = "0.48.5" 2749 | source = "registry+https://github.com/rust-lang/crates.io-index" 2750 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2751 | 2752 | [[package]] 2753 | name = "windows_i686_msvc" 2754 | version = "0.52.6" 2755 | source = "registry+https://github.com/rust-lang/crates.io-index" 2756 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2757 | 2758 | [[package]] 2759 | name = "windows_x86_64_gnu" 2760 | version = "0.48.5" 2761 | source = "registry+https://github.com/rust-lang/crates.io-index" 2762 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2763 | 2764 | [[package]] 2765 | name = "windows_x86_64_gnu" 2766 | version = "0.52.6" 2767 | source = "registry+https://github.com/rust-lang/crates.io-index" 2768 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2769 | 2770 | [[package]] 2771 | name = "windows_x86_64_gnullvm" 2772 | version = "0.48.5" 2773 | source = "registry+https://github.com/rust-lang/crates.io-index" 2774 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2775 | 2776 | [[package]] 2777 | name = "windows_x86_64_gnullvm" 2778 | version = "0.52.6" 2779 | source = "registry+https://github.com/rust-lang/crates.io-index" 2780 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2781 | 2782 | [[package]] 2783 | name = "windows_x86_64_msvc" 2784 | version = "0.48.5" 2785 | source = "registry+https://github.com/rust-lang/crates.io-index" 2786 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2787 | 2788 | [[package]] 2789 | name = "windows_x86_64_msvc" 2790 | version = "0.52.6" 2791 | source = "registry+https://github.com/rust-lang/crates.io-index" 2792 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2793 | 2794 | [[package]] 2795 | name = "wit-bindgen-rt" 2796 | version = "0.33.0" 2797 | source = "registry+https://github.com/rust-lang/crates.io-index" 2798 | checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" 2799 | dependencies = [ 2800 | "bitflags", 2801 | ] 2802 | 2803 | [[package]] 2804 | name = "write16" 2805 | version = "1.0.0" 2806 | source = "registry+https://github.com/rust-lang/crates.io-index" 2807 | checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 2808 | 2809 | [[package]] 2810 | name = "writeable" 2811 | version = "0.5.5" 2812 | source = "registry+https://github.com/rust-lang/crates.io-index" 2813 | checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 2814 | 2815 | [[package]] 2816 | name = "yoke" 2817 | version = "0.7.5" 2818 | source = "registry+https://github.com/rust-lang/crates.io-index" 2819 | checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" 2820 | dependencies = [ 2821 | "serde", 2822 | "stable_deref_trait", 2823 | "yoke-derive", 2824 | "zerofrom", 2825 | ] 2826 | 2827 | [[package]] 2828 | name = "yoke-derive" 2829 | version = "0.7.5" 2830 | source = "registry+https://github.com/rust-lang/crates.io-index" 2831 | checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" 2832 | dependencies = [ 2833 | "proc-macro2", 2834 | "quote", 2835 | "syn", 2836 | "synstructure", 2837 | ] 2838 | 2839 | [[package]] 2840 | name = "zerocopy" 2841 | version = "0.7.35" 2842 | source = "registry+https://github.com/rust-lang/crates.io-index" 2843 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 2844 | dependencies = [ 2845 | "byteorder", 2846 | "zerocopy-derive", 2847 | ] 2848 | 2849 | [[package]] 2850 | name = "zerocopy-derive" 2851 | version = "0.7.35" 2852 | source = "registry+https://github.com/rust-lang/crates.io-index" 2853 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 2854 | dependencies = [ 2855 | "proc-macro2", 2856 | "quote", 2857 | "syn", 2858 | ] 2859 | 2860 | [[package]] 2861 | name = "zerofrom" 2862 | version = "0.1.5" 2863 | source = "registry+https://github.com/rust-lang/crates.io-index" 2864 | checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" 2865 | dependencies = [ 2866 | "zerofrom-derive", 2867 | ] 2868 | 2869 | [[package]] 2870 | name = "zerofrom-derive" 2871 | version = "0.1.5" 2872 | source = "registry+https://github.com/rust-lang/crates.io-index" 2873 | checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" 2874 | dependencies = [ 2875 | "proc-macro2", 2876 | "quote", 2877 | "syn", 2878 | "synstructure", 2879 | ] 2880 | 2881 | [[package]] 2882 | name = "zeroize" 2883 | version = "1.8.1" 2884 | source = "registry+https://github.com/rust-lang/crates.io-index" 2885 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 2886 | 2887 | [[package]] 2888 | name = "zerovec" 2889 | version = "0.10.4" 2890 | source = "registry+https://github.com/rust-lang/crates.io-index" 2891 | checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" 2892 | dependencies = [ 2893 | "yoke", 2894 | "zerofrom", 2895 | "zerovec-derive", 2896 | ] 2897 | 2898 | [[package]] 2899 | name = "zerovec-derive" 2900 | version = "0.10.3" 2901 | source = "registry+https://github.com/rust-lang/crates.io-index" 2902 | checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" 2903 | dependencies = [ 2904 | "proc-macro2", 2905 | "quote", 2906 | "syn", 2907 | ] 2908 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-event-collector" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | sqlx = { version = "0.8.3", features = ["runtime-tokio-native-tls", "sqlite"] } 8 | axum = "0.8.1" 9 | serde_json = "1.0.133" 10 | tokio = { version = "1.0", features = ["full"] } 11 | serde = { version = "1.0.216", features = ["derive"] } 12 | opensearch = "2.3.0" 13 | tracing-subscriber = "0.3.19" 14 | tower-http = { version = "0.6.2", features = ["trace"] } 15 | tracing = "0.1" 16 | dotenv = "0.15.0" 17 | jsonwebtoken = "9.3.0" 18 | chrono = "0.4.39" 19 | once_cell = "1.20.2" 20 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage 2 | FROM rust:1.83 as builder 3 | 4 | # Install necessary build dependencies 5 | RUN apt-get update && apt-get install -y \ 6 | pkg-config \ 7 | libssl-dev \ 8 | perl \ 9 | libfindbin-libs-perl 10 | 11 | # OpenSSL configuration (use system OpenSSL during build) 12 | ENV OPENSSL_NO_VENDOR=1 13 | 14 | # Set working directory and copy source code 15 | WORKDIR /usr/src/app 16 | COPY Cargo.toml Cargo.lock ./ 17 | COPY src ./src 18 | COPY .env ./ 19 | COPY sqlite3.db ./ 20 | 21 | # Build the app (release mode) 22 | RUN cargo build --release 23 | 24 | # Runtime stage 25 | FROM debian:bookworm-slim 26 | 27 | # Install runtime dependencies (only libssl3 is needed) 28 | RUN apt-get update && apt-get install -y \ 29 | libssl3 \ 30 | ca-certificates \ 31 | && rm -rf /var/lib/apt/lists/* 32 | 33 | # Copy the binary generated in the build stage 34 | COPY --from=builder /usr/src/app/target/release/rust-event-collector /usr/local/bin/ 35 | COPY --from=builder /usr/src/app/.env /app/ 36 | 37 | # Set working directory 38 | WORKDIR /app 39 | 40 | # Execution command 41 | CMD ["/usr/local/bin/rust-event-collector"] -------------------------------------------------------------------------------- /README.ko.md: -------------------------------------------------------------------------------- 1 | # 자체 이벤트 수집기 2 | 3 | [한국어](README.ko.md) | [English](README.md) 4 | 5 | ## 프로젝트 개요 6 | 7 | 어플리케이션에서 전송되는 이벤트를 빠르고 정확하게 수집할 수 있도록 설계된 이벤트 수집 프로젝트입니다 8 | 9 | 채널과 여러개의 병렬 쓰레드, 스케쥴러 등을 동시에 활용해 효율적으로 이벤트가 관리되고 있습니다 10 | 11 | 또한 오류가 발생되거나 메모리 한계를 고려해 임시로 데이터를 보관하는 기능도 구현되어있습니다 12 | 13 | ### 주요 기능 14 | 15 | - **이벤트 수집**: HTTP POST 요청으로 이벤트 데이터 수집 16 | - **오픈서치 연동**: 실시간으로 이벤트 데이터를 오픈서치에 대량 등록 17 | - **데이터베이스 백업**: 채널에 많은 데이터가 누적되어있거나 오픈서치 저장 실패 시 데이터베이스에 펜딩 18 | - **인증 미들웨어**: Bearer 토큰을 사용해 API 보안을 유지 19 | - **운영 중 상태 모니터링**: `/ping` 엔드포인트로 서버 상태 확인 20 | - **비동기 작업 처리**: 오픈서치 및 펜딩 데이터베이스와의 비동기 통신 21 | - **적절한 리소스 설정**: 채널은 메모리에 저장되는 영역으로 10만개로 설정했으며 오픈서치 대량 등록 쓰레드는 10개로 지정 22 | 23 | ## 설치 및 실행 24 | 25 | ### 1. 러스트 설치 26 | 27 | 이 프로젝트는 Rust를 이용해서 개발되었습니다. 시스템에 Rust 및 Cargo가 설치되어 있어야 합니다. 28 | 29 | ### 2. 프로젝트 클론 30 | 31 | ``` bash 32 | git clone https://github.com/lee-lou2/rust-event-collector 33 | cd https://github.com/lee-lou2/rust-event-collector 34 | ``` 35 | 36 | ### 3. 환경 변수 설정 37 | 38 | 프로젝트 실행 전, `.env` 파일에 다음 변수를 추가하세요: 39 | 40 | ``` dotenv 41 | OPEN_SEARCH_DNS=http://localhost:9200 42 | SERVER_PORT=3000 43 | JWT_SECRET= 44 | SERVER_ENVIRONMENT=local 45 | DATABASE_URL=sqlite://sqlite3.db 46 | ``` 47 | 48 | ### 4. 서버 실행 49 | 50 | #### cargo 를 이용한 실행 51 | 52 | ``` bash 53 | cargo run 54 | ``` 55 | 56 | #### docker 를 이용한 실행 57 | 58 | ```bash 59 | sh deploy.sh 60 | ``` 61 | 62 | 서버가 다음 주소에서 실행됩니다: `http://0.0.0.0:3000` (환경 변수에 설정된 포트에 따라 다를 수 있음) 63 | 64 | ## 시스템 구조 65 | 66 | 1. **핵심 구성 요소**: 67 | - **Axum**: HTTP 서버 프레임워크 68 | - **OpenSearch**: 데이터 저장소 69 | - **SQLite**: 실패한 이벤트 데이터 임시 저장소 70 | - **Tokio**: 비동기 작업 실행기 71 | 72 | 2. **작업 흐름**: 73 | - 클라이언트가 `/events` API를 호출하고 이벤트 데이터를 전송합니다. 74 | - **성공**: 75 | - 이벤트는 채널에 전달되도록 시도합니다. 76 | - 기본적으로 1000개의 채널이 준비되어있습니다. 77 | - 모든 채널이 꽉 채워져있다면 데이터베이스에 펜딩 데이터를 저장합니다. 78 | - 채워지지 않았다면 채널에 전달됩니다. 79 | - 채널에 전달된 데이터는 1000개씩 묶어서 오픈서치에 대량 등록합니다. 80 | - 1000개까지 묶이지 않더라도 10초 단위로 채널에 있는 이벤트를 오픈서치로 대량 등록합니다. 81 | - **실패**: 82 | - 채널이 꽉 채워져있거나 오픈서치 등록간 오류가 발생한다면 데이터베이스에 펜딩 데이터를 저장합니다. 83 | - 이렇게 저장된 데이터는 1분 간격으로 조회되어 채널로 다시 전달을 시도합니다. 84 | 85 | - 스케줄러는 펜딩된 데이터를 주기적으로 채널로 전송 시도합니다. 86 | 87 | ## Flowchart 88 | 89 | 시스템의 동작 흐름은 아래의 이미지를 참조하세요 90 | 91 | ![flowchart.png](docs/flowchart.png) 92 | 93 | ## API 문서 94 | 95 | ### **인증** 96 | 97 | 모든 엔드포인트는 `/ping`을 제외하고 헤더에 Bearer 토큰이 필요합니다. 98 | 99 | 잘못된 토큰이 포함되거나 누락된 경우, HTTP 401 응답이 반환됩니다. 100 | 101 | ### **POST /events** 102 | 103 | - **설명**: 이벤트를 빠르고 안전하게 저장합니다. 104 | - **HTTP 메서드**: POST 105 | - **헤더**: 106 | - `Authorization: Bearer ` (필수): API 접근을 위한 인증 토큰 107 | - `device-uuid` (선택): 이벤트가 발생한 디바이스의 고유 식별자 108 | - `app-version` (선택): 앱 버전 정보 109 | - `os-version` (선택): 운영체제 버전 정보 110 | - **요청 본문**: JSON 111 | - 필드: 112 | - `log_id` (필수): 고유한 로그 식별자 113 | - `page` (필수): 이벤트가 발생한 페이지 114 | - `event` (필수): 이벤트 이름 115 | - `label` (선택): 이벤트 레이블 116 | - `target` (선택): 이벤트 대상 117 | - `section` (선택): 이벤트가 발생한 섹션 118 | - `param` (선택): 추가 파라미터(JSON) 119 | - **요청 예시**: 120 | 121 | ```bash 122 | curl -X POST http://0.0.0.0:3000/events \ 123 | -H "Authorization: Bearer " \ 124 | -H "Content-Type: application/json" \ 125 | -H "device-uuid: " \ 126 | -H "app-version: " \ 127 | -H "os-version: " \ 128 | -d '{ 129 | "page": "/home", 130 | "event": "click", 131 | "label": "button_click", 132 | "target": "#button_id", 133 | "section": "header", 134 | "param": { 135 | "key1": "value1" 136 | } 137 | }' 138 | ``` 139 | 140 | - **응답**: 141 | - HTTP 200: 이벤트 등록 요청 성공 142 | 143 | ### **GET /ping** 144 | 145 | - **설명**: 시스템 상태를 확인합니다. 146 | - **응답**: 147 | - HTTP 200: "pong" 문자열 반환 148 | 149 | ## 프로젝트 로드맵 150 | 151 | - [ ] 이벤트 데이터 지연 시간 최적화 152 | - [ ] 오픈서치 및 데이터베이스 연결 오류에 대한 세부적인 처리 153 | - [ ] 이벤트 백업 데이터 주기적 정리 기능 추가 154 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom Event Collector 2 | 3 | [한국어](README.ko.md) | [English](README.md) 4 | 5 | ## Project Overview 6 | 7 | This is an event collection project designed to quickly and accurately collect events transmitted from applications. 8 | 9 | Events are efficiently managed using channels, multiple parallel threads, and schedulers simultaneously. 10 | 11 | Additionally, functionality has been implemented to temporarily store data in consideration of errors or memory 12 | limitations. 13 | 14 | ### Key Features 15 | 16 | - **Event Collection**: Collect event data via HTTP POST requests 17 | - **OpenSearch Integration**: Bulk register event data to OpenSearch in real-time 18 | - **Database Backup**: Pending data to database when channels are accumulated with too much data or OpenSearch storage 19 | fails 20 | - **Authentication Middleware**: Maintain API security using Bearer tokens 21 | - **Runtime Status Monitoring**: Check server status via `/ping` endpoint 22 | - **Asynchronous Task Processing**: Asynchronous communication with OpenSearch and pending database 23 | - **Appropriate Resource Configuration**: Channels are set to 100,000 as memory storage area, and OpenSearch bulk 24 | registration threads are set to 10 25 | 26 | ## Installation and Execution 27 | 28 | ### 1. Install Rust 29 | 30 | This project was developed using Rust. Rust and Cargo must be installed on your system. 31 | 32 | ### 2. Clone Project 33 | 34 | ```bash 35 | git clone https://github.com/lee-lou2/rust-event-collector 36 | cd https://github.com/lee-lou2/rust-event-collector 37 | ``` 38 | 39 | ### 3. Environment Variable Setup 40 | 41 | Before running the project, add the following variables to the `.env` file: 42 | 43 | ```dotenv 44 | OPEN_SEARCH_DNS=http://localhost:9200 45 | SERVER_PORT=3000 46 | JWT_SECRET= 47 | SERVER_ENVIRONMENT=local 48 | DATABASE_URL=sqlite://sqlite3.db 49 | ``` 50 | 51 | ### 4. Run Server 52 | 53 | #### Run using cargo 54 | 55 | ```bash 56 | cargo run 57 | ``` 58 | 59 | #### Run using docker 60 | 61 | ```bash 62 | sh deploy.sh 63 | ``` 64 | 65 | Server will run at: `http://0.0.0.0:3000` (may vary depending on port set in environment variables) 66 | 67 | ## System Architecture 68 | 69 | 1. **Core Components**: 70 | - **Axum**: HTTP server framework 71 | - **OpenSearch**: Data storage 72 | - **SQLite**: Temporary storage for failed event data 73 | - **Tokio**: Asynchronous task executor 74 | 75 | 2. **Workflow**: 76 | - Client calls `/events` API and sends event data. 77 | - **Success**: 78 | - Attempts to deliver events to channels. 79 | - By default, 1000 channels are prepared. 80 | - If all channels are full, pending data is stored in the database. 81 | - If not full, data is delivered to the channel. 82 | - Data delivered to channels is bulk registered to OpenSearch in groups of 1000. 83 | - Even if not grouped up to 1000, bulk registers events in channels to OpenSearch every 10 seconds. 84 | - **Failure**: 85 | - If channels are full or errors occur during OpenSearch registration, pending data is stored in the database. 86 | - Such stored data is queried at 1-minute intervals and attempts to be re-delivered to channels. 87 | 88 | - Scheduler periodically attempts to send pending data to channels. 89 | 90 | ## Flowchart 91 | 92 | Refer to the image below for system operation flow 93 | 94 | ![flowchart.png](docs/flowchart.png) 95 | 96 | ## API Documentation 97 | 98 | ### **Authentication** 99 | 100 | All endpoints except `/ping` require a Bearer token in the header. 101 | 102 | If an invalid token is included or missing, an HTTP 401 response is returned. 103 | 104 | ### **POST /events** 105 | 106 | - **Description**: Quickly and securely stores events. 107 | - **HTTP Method**: POST 108 | - **Headers**: 109 | - `Authorization: Bearer ` (required): Authentication token for API access 110 | - `device-uuid` (optional): Unique identifier of the device where the event occurred 111 | - `app-version` (optional): App version information 112 | - `os-version` (optional): Operating system version information 113 | - **Request Body**: JSON 114 | - Fields: 115 | - `log_id` (required): Unique log identifier 116 | - `page` (required): Page where the event occurred 117 | - `event` (required): Event name 118 | - `label` (optional): Event label 119 | - `target` (optional): Event target 120 | - `section` (optional): Section where the event occurred 121 | - `param` (optional): Additional parameters(JSON) 122 | - **Request Example**: 123 | 124 | ```bash 125 | curl -X POST http://0.0.0.0:3000/events \ 126 | -H "Authorization: Bearer " \ 127 | -H "Content-Type: application/json" \ 128 | -H "device-uuid: " \ 129 | -H "app-version: " \ 130 | -H "os-version: " \ 131 | -d '{ 132 | "page": "/home", 133 | "event": "click", 134 | "label": "button_click", 135 | "target": "#button_id", 136 | "section": "header", 137 | "param": { 138 | "key1": "value1" 139 | } 140 | }' 141 | ``` 142 | 143 | - **Response**: 144 | - HTTP 200: Event registration request successful 145 | 146 | ### **GET /ping** 147 | 148 | - **Description**: Check system status. 149 | - **Response**: 150 | - HTTP 200: Returns "pong" string 151 | 152 | ## Project Roadmap 153 | 154 | - [ ] Optimize event data latency 155 | - [ ] Detailed handling of OpenSearch and database connection errors 156 | - [ ] Add periodic cleanup functionality for event backup data 157 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | IMAGE_NAME="rust-event-collector" 3 | IMAGE_TAG="latest" 4 | INTERNAL_SERVER_PORT=3000 5 | EXTERNAL_SERVER_PORT=3000 6 | 7 | docker build -t ${IMAGE_NAME}:${IMAGE_TAG} . 8 | if docker ps -a | grep -q ${IMAGE_NAME}; then 9 | docker stop ${IMAGE_NAME} 10 | docker rm ${IMAGE_NAME} 11 | fi 12 | 13 | docker run --name ${IMAGE_NAME} \ 14 | -v ${PWD}/sqlite3.db:/app/sqlite3.db \ 15 | -w /app \ 16 | --cpus="0.5" \ 17 | --memory="0.5g" \ 18 | -d \ 19 | -p ${INTERNAL_SERVER_PORT}:${EXTERNAL_SERVER_PORT} \ 20 | ${IMAGE_NAME}:${IMAGE_TAG} -------------------------------------------------------------------------------- /docs/flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lee-lou2/rust-event-collector/b944247aabbb811752780de2ca4da0e97cea477e/docs/flowchart.png -------------------------------------------------------------------------------- /init_database.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DB_FILE="sqlite3.db" 4 | 5 | # 데이터베이스 파일 확인 및 생성 6 | if [ ! -f "$DB_FILE" ]; then 7 | echo "Database file does not exist. Creating..." 8 | sqlite3 "$DB_FILE" < = Lazy::new(|| { 15 | dotenv().ok(); 16 | Environment { 17 | server_port: env::var("SERVER_PORT").unwrap_or_else(|_| "8080".to_string()), 18 | jwt_secret: env::var("JWT_SECRET").unwrap_or_else(|_| "".to_string()), 19 | server_environment: env::var("SERVER_ENVIRONMENT") 20 | .unwrap_or_else(|_| "development".to_string()), 21 | open_search_dns: env::var("OPEN_SEARCH_DNS") 22 | .unwrap_or_else(|_| "http://localhost:9200".to_string()), 23 | database_url: env::var("DATABASE_URL") 24 | .unwrap_or_else(|_| "sqlite://sqlite3.db".to_string()), 25 | } 26 | }); 27 | 28 | pub fn get_environments() -> &'static Environment { 29 | &ENVIRONMENTS 30 | } 31 | -------------------------------------------------------------------------------- /src/handlers.rs: -------------------------------------------------------------------------------- 1 | use crate::utils::insert_pending_events; 2 | use axum::{ 3 | extract::{Extension, State}, 4 | Json, 5 | }; 6 | use serde::{Deserialize, Serialize}; 7 | use sqlx::SqlitePool; 8 | use tokio::sync::mpsc; 9 | 10 | /// App state 11 | #[derive(Clone)] 12 | pub struct AppState { 13 | pub tx: mpsc::Sender, 14 | pub conn: SqlitePool, 15 | } 16 | 17 | /// Event info schema 18 | /// The data structure provided by the user in the body 19 | #[derive(Deserialize, Serialize, Clone)] 20 | pub struct EventInfoSchema { 21 | pub page: String, 22 | pub event: String, 23 | pub label: Option, 24 | pub target: Option, 25 | pub section: Option, 26 | pub param: Option, 27 | } 28 | 29 | /// Event schema 30 | /// Event schema created with information included in the header and the input data 31 | #[derive(Clone, Deserialize, Serialize)] 32 | pub struct EventSchema { 33 | pub user_id: Option, 34 | pub device_uuid: Option, 35 | pub app_version: Option, 36 | pub os_version: Option, 37 | pub user_agent: Option, 38 | pub event_info: EventInfoSchema, 39 | } 40 | 41 | /// Event creation handler 42 | /// Pass the input event to the channel 43 | pub async fn create_events_handler( 44 | State(state): State, 45 | header: axum::http::HeaderMap, 46 | Extension(claims): Extension, 47 | Json(payload): Json, 48 | ) -> &'static str { 49 | // Store user information 50 | let user_id = claims.sub; 51 | 52 | // Device and app information 53 | let get_header = |key| header.get(key).and_then(|v| v.to_str().ok()); 54 | let device_uuid = get_header("device-uuid"); 55 | let app_version = get_header("app-version"); 56 | let os_version = get_header("os-version"); 57 | let user_agent = get_header("user-agent"); 58 | let data = EventSchema { 59 | user_id: Some(user_id), 60 | device_uuid: device_uuid.map(|v| v.to_string()), 61 | app_version: app_version.map(|v| v.to_string()), 62 | os_version: os_version.map(|v| v.to_string()), 63 | user_agent: user_agent.map(|v| v.to_string()), 64 | event_info: payload, 65 | }; 66 | 67 | let cloned_data = data.clone(); 68 | if let Err(e) = state.tx.send(data).await { 69 | eprintln!("Error sending data to channel: {:?}", e); 70 | match insert_pending_events(&[cloned_data], &state.conn).await { 71 | Ok(_) => {} 72 | Err(e) => { 73 | eprintln!("Error inserting pending events: {:?}", e); 74 | } 75 | } 76 | "pending" 77 | } else { 78 | "created" 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | mod config; 2 | mod handlers; 3 | mod middlewares; 4 | mod tasks; 5 | mod utils; 6 | 7 | use axum::{ 8 | middleware::from_fn, 9 | routing::{get, post}, 10 | Router, 11 | }; 12 | use handlers::{create_events_handler, AppState, EventSchema}; 13 | use opensearch::{http::transport::Transport, OpenSearch}; 14 | use std::sync::Arc; 15 | use tasks::{consume_events, schedule_insert_pending_events}; 16 | use tokio::sync::{mpsc, Mutex}; 17 | use tower_http::trace::TraceLayer; 18 | use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; 19 | 20 | #[tokio::main] 21 | async fn main() { 22 | // Initialize logging 23 | tracing_subscriber::registry() 24 | .with( 25 | tracing_subscriber::fmt::layer() 26 | .with_target(true) 27 | .with_level(true), 28 | ) 29 | .with(tracing_subscriber::filter::LevelFilter::DEBUG) 30 | .init(); 31 | 32 | // OpenSearch client configuration 33 | let envs = config::get_environments(); 34 | let transport = Transport::single_node(&envs.open_search_dns).unwrap(); 35 | let open_search_client = OpenSearch::new(transport); 36 | 37 | // Database configuration 38 | let db_pool = sqlx::sqlite::SqlitePoolOptions::new() 39 | .max_connections(10) 40 | .connect(envs.database_url.as_str()) 41 | .await 42 | .expect("Failed to create pool"); 43 | 44 | // Channel configuration 45 | let (tx, rx) = mpsc::channel::(100000); 46 | let rx = Arc::new(Mutex::new(rx)); 47 | 48 | // Run consumer & scheduler asynchronously 49 | consume_events(&rx, &open_search_client, &db_pool).await; 50 | schedule_insert_pending_events(&tx, &db_pool).await; 51 | 52 | // Web server 53 | let state = AppState { 54 | tx: tx.clone(), 55 | conn: db_pool, 56 | }; 57 | 58 | // Router configuration and middleware addition 59 | let app = Router::new() 60 | .route("/ping", get(|| async { "pong" })) 61 | .route( 62 | "/events", 63 | post(create_events_handler).layer(from_fn(middlewares::jwt_auth_middleware)), 64 | ) 65 | .with_state(state) 66 | .layer(TraceLayer::new_for_http()); 67 | 68 | // Start the server 69 | let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", &envs.server_port)) 70 | .await 71 | .unwrap(); 72 | println!("Server is running at http://0.0.0.0:{}", &envs.server_port); 73 | axum::serve(listener, app).await.unwrap(); 74 | } 75 | -------------------------------------------------------------------------------- /src/middlewares.rs: -------------------------------------------------------------------------------- 1 | use axum::{ 2 | body::Body, 3 | http::{header::AUTHORIZATION, Request, StatusCode}, 4 | middleware::Next, 5 | response::IntoResponse, 6 | }; 7 | use jsonwebtoken::{decode, DecodingKey, Validation}; 8 | use serde::{Deserialize, Serialize}; 9 | 10 | /// JWT Token Claims 11 | #[derive(Debug, Deserialize, Serialize, Clone)] 12 | pub struct Claims { 13 | pub sub: String, 14 | pub exp: usize, 15 | } 16 | 17 | pub async fn jwt_auth_middleware(mut req: Request, next: Next) -> impl IntoResponse { 18 | let Some(auth_value) = req.headers().get(AUTHORIZATION) else { 19 | return (StatusCode::UNAUTHORIZED, "No authorization header").into_response(); 20 | }; 21 | 22 | let Ok(auth_str) = auth_value.to_str() else { 23 | return (StatusCode::UNAUTHORIZED, "Invalid authorization header").into_response(); 24 | }; 25 | 26 | let Some(token) = auth_str.strip_prefix("Bearer ") else { 27 | return (StatusCode::UNAUTHORIZED, "Invalid authorization header").into_response(); 28 | }; 29 | 30 | let envs = crate::config::get_environments(); 31 | let token_data = match decode::( 32 | token, 33 | &DecodingKey::from_secret(envs.jwt_secret.as_bytes()), 34 | &Validation::default(), 35 | ) { 36 | Ok(data) => data, 37 | Err(_) => return (StatusCode::UNAUTHORIZED, "Invalid token").into_response(), 38 | }; 39 | 40 | req.extensions_mut().insert(token_data.claims); 41 | next.run(req).await 42 | } 43 | -------------------------------------------------------------------------------- /src/tasks.rs: -------------------------------------------------------------------------------- 1 | use crate::handlers::EventSchema; 2 | use crate::utils::insert_events_bulk; 3 | use serde_json::from_str; 4 | use sqlx::SqlitePool; 5 | use std::sync::Arc; 6 | use std::time::Duration; 7 | use tokio::sync::mpsc::Receiver; 8 | use tokio::sync::Mutex; 9 | use tokio::time::interval; 10 | 11 | /// Event consumer 12 | /// When data is registered in the channel, consume it and group it in batches of 1000 or group events within 10 seconds and pass them to the bulk insert function 13 | pub async fn consume_events( 14 | rx: &Arc>>, 15 | open_search_client: &opensearch::OpenSearch, 16 | db_pool: &SqlitePool, 17 | ) { 18 | tokio::spawn({ 19 | // Clone basic information 20 | let rx = Arc::clone(rx); 21 | let open_search_client = open_search_client.clone(); 22 | let db_pool = db_pool.clone(); 23 | 24 | async move { 25 | // Configuration for bulk insertion 26 | let batch_size = 1000; 27 | let mut event_buffer = Vec::with_capacity(batch_size); 28 | let mut ticker = interval(Duration::from_secs(10)); 29 | 30 | loop { 31 | tokio::select! { 32 | // Event consumption 33 | maybe_event = async { 34 | let mut rx_guard = rx.lock().await; 35 | rx_guard.recv().await 36 | } => { 37 | match maybe_event { 38 | // If an event is found, store it in the buffer 39 | Some(event) => { 40 | event_buffer.push(event); 41 | if event_buffer.len() >= batch_size { 42 | // If the buffer exceeds the batch size, insert events 43 | insert_events_bulk(&event_buffer, &open_search_client, &db_pool).await; 44 | event_buffer.clear(); 45 | } 46 | } 47 | None => { 48 | if !event_buffer.is_empty() { 49 | // Bulk insert remaining events 50 | insert_events_bulk(&event_buffer, &open_search_client, &db_pool).await; 51 | event_buffer.clear(); 52 | } 53 | break; 54 | } 55 | } 56 | }, 57 | 58 | _ = ticker.tick() => { 59 | if !event_buffer.is_empty() { 60 | // Insert periodically even without reaching batch size 61 | insert_events_bulk(&event_buffer, &open_search_client, &db_pool).await; 62 | event_buffer.clear(); 63 | } 64 | } 65 | } 66 | } 67 | } 68 | }); 69 | } 70 | 71 | /// Scheduler to forward pending events 72 | /// Retrieves pending events from the database at specific intervals and inputs them into the channel 73 | pub async fn schedule_insert_pending_events( 74 | tx: &tokio::sync::mpsc::Sender, 75 | db_pool: &SqlitePool, 76 | ) { 77 | tokio::spawn({ 78 | // Clone basic information 79 | let db_pool = db_pool.clone(); 80 | let cloned_tx = tx.clone(); 81 | 82 | async move { 83 | // Set repeat period 84 | let mut interval = interval(Duration::from_secs(60)); 85 | loop { 86 | interval.tick().await; 87 | // Fetch pending events 88 | match sqlx::query!("SELECT id, log FROM events LIMIT 1000") 89 | .fetch_all(&db_pool) 90 | .await 91 | { 92 | Ok(rows) => { 93 | for row in rows { 94 | // Produce fetched event data 95 | let id = row.id; 96 | let log = row.log.unwrap_or(String::from("")); 97 | let data: EventSchema = from_str(&log).unwrap(); 98 | if let Err(e) = cloned_tx.send(data).await { 99 | eprintln!("Error sending data to channel: {:?}", e); 100 | } else { 101 | match sqlx::query!("DELETE FROM events WHERE id = ?", id) 102 | .execute(&db_pool) 103 | .await 104 | { 105 | Ok(_) => {} 106 | Err(e) => { 107 | eprintln!("Error deleting event with id {}: {:?}", id, e); 108 | } 109 | } 110 | } 111 | } 112 | } 113 | Err(e) => { 114 | eprintln!("Error fetching events: {:?}", e); 115 | } 116 | } 117 | } 118 | } 119 | }); 120 | } 121 | -------------------------------------------------------------------------------- /src/utils.rs: -------------------------------------------------------------------------------- 1 | use crate::handlers::EventSchema; 2 | use chrono::Datelike; 3 | use opensearch::{BulkParts, OpenSearch}; 4 | use serde_json::{json, Value}; 5 | use sqlx::SqlitePool; 6 | 7 | /// Register pending events 8 | /// Save pending data to the database when the channel is full or an error occurs while saving to OpenSearch. 9 | /// The stored data will be retrieved periodically and reinserted into OpenSearch. 10 | pub async fn insert_pending_events( 11 | events: &[EventSchema], 12 | db_pool: &SqlitePool, 13 | ) -> Result<(), sqlx::Error> { 14 | // Start transaction 15 | let mut tx = db_pool.begin().await?; 16 | for event in events { 17 | // Serialize event to JSON string 18 | let serialized_event = serde_json::to_string(event).unwrap(); 19 | // Use placeholders in the query and bind values 20 | sqlx::query!("INSERT INTO events (log) VALUES (?)", serialized_event) 21 | .execute(&mut *tx) // Explicitly dereference transaction 22 | .await?; 23 | } 24 | // Commit transaction 25 | tx.commit().await?; 26 | Ok(()) 27 | } 28 | 29 | /// Bulk insert events 30 | /// Code for storing a large number of events in bulk in OpenSearch. 31 | /// If an error occurs during saving, the data is saved in the pending database and the error is output. 32 | pub async fn insert_events_bulk( 33 | events: &[EventSchema], 34 | open_search_client: &OpenSearch, 35 | db_pool: &SqlitePool, 36 | ) { 37 | let now = chrono::Utc::now().with_timezone(&chrono::FixedOffset::east_opt(9 * 3600).unwrap()); 38 | let envs = crate::config::get_environments(); 39 | let index_name = format!( 40 | "events_{}_{}-{}", 41 | &envs.server_environment, 42 | now.year(), 43 | now.month() 44 | ); 45 | 46 | let mut bulk_lines = Vec::with_capacity(events.len() * 2); 47 | for event in events { 48 | let action_meta = serde_json::to_string(&json!({"index": {"_index": index_name}})).unwrap(); 49 | bulk_lines.push(action_meta); 50 | let doc = serde_json::to_string(event).unwrap(); 51 | bulk_lines.push(doc); 52 | } 53 | 54 | let response = open_search_client 55 | .bulk(BulkParts::None) 56 | .body(bulk_lines) // Pass Vec 57 | .send() 58 | .await; 59 | 60 | match response { 61 | Ok(res) => { 62 | let status = res.status_code(); 63 | let body: Value = match res.json().await { 64 | Ok(v) => v, 65 | Err(e) => { 66 | // Save to pending database if event registration fails 67 | eprintln!("Failed to parse bulk response: {:?}", e); 68 | match insert_pending_events(events, db_pool).await { 69 | Ok(_) => {} 70 | Err(e) => { 71 | eprintln!("Failed to insert pending events: {:?}", e); 72 | } 73 | } 74 | return; 75 | } 76 | }; 77 | 78 | if !status.is_success() { 79 | eprintln!( 80 | "Bulk insert request failed with status {}: {:?}", 81 | status, body 82 | ); 83 | match insert_pending_events(events, db_pool).await { 84 | Ok(_) => {} 85 | Err(e) => { 86 | eprintln!("Failed to insert pending events: {:?}", e); 87 | } 88 | } 89 | return; 90 | } 91 | 92 | let errors = body["errors"].as_bool().unwrap_or(false); 93 | if errors { 94 | let blank_vec = vec![]; 95 | let items = body["items"].as_array().unwrap_or(&blank_vec); 96 | let mut failed_events = vec![]; 97 | for (i, item) in items.iter().enumerate() { 98 | if let Some(index_res) = item.get("index") { 99 | let st = index_res["status"].as_u64().unwrap_or(0); 100 | if !(200..300).contains(&st) { 101 | if let Some(event) = events.get(i) { 102 | eprintln!( 103 | "Failed to insert event into OpenSearch (status: {}): {:?}", 104 | st, index_res 105 | ); 106 | failed_events.push((*event).clone()); 107 | } 108 | } 109 | } else if let Some(event) = events.get(i) { 110 | failed_events.push((*event).clone()); 111 | } 112 | } 113 | // Save failed data as pending 114 | let events = &failed_events[..]; 115 | match insert_pending_events(events, db_pool).await { 116 | Ok(_) => {} 117 | Err(e) => { 118 | eprintln!("Failed to insert pending events: {:?}", e); 119 | } 120 | } 121 | } else { 122 | println!( 123 | "Bulk inserted {} events into OpenSearch successfully.", 124 | events.len() 125 | ); 126 | } 127 | } 128 | Err(e) => { 129 | eprintln!("Failed to send bulk request to OpenSearch: {:?}", e); 130 | match insert_pending_events(events, db_pool).await { 131 | Ok(_) => {} 132 | Err(e) => { 133 | eprintln!("Failed to insert pending events: {:?}", e); 134 | } 135 | } 136 | } 137 | } 138 | } 139 | --------------------------------------------------------------------------------