feat(m): add route creation #140

merged
opened by a.starrysky.fyi targeting main from private/minion/push-mpvpoxrvtrvk

It's only basic routes for now - but this is effectively a first prototype of a golinks server. We still need to make everything beautiful, but it should be in a workable state when deployed on teal as of now...

This needs some changes on packetmix to set up a database as well, so let's make those here too...

+4 -7
menu/.gitignore
··· 3 # SPDX-License-Identifier: CC0-1.0 4 5 /target 6 - 7 - 8 - # Added by cargo 9 - # 10 - # already existing elements were commented out 11 - 12 - #/target
··· 3 # SPDX-License-Identifier: CC0-1.0 4 5 /target 6 + .devenv.flake.nix 7 + .devenv/ 8 + .direnv/ 9 + .envrc
+16
menu/.sqlx/query-735cda2fe387b6b852a03ba7ccba41353667bd505f80c1cfe3ad16b738b45ba5.json
···
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "INSERT INTO direct (\"from\", \"to\", \"owner\") VALUES ($1, $2, $3)", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Left": [ 8 + "Varchar", 9 + "Varchar", 10 + "Varchar" 11 + ] 12 + }, 13 + "nullable": [] 14 + }, 15 + "hash": "735cda2fe387b6b852a03ba7ccba41353667bd505f80c1cfe3ad16b738b45ba5" 16 + }
+22
menu/.sqlx/query-ed9553fa271ff0110c64c3247d894e61495d971492c77d074c5a191433f40afe.json
···
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "SELECT (\"to\") FROM direct WHERE \"from\" = $1 LIMIT 1", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "to", 9 + "type_info": "Varchar" 10 + } 11 + ], 12 + "parameters": { 13 + "Left": [ 14 + "Text" 15 + ] 16 + }, 17 + "nullable": [ 18 + false 19 + ] 20 + }, 21 + "hash": "ed9553fa271ff0110c64c3247d894e61495d971492c77d074c5a191433f40afe" 22 + }
+1633 -53
menu/Cargo.lock
··· 2 # It is not intended for manual editing. 3 version = 4 4 5 [[package]] 6 name = "atomic-waker" 7 version = "1.1.2" 8 source = "registry+https://github.com/rust-lang/crates.io-index" 9 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 10 11 [[package]] 12 name = "axum" 13 version = "0.8.8" ··· 15 checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" 16 dependencies = [ 17 "axum-core", 18 "bytes", 19 "form_urlencoded", 20 "futures-util", ··· 60 "tracing", 61 ] 62 63 [[package]] 64 name = "bitflags" 65 version = "2.10.0" 66 source = "registry+https://github.com/rust-lang/crates.io-index" 67 checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" 68 69 [[package]] 70 name = "bytes" ··· 72 source = "registry+https://github.com/rust-lang/crates.io-index" 73 checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" 74 75 [[package]] 76 name = "form_urlencoded" 77 version = "1.2.2" ··· 88 checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 89 dependencies = [ 90 "futures-core", 91 ] 92 93 [[package]] ··· 96 source = "registry+https://github.com/rust-lang/crates.io-index" 97 checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 98 99 [[package]] 100 name = "futures-task" 101 version = "0.3.31" ··· 109 checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 110 dependencies = [ 111 "futures-core", 112 "futures-task", 113 "pin-project-lite", 114 "pin-utils", 115 ] 116 117 [[package]] ··· 197 ] 198 199 [[package]] 200 - name = "itoa" 201 - version = "1.0.17" 202 source = "registry+https://github.com/rust-lang/crates.io-index" 203 - checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" 204 205 [[package]] 206 - name = "libc" 207 - version = "0.2.179" 208 source = "registry+https://github.com/rust-lang/crates.io-index" 209 - checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f" 210 211 [[package]] 212 - name = "log" 213 - version = "0.4.29" 214 source = "registry+https://github.com/rust-lang/crates.io-index" 215 - checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 216 217 [[package]] 218 - name = "matchit" 219 - version = "0.8.4" 220 source = "registry+https://github.com/rust-lang/crates.io-index" 221 - checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 222 223 [[package]] 224 - name = "memchr" 225 - version = "2.7.6" 226 source = "registry+https://github.com/rust-lang/crates.io-index" 227 - checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" 228 - 229 - [[package]] 230 - name = "menu" 231 - version = "0.1.0" 232 dependencies = [ 233 - "axum", 234 - "tokio", 235 - "tower-http", 236 - "tower-layer", 237 ] 238 239 [[package]] 240 - name = "mime" 241 - version = "0.3.17" 242 source = "registry+https://github.com/rust-lang/crates.io-index" 243 - checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 244 245 [[package]] 246 - name = "mio" 247 - version = "1.1.1" 248 source = "registry+https://github.com/rust-lang/crates.io-index" 249 - checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" 250 dependencies = [ 251 - "libc", 252 - "wasi", 253 - "windows-sys 0.61.2", 254 ] 255 256 [[package]] 257 - name = "once_cell" 258 - version = "1.21.3" 259 source = "registry+https://github.com/rust-lang/crates.io-index" 260 - checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 261 262 [[package]] 263 - name = "percent-encoding" 264 - version = "2.3.2" 265 source = "registry+https://github.com/rust-lang/crates.io-index" 266 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 267 ··· 277 source = "registry+https://github.com/rust-lang/crates.io-index" 278 checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 279 280 [[package]] 281 name = "proc-macro2" 282 version = "1.0.104" ··· 295 "proc-macro2", 296 ] 297 298 [[package]] 299 name = "ryu" 300 version = "1.0.22" 301 source = "registry+https://github.com/rust-lang/crates.io-index" 302 checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" 303 304 [[package]] 305 name = "serde" 306 version = "1.0.228" ··· 308 checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" 309 dependencies = [ 310 "serde_core", 311 ] 312 313 [[package]] ··· 366 "serde", 367 ] 368 369 [[package]] 370 name = "smallvec" 371 version = "1.15.1" 372 source = "registry+https://github.com/rust-lang/crates.io-index" 373 checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 374 375 [[package]] 376 name = "socket2" ··· 382 "windows-sys 0.60.2", 383 ] 384 385 [[package]] 386 name = "syn" 387 version = "2.0.112" 388 source = "registry+https://github.com/rust-lang/crates.io-index" 389 - checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4" 390 dependencies = [ 391 - "proc-macro2", 392 - "quote", 393 - "unicode-ident", 394 ] 395 396 [[package]] 397 - name = "sync_wrapper" 398 - version = "1.0.2" 399 source = "registry+https://github.com/rust-lang/crates.io-index" 400 - checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 401 402 [[package]] 403 name = "tokio" ··· 405 source = "registry+https://github.com/rust-lang/crates.io-index" 406 checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" 407 dependencies = [ 408 "libc", 409 "mio", 410 "pin-project-lite", ··· 424 "syn", 425 ] 426 427 [[package]] 428 name = "tower" 429 version = "0.5.2" ··· 474 dependencies = [ 475 "log", 476 "pin-project-lite", 477 "tracing-core", 478 ] 479 480 [[package]] 481 name = "tracing-core" 482 version = "0.1.36" ··· 486 "once_cell", 487 ] 488 489 [[package]] 490 name = "unicode-ident" 491 version = "1.0.22" 492 source = "registry+https://github.com/rust-lang/crates.io-index" 493 checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" 494 495 [[package]] 496 name = "wasi" 497 version = "0.11.1+wasi-snapshot-preview1" 498 source = "registry+https://github.com/rust-lang/crates.io-index" 499 checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 500 501 [[package]] 502 name = "windows-link" 503 version = "0.2.1" 504 source = "registry+https://github.com/rust-lang/crates.io-index" 505 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 506 507 [[package]] 508 name = "windows-sys" 509 version = "0.60.2" 510 source = "registry+https://github.com/rust-lang/crates.io-index" 511 checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" 512 dependencies = [ 513 - "windows-targets", 514 ] 515 516 [[package]] ··· 522 "windows-link", 523 ] 524 525 [[package]] 526 name = "windows-targets" 527 version = "0.53.5" ··· 529 checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" 530 dependencies = [ 531 "windows-link", 532 - "windows_aarch64_gnullvm", 533 - "windows_aarch64_msvc", 534 - "windows_i686_gnu", 535 - "windows_i686_gnullvm", 536 - "windows_i686_msvc", 537 - "windows_x86_64_gnu", 538 - "windows_x86_64_gnullvm", 539 - "windows_x86_64_msvc", 540 ] 541 542 [[package]] 543 name = "windows_aarch64_gnullvm" 544 version = "0.53.1" 545 source = "registry+https://github.com/rust-lang/crates.io-index" 546 checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" 547 548 [[package]] 549 name = "windows_aarch64_msvc" 550 version = "0.53.1" 551 source = "registry+https://github.com/rust-lang/crates.io-index" 552 checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" 553 554 [[package]] 555 name = "windows_i686_gnu" 556 version = "0.53.1" 557 source = "registry+https://github.com/rust-lang/crates.io-index" 558 checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" 559 560 [[package]] 561 name = "windows_i686_gnullvm" 562 version = "0.53.1" 563 source = "registry+https://github.com/rust-lang/crates.io-index" 564 checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" 565 566 [[package]] 567 name = "windows_i686_msvc" 568 version = "0.53.1" 569 source = "registry+https://github.com/rust-lang/crates.io-index" 570 checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" 571 572 [[package]] 573 name = "windows_x86_64_gnu" 574 version = "0.53.1" 575 source = "registry+https://github.com/rust-lang/crates.io-index" 576 checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" 577 578 [[package]] 579 name = "windows_x86_64_gnullvm" 580 version = "0.53.1" 581 source = "registry+https://github.com/rust-lang/crates.io-index" 582 checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" 583 584 [[package]] 585 name = "windows_x86_64_msvc" 586 version = "0.53.1" 587 source = "registry+https://github.com/rust-lang/crates.io-index" 588 checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" 589 590 [[package]] 591 name = "zmij" 592 version = "1.0.8"
··· 2 # It is not intended for manual editing. 3 version = 4 4 5 + [[package]] 6 + name = "allocator-api2" 7 + version = "0.2.21" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 10 + 11 + [[package]] 12 + name = "atoi" 13 + version = "2.0.0" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" 16 + dependencies = [ 17 + "num-traits", 18 + ] 19 + 20 [[package]] 21 name = "atomic-waker" 22 version = "1.1.2" 23 source = "registry+https://github.com/rust-lang/crates.io-index" 24 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 25 26 + [[package]] 27 + name = "autocfg" 28 + version = "1.5.0" 29 + source = "registry+https://github.com/rust-lang/crates.io-index" 30 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 31 + 32 [[package]] 33 name = "axum" 34 version = "0.8.8" ··· 36 checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" 37 dependencies = [ 38 "axum-core", 39 + "axum-macros", 40 "bytes", 41 "form_urlencoded", 42 "futures-util", ··· 82 "tracing", 83 ] 84 85 + [[package]] 86 + name = "axum-macros" 87 + version = "0.5.0" 88 + source = "registry+https://github.com/rust-lang/crates.io-index" 89 + checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" 90 + dependencies = [ 91 + "proc-macro2", 92 + "quote", 93 + "syn", 94 + ] 95 + 96 + [[package]] 97 + name = "base64" 98 + version = "0.22.1" 99 + source = "registry+https://github.com/rust-lang/crates.io-index" 100 + checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 101 + 102 + [[package]] 103 + name = "base64ct" 104 + version = "1.8.1" 105 + source = "registry+https://github.com/rust-lang/crates.io-index" 106 + checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" 107 + 108 [[package]] 109 name = "bitflags" 110 version = "2.10.0" 111 source = "registry+https://github.com/rust-lang/crates.io-index" 112 checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" 113 + dependencies = [ 114 + "serde_core", 115 + ] 116 + 117 + [[package]] 118 + name = "block-buffer" 119 + version = "0.10.4" 120 + source = "registry+https://github.com/rust-lang/crates.io-index" 121 + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 122 + dependencies = [ 123 + "generic-array", 124 + ] 125 + 126 + [[package]] 127 + name = "bumpalo" 128 + version = "3.19.1" 129 + source = "registry+https://github.com/rust-lang/crates.io-index" 130 + checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" 131 + 132 + [[package]] 133 + name = "byteorder" 134 + version = "1.5.0" 135 + source = "registry+https://github.com/rust-lang/crates.io-index" 136 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 137 138 [[package]] 139 name = "bytes" ··· 141 source = "registry+https://github.com/rust-lang/crates.io-index" 142 checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" 143 144 + [[package]] 145 + name = "cc" 146 + version = "1.2.51" 147 + source = "registry+https://github.com/rust-lang/crates.io-index" 148 + checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" 149 + dependencies = [ 150 + "find-msvc-tools", 151 + "shlex", 152 + ] 153 + 154 + [[package]] 155 + name = "cfg-if" 156 + version = "1.0.4" 157 + source = "registry+https://github.com/rust-lang/crates.io-index" 158 + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 159 + 160 + [[package]] 161 + name = "concurrent-queue" 162 + version = "2.5.0" 163 + source = "registry+https://github.com/rust-lang/crates.io-index" 164 + checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 165 + dependencies = [ 166 + "crossbeam-utils", 167 + ] 168 + 169 + [[package]] 170 + name = "const-oid" 171 + version = "0.9.6" 172 + source = "registry+https://github.com/rust-lang/crates.io-index" 173 + checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 174 + 175 + [[package]] 176 + name = "cpufeatures" 177 + version = "0.2.17" 178 + source = "registry+https://github.com/rust-lang/crates.io-index" 179 + checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 180 + dependencies = [ 181 + "libc", 182 + ] 183 + 184 + [[package]] 185 + name = "crc" 186 + version = "3.4.0" 187 + source = "registry+https://github.com/rust-lang/crates.io-index" 188 + checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" 189 + dependencies = [ 190 + "crc-catalog", 191 + ] 192 + 193 + [[package]] 194 + name = "crc-catalog" 195 + version = "2.4.0" 196 + source = "registry+https://github.com/rust-lang/crates.io-index" 197 + checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" 198 + 199 + [[package]] 200 + name = "crossbeam-queue" 201 + version = "0.3.12" 202 + source = "registry+https://github.com/rust-lang/crates.io-index" 203 + checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" 204 + dependencies = [ 205 + "crossbeam-utils", 206 + ] 207 + 208 + [[package]] 209 + name = "crossbeam-utils" 210 + version = "0.8.21" 211 + source = "registry+https://github.com/rust-lang/crates.io-index" 212 + checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 213 + 214 + [[package]] 215 + name = "crypto-common" 216 + version = "0.1.7" 217 + source = "registry+https://github.com/rust-lang/crates.io-index" 218 + checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" 219 + dependencies = [ 220 + "generic-array", 221 + "typenum", 222 + ] 223 + 224 + [[package]] 225 + name = "der" 226 + version = "0.7.10" 227 + source = "registry+https://github.com/rust-lang/crates.io-index" 228 + checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" 229 + dependencies = [ 230 + "const-oid", 231 + "pem-rfc7468", 232 + "zeroize", 233 + ] 234 + 235 + [[package]] 236 + name = "digest" 237 + version = "0.10.7" 238 + source = "registry+https://github.com/rust-lang/crates.io-index" 239 + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 240 + dependencies = [ 241 + "block-buffer", 242 + "const-oid", 243 + "crypto-common", 244 + "subtle", 245 + ] 246 + 247 + [[package]] 248 + name = "displaydoc" 249 + version = "0.2.5" 250 + source = "registry+https://github.com/rust-lang/crates.io-index" 251 + checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 252 + dependencies = [ 253 + "proc-macro2", 254 + "quote", 255 + "syn", 256 + ] 257 + 258 + [[package]] 259 + name = "dotenvy" 260 + version = "0.15.7" 261 + source = "registry+https://github.com/rust-lang/crates.io-index" 262 + checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" 263 + 264 + [[package]] 265 + name = "either" 266 + version = "1.15.0" 267 + source = "registry+https://github.com/rust-lang/crates.io-index" 268 + checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 269 + dependencies = [ 270 + "serde", 271 + ] 272 + 273 + [[package]] 274 + name = "equivalent" 275 + version = "1.0.2" 276 + source = "registry+https://github.com/rust-lang/crates.io-index" 277 + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 278 + 279 + [[package]] 280 + name = "etcetera" 281 + version = "0.8.0" 282 + source = "registry+https://github.com/rust-lang/crates.io-index" 283 + checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" 284 + dependencies = [ 285 + "cfg-if", 286 + "home", 287 + "windows-sys 0.48.0", 288 + ] 289 + 290 + [[package]] 291 + name = "event-listener" 292 + version = "5.4.1" 293 + source = "registry+https://github.com/rust-lang/crates.io-index" 294 + checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" 295 + dependencies = [ 296 + "concurrent-queue", 297 + "parking", 298 + "pin-project-lite", 299 + ] 300 + 301 + [[package]] 302 + name = "find-msvc-tools" 303 + version = "0.1.6" 304 + source = "registry+https://github.com/rust-lang/crates.io-index" 305 + checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" 306 + 307 + [[package]] 308 + name = "flume" 309 + version = "0.11.1" 310 + source = "registry+https://github.com/rust-lang/crates.io-index" 311 + checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" 312 + dependencies = [ 313 + "futures-core", 314 + "futures-sink", 315 + "spin", 316 + ] 317 + 318 + [[package]] 319 + name = "foldhash" 320 + version = "0.1.5" 321 + source = "registry+https://github.com/rust-lang/crates.io-index" 322 + checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 323 + 324 [[package]] 325 name = "form_urlencoded" 326 version = "1.2.2" ··· 337 checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 338 dependencies = [ 339 "futures-core", 340 + "futures-sink", 341 ] 342 343 [[package]] ··· 346 source = "registry+https://github.com/rust-lang/crates.io-index" 347 checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 348 349 + [[package]] 350 + name = "futures-executor" 351 + version = "0.3.31" 352 + source = "registry+https://github.com/rust-lang/crates.io-index" 353 + checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 354 + dependencies = [ 355 + "futures-core", 356 + "futures-task", 357 + "futures-util", 358 + ] 359 + 360 + [[package]] 361 + name = "futures-intrusive" 362 + version = "0.5.0" 363 + source = "registry+https://github.com/rust-lang/crates.io-index" 364 + checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" 365 + dependencies = [ 366 + "futures-core", 367 + "lock_api", 368 + "parking_lot", 369 + ] 370 + 371 + [[package]] 372 + name = "futures-io" 373 + version = "0.3.31" 374 + source = "registry+https://github.com/rust-lang/crates.io-index" 375 + checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 376 + 377 + [[package]] 378 + name = "futures-sink" 379 + version = "0.3.31" 380 + source = "registry+https://github.com/rust-lang/crates.io-index" 381 + checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 382 + 383 [[package]] 384 name = "futures-task" 385 version = "0.3.31" ··· 393 checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 394 dependencies = [ 395 "futures-core", 396 + "futures-io", 397 + "futures-sink", 398 "futures-task", 399 + "memchr", 400 "pin-project-lite", 401 "pin-utils", 402 + "slab", 403 + ] 404 + 405 + [[package]] 406 + name = "generic-array" 407 + version = "0.14.7" 408 + source = "registry+https://github.com/rust-lang/crates.io-index" 409 + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 410 + dependencies = [ 411 + "typenum", 412 + "version_check", 413 + ] 414 + 415 + [[package]] 416 + name = "getrandom" 417 + version = "0.2.16" 418 + source = "registry+https://github.com/rust-lang/crates.io-index" 419 + checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 420 + dependencies = [ 421 + "cfg-if", 422 + "libc", 423 + "wasi", 424 + ] 425 + 426 + [[package]] 427 + name = "hashbrown" 428 + version = "0.15.5" 429 + source = "registry+https://github.com/rust-lang/crates.io-index" 430 + checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" 431 + dependencies = [ 432 + "allocator-api2", 433 + "equivalent", 434 + "foldhash", 435 + ] 436 + 437 + [[package]] 438 + name = "hashbrown" 439 + version = "0.16.1" 440 + source = "registry+https://github.com/rust-lang/crates.io-index" 441 + checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" 442 + 443 + [[package]] 444 + name = "hashlink" 445 + version = "0.10.0" 446 + source = "registry+https://github.com/rust-lang/crates.io-index" 447 + checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" 448 + dependencies = [ 449 + "hashbrown 0.15.5", 450 + ] 451 + 452 + [[package]] 453 + name = "heck" 454 + version = "0.5.0" 455 + source = "registry+https://github.com/rust-lang/crates.io-index" 456 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 457 + 458 + [[package]] 459 + name = "hex" 460 + version = "0.4.3" 461 + source = "registry+https://github.com/rust-lang/crates.io-index" 462 + checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 463 + 464 + [[package]] 465 + name = "hkdf" 466 + version = "0.12.4" 467 + source = "registry+https://github.com/rust-lang/crates.io-index" 468 + checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" 469 + dependencies = [ 470 + "hmac", 471 + ] 472 + 473 + [[package]] 474 + name = "hmac" 475 + version = "0.12.1" 476 + source = "registry+https://github.com/rust-lang/crates.io-index" 477 + checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 478 + dependencies = [ 479 + "digest", 480 + ] 481 + 482 + [[package]] 483 + name = "home" 484 + version = "0.5.12" 485 + source = "registry+https://github.com/rust-lang/crates.io-index" 486 + checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" 487 + dependencies = [ 488 + "windows-sys 0.61.2", 489 ] 490 491 [[package]] ··· 571 ] 572 573 [[package]] 574 + name = "icu_collections" 575 + version = "2.1.1" 576 source = "registry+https://github.com/rust-lang/crates.io-index" 577 + checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" 578 + dependencies = [ 579 + "displaydoc", 580 + "potential_utf", 581 + "yoke", 582 + "zerofrom", 583 + "zerovec", 584 + ] 585 586 [[package]] 587 + name = "icu_locale_core" 588 + version = "2.1.1" 589 source = "registry+https://github.com/rust-lang/crates.io-index" 590 + checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" 591 + dependencies = [ 592 + "displaydoc", 593 + "litemap", 594 + "tinystr", 595 + "writeable", 596 + "zerovec", 597 + ] 598 599 [[package]] 600 + name = "icu_normalizer" 601 + version = "2.1.1" 602 source = "registry+https://github.com/rust-lang/crates.io-index" 603 + checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" 604 + dependencies = [ 605 + "icu_collections", 606 + "icu_normalizer_data", 607 + "icu_properties", 608 + "icu_provider", 609 + "smallvec", 610 + "zerovec", 611 + ] 612 613 [[package]] 614 + name = "icu_normalizer_data" 615 + version = "2.1.1" 616 source = "registry+https://github.com/rust-lang/crates.io-index" 617 + checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" 618 619 [[package]] 620 + name = "icu_properties" 621 + version = "2.1.2" 622 source = "registry+https://github.com/rust-lang/crates.io-index" 623 + checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" 624 dependencies = [ 625 + "icu_collections", 626 + "icu_locale_core", 627 + "icu_properties_data", 628 + "icu_provider", 629 + "zerotrie", 630 + "zerovec", 631 ] 632 633 [[package]] 634 + name = "icu_properties_data" 635 + version = "2.1.2" 636 source = "registry+https://github.com/rust-lang/crates.io-index" 637 + checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" 638 639 [[package]] 640 + name = "icu_provider" 641 + version = "2.1.1" 642 source = "registry+https://github.com/rust-lang/crates.io-index" 643 + checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" 644 dependencies = [ 645 + "displaydoc", 646 + "icu_locale_core", 647 + "writeable", 648 + "yoke", 649 + "zerofrom", 650 + "zerotrie", 651 + "zerovec", 652 ] 653 654 [[package]] 655 + name = "idna" 656 + version = "1.1.0" 657 source = "registry+https://github.com/rust-lang/crates.io-index" 658 + checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" 659 + dependencies = [ 660 + "idna_adapter", 661 + "smallvec", 662 + "utf8_iter", 663 + ] 664 665 [[package]] 666 + name = "idna_adapter" 667 + version = "1.2.1" 668 + source = "registry+https://github.com/rust-lang/crates.io-index" 669 + checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" 670 + dependencies = [ 671 + "icu_normalizer", 672 + "icu_properties", 673 + ] 674 + 675 + [[package]] 676 + name = "indexmap" 677 + version = "2.12.1" 678 + source = "registry+https://github.com/rust-lang/crates.io-index" 679 + checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" 680 + dependencies = [ 681 + "equivalent", 682 + "hashbrown 0.16.1", 683 + ] 684 + 685 + [[package]] 686 + name = "itoa" 687 + version = "1.0.17" 688 + source = "registry+https://github.com/rust-lang/crates.io-index" 689 + checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" 690 + 691 + [[package]] 692 + name = "js-sys" 693 + version = "0.3.83" 694 + source = "registry+https://github.com/rust-lang/crates.io-index" 695 + checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" 696 + dependencies = [ 697 + "once_cell", 698 + "wasm-bindgen", 699 + ] 700 + 701 + [[package]] 702 + name = "lazy_static" 703 + version = "1.5.0" 704 + source = "registry+https://github.com/rust-lang/crates.io-index" 705 + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 706 + dependencies = [ 707 + "spin", 708 + ] 709 + 710 + [[package]] 711 + name = "libc" 712 + version = "0.2.179" 713 + source = "registry+https://github.com/rust-lang/crates.io-index" 714 + checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f" 715 + 716 + [[package]] 717 + name = "libm" 718 + version = "0.2.15" 719 + source = "registry+https://github.com/rust-lang/crates.io-index" 720 + checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" 721 + 722 + [[package]] 723 + name = "libredox" 724 + version = "0.1.12" 725 + source = "registry+https://github.com/rust-lang/crates.io-index" 726 + checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" 727 + dependencies = [ 728 + "bitflags", 729 + "libc", 730 + "redox_syscall 0.7.0", 731 + ] 732 + 733 + [[package]] 734 + name = "libsqlite3-sys" 735 + version = "0.30.1" 736 + source = "registry+https://github.com/rust-lang/crates.io-index" 737 + checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" 738 + dependencies = [ 739 + "pkg-config", 740 + "vcpkg", 741 + ] 742 + 743 + [[package]] 744 + name = "litemap" 745 + version = "0.8.1" 746 + source = "registry+https://github.com/rust-lang/crates.io-index" 747 + checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" 748 + 749 + [[package]] 750 + name = "lock_api" 751 + version = "0.4.14" 752 + source = "registry+https://github.com/rust-lang/crates.io-index" 753 + checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" 754 + dependencies = [ 755 + "scopeguard", 756 + ] 757 + 758 + [[package]] 759 + name = "log" 760 + version = "0.4.29" 761 + source = "registry+https://github.com/rust-lang/crates.io-index" 762 + checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 763 + 764 + [[package]] 765 + name = "matchit" 766 + version = "0.8.4" 767 + source = "registry+https://github.com/rust-lang/crates.io-index" 768 + checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 769 + 770 + [[package]] 771 + name = "md-5" 772 + version = "0.10.6" 773 + source = "registry+https://github.com/rust-lang/crates.io-index" 774 + checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 775 + dependencies = [ 776 + "cfg-if", 777 + "digest", 778 + ] 779 + 780 + [[package]] 781 + name = "memchr" 782 + version = "2.7.6" 783 + source = "registry+https://github.com/rust-lang/crates.io-index" 784 + checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" 785 + 786 + [[package]] 787 + name = "menu" 788 + version = "0.1.0" 789 + dependencies = [ 790 + "axum", 791 + "serde", 792 + "sqlx", 793 + "tokio", 794 + "tower-http", 795 + "tower-layer", 796 + ] 797 + 798 + [[package]] 799 + name = "mime" 800 + version = "0.3.17" 801 + source = "registry+https://github.com/rust-lang/crates.io-index" 802 + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 803 + 804 + [[package]] 805 + name = "mio" 806 + version = "1.1.1" 807 + source = "registry+https://github.com/rust-lang/crates.io-index" 808 + checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" 809 + dependencies = [ 810 + "libc", 811 + "wasi", 812 + "windows-sys 0.61.2", 813 + ] 814 + 815 + [[package]] 816 + name = "num-bigint-dig" 817 + version = "0.8.6" 818 + source = "registry+https://github.com/rust-lang/crates.io-index" 819 + checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" 820 + dependencies = [ 821 + "lazy_static", 822 + "libm", 823 + "num-integer", 824 + "num-iter", 825 + "num-traits", 826 + "rand", 827 + "smallvec", 828 + "zeroize", 829 + ] 830 + 831 + [[package]] 832 + name = "num-integer" 833 + version = "0.1.46" 834 + source = "registry+https://github.com/rust-lang/crates.io-index" 835 + checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 836 + dependencies = [ 837 + "num-traits", 838 + ] 839 + 840 + [[package]] 841 + name = "num-iter" 842 + version = "0.1.45" 843 + source = "registry+https://github.com/rust-lang/crates.io-index" 844 + checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 845 + dependencies = [ 846 + "autocfg", 847 + "num-integer", 848 + "num-traits", 849 + ] 850 + 851 + [[package]] 852 + name = "num-traits" 853 + version = "0.2.19" 854 + source = "registry+https://github.com/rust-lang/crates.io-index" 855 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 856 + dependencies = [ 857 + "autocfg", 858 + "libm", 859 + ] 860 + 861 + [[package]] 862 + name = "once_cell" 863 + version = "1.21.3" 864 + source = "registry+https://github.com/rust-lang/crates.io-index" 865 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 866 + 867 + [[package]] 868 + name = "parking" 869 + version = "2.2.1" 870 + source = "registry+https://github.com/rust-lang/crates.io-index" 871 + checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 872 + 873 + [[package]] 874 + name = "parking_lot" 875 + version = "0.12.5" 876 + source = "registry+https://github.com/rust-lang/crates.io-index" 877 + checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 878 + dependencies = [ 879 + "lock_api", 880 + "parking_lot_core", 881 + ] 882 + 883 + [[package]] 884 + name = "parking_lot_core" 885 + version = "0.9.12" 886 + source = "registry+https://github.com/rust-lang/crates.io-index" 887 + checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 888 + dependencies = [ 889 + "cfg-if", 890 + "libc", 891 + "redox_syscall 0.5.18", 892 + "smallvec", 893 + "windows-link", 894 + ] 895 + 896 + [[package]] 897 + name = "pem-rfc7468" 898 + version = "0.7.0" 899 + source = "registry+https://github.com/rust-lang/crates.io-index" 900 + checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 901 + dependencies = [ 902 + "base64ct", 903 + ] 904 + 905 + [[package]] 906 + name = "percent-encoding" 907 + version = "2.3.2" 908 source = "registry+https://github.com/rust-lang/crates.io-index" 909 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 910 ··· 920 source = "registry+https://github.com/rust-lang/crates.io-index" 921 checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 922 923 + [[package]] 924 + name = "pkcs1" 925 + version = "0.7.5" 926 + source = "registry+https://github.com/rust-lang/crates.io-index" 927 + checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" 928 + dependencies = [ 929 + "der", 930 + "pkcs8", 931 + "spki", 932 + ] 933 + 934 + [[package]] 935 + name = "pkcs8" 936 + version = "0.10.2" 937 + source = "registry+https://github.com/rust-lang/crates.io-index" 938 + checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 939 + dependencies = [ 940 + "der", 941 + "spki", 942 + ] 943 + 944 + [[package]] 945 + name = "pkg-config" 946 + version = "0.3.32" 947 + source = "registry+https://github.com/rust-lang/crates.io-index" 948 + checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 949 + 950 + [[package]] 951 + name = "potential_utf" 952 + version = "0.1.4" 953 + source = "registry+https://github.com/rust-lang/crates.io-index" 954 + checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" 955 + dependencies = [ 956 + "zerovec", 957 + ] 958 + 959 + [[package]] 960 + name = "ppv-lite86" 961 + version = "0.2.21" 962 + source = "registry+https://github.com/rust-lang/crates.io-index" 963 + checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 964 + dependencies = [ 965 + "zerocopy", 966 + ] 967 + 968 [[package]] 969 name = "proc-macro2" 970 version = "1.0.104" ··· 983 "proc-macro2", 984 ] 985 986 + [[package]] 987 + name = "rand" 988 + version = "0.8.5" 989 + source = "registry+https://github.com/rust-lang/crates.io-index" 990 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 991 + dependencies = [ 992 + "libc", 993 + "rand_chacha", 994 + "rand_core", 995 + ] 996 + 997 + [[package]] 998 + name = "rand_chacha" 999 + version = "0.3.1" 1000 + source = "registry+https://github.com/rust-lang/crates.io-index" 1001 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1002 + dependencies = [ 1003 + "ppv-lite86", 1004 + "rand_core", 1005 + ] 1006 + 1007 + [[package]] 1008 + name = "rand_core" 1009 + version = "0.6.4" 1010 + source = "registry+https://github.com/rust-lang/crates.io-index" 1011 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1012 + dependencies = [ 1013 + "getrandom", 1014 + ] 1015 + 1016 + [[package]] 1017 + name = "redox_syscall" 1018 + version = "0.5.18" 1019 + source = "registry+https://github.com/rust-lang/crates.io-index" 1020 + checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" 1021 + dependencies = [ 1022 + "bitflags", 1023 + ] 1024 + 1025 + [[package]] 1026 + name = "redox_syscall" 1027 + version = "0.7.0" 1028 + source = "registry+https://github.com/rust-lang/crates.io-index" 1029 + checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" 1030 + dependencies = [ 1031 + "bitflags", 1032 + ] 1033 + 1034 + [[package]] 1035 + name = "ring" 1036 + version = "0.17.14" 1037 + source = "registry+https://github.com/rust-lang/crates.io-index" 1038 + checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 1039 + dependencies = [ 1040 + "cc", 1041 + "cfg-if", 1042 + "getrandom", 1043 + "libc", 1044 + "untrusted", 1045 + "windows-sys 0.52.0", 1046 + ] 1047 + 1048 + [[package]] 1049 + name = "rsa" 1050 + version = "0.9.9" 1051 + source = "registry+https://github.com/rust-lang/crates.io-index" 1052 + checksum = "40a0376c50d0358279d9d643e4bf7b7be212f1f4ff1da9070a7b54d22ef75c88" 1053 + dependencies = [ 1054 + "const-oid", 1055 + "digest", 1056 + "num-bigint-dig", 1057 + "num-integer", 1058 + "num-traits", 1059 + "pkcs1", 1060 + "pkcs8", 1061 + "rand_core", 1062 + "signature", 1063 + "spki", 1064 + "subtle", 1065 + "zeroize", 1066 + ] 1067 + 1068 + [[package]] 1069 + name = "rustls" 1070 + version = "0.23.35" 1071 + source = "registry+https://github.com/rust-lang/crates.io-index" 1072 + checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" 1073 + dependencies = [ 1074 + "once_cell", 1075 + "ring", 1076 + "rustls-pki-types", 1077 + "rustls-webpki", 1078 + "subtle", 1079 + "zeroize", 1080 + ] 1081 + 1082 + [[package]] 1083 + name = "rustls-pki-types" 1084 + version = "1.13.2" 1085 + source = "registry+https://github.com/rust-lang/crates.io-index" 1086 + checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" 1087 + dependencies = [ 1088 + "zeroize", 1089 + ] 1090 + 1091 + [[package]] 1092 + name = "rustls-webpki" 1093 + version = "0.103.8" 1094 + source = "registry+https://github.com/rust-lang/crates.io-index" 1095 + checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" 1096 + dependencies = [ 1097 + "ring", 1098 + "rustls-pki-types", 1099 + "untrusted", 1100 + ] 1101 + 1102 + [[package]] 1103 + name = "rustversion" 1104 + version = "1.0.22" 1105 + source = "registry+https://github.com/rust-lang/crates.io-index" 1106 + checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 1107 + 1108 [[package]] 1109 name = "ryu" 1110 version = "1.0.22" 1111 source = "registry+https://github.com/rust-lang/crates.io-index" 1112 checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" 1113 1114 + [[package]] 1115 + name = "scopeguard" 1116 + version = "1.2.0" 1117 + source = "registry+https://github.com/rust-lang/crates.io-index" 1118 + checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1119 + 1120 [[package]] 1121 name = "serde" 1122 version = "1.0.228" ··· 1124 checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" 1125 dependencies = [ 1126 "serde_core", 1127 + "serde_derive", 1128 ] 1129 1130 [[package]] ··· 1183 "serde", 1184 ] 1185 1186 + [[package]] 1187 + name = "sha1" 1188 + version = "0.10.6" 1189 + source = "registry+https://github.com/rust-lang/crates.io-index" 1190 + checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 1191 + dependencies = [ 1192 + "cfg-if", 1193 + "cpufeatures", 1194 + "digest", 1195 + ] 1196 + 1197 + [[package]] 1198 + name = "sha2" 1199 + version = "0.10.9" 1200 + source = "registry+https://github.com/rust-lang/crates.io-index" 1201 + checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 1202 + dependencies = [ 1203 + "cfg-if", 1204 + "cpufeatures", 1205 + "digest", 1206 + ] 1207 + 1208 + [[package]] 1209 + name = "shlex" 1210 + version = "1.3.0" 1211 + source = "registry+https://github.com/rust-lang/crates.io-index" 1212 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1213 + 1214 + [[package]] 1215 + name = "signature" 1216 + version = "2.2.0" 1217 + source = "registry+https://github.com/rust-lang/crates.io-index" 1218 + checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1219 + dependencies = [ 1220 + "digest", 1221 + "rand_core", 1222 + ] 1223 + 1224 + [[package]] 1225 + name = "slab" 1226 + version = "0.4.11" 1227 + source = "registry+https://github.com/rust-lang/crates.io-index" 1228 + checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" 1229 + 1230 [[package]] 1231 name = "smallvec" 1232 version = "1.15.1" 1233 source = "registry+https://github.com/rust-lang/crates.io-index" 1234 checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 1235 + dependencies = [ 1236 + "serde", 1237 + ] 1238 1239 [[package]] 1240 name = "socket2" ··· 1246 "windows-sys 0.60.2", 1247 ] 1248 1249 + [[package]] 1250 + name = "spin" 1251 + version = "0.9.8" 1252 + source = "registry+https://github.com/rust-lang/crates.io-index" 1253 + checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1254 + dependencies = [ 1255 + "lock_api", 1256 + ] 1257 + 1258 + [[package]] 1259 + name = "spki" 1260 + version = "0.7.3" 1261 + source = "registry+https://github.com/rust-lang/crates.io-index" 1262 + checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 1263 + dependencies = [ 1264 + "base64ct", 1265 + "der", 1266 + ] 1267 + 1268 + [[package]] 1269 + name = "sqlx" 1270 + version = "0.8.6" 1271 + source = "registry+https://github.com/rust-lang/crates.io-index" 1272 + checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" 1273 + dependencies = [ 1274 + "sqlx-core", 1275 + "sqlx-macros", 1276 + "sqlx-mysql", 1277 + "sqlx-postgres", 1278 + "sqlx-sqlite", 1279 + ] 1280 + 1281 + [[package]] 1282 + name = "sqlx-core" 1283 + version = "0.8.6" 1284 + source = "registry+https://github.com/rust-lang/crates.io-index" 1285 + checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" 1286 + dependencies = [ 1287 + "base64", 1288 + "bytes", 1289 + "crc", 1290 + "crossbeam-queue", 1291 + "either", 1292 + "event-listener", 1293 + "futures-core", 1294 + "futures-intrusive", 1295 + "futures-io", 1296 + "futures-util", 1297 + "hashbrown 0.15.5", 1298 + "hashlink", 1299 + "indexmap", 1300 + "log", 1301 + "memchr", 1302 + "once_cell", 1303 + "percent-encoding", 1304 + "rustls", 1305 + "serde", 1306 + "serde_json", 1307 + "sha2", 1308 + "smallvec", 1309 + "thiserror", 1310 + "tokio", 1311 + "tokio-stream", 1312 + "tracing", 1313 + "url", 1314 + "uuid", 1315 + "webpki-roots 0.26.11", 1316 + ] 1317 + 1318 + [[package]] 1319 + name = "sqlx-macros" 1320 + version = "0.8.6" 1321 + source = "registry+https://github.com/rust-lang/crates.io-index" 1322 + checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" 1323 + dependencies = [ 1324 + "proc-macro2", 1325 + "quote", 1326 + "sqlx-core", 1327 + "sqlx-macros-core", 1328 + "syn", 1329 + ] 1330 + 1331 + [[package]] 1332 + name = "sqlx-macros-core" 1333 + version = "0.8.6" 1334 + source = "registry+https://github.com/rust-lang/crates.io-index" 1335 + checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" 1336 + dependencies = [ 1337 + "dotenvy", 1338 + "either", 1339 + "heck", 1340 + "hex", 1341 + "once_cell", 1342 + "proc-macro2", 1343 + "quote", 1344 + "serde", 1345 + "serde_json", 1346 + "sha2", 1347 + "sqlx-core", 1348 + "sqlx-mysql", 1349 + "sqlx-postgres", 1350 + "sqlx-sqlite", 1351 + "syn", 1352 + "tokio", 1353 + "url", 1354 + ] 1355 + 1356 + [[package]] 1357 + name = "sqlx-mysql" 1358 + version = "0.8.6" 1359 + source = "registry+https://github.com/rust-lang/crates.io-index" 1360 + checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" 1361 + dependencies = [ 1362 + "atoi", 1363 + "base64", 1364 + "bitflags", 1365 + "byteorder", 1366 + "bytes", 1367 + "crc", 1368 + "digest", 1369 + "dotenvy", 1370 + "either", 1371 + "futures-channel", 1372 + "futures-core", 1373 + "futures-io", 1374 + "futures-util", 1375 + "generic-array", 1376 + "hex", 1377 + "hkdf", 1378 + "hmac", 1379 + "itoa", 1380 + "log", 1381 + "md-5", 1382 + "memchr", 1383 + "once_cell", 1384 + "percent-encoding", 1385 + "rand", 1386 + "rsa", 1387 + "serde", 1388 + "sha1", 1389 + "sha2", 1390 + "smallvec", 1391 + "sqlx-core", 1392 + "stringprep", 1393 + "thiserror", 1394 + "tracing", 1395 + "uuid", 1396 + "whoami", 1397 + ] 1398 + 1399 + [[package]] 1400 + name = "sqlx-postgres" 1401 + version = "0.8.6" 1402 + source = "registry+https://github.com/rust-lang/crates.io-index" 1403 + checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" 1404 + dependencies = [ 1405 + "atoi", 1406 + "base64", 1407 + "bitflags", 1408 + "byteorder", 1409 + "crc", 1410 + "dotenvy", 1411 + "etcetera", 1412 + "futures-channel", 1413 + "futures-core", 1414 + "futures-util", 1415 + "hex", 1416 + "hkdf", 1417 + "hmac", 1418 + "home", 1419 + "itoa", 1420 + "log", 1421 + "md-5", 1422 + "memchr", 1423 + "once_cell", 1424 + "rand", 1425 + "serde", 1426 + "serde_json", 1427 + "sha2", 1428 + "smallvec", 1429 + "sqlx-core", 1430 + "stringprep", 1431 + "thiserror", 1432 + "tracing", 1433 + "uuid", 1434 + "whoami", 1435 + ] 1436 + 1437 + [[package]] 1438 + name = "sqlx-sqlite" 1439 + version = "0.8.6" 1440 + source = "registry+https://github.com/rust-lang/crates.io-index" 1441 + checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" 1442 + dependencies = [ 1443 + "atoi", 1444 + "flume", 1445 + "futures-channel", 1446 + "futures-core", 1447 + "futures-executor", 1448 + "futures-intrusive", 1449 + "futures-util", 1450 + "libsqlite3-sys", 1451 + "log", 1452 + "percent-encoding", 1453 + "serde", 1454 + "serde_urlencoded", 1455 + "sqlx-core", 1456 + "thiserror", 1457 + "tracing", 1458 + "url", 1459 + "uuid", 1460 + ] 1461 + 1462 + [[package]] 1463 + name = "stable_deref_trait" 1464 + version = "1.2.1" 1465 + source = "registry+https://github.com/rust-lang/crates.io-index" 1466 + checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" 1467 + 1468 + [[package]] 1469 + name = "stringprep" 1470 + version = "0.1.5" 1471 + source = "registry+https://github.com/rust-lang/crates.io-index" 1472 + checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" 1473 + dependencies = [ 1474 + "unicode-bidi", 1475 + "unicode-normalization", 1476 + "unicode-properties", 1477 + ] 1478 + 1479 + [[package]] 1480 + name = "subtle" 1481 + version = "2.6.1" 1482 + source = "registry+https://github.com/rust-lang/crates.io-index" 1483 + checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 1484 + 1485 [[package]] 1486 name = "syn" 1487 version = "2.0.112" 1488 source = "registry+https://github.com/rust-lang/crates.io-index" 1489 + checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4" 1490 + dependencies = [ 1491 + "proc-macro2", 1492 + "quote", 1493 + "unicode-ident", 1494 + ] 1495 + 1496 + [[package]] 1497 + name = "sync_wrapper" 1498 + version = "1.0.2" 1499 + source = "registry+https://github.com/rust-lang/crates.io-index" 1500 + checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 1501 + 1502 + [[package]] 1503 + name = "synstructure" 1504 + version = "0.13.2" 1505 + source = "registry+https://github.com/rust-lang/crates.io-index" 1506 + checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" 1507 + dependencies = [ 1508 + "proc-macro2", 1509 + "quote", 1510 + "syn", 1511 + ] 1512 + 1513 + [[package]] 1514 + name = "thiserror" 1515 + version = "2.0.17" 1516 + source = "registry+https://github.com/rust-lang/crates.io-index" 1517 + checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" 1518 + dependencies = [ 1519 + "thiserror-impl", 1520 + ] 1521 + 1522 + [[package]] 1523 + name = "thiserror-impl" 1524 + version = "2.0.17" 1525 + source = "registry+https://github.com/rust-lang/crates.io-index" 1526 + checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" 1527 + dependencies = [ 1528 + "proc-macro2", 1529 + "quote", 1530 + "syn", 1531 + ] 1532 + 1533 + [[package]] 1534 + name = "tinystr" 1535 + version = "0.8.2" 1536 + source = "registry+https://github.com/rust-lang/crates.io-index" 1537 + checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" 1538 + dependencies = [ 1539 + "displaydoc", 1540 + "zerovec", 1541 + ] 1542 + 1543 + [[package]] 1544 + name = "tinyvec" 1545 + version = "1.10.0" 1546 + source = "registry+https://github.com/rust-lang/crates.io-index" 1547 + checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" 1548 dependencies = [ 1549 + "tinyvec_macros", 1550 ] 1551 1552 [[package]] 1553 + name = "tinyvec_macros" 1554 + version = "0.1.1" 1555 source = "registry+https://github.com/rust-lang/crates.io-index" 1556 + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1557 1558 [[package]] 1559 name = "tokio" ··· 1561 source = "registry+https://github.com/rust-lang/crates.io-index" 1562 checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" 1563 dependencies = [ 1564 + "bytes", 1565 "libc", 1566 "mio", 1567 "pin-project-lite", ··· 1581 "syn", 1582 ] 1583 1584 + [[package]] 1585 + name = "tokio-stream" 1586 + version = "0.1.17" 1587 + source = "registry+https://github.com/rust-lang/crates.io-index" 1588 + checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" 1589 + dependencies = [ 1590 + "futures-core", 1591 + "pin-project-lite", 1592 + "tokio", 1593 + ] 1594 + 1595 [[package]] 1596 name = "tower" 1597 version = "0.5.2" ··· 1642 dependencies = [ 1643 "log", 1644 "pin-project-lite", 1645 + "tracing-attributes", 1646 "tracing-core", 1647 ] 1648 1649 + [[package]] 1650 + name = "tracing-attributes" 1651 + version = "0.1.31" 1652 + source = "registry+https://github.com/rust-lang/crates.io-index" 1653 + checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" 1654 + dependencies = [ 1655 + "proc-macro2", 1656 + "quote", 1657 + "syn", 1658 + ] 1659 + 1660 [[package]] 1661 name = "tracing-core" 1662 version = "0.1.36" ··· 1666 "once_cell", 1667 ] 1668 1669 + [[package]] 1670 + name = "typenum" 1671 + version = "1.19.0" 1672 + source = "registry+https://github.com/rust-lang/crates.io-index" 1673 + checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" 1674 + 1675 + [[package]] 1676 + name = "unicode-bidi" 1677 + version = "0.3.18" 1678 + source = "registry+https://github.com/rust-lang/crates.io-index" 1679 + checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" 1680 + 1681 [[package]] 1682 name = "unicode-ident" 1683 version = "1.0.22" 1684 source = "registry+https://github.com/rust-lang/crates.io-index" 1685 checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" 1686 1687 + [[package]] 1688 + name = "unicode-normalization" 1689 + version = "0.1.25" 1690 + source = "registry+https://github.com/rust-lang/crates.io-index" 1691 + checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" 1692 + dependencies = [ 1693 + "tinyvec", 1694 + ] 1695 + 1696 + [[package]] 1697 + name = "unicode-properties" 1698 + version = "0.1.4" 1699 + source = "registry+https://github.com/rust-lang/crates.io-index" 1700 + checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" 1701 + 1702 + [[package]] 1703 + name = "untrusted" 1704 + version = "0.9.0" 1705 + source = "registry+https://github.com/rust-lang/crates.io-index" 1706 + checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 1707 + 1708 + [[package]] 1709 + name = "url" 1710 + version = "2.5.7" 1711 + source = "registry+https://github.com/rust-lang/crates.io-index" 1712 + checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" 1713 + dependencies = [ 1714 + "form_urlencoded", 1715 + "idna", 1716 + "percent-encoding", 1717 + "serde", 1718 + ] 1719 + 1720 + [[package]] 1721 + name = "utf8_iter" 1722 + version = "1.0.4" 1723 + source = "registry+https://github.com/rust-lang/crates.io-index" 1724 + checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 1725 + 1726 + [[package]] 1727 + name = "uuid" 1728 + version = "1.19.0" 1729 + source = "registry+https://github.com/rust-lang/crates.io-index" 1730 + checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" 1731 + dependencies = [ 1732 + "js-sys", 1733 + "wasm-bindgen", 1734 + ] 1735 + 1736 + [[package]] 1737 + name = "vcpkg" 1738 + version = "0.2.15" 1739 + source = "registry+https://github.com/rust-lang/crates.io-index" 1740 + checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1741 + 1742 + [[package]] 1743 + name = "version_check" 1744 + version = "0.9.5" 1745 + source = "registry+https://github.com/rust-lang/crates.io-index" 1746 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 1747 + 1748 [[package]] 1749 name = "wasi" 1750 version = "0.11.1+wasi-snapshot-preview1" 1751 source = "registry+https://github.com/rust-lang/crates.io-index" 1752 checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 1753 1754 + [[package]] 1755 + name = "wasite" 1756 + version = "0.1.0" 1757 + source = "registry+https://github.com/rust-lang/crates.io-index" 1758 + checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" 1759 + 1760 + [[package]] 1761 + name = "wasm-bindgen" 1762 + version = "0.2.106" 1763 + source = "registry+https://github.com/rust-lang/crates.io-index" 1764 + checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" 1765 + dependencies = [ 1766 + "cfg-if", 1767 + "once_cell", 1768 + "rustversion", 1769 + "wasm-bindgen-macro", 1770 + "wasm-bindgen-shared", 1771 + ] 1772 + 1773 + [[package]] 1774 + name = "wasm-bindgen-macro" 1775 + version = "0.2.106" 1776 + source = "registry+https://github.com/rust-lang/crates.io-index" 1777 + checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" 1778 + dependencies = [ 1779 + "quote", 1780 + "wasm-bindgen-macro-support", 1781 + ] 1782 + 1783 + [[package]] 1784 + name = "wasm-bindgen-macro-support" 1785 + version = "0.2.106" 1786 + source = "registry+https://github.com/rust-lang/crates.io-index" 1787 + checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" 1788 + dependencies = [ 1789 + "bumpalo", 1790 + "proc-macro2", 1791 + "quote", 1792 + "syn", 1793 + "wasm-bindgen-shared", 1794 + ] 1795 + 1796 + [[package]] 1797 + name = "wasm-bindgen-shared" 1798 + version = "0.2.106" 1799 + source = "registry+https://github.com/rust-lang/crates.io-index" 1800 + checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" 1801 + dependencies = [ 1802 + "unicode-ident", 1803 + ] 1804 + 1805 + [[package]] 1806 + name = "webpki-roots" 1807 + version = "0.26.11" 1808 + source = "registry+https://github.com/rust-lang/crates.io-index" 1809 + checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" 1810 + dependencies = [ 1811 + "webpki-roots 1.0.5", 1812 + ] 1813 + 1814 + [[package]] 1815 + name = "webpki-roots" 1816 + version = "1.0.5" 1817 + source = "registry+https://github.com/rust-lang/crates.io-index" 1818 + checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" 1819 + dependencies = [ 1820 + "rustls-pki-types", 1821 + ] 1822 + 1823 + [[package]] 1824 + name = "whoami" 1825 + version = "1.6.1" 1826 + source = "registry+https://github.com/rust-lang/crates.io-index" 1827 + checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" 1828 + dependencies = [ 1829 + "libredox", 1830 + "wasite", 1831 + ] 1832 + 1833 [[package]] 1834 name = "windows-link" 1835 version = "0.2.1" 1836 source = "registry+https://github.com/rust-lang/crates.io-index" 1837 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 1838 1839 + [[package]] 1840 + name = "windows-sys" 1841 + version = "0.48.0" 1842 + source = "registry+https://github.com/rust-lang/crates.io-index" 1843 + checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1844 + dependencies = [ 1845 + "windows-targets 0.48.5", 1846 + ] 1847 + 1848 + [[package]] 1849 + name = "windows-sys" 1850 + version = "0.52.0" 1851 + source = "registry+https://github.com/rust-lang/crates.io-index" 1852 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1853 + dependencies = [ 1854 + "windows-targets 0.52.6", 1855 + ] 1856 + 1857 [[package]] 1858 name = "windows-sys" 1859 version = "0.60.2" 1860 source = "registry+https://github.com/rust-lang/crates.io-index" 1861 checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" 1862 dependencies = [ 1863 + "windows-targets 0.53.5", 1864 ] 1865 1866 [[package]] ··· 1872 "windows-link", 1873 ] 1874 1875 + [[package]] 1876 + name = "windows-targets" 1877 + version = "0.48.5" 1878 + source = "registry+https://github.com/rust-lang/crates.io-index" 1879 + checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1880 + dependencies = [ 1881 + "windows_aarch64_gnullvm 0.48.5", 1882 + "windows_aarch64_msvc 0.48.5", 1883 + "windows_i686_gnu 0.48.5", 1884 + "windows_i686_msvc 0.48.5", 1885 + "windows_x86_64_gnu 0.48.5", 1886 + "windows_x86_64_gnullvm 0.48.5", 1887 + "windows_x86_64_msvc 0.48.5", 1888 + ] 1889 + 1890 + [[package]] 1891 + name = "windows-targets" 1892 + version = "0.52.6" 1893 + source = "registry+https://github.com/rust-lang/crates.io-index" 1894 + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1895 + dependencies = [ 1896 + "windows_aarch64_gnullvm 0.52.6", 1897 + "windows_aarch64_msvc 0.52.6", 1898 + "windows_i686_gnu 0.52.6", 1899 + "windows_i686_gnullvm 0.52.6", 1900 + "windows_i686_msvc 0.52.6", 1901 + "windows_x86_64_gnu 0.52.6", 1902 + "windows_x86_64_gnullvm 0.52.6", 1903 + "windows_x86_64_msvc 0.52.6", 1904 + ] 1905 + 1906 [[package]] 1907 name = "windows-targets" 1908 version = "0.53.5" ··· 1910 checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" 1911 dependencies = [ 1912 "windows-link", 1913 + "windows_aarch64_gnullvm 0.53.1", 1914 + "windows_aarch64_msvc 0.53.1", 1915 + "windows_i686_gnu 0.53.1", 1916 + "windows_i686_gnullvm 0.53.1", 1917 + "windows_i686_msvc 0.53.1", 1918 + "windows_x86_64_gnu 0.53.1", 1919 + "windows_x86_64_gnullvm 0.53.1", 1920 + "windows_x86_64_msvc 0.53.1", 1921 ] 1922 1923 + [[package]] 1924 + name = "windows_aarch64_gnullvm" 1925 + version = "0.48.5" 1926 + source = "registry+https://github.com/rust-lang/crates.io-index" 1927 + checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1928 + 1929 + [[package]] 1930 + name = "windows_aarch64_gnullvm" 1931 + version = "0.52.6" 1932 + source = "registry+https://github.com/rust-lang/crates.io-index" 1933 + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1934 + 1935 [[package]] 1936 name = "windows_aarch64_gnullvm" 1937 version = "0.53.1" 1938 source = "registry+https://github.com/rust-lang/crates.io-index" 1939 checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" 1940 1941 + [[package]] 1942 + name = "windows_aarch64_msvc" 1943 + version = "0.48.5" 1944 + source = "registry+https://github.com/rust-lang/crates.io-index" 1945 + checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1946 + 1947 + [[package]] 1948 + name = "windows_aarch64_msvc" 1949 + version = "0.52.6" 1950 + source = "registry+https://github.com/rust-lang/crates.io-index" 1951 + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1952 + 1953 [[package]] 1954 name = "windows_aarch64_msvc" 1955 version = "0.53.1" 1956 source = "registry+https://github.com/rust-lang/crates.io-index" 1957 checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" 1958 1959 + [[package]] 1960 + name = "windows_i686_gnu" 1961 + version = "0.48.5" 1962 + source = "registry+https://github.com/rust-lang/crates.io-index" 1963 + checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1964 + 1965 + [[package]] 1966 + name = "windows_i686_gnu" 1967 + version = "0.52.6" 1968 + source = "registry+https://github.com/rust-lang/crates.io-index" 1969 + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1970 + 1971 [[package]] 1972 name = "windows_i686_gnu" 1973 version = "0.53.1" 1974 source = "registry+https://github.com/rust-lang/crates.io-index" 1975 checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" 1976 1977 + [[package]] 1978 + name = "windows_i686_gnullvm" 1979 + version = "0.52.6" 1980 + source = "registry+https://github.com/rust-lang/crates.io-index" 1981 + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1982 + 1983 [[package]] 1984 name = "windows_i686_gnullvm" 1985 version = "0.53.1" 1986 source = "registry+https://github.com/rust-lang/crates.io-index" 1987 checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" 1988 1989 + [[package]] 1990 + name = "windows_i686_msvc" 1991 + version = "0.48.5" 1992 + source = "registry+https://github.com/rust-lang/crates.io-index" 1993 + checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1994 + 1995 + [[package]] 1996 + name = "windows_i686_msvc" 1997 + version = "0.52.6" 1998 + source = "registry+https://github.com/rust-lang/crates.io-index" 1999 + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2000 + 2001 [[package]] 2002 name = "windows_i686_msvc" 2003 version = "0.53.1" 2004 source = "registry+https://github.com/rust-lang/crates.io-index" 2005 checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" 2006 2007 + [[package]] 2008 + name = "windows_x86_64_gnu" 2009 + version = "0.48.5" 2010 + source = "registry+https://github.com/rust-lang/crates.io-index" 2011 + checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2012 + 2013 + [[package]] 2014 + name = "windows_x86_64_gnu" 2015 + version = "0.52.6" 2016 + source = "registry+https://github.com/rust-lang/crates.io-index" 2017 + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2018 + 2019 [[package]] 2020 name = "windows_x86_64_gnu" 2021 version = "0.53.1" 2022 source = "registry+https://github.com/rust-lang/crates.io-index" 2023 checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" 2024 2025 + [[package]] 2026 + name = "windows_x86_64_gnullvm" 2027 + version = "0.48.5" 2028 + source = "registry+https://github.com/rust-lang/crates.io-index" 2029 + checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2030 + 2031 + [[package]] 2032 + name = "windows_x86_64_gnullvm" 2033 + version = "0.52.6" 2034 + source = "registry+https://github.com/rust-lang/crates.io-index" 2035 + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2036 + 2037 [[package]] 2038 name = "windows_x86_64_gnullvm" 2039 version = "0.53.1" 2040 source = "registry+https://github.com/rust-lang/crates.io-index" 2041 checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" 2042 2043 + [[package]] 2044 + name = "windows_x86_64_msvc" 2045 + version = "0.48.5" 2046 + source = "registry+https://github.com/rust-lang/crates.io-index" 2047 + checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2048 + 2049 + [[package]] 2050 + name = "windows_x86_64_msvc" 2051 + version = "0.52.6" 2052 + source = "registry+https://github.com/rust-lang/crates.io-index" 2053 + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2054 + 2055 [[package]] 2056 name = "windows_x86_64_msvc" 2057 version = "0.53.1" 2058 source = "registry+https://github.com/rust-lang/crates.io-index" 2059 checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" 2060 2061 + [[package]] 2062 + name = "writeable" 2063 + version = "0.6.2" 2064 + source = "registry+https://github.com/rust-lang/crates.io-index" 2065 + checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" 2066 + 2067 + [[package]] 2068 + name = "yoke" 2069 + version = "0.8.1" 2070 + source = "registry+https://github.com/rust-lang/crates.io-index" 2071 + checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" 2072 + dependencies = [ 2073 + "stable_deref_trait", 2074 + "yoke-derive", 2075 + "zerofrom", 2076 + ] 2077 + 2078 + [[package]] 2079 + name = "yoke-derive" 2080 + version = "0.8.1" 2081 + source = "registry+https://github.com/rust-lang/crates.io-index" 2082 + checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" 2083 + dependencies = [ 2084 + "proc-macro2", 2085 + "quote", 2086 + "syn", 2087 + "synstructure", 2088 + ] 2089 + 2090 + [[package]] 2091 + name = "zerocopy" 2092 + version = "0.8.31" 2093 + source = "registry+https://github.com/rust-lang/crates.io-index" 2094 + checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" 2095 + dependencies = [ 2096 + "zerocopy-derive", 2097 + ] 2098 + 2099 + [[package]] 2100 + name = "zerocopy-derive" 2101 + version = "0.8.31" 2102 + source = "registry+https://github.com/rust-lang/crates.io-index" 2103 + checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" 2104 + dependencies = [ 2105 + "proc-macro2", 2106 + "quote", 2107 + "syn", 2108 + ] 2109 + 2110 + [[package]] 2111 + name = "zerofrom" 2112 + version = "0.1.6" 2113 + source = "registry+https://github.com/rust-lang/crates.io-index" 2114 + checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 2115 + dependencies = [ 2116 + "zerofrom-derive", 2117 + ] 2118 + 2119 + [[package]] 2120 + name = "zerofrom-derive" 2121 + version = "0.1.6" 2122 + source = "registry+https://github.com/rust-lang/crates.io-index" 2123 + checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 2124 + dependencies = [ 2125 + "proc-macro2", 2126 + "quote", 2127 + "syn", 2128 + "synstructure", 2129 + ] 2130 + 2131 + [[package]] 2132 + name = "zeroize" 2133 + version = "1.8.2" 2134 + source = "registry+https://github.com/rust-lang/crates.io-index" 2135 + checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" 2136 + 2137 + [[package]] 2138 + name = "zerotrie" 2139 + version = "0.2.3" 2140 + source = "registry+https://github.com/rust-lang/crates.io-index" 2141 + checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" 2142 + dependencies = [ 2143 + "displaydoc", 2144 + "yoke", 2145 + "zerofrom", 2146 + ] 2147 + 2148 + [[package]] 2149 + name = "zerovec" 2150 + version = "0.11.5" 2151 + source = "registry+https://github.com/rust-lang/crates.io-index" 2152 + checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" 2153 + dependencies = [ 2154 + "yoke", 2155 + "zerofrom", 2156 + "zerovec-derive", 2157 + ] 2158 + 2159 + [[package]] 2160 + name = "zerovec-derive" 2161 + version = "0.11.2" 2162 + source = "registry+https://github.com/rust-lang/crates.io-index" 2163 + checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" 2164 + dependencies = [ 2165 + "proc-macro2", 2166 + "quote", 2167 + "syn", 2168 + ] 2169 + 2170 [[package]] 2171 name = "zmij" 2172 version = "1.0.8"
+3 -1
menu/Cargo.toml
··· 8 edition = "2024" 9 10 [dependencies] 11 - axum = "0.8.8" 12 tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] } 13 tower-http = { version = "0.6.8", features = ["normalize-path"] } 14 tower-layer = "0.3.3"
··· 8 edition = "2024" 9 10 [dependencies] 11 + axum = { version = "0.8.8", features = ["macros"] } 12 + serde = { version = "1.0.228", features = ["derive"] } 13 + sqlx = { version = "0.8.6", features = ["runtime-tokio", "tls-rustls-ring-webpki", "postgres", "uuid", "macros"] } 14 tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] } 15 tower-http = { version = "0.6.8", features = ["normalize-path"] } 16 tower-layer = "0.3.3"
+103
menu/devenv.lock
···
··· 1 + { 2 + "nodes": { 3 + "devenv": { 4 + "locked": { 5 + "dir": "src/modules", 6 + "lastModified": 1767442681, 7 + "owner": "cachix", 8 + "repo": "devenv", 9 + "rev": "2f48604a0a850d000812d94cf5f3d04ad6ae66ce", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "dir": "src/modules", 14 + "owner": "cachix", 15 + "repo": "devenv", 16 + "type": "github" 17 + } 18 + }, 19 + "flake-compat": { 20 + "flake": false, 21 + "locked": { 22 + "lastModified": 1767039857, 23 + "owner": "NixOS", 24 + "repo": "flake-compat", 25 + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", 26 + "type": "github" 27 + }, 28 + "original": { 29 + "owner": "NixOS", 30 + "repo": "flake-compat", 31 + "type": "github" 32 + } 33 + }, 34 + "git-hooks": { 35 + "inputs": { 36 + "flake-compat": "flake-compat", 37 + "gitignore": "gitignore", 38 + "nixpkgs": [ 39 + "nixpkgs" 40 + ] 41 + }, 42 + "locked": { 43 + "lastModified": 1767281941, 44 + "owner": "cachix", 45 + "repo": "git-hooks.nix", 46 + "rev": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa", 47 + "type": "github" 48 + }, 49 + "original": { 50 + "owner": "cachix", 51 + "repo": "git-hooks.nix", 52 + "type": "github" 53 + } 54 + }, 55 + "gitignore": { 56 + "inputs": { 57 + "nixpkgs": [ 58 + "git-hooks", 59 + "nixpkgs" 60 + ] 61 + }, 62 + "locked": { 63 + "lastModified": 1762808025, 64 + "owner": "hercules-ci", 65 + "repo": "gitignore.nix", 66 + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", 67 + "type": "github" 68 + }, 69 + "original": { 70 + "owner": "hercules-ci", 71 + "repo": "gitignore.nix", 72 + "type": "github" 73 + } 74 + }, 75 + "nixpkgs": { 76 + "locked": { 77 + "lastModified": 1767052823, 78 + "owner": "cachix", 79 + "repo": "devenv-nixpkgs", 80 + "rev": "538a5124359f0b3d466e1160378c87887e3b51a4", 81 + "type": "github" 82 + }, 83 + "original": { 84 + "owner": "cachix", 85 + "ref": "rolling", 86 + "repo": "devenv-nixpkgs", 87 + "type": "github" 88 + } 89 + }, 90 + "root": { 91 + "inputs": { 92 + "devenv": "devenv", 93 + "git-hooks": "git-hooks", 94 + "nixpkgs": "nixpkgs", 95 + "pre-commit-hooks": [ 96 + "git-hooks" 97 + ] 98 + } 99 + } 100 + }, 101 + "root": "root", 102 + "version": 7 103 + }
+10
menu/devenv.nix
···
··· 1 + { pkgs, ... }: 2 + { 3 + services.postgres = { 4 + enable = true; 5 + initialDatabases = [ 6 + { name = "menu"; } 7 + ]; 8 + }; 9 + } 10 +
+4
menu/migrations/20260103193240_add-direct.sql
···
··· 1 + CREATE TABLE "direct" ( 2 + "from" varchar PRIMARY KEY, 3 + "to" varchar NOT NULL 4 + );
+1
menu/migrations/20260103201130_add-direct-owner.sql
···
··· 1 + ALTER TABLE "direct" ADD COLUMN "owner" varchar NOT NULL;
+2
menu/project.nix
··· 47 shell = 48 { 49 bacon, 50 fenix, 51 mkShell, 52 pkg-config, ··· 67 inherit pkgs; 68 inherit (stdenv.hostPlatform) system; 69 }) 70 pkg-config 71 reuse 72 (fenix.complete.withComponents [
··· 47 shell = 48 { 49 bacon, 50 + devenv, 51 fenix, 52 mkShell, 53 pkg-config, ··· 68 inherit pkgs; 69 inherit (stdenv.hostPlatform) system; 70 }) 71 + devenv 72 pkg-config 73 reuse 74 (fenix.complete.withComponents [
+19
menu/src/html/create.html
···
··· 1 + <html> 2 + <head> 3 + <title>Add shortlink</title> 4 + </head> 5 + 6 + <body> 7 + <form action="" method="post"> 8 + <div> 9 + <label for="from">When I go to {host}/</label><!-- 10 + --><input type="text" name="from" id="from" placeholder="kagi" value="{path}" required /> 11 + </div> 12 + <div> 13 + <label for="to">Send me to </label> 14 + <input type="text" name="to" id="to" placeholder="https://kagi.com" required /> 15 + </div> 16 + <input type="submit" value="Add shortlink" /> 17 + </form> 18 + </body> 19 + </html>
+144 -6
menu/src/main.rs
··· 3 // SPDX-License-Identifier: MIT 4 5 use axum::{ 6 - Router, ServiceExt, 7 extract::{Path, Query, Request}, 8 - http::StatusCode, 9 - response::{IntoResponse, Redirect}, 10 - routing::get, 11 }; 12 - use std::{collections::HashMap, env}; 13 use tower_http::normalize_path::NormalizePathLayer; 14 use tower_layer::Layer; 15 16 async fn get_redirect(default_location: &str, go: &str) -> Redirect { 17 - Redirect::temporary(&("".to_string() + default_location + go)) 18 } 19 20 async fn get_redirect_base(go: &str) -> Redirect { ··· 41 } 42 } 43 44 async fn handle_404() -> impl IntoResponse { 45 (StatusCode::NOT_FOUND, "Not Found") 46 } 47 48 #[tokio::main] 49 async fn main() { 50 let router = Router::new() 51 .route("/", get(handle_root)) 52 .route("/_/search", get(handle_search)) 53 .route("/_/{*route}", get(handle_404)) 54 .route("/{*go}", get(handle_base));
··· 3 // SPDX-License-Identifier: MIT 4 5 use axum::{ 6 + Form, Router, ServiceExt, 7 + body::Body, 8 extract::{Path, Query, Request}, 9 + http::{HeaderMap, Response, StatusCode}, 10 + response::{Html, IntoResponse, Redirect}, 11 + routing::{get, post}, 12 }; 13 + use serde::Deserialize; 14 + use sqlx::{Connection, PgConnection}; 15 + use std::{collections::HashMap, env, ops::DerefMut, sync::OnceLock}; 16 + use tokio::sync::Mutex; 17 use tower_http::normalize_path::NormalizePathLayer; 18 use tower_layer::Layer; 19 20 + fn template_html(html: &str, replacements: &HashMap<&str, Option<&str>>) -> String { 21 + let mut result = html.to_owned(); 22 + for (&text, &maybe_replacement) in replacements { 23 + if let Some(replacement) = maybe_replacement { 24 + result = result.replace(&("{".to_owned() + text + "}"), replacement) 25 + } 26 + } 27 + 28 + result 29 + } 30 + 31 + #[derive(Debug)] 32 + struct State { 33 + sqlx_connection: Mutex<PgConnection>, 34 + } 35 + static STATE: OnceLock<State> = OnceLock::new(); 36 + 37 + const ALLOWED_HOSTS: &'static [&'static str] = &[ 38 + "go", 39 + "go.search.freshly.space", 40 + "menu.freshlybakedca.ke", 41 + "starry.sk", 42 + ]; 43 + 44 + fn clean_host(provided_host: &str) -> &str { 45 + if ALLOWED_HOSTS.contains(&provided_host) { 46 + return provided_host; 47 + } 48 + 49 + return "go"; 50 + } 51 + 52 async fn get_redirect(default_location: &str, go: &str) -> Redirect { 53 + let redirect = sqlx::query!(r#"SELECT ("to") FROM direct WHERE "from" = $1 LIMIT 1"#, go) 54 + .fetch_one( 55 + STATE 56 + .get() 57 + .expect("Server must be initialized before processing connections") 58 + .sqlx_connection 59 + .lock() 60 + .await 61 + .deref_mut(), 62 + ) 63 + .await; 64 + 65 + if let Ok(record) = redirect { 66 + Redirect::temporary(&record.to) 67 + } else { 68 + Redirect::temporary(&("".to_string() + default_location + go)) 69 + } 70 } 71 72 async fn get_redirect_base(go: &str) -> Redirect { ··· 93 } 94 } 95 96 + async fn handle_create_page( 97 + Query(params): Query<HashMap<String, String>>, 98 + headers: HeaderMap, 99 + ) -> Html<String> { 100 + Html(template_html( 101 + include_str!("./html/create.html"), 102 + &HashMap::from([ 103 + ( 104 + "host", 105 + Some(clean_host( 106 + headers 107 + .get("host") 108 + .and_then(|header| Some(header.to_str().unwrap_or_else(|_| "go"))) 109 + .unwrap_or_else(|| "go"), 110 + )), 111 + ), 112 + ( 113 + "path", 114 + params.get("path").and_then(|path| Some(path.as_str())), 115 + ), 116 + ]), 117 + )) 118 + } 119 + 120 + #[derive(Deserialize)] 121 + struct Create { 122 + from: String, 123 + to: String, 124 + } 125 + 126 + #[axum::debug_handler] 127 + async fn handle_create_post(headers: HeaderMap, Form(create): Form<Create>) -> Response<Body> { 128 + let Some(Ok(owner)) = headers 129 + .get("X-Webauth-Login") 130 + .and_then(|header| Some(header.to_str())) 131 + else { 132 + return (StatusCode::UNAUTHORIZED, "Access over Tailscale only").into_response(); 133 + }; 134 + 135 + let create_call = sqlx::query!( 136 + r#"INSERT INTO direct ("from", "to", "owner") VALUES ($1, $2, $3)"#, 137 + create.from, 138 + create.to, 139 + owner, 140 + ) 141 + .execute( 142 + STATE 143 + .get() 144 + .expect("Server must be initialized before processing connections") 145 + .sqlx_connection 146 + .lock() 147 + .await 148 + .deref_mut(), 149 + ) 150 + .await; 151 + 152 + if create_call.is_ok() { 153 + Redirect::to(&format!("/_/created?path={}", create.from)).into_response() 154 + } else { 155 + Redirect::to(&format!("/_/createFailed?path={}", create.from)).into_response() 156 + } 157 + } 158 + 159 async fn handle_404() -> impl IntoResponse { 160 (StatusCode::NOT_FOUND, "Not Found") 161 } 162 163 #[tokio::main] 164 async fn main() { 165 + let mut connection = PgConnection::connect( 166 + env::var("DATABASE_URL") 167 + .expect( 168 + "Please ensure you set your database URL in the $DATABASE_URL environment variable", 169 + ) 170 + .as_str(), 171 + ) 172 + .await 173 + .expect("Failed to connect to database defined in $DATABASE_URL"); 174 + 175 + sqlx::migrate!() 176 + .run(&mut connection) 177 + .await 178 + .expect("Failed to run database migrations"); 179 + 180 + STATE 181 + .set(State { 182 + sqlx_connection: Mutex::new(connection), 183 + }) 184 + .expect("Consistency issue: failed to set STATE - was it already set?"); 185 + 186 let router = Router::new() 187 .route("/", get(handle_root)) 188 + .route("/_/create", get(handle_create_page)) 189 + .route("/_/create", post(handle_create_post)) 190 .route("/_/search", get(handle_search)) 191 .route("/_/{*route}", get(handle_404)) 192 .route("/{*go}", get(handle_base));
+16 -1
packetmix/systems/teal/menu.nix
··· 17 18 systemd.services.menu = { 19 wantedBy = [ "default.target" ]; 20 script = '' 21 ${project.packages.menu.result.${system}}/bin/menu 22 ''; ··· 25 Group = "menu"; 26 PrivateTmp = true; 27 }; 28 - environment.BIND_ADDR = "127.0.0.1:1038"; 29 }; 30 31 services.headscale.settings.dns.extra_records = [
··· 17 18 systemd.services.menu = { 19 wantedBy = [ "default.target" ]; 20 + wants = [ "postgresql.service" ]; 21 script = '' 22 ${project.packages.menu.result.${system}}/bin/menu 23 ''; ··· 26 Group = "menu"; 27 PrivateTmp = true; 28 }; 29 + environment = { 30 + BIND_ADDR = "127.0.0.1:1038"; 31 + DATABASE_URL = "postgresql:///menu?host=/run/postgresql"; 32 + }; 33 + }; 34 + 35 + services.postgresql = { 36 + enable = true; 37 + ensureDatabases = [ "menu" ]; 38 + ensureUsers = [ 39 + { 40 + name = "menu"; 41 + ensureDBOwnership = true; 42 + } 43 + ]; 44 }; 45 46 services.headscale.settings.dns.extra_records = [