summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-02-12 16:00:45 +0100
committerGitHub <[email protected]>2024-02-12 16:00:45 +0100
commitc663810817183c8f92a4279236ca84d271365088 (patch)
tree0c844cc883e5e474a9cdad30004108852f13f903
parentda6367885d31698464e1bec122e3e673974427c6 (diff)
parent9139d76cb1cf462820b2ddfa80d9a8d55bb30996 (diff)
downloadwebol-c663810817183c8f92a4279236ca84d271365088.tar
webol-c663810817183c8f92a4279236ca84d271365088.tar.gz
webol-c663810817183c8f92a4279236ca84d271365088.zip
Merge pull request #14 from FxQnLr/axum7
Axum7 & config changes
-rw-r--r--.github/workflows/pull_request.yml45
-rw-r--r--.gitignore1
-rw-r--r--Cargo.lock909
-rw-r--r--Cargo.toml30
-rw-r--r--Dockerfile15
-rw-r--r--README.md4
-rw-r--r--src/auth.rs24
-rw-r--r--src/config.rs32
-rw-r--r--src/db.rs16
-rw-r--r--src/error.rs8
-rw-r--r--src/main.rs41
-rw-r--r--src/routes/device.rs28
-rw-r--r--src/routes/start.rs76
-rw-r--r--src/routes/status.rs2
-rw-r--r--src/services/ping.rs84
-rw-r--r--src/wol.rs14
16 files changed, 789 insertions, 540 deletions
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 279e16d..7196d4e 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -1,35 +1,32 @@
1name: check 1name: check
2 2
3on: 3on: [ pull_request, workflow_dispatch ]
4 pull_request:
5 branches: [ "main" ]
6 workflow_dispatch:
7 4
8env: 5env:
9 SCCACHE_GHA_ENABLED: "true" 6 SCCACHE_GHA_ENABLED: "true"
10 RUSTC_WRAPPER: "sccache" 7 RUSTC_WRAPPER: "sccache"
11 SQLX_OFFLINE: "true" 8 SQLX_OFFLINE: "true"
12 CARGO_TERM_COLOR: always 9 CARGO_TERM_COLOR: always
13 10
14jobs: 11jobs:
15 check: 12 check:
16 runs-on: ubuntu-latest 13 runs-on: ubuntu-latest
17 steps: 14 steps:
18 - name: Run sccache-cache 15 - name: Run sccache-cache
19 uses: mozilla-actions/[email protected] 16 uses: mozilla-actions/[email protected]
20 17
21 - uses: actions/checkout@v4 18 - uses: actions/checkout@v4
22 19
23 - run: cargo check 20 - run: cargo check
24 - run: cargo clippy 21 - run: cargo clippy
25 22
26 check-release: 23 check-release:
27 runs-on: ubuntu-latest 24 runs-on: ubuntu-latest
28 steps: 25 steps:
29 - name: Run sccache-cache 26 - name: Run sccache-cache
30 uses: mozilla-actions/[email protected] 27 uses: mozilla-actions/[email protected]
31 28
32 - uses: actions/checkout@v4 29 - uses: actions/checkout@v4
33 30
34 - run: cargo check --release 31 - run: cargo check --release
35 - run: cargo clippy --release \ No newline at end of file 32 - run: cargo clippy --release
diff --git a/.gitignore b/.gitignore
index bf0eacb..0fd9734 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,5 +11,6 @@ target/
11 11
12*.sqlite* 12*.sqlite*
13.env 13.env
14config.*
14 15
15.idea 16.idea
diff --git a/Cargo.lock b/Cargo.lock
index 8f62060..f95052b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -19,20 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
19 19
20[[package]] 20[[package]]
21name = "ahash" 21name = "ahash"
22version = "0.7.7" 22version = "0.8.8"
23source = "registry+https://github.com/rust-lang/crates.io-index" 23source = "registry+https://github.com/rust-lang/crates.io-index"
24checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" 24checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"
25dependencies = [
26 "getrandom",
27 "once_cell",
28 "version_check",
29]
30
31[[package]]
32name = "ahash"
33version = "0.8.6"
34source = "registry+https://github.com/rust-lang/crates.io-index"
35checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
36dependencies = [ 25dependencies = [
37 "cfg-if", 26 "cfg-if",
38 "getrandom", 27 "getrandom",
@@ -58,13 +47,13 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
58 47
59[[package]] 48[[package]]
60name = "async-trait" 49name = "async-trait"
61version = "0.1.74" 50version = "0.1.77"
62source = "registry+https://github.com/rust-lang/crates.io-index" 51source = "registry+https://github.com/rust-lang/crates.io-index"
63checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" 52checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
64dependencies = [ 53dependencies = [
65 "proc-macro2", 54 "proc-macro2",
66 "quote", 55 "quote",
67 "syn 2.0.38", 56 "syn 2.0.48",
68] 57]
69 58
70[[package]] 59[[package]]
@@ -77,6 +66,16 @@ dependencies = [
77] 66]
78 67
79[[package]] 68[[package]]
69name = "atomic-write-file"
70version = "0.1.2"
71source = "registry+https://github.com/rust-lang/crates.io-index"
72checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436"
73dependencies = [
74 "nix",
75 "rand",
76]
77
78[[package]]
80name = "autocfg" 79name = "autocfg"
81version = "1.1.0" 80version = "1.1.0"
82source = "registry+https://github.com/rust-lang/crates.io-index" 81source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -84,20 +83,20 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
84 83
85[[package]] 84[[package]]
86name = "axum" 85name = "axum"
87version = "0.6.20" 86version = "0.7.4"
88source = "registry+https://github.com/rust-lang/crates.io-index" 87source = "registry+https://github.com/rust-lang/crates.io-index"
89checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" 88checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e"
90dependencies = [ 89dependencies = [
91 "async-trait", 90 "async-trait",
92 "axum-core", 91 "axum-core",
93 "base64 0.21.5", 92 "base64",
94 "bitflags 1.3.2",
95 "bytes", 93 "bytes",
96 "futures-util", 94 "futures-util",
97 "headers",
98 "http", 95 "http",
99 "http-body", 96 "http-body",
97 "http-body-util",
100 "hyper", 98 "hyper",
99 "hyper-util",
101 "itoa", 100 "itoa",
102 "matchit", 101 "matchit",
103 "memchr", 102 "memchr",
@@ -116,35 +115,40 @@ dependencies = [
116 "tower", 115 "tower",
117 "tower-layer", 116 "tower-layer",
118 "tower-service", 117 "tower-service",
118 "tracing",
119] 119]
120 120
121[[package]] 121[[package]]
122name = "axum-core" 122name = "axum-core"
123version = "0.3.4" 123version = "0.4.3"
124source = "registry+https://github.com/rust-lang/crates.io-index" 124source = "registry+https://github.com/rust-lang/crates.io-index"
125checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" 125checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
126dependencies = [ 126dependencies = [
127 "async-trait", 127 "async-trait",
128 "bytes", 128 "bytes",
129 "futures-util", 129 "futures-util",
130 "http", 130 "http",
131 "http-body", 131 "http-body",
132 "http-body-util",
132 "mime", 133 "mime",
134 "pin-project-lite",
133 "rustversion", 135 "rustversion",
136 "sync_wrapper",
134 "tower-layer", 137 "tower-layer",
135 "tower-service", 138 "tower-service",
139 "tracing",
136] 140]
137 141
138[[package]] 142[[package]]
139name = "axum-macros" 143name = "axum-macros"
140version = "0.3.8" 144version = "0.4.1"
141source = "registry+https://github.com/rust-lang/crates.io-index" 145source = "registry+https://github.com/rust-lang/crates.io-index"
142checksum = "cdca6a10ecad987bda04e95606ef85a5417dcaac1a78455242d72e031e2b6b62" 146checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa"
143dependencies = [ 147dependencies = [
144 "heck", 148 "heck",
145 "proc-macro2", 149 "proc-macro2",
146 "quote", 150 "quote",
147 "syn 2.0.38", 151 "syn 2.0.48",
148] 152]
149 153
150[[package]] 154[[package]]
@@ -164,15 +168,9 @@ dependencies = [
164 168
165[[package]] 169[[package]]
166name = "base64" 170name = "base64"
167version = "0.13.1" 171version = "0.21.7"
168source = "registry+https://github.com/rust-lang/crates.io-index"
169checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
170
171[[package]]
172name = "base64"
173version = "0.21.5"
174source = "registry+https://github.com/rust-lang/crates.io-index" 172source = "registry+https://github.com/rust-lang/crates.io-index"
175checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" 173checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
176 174
177[[package]] 175[[package]]
178name = "base64ct" 176name = "base64ct"
@@ -188,9 +186,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
188 186
189[[package]] 187[[package]]
190name = "bitflags" 188name = "bitflags"
191version = "2.4.1" 189version = "2.4.2"
192source = "registry+https://github.com/rust-lang/crates.io-index" 190source = "registry+https://github.com/rust-lang/crates.io-index"
193checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" 191checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
194dependencies = [ 192dependencies = [
195 "serde", 193 "serde",
196] 194]
@@ -232,12 +230,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
232checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 230checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
233 231
234[[package]] 232[[package]]
233name = "color-eyre"
234version = "0.6.2"
235source = "registry+https://github.com/rust-lang/crates.io-index"
236checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204"
237dependencies = [
238 "backtrace",
239 "color-spantrace",
240 "eyre",
241 "indenter",
242 "once_cell",
243 "owo-colors",
244 "tracing-error",
245]
246
247[[package]]
248name = "color-spantrace"
249version = "0.2.1"
250source = "registry+https://github.com/rust-lang/crates.io-index"
251checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2"
252dependencies = [
253 "once_cell",
254 "owo-colors",
255 "tracing-core",
256 "tracing-error",
257]
258
259[[package]]
235name = "config" 260name = "config"
236version = "0.13.3" 261version = "0.14.0"
237source = "registry+https://github.com/rust-lang/crates.io-index" 262source = "registry+https://github.com/rust-lang/crates.io-index"
238checksum = "d379af7f68bfc21714c6c7dea883544201741d2ce8274bb12fa54f89507f52a7" 263checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be"
239dependencies = [ 264dependencies = [
240 "async-trait", 265 "async-trait",
266 "convert_case",
241 "json5", 267 "json5",
242 "lazy_static", 268 "lazy_static",
243 "nom", 269 "nom",
@@ -252,15 +278,44 @@ dependencies = [
252 278
253[[package]] 279[[package]]
254name = "const-oid" 280name = "const-oid"
255version = "0.9.5" 281version = "0.9.6"
256source = "registry+https://github.com/rust-lang/crates.io-index" 282source = "registry+https://github.com/rust-lang/crates.io-index"
257checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" 283checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
284
285[[package]]
286name = "const-random"
287version = "0.1.17"
288source = "registry+https://github.com/rust-lang/crates.io-index"
289checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a"
290dependencies = [
291 "const-random-macro",
292]
293
294[[package]]
295name = "const-random-macro"
296version = "0.1.16"
297source = "registry+https://github.com/rust-lang/crates.io-index"
298checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
299dependencies = [
300 "getrandom",
301 "once_cell",
302 "tiny-keccak",
303]
304
305[[package]]
306name = "convert_case"
307version = "0.6.0"
308source = "registry+https://github.com/rust-lang/crates.io-index"
309checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
310dependencies = [
311 "unicode-segmentation",
312]
258 313
259[[package]] 314[[package]]
260name = "cpufeatures" 315name = "cpufeatures"
261version = "0.2.11" 316version = "0.2.12"
262source = "registry+https://github.com/rust-lang/crates.io-index" 317source = "registry+https://github.com/rust-lang/crates.io-index"
263checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" 318checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
264dependencies = [ 319dependencies = [
265 "libc", 320 "libc",
266] 321]
@@ -276,28 +331,30 @@ dependencies = [
276 331
277[[package]] 332[[package]]
278name = "crc-catalog" 333name = "crc-catalog"
279version = "2.3.0" 334version = "2.4.0"
280source = "registry+https://github.com/rust-lang/crates.io-index" 335source = "registry+https://github.com/rust-lang/crates.io-index"
281checksum = "4939f9ed1444bd8c896d37f3090012fa6e7834fe84ef8c9daa166109515732f9" 336checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
282 337
283[[package]] 338[[package]]
284name = "crossbeam-queue" 339name = "crossbeam-queue"
285version = "0.3.8" 340version = "0.3.11"
286source = "registry+https://github.com/rust-lang/crates.io-index" 341source = "registry+https://github.com/rust-lang/crates.io-index"
287checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" 342checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35"
288dependencies = [ 343dependencies = [
289 "cfg-if",
290 "crossbeam-utils", 344 "crossbeam-utils",
291] 345]
292 346
293[[package]] 347[[package]]
294name = "crossbeam-utils" 348name = "crossbeam-utils"
295version = "0.8.16" 349version = "0.8.19"
296source = "registry+https://github.com/rust-lang/crates.io-index" 350source = "registry+https://github.com/rust-lang/crates.io-index"
297checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 351checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
298dependencies = [ 352
299 "cfg-if", 353[[package]]
300] 354name = "crunchy"
355version = "0.2.2"
356source = "registry+https://github.com/rust-lang/crates.io-index"
357checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
301 358
302[[package]] 359[[package]]
303name = "crypto-common" 360name = "crypto-common"
@@ -316,7 +373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
316checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" 373checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
317dependencies = [ 374dependencies = [
318 "cfg-if", 375 "cfg-if",
319 "hashbrown 0.14.2", 376 "hashbrown 0.14.3",
320 "lock_api", 377 "lock_api",
321 "once_cell", 378 "once_cell",
322 "parking_lot_core", 379 "parking_lot_core",
@@ -324,9 +381,9 @@ dependencies = [
324 381
325[[package]] 382[[package]]
326name = "data-encoding" 383name = "data-encoding"
327version = "2.4.0" 384version = "2.5.0"
328source = "registry+https://github.com/rust-lang/crates.io-index" 385source = "registry+https://github.com/rust-lang/crates.io-index"
329checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" 386checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
330 387
331[[package]] 388[[package]]
332name = "der" 389name = "der"
@@ -341,9 +398,9 @@ dependencies = [
341 398
342[[package]] 399[[package]]
343name = "deranged" 400name = "deranged"
344version = "0.3.9" 401version = "0.3.11"
345source = "registry+https://github.com/rust-lang/crates.io-index" 402source = "registry+https://github.com/rust-lang/crates.io-index"
346checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" 403checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
347dependencies = [ 404dependencies = [
348 "powerfmt", 405 "powerfmt",
349] 406]
@@ -362,9 +419,12 @@ dependencies = [
362 419
363[[package]] 420[[package]]
364name = "dlv-list" 421name = "dlv-list"
365version = "0.3.0" 422version = "0.5.2"
366source = "registry+https://github.com/rust-lang/crates.io-index" 423source = "registry+https://github.com/rust-lang/crates.io-index"
367checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" 424checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f"
425dependencies = [
426 "const-random",
427]
368 428
369[[package]] 429[[package]]
370name = "dotenvy" 430name = "dotenvy"
@@ -374,9 +434,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
374 434
375[[package]] 435[[package]]
376name = "either" 436name = "either"
377version = "1.9.0" 437version = "1.10.0"
378source = "registry+https://github.com/rust-lang/crates.io-index" 438source = "registry+https://github.com/rust-lang/crates.io-index"
379checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 439checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
380dependencies = [ 440dependencies = [
381 "serde", 441 "serde",
382] 442]
@@ -389,12 +449,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
389 449
390[[package]] 450[[package]]
391name = "errno" 451name = "errno"
392version = "0.3.5" 452version = "0.3.8"
393source = "registry+https://github.com/rust-lang/crates.io-index" 453source = "registry+https://github.com/rust-lang/crates.io-index"
394checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" 454checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
395dependencies = [ 455dependencies = [
396 "libc", 456 "libc",
397 "windows-sys", 457 "windows-sys 0.52.0",
398] 458]
399 459
400[[package]] 460[[package]]
@@ -405,7 +465,7 @@ checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943"
405dependencies = [ 465dependencies = [
406 "cfg-if", 466 "cfg-if",
407 "home", 467 "home",
408 "windows-sys", 468 "windows-sys 0.48.0",
409] 469]
410 470
411[[package]] 471[[package]]
@@ -415,6 +475,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
415checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 475checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
416 476
417[[package]] 477[[package]]
478name = "eyre"
479version = "0.6.12"
480source = "registry+https://github.com/rust-lang/crates.io-index"
481checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
482dependencies = [
483 "indenter",
484 "once_cell",
485]
486
487[[package]]
418name = "fastrand" 488name = "fastrand"
419version = "2.0.1" 489version = "2.0.1"
420source = "registry+https://github.com/rust-lang/crates.io-index" 490source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -445,18 +515,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
445 515
446[[package]] 516[[package]]
447name = "form_urlencoded" 517name = "form_urlencoded"
448version = "1.2.0" 518version = "1.2.1"
449source = "registry+https://github.com/rust-lang/crates.io-index" 519source = "registry+https://github.com/rust-lang/crates.io-index"
450checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 520checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
451dependencies = [ 521dependencies = [
452 "percent-encoding", 522 "percent-encoding",
453] 523]
454 524
455[[package]] 525[[package]]
456name = "futures-channel" 526name = "futures-channel"
457version = "0.3.29" 527version = "0.3.30"
458source = "registry+https://github.com/rust-lang/crates.io-index" 528source = "registry+https://github.com/rust-lang/crates.io-index"
459checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" 529checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
460dependencies = [ 530dependencies = [
461 "futures-core", 531 "futures-core",
462 "futures-sink", 532 "futures-sink",
@@ -464,15 +534,15 @@ dependencies = [
464 534
465[[package]] 535[[package]]
466name = "futures-core" 536name = "futures-core"
467version = "0.3.29" 537version = "0.3.30"
468source = "registry+https://github.com/rust-lang/crates.io-index" 538source = "registry+https://github.com/rust-lang/crates.io-index"
469checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" 539checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
470 540
471[[package]] 541[[package]]
472name = "futures-executor" 542name = "futures-executor"
473version = "0.3.29" 543version = "0.3.30"
474source = "registry+https://github.com/rust-lang/crates.io-index" 544source = "registry+https://github.com/rust-lang/crates.io-index"
475checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" 545checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
476dependencies = [ 546dependencies = [
477 "futures-core", 547 "futures-core",
478 "futures-task", 548 "futures-task",
@@ -492,27 +562,27 @@ dependencies = [
492 562
493[[package]] 563[[package]]
494name = "futures-io" 564name = "futures-io"
495version = "0.3.29" 565version = "0.3.30"
496source = "registry+https://github.com/rust-lang/crates.io-index" 566source = "registry+https://github.com/rust-lang/crates.io-index"
497checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" 567checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
498 568
499[[package]] 569[[package]]
500name = "futures-sink" 570name = "futures-sink"
501version = "0.3.29" 571version = "0.3.30"
502source = "registry+https://github.com/rust-lang/crates.io-index" 572source = "registry+https://github.com/rust-lang/crates.io-index"
503checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" 573checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
504 574
505[[package]] 575[[package]]
506name = "futures-task" 576name = "futures-task"
507version = "0.3.29" 577version = "0.3.30"
508source = "registry+https://github.com/rust-lang/crates.io-index" 578source = "registry+https://github.com/rust-lang/crates.io-index"
509checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" 579checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
510 580
511[[package]] 581[[package]]
512name = "futures-util" 582name = "futures-util"
513version = "0.3.29" 583version = "0.3.30"
514source = "registry+https://github.com/rust-lang/crates.io-index" 584source = "registry+https://github.com/rust-lang/crates.io-index"
515checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" 585checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
516dependencies = [ 586dependencies = [
517 "futures-core", 587 "futures-core",
518 "futures-io", 588 "futures-io",
@@ -536,9 +606,9 @@ dependencies = [
536 606
537[[package]] 607[[package]]
538name = "getrandom" 608name = "getrandom"
539version = "0.2.10" 609version = "0.2.12"
540source = "registry+https://github.com/rust-lang/crates.io-index" 610source = "registry+https://github.com/rust-lang/crates.io-index"
541checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 611checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
542dependencies = [ 612dependencies = [
543 "cfg-if", 613 "cfg-if",
544 "libc", 614 "libc",
@@ -547,9 +617,9 @@ dependencies = [
547 617
548[[package]] 618[[package]]
549name = "gimli" 619name = "gimli"
550version = "0.28.0" 620version = "0.28.1"
551source = "registry+https://github.com/rust-lang/crates.io-index" 621source = "registry+https://github.com/rust-lang/crates.io-index"
552checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" 622checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
553 623
554[[package]] 624[[package]]
555name = "glob" 625name = "glob"
@@ -558,21 +628,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
558checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 628checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
559 629
560[[package]] 630[[package]]
561name = "hashbrown" 631name = "h2"
562version = "0.12.3" 632version = "0.4.2"
563source = "registry+https://github.com/rust-lang/crates.io-index" 633source = "registry+https://github.com/rust-lang/crates.io-index"
564checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 634checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943"
565dependencies = [ 635dependencies = [
566 "ahash 0.7.7", 636 "bytes",
637 "fnv",
638 "futures-core",
639 "futures-sink",
640 "futures-util",
641 "http",
642 "indexmap",
643 "slab",
644 "tokio",
645 "tokio-util",
646 "tracing",
567] 647]
568 648
569[[package]] 649[[package]]
570name = "hashbrown" 650name = "hashbrown"
571version = "0.14.2" 651version = "0.13.2"
572source = "registry+https://github.com/rust-lang/crates.io-index" 652source = "registry+https://github.com/rust-lang/crates.io-index"
573checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" 653checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
654
655[[package]]
656name = "hashbrown"
657version = "0.14.3"
658source = "registry+https://github.com/rust-lang/crates.io-index"
659checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
574dependencies = [ 660dependencies = [
575 "ahash 0.8.6", 661 "ahash",
576 "allocator-api2", 662 "allocator-api2",
577] 663]
578 664
@@ -582,31 +668,7 @@ version = "0.8.4"
582source = "registry+https://github.com/rust-lang/crates.io-index" 668source = "registry+https://github.com/rust-lang/crates.io-index"
583checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" 669checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"
584dependencies = [ 670dependencies = [
585 "hashbrown 0.14.2", 671 "hashbrown 0.14.3",
586]
587
588[[package]]
589name = "headers"
590version = "0.3.9"
591source = "registry+https://github.com/rust-lang/crates.io-index"
592checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270"
593dependencies = [
594 "base64 0.21.5",
595 "bytes",
596 "headers-core",
597 "http",
598 "httpdate",
599 "mime",
600 "sha1",
601]
602
603[[package]]
604name = "headers-core"
605version = "0.2.0"
606source = "registry+https://github.com/rust-lang/crates.io-index"
607checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
608dependencies = [
609 "http",
610] 672]
611 673
612[[package]] 674[[package]]
@@ -620,9 +682,9 @@ dependencies = [
620 682
621[[package]] 683[[package]]
622name = "hermit-abi" 684name = "hermit-abi"
623version = "0.3.3" 685version = "0.3.5"
624source = "registry+https://github.com/rust-lang/crates.io-index" 686source = "registry+https://github.com/rust-lang/crates.io-index"
625checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" 687checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3"
626 688
627[[package]] 689[[package]]
628name = "hex" 690name = "hex"
@@ -632,9 +694,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
632 694
633[[package]] 695[[package]]
634name = "hkdf" 696name = "hkdf"
635version = "0.12.3" 697version = "0.12.4"
636source = "registry+https://github.com/rust-lang/crates.io-index" 698source = "registry+https://github.com/rust-lang/crates.io-index"
637checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" 699checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
638dependencies = [ 700dependencies = [
639 "hmac", 701 "hmac",
640] 702]
@@ -650,18 +712,18 @@ dependencies = [
650 712
651[[package]] 713[[package]]
652name = "home" 714name = "home"
653version = "0.5.5" 715version = "0.5.9"
654source = "registry+https://github.com/rust-lang/crates.io-index" 716source = "registry+https://github.com/rust-lang/crates.io-index"
655checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" 717checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
656dependencies = [ 718dependencies = [
657 "windows-sys", 719 "windows-sys 0.52.0",
658] 720]
659 721
660[[package]] 722[[package]]
661name = "http" 723name = "http"
662version = "0.2.9" 724version = "1.0.0"
663source = "registry+https://github.com/rust-lang/crates.io-index" 725source = "registry+https://github.com/rust-lang/crates.io-index"
664checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 726checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea"
665dependencies = [ 727dependencies = [
666 "bytes", 728 "bytes",
667 "fnv", 729 "fnv",
@@ -670,12 +732,24 @@ dependencies = [
670 732
671[[package]] 733[[package]]
672name = "http-body" 734name = "http-body"
673version = "0.4.5" 735version = "1.0.0"
674source = "registry+https://github.com/rust-lang/crates.io-index" 736source = "registry+https://github.com/rust-lang/crates.io-index"
675checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 737checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
676dependencies = [ 738dependencies = [
677 "bytes", 739 "bytes",
678 "http", 740 "http",
741]
742
743[[package]]
744name = "http-body-util"
745version = "0.1.0"
746source = "registry+https://github.com/rust-lang/crates.io-index"
747checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840"
748dependencies = [
749 "bytes",
750 "futures-util",
751 "http",
752 "http-body",
679 "pin-project-lite", 753 "pin-project-lite",
680] 754]
681 755
@@ -693,61 +767,79 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
693 767
694[[package]] 768[[package]]
695name = "hyper" 769name = "hyper"
696version = "0.14.27" 770version = "1.1.0"
697source = "registry+https://github.com/rust-lang/crates.io-index" 771source = "registry+https://github.com/rust-lang/crates.io-index"
698checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" 772checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75"
699dependencies = [ 773dependencies = [
700 "bytes", 774 "bytes",
701 "futures-channel", 775 "futures-channel",
702 "futures-core",
703 "futures-util", 776 "futures-util",
777 "h2",
704 "http", 778 "http",
705 "http-body", 779 "http-body",
706 "httparse", 780 "httparse",
707 "httpdate", 781 "httpdate",
708 "itoa", 782 "itoa",
709 "pin-project-lite", 783 "pin-project-lite",
710 "socket2 0.4.10",
711 "tokio", 784 "tokio",
712 "tower-service", 785]
713 "tracing", 786
714 "want", 787[[package]]
788name = "hyper-util"
789version = "0.1.3"
790source = "registry+https://github.com/rust-lang/crates.io-index"
791checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"
792dependencies = [
793 "bytes",
794 "futures-util",
795 "http",
796 "http-body",
797 "hyper",
798 "pin-project-lite",
799 "socket2",
800 "tokio",
715] 801]
716 802
717[[package]] 803[[package]]
718name = "idna" 804name = "idna"
719version = "0.4.0" 805version = "0.5.0"
720source = "registry+https://github.com/rust-lang/crates.io-index" 806source = "registry+https://github.com/rust-lang/crates.io-index"
721checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 807checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
722dependencies = [ 808dependencies = [
723 "unicode-bidi", 809 "unicode-bidi",
724 "unicode-normalization", 810 "unicode-normalization",
725] 811]
726 812
727[[package]] 813[[package]]
814name = "indenter"
815version = "0.3.3"
816source = "registry+https://github.com/rust-lang/crates.io-index"
817checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
818
819[[package]]
728name = "indexmap" 820name = "indexmap"
729version = "2.1.0" 821version = "2.2.3"
730source = "registry+https://github.com/rust-lang/crates.io-index" 822source = "registry+https://github.com/rust-lang/crates.io-index"
731checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" 823checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
732dependencies = [ 824dependencies = [
733 "equivalent", 825 "equivalent",
734 "hashbrown 0.14.2", 826 "hashbrown 0.14.3",
735] 827]
736 828
737[[package]] 829[[package]]
738name = "itertools" 830name = "itertools"
739version = "0.11.0" 831version = "0.12.1"
740source = "registry+https://github.com/rust-lang/crates.io-index" 832source = "registry+https://github.com/rust-lang/crates.io-index"
741checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" 833checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
742dependencies = [ 834dependencies = [
743 "either", 835 "either",
744] 836]
745 837
746[[package]] 838[[package]]
747name = "itoa" 839name = "itoa"
748version = "1.0.9" 840version = "1.0.10"
749source = "registry+https://github.com/rust-lang/crates.io-index" 841source = "registry+https://github.com/rust-lang/crates.io-index"
750checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 842checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
751 843
752[[package]] 844[[package]]
753name = "json5" 845name = "json5"
@@ -771,9 +863,9 @@ dependencies = [
771 863
772[[package]] 864[[package]]
773name = "libc" 865name = "libc"
774version = "0.2.149" 866version = "0.2.153"
775source = "registry+https://github.com/rust-lang/crates.io-index" 867source = "registry+https://github.com/rust-lang/crates.io-index"
776checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" 868checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
777 869
778[[package]] 870[[package]]
779name = "libm" 871name = "libm"
@@ -783,9 +875,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
783 875
784[[package]] 876[[package]]
785name = "libsqlite3-sys" 877name = "libsqlite3-sys"
786version = "0.26.0" 878version = "0.27.0"
787source = "registry+https://github.com/rust-lang/crates.io-index" 879source = "registry+https://github.com/rust-lang/crates.io-index"
788checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" 880checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
789dependencies = [ 881dependencies = [
790 "cc", 882 "cc",
791 "pkg-config", 883 "pkg-config",
@@ -800,9 +892,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
800 892
801[[package]] 893[[package]]
802name = "linux-raw-sys" 894name = "linux-raw-sys"
803version = "0.4.10" 895version = "0.4.13"
804source = "registry+https://github.com/rust-lang/crates.io-index" 896source = "registry+https://github.com/rust-lang/crates.io-index"
805checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" 897checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
806 898
807[[package]] 899[[package]]
808name = "lock_api" 900name = "lock_api"
@@ -847,9 +939,9 @@ dependencies = [
847 939
848[[package]] 940[[package]]
849name = "memchr" 941name = "memchr"
850version = "2.6.4" 942version = "2.7.1"
851source = "registry+https://github.com/rust-lang/crates.io-index" 943source = "registry+https://github.com/rust-lang/crates.io-index"
852checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" 944checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
853 945
854[[package]] 946[[package]]
855name = "mime" 947name = "mime"
@@ -865,22 +957,33 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
865 957
866[[package]] 958[[package]]
867name = "miniz_oxide" 959name = "miniz_oxide"
868version = "0.7.1" 960version = "0.7.2"
869source = "registry+https://github.com/rust-lang/crates.io-index" 961source = "registry+https://github.com/rust-lang/crates.io-index"
870checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 962checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
871dependencies = [ 963dependencies = [
872 "adler", 964 "adler",
873] 965]
874 966
875[[package]] 967[[package]]
876name = "mio" 968name = "mio"
877version = "0.8.9" 969version = "0.8.10"
878source = "registry+https://github.com/rust-lang/crates.io-index" 970source = "registry+https://github.com/rust-lang/crates.io-index"
879checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" 971checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
880dependencies = [ 972dependencies = [
881 "libc", 973 "libc",
882 "wasi", 974 "wasi",
883 "windows-sys", 975 "windows-sys 0.48.0",
976]
977
978[[package]]
979name = "nix"
980version = "0.27.1"
981source = "registry+https://github.com/rust-lang/crates.io-index"
982checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
983dependencies = [
984 "bitflags 2.4.2",
985 "cfg-if",
986 "libc",
884] 987]
885 988
886[[package]] 989[[package]]
@@ -927,20 +1030,25 @@ dependencies = [
927] 1030]
928 1031
929[[package]] 1032[[package]]
1033name = "num-conv"
1034version = "0.1.0"
1035source = "registry+https://github.com/rust-lang/crates.io-index"
1036checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
1037
1038[[package]]
930name = "num-integer" 1039name = "num-integer"
931version = "0.1.45" 1040version = "0.1.46"
932source = "registry+https://github.com/rust-lang/crates.io-index" 1041source = "registry+https://github.com/rust-lang/crates.io-index"
933checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1042checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
934dependencies = [ 1043dependencies = [
935 "autocfg",
936 "num-traits", 1044 "num-traits",
937] 1045]
938 1046
939[[package]] 1047[[package]]
940name = "num-iter" 1048name = "num-iter"
941version = "0.1.43" 1049version = "0.1.44"
942source = "registry+https://github.com/rust-lang/crates.io-index" 1050source = "registry+https://github.com/rust-lang/crates.io-index"
943checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" 1051checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9"
944dependencies = [ 1052dependencies = [
945 "autocfg", 1053 "autocfg",
946 "num-integer", 1054 "num-integer",
@@ -949,9 +1057,9 @@ dependencies = [
949 1057
950[[package]] 1058[[package]]
951name = "num-traits" 1059name = "num-traits"
952version = "0.2.17" 1060version = "0.2.18"
953source = "registry+https://github.com/rust-lang/crates.io-index" 1061source = "registry+https://github.com/rust-lang/crates.io-index"
954checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" 1062checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
955dependencies = [ 1063dependencies = [
956 "autocfg", 1064 "autocfg",
957 "libm", 1065 "libm",
@@ -978,27 +1086,27 @@ dependencies = [
978 1086
979[[package]] 1087[[package]]
980name = "object" 1088name = "object"
981version = "0.32.1" 1089version = "0.32.2"
982source = "registry+https://github.com/rust-lang/crates.io-index" 1090source = "registry+https://github.com/rust-lang/crates.io-index"
983checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" 1091checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
984dependencies = [ 1092dependencies = [
985 "memchr", 1093 "memchr",
986] 1094]
987 1095
988[[package]] 1096[[package]]
989name = "once_cell" 1097name = "once_cell"
990version = "1.18.0" 1098version = "1.19.0"
991source = "registry+https://github.com/rust-lang/crates.io-index" 1099source = "registry+https://github.com/rust-lang/crates.io-index"
992checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 1100checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
993 1101
994[[package]] 1102[[package]]
995name = "ordered-multimap" 1103name = "ordered-multimap"
996version = "0.4.3" 1104version = "0.6.0"
997source = "registry+https://github.com/rust-lang/crates.io-index" 1105source = "registry+https://github.com/rust-lang/crates.io-index"
998checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" 1106checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e"
999dependencies = [ 1107dependencies = [
1000 "dlv-list", 1108 "dlv-list",
1001 "hashbrown 0.12.3", 1109 "hashbrown 0.13.2",
1002] 1110]
1003 1111
1004[[package]] 1112[[package]]
@@ -1008,6 +1116,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1008checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1116checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
1009 1117
1010[[package]] 1118[[package]]
1119name = "owo-colors"
1120version = "3.5.0"
1121source = "registry+https://github.com/rust-lang/crates.io-index"
1122checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
1123
1124[[package]]
1011name = "parking_lot" 1125name = "parking_lot"
1012version = "0.12.1" 1126version = "0.12.1"
1013source = "registry+https://github.com/rust-lang/crates.io-index" 1127source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1027,7 +1141,7 @@ dependencies = [
1027 "libc", 1141 "libc",
1028 "redox_syscall", 1142 "redox_syscall",
1029 "smallvec", 1143 "smallvec",
1030 "windows-targets", 1144 "windows-targets 0.48.5",
1031] 1145]
1032 1146
1033[[package]] 1147[[package]]
@@ -1053,15 +1167,15 @@ dependencies = [
1053 1167
1054[[package]] 1168[[package]]
1055name = "percent-encoding" 1169name = "percent-encoding"
1056version = "2.3.0" 1170version = "2.3.1"
1057source = "registry+https://github.com/rust-lang/crates.io-index" 1171source = "registry+https://github.com/rust-lang/crates.io-index"
1058checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 1172checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
1059 1173
1060[[package]] 1174[[package]]
1061name = "pest" 1175name = "pest"
1062version = "2.7.5" 1176version = "2.7.7"
1063source = "registry+https://github.com/rust-lang/crates.io-index" 1177source = "registry+https://github.com/rust-lang/crates.io-index"
1064checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" 1178checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546"
1065dependencies = [ 1179dependencies = [
1066 "memchr", 1180 "memchr",
1067 "thiserror", 1181 "thiserror",
@@ -1070,9 +1184,9 @@ dependencies = [
1070 1184
1071[[package]] 1185[[package]]
1072name = "pest_derive" 1186name = "pest_derive"
1073version = "2.7.5" 1187version = "2.7.7"
1074source = "registry+https://github.com/rust-lang/crates.io-index" 1188source = "registry+https://github.com/rust-lang/crates.io-index"
1075checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" 1189checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809"
1076dependencies = [ 1190dependencies = [
1077 "pest", 1191 "pest",
1078 "pest_generator", 1192 "pest_generator",
@@ -1080,22 +1194,22 @@ dependencies = [
1080 1194
1081[[package]] 1195[[package]]
1082name = "pest_generator" 1196name = "pest_generator"
1083version = "2.7.5" 1197version = "2.7.7"
1084source = "registry+https://github.com/rust-lang/crates.io-index" 1198source = "registry+https://github.com/rust-lang/crates.io-index"
1085checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" 1199checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e"
1086dependencies = [ 1200dependencies = [
1087 "pest", 1201 "pest",
1088 "pest_meta", 1202 "pest_meta",
1089 "proc-macro2", 1203 "proc-macro2",
1090 "quote", 1204 "quote",
1091 "syn 2.0.38", 1205 "syn 2.0.48",
1092] 1206]
1093 1207
1094[[package]] 1208[[package]]
1095name = "pest_meta" 1209name = "pest_meta"
1096version = "2.7.5" 1210version = "2.7.7"
1097source = "registry+https://github.com/rust-lang/crates.io-index" 1211source = "registry+https://github.com/rust-lang/crates.io-index"
1098checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" 1212checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a"
1099dependencies = [ 1213dependencies = [
1100 "once_cell", 1214 "once_cell",
1101 "pest", 1215 "pest",
@@ -1104,22 +1218,22 @@ dependencies = [
1104 1218
1105[[package]] 1219[[package]]
1106name = "pin-project" 1220name = "pin-project"
1107version = "1.1.3" 1221version = "1.1.4"
1108source = "registry+https://github.com/rust-lang/crates.io-index" 1222source = "registry+https://github.com/rust-lang/crates.io-index"
1109checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" 1223checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"
1110dependencies = [ 1224dependencies = [
1111 "pin-project-internal", 1225 "pin-project-internal",
1112] 1226]
1113 1227
1114[[package]] 1228[[package]]
1115name = "pin-project-internal" 1229name = "pin-project-internal"
1116version = "1.1.3" 1230version = "1.1.4"
1117source = "registry+https://github.com/rust-lang/crates.io-index" 1231source = "registry+https://github.com/rust-lang/crates.io-index"
1118checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" 1232checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
1119dependencies = [ 1233dependencies = [
1120 "proc-macro2", 1234 "proc-macro2",
1121 "quote", 1235 "quote",
1122 "syn 2.0.38", 1236 "syn 2.0.48",
1123] 1237]
1124 1238
1125[[package]] 1239[[package]]
@@ -1157,9 +1271,9 @@ dependencies = [
1157 1271
1158[[package]] 1272[[package]]
1159name = "pkg-config" 1273name = "pkg-config"
1160version = "0.3.27" 1274version = "0.3.29"
1161source = "registry+https://github.com/rust-lang/crates.io-index" 1275source = "registry+https://github.com/rust-lang/crates.io-index"
1162checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 1276checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
1163 1277
1164[[package]] 1278[[package]]
1165name = "pnet_base" 1279name = "pnet_base"
@@ -1217,18 +1331,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
1217 1331
1218[[package]] 1332[[package]]
1219name = "proc-macro2" 1333name = "proc-macro2"
1220version = "1.0.69" 1334version = "1.0.78"
1221source = "registry+https://github.com/rust-lang/crates.io-index" 1335source = "registry+https://github.com/rust-lang/crates.io-index"
1222checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" 1336checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
1223dependencies = [ 1337dependencies = [
1224 "unicode-ident", 1338 "unicode-ident",
1225] 1339]
1226 1340
1227[[package]] 1341[[package]]
1228name = "quote" 1342name = "quote"
1229version = "1.0.33" 1343version = "1.0.35"
1230source = "registry+https://github.com/rust-lang/crates.io-index" 1344source = "registry+https://github.com/rust-lang/crates.io-index"
1231checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" 1345checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
1232dependencies = [ 1346dependencies = [
1233 "proc-macro2", 1347 "proc-macro2",
1234] 1348]
@@ -1274,13 +1388,13 @@ dependencies = [
1274 1388
1275[[package]] 1389[[package]]
1276name = "regex" 1390name = "regex"
1277version = "1.10.2" 1391version = "1.10.3"
1278source = "registry+https://github.com/rust-lang/crates.io-index" 1392source = "registry+https://github.com/rust-lang/crates.io-index"
1279checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 1393checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
1280dependencies = [ 1394dependencies = [
1281 "aho-corasick", 1395 "aho-corasick",
1282 "memchr", 1396 "memchr",
1283 "regex-automata 0.4.3", 1397 "regex-automata 0.4.5",
1284 "regex-syntax 0.8.2", 1398 "regex-syntax 0.8.2",
1285] 1399]
1286 1400
@@ -1295,9 +1409,9 @@ dependencies = [
1295 1409
1296[[package]] 1410[[package]]
1297name = "regex-automata" 1411name = "regex-automata"
1298version = "0.4.3" 1412version = "0.4.5"
1299source = "registry+https://github.com/rust-lang/crates.io-index" 1413source = "registry+https://github.com/rust-lang/crates.io-index"
1300checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 1414checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
1301dependencies = [ 1415dependencies = [
1302 "aho-corasick", 1416 "aho-corasick",
1303 "memchr", 1417 "memchr",
@@ -1318,20 +1432,21 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
1318 1432
1319[[package]] 1433[[package]]
1320name = "ron" 1434name = "ron"
1321version = "0.7.1" 1435version = "0.8.1"
1322source = "registry+https://github.com/rust-lang/crates.io-index" 1436source = "registry+https://github.com/rust-lang/crates.io-index"
1323checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" 1437checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"
1324dependencies = [ 1438dependencies = [
1325 "base64 0.13.1", 1439 "base64",
1326 "bitflags 1.3.2", 1440 "bitflags 2.4.2",
1327 "serde", 1441 "serde",
1442 "serde_derive",
1328] 1443]
1329 1444
1330[[package]] 1445[[package]]
1331name = "rsa" 1446name = "rsa"
1332version = "0.9.3" 1447version = "0.9.6"
1333source = "registry+https://github.com/rust-lang/crates.io-index" 1448source = "registry+https://github.com/rust-lang/crates.io-index"
1334checksum = "86ef35bf3e7fe15a53c4ab08a998e42271eab13eb0db224126bc7bc4c4bad96d" 1449checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc"
1335dependencies = [ 1450dependencies = [
1336 "const-oid", 1451 "const-oid",
1337 "digest", 1452 "digest",
@@ -1349,9 +1464,9 @@ dependencies = [
1349 1464
1350[[package]] 1465[[package]]
1351name = "rust-ini" 1466name = "rust-ini"
1352version = "0.18.0" 1467version = "0.19.0"
1353source = "registry+https://github.com/rust-lang/crates.io-index" 1468source = "registry+https://github.com/rust-lang/crates.io-index"
1354checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" 1469checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091"
1355dependencies = [ 1470dependencies = [
1356 "cfg-if", 1471 "cfg-if",
1357 "ordered-multimap", 1472 "ordered-multimap",
@@ -1365,15 +1480,15 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
1365 1480
1366[[package]] 1481[[package]]
1367name = "rustix" 1482name = "rustix"
1368version = "0.38.21" 1483version = "0.38.31"
1369source = "registry+https://github.com/rust-lang/crates.io-index" 1484source = "registry+https://github.com/rust-lang/crates.io-index"
1370checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" 1485checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"
1371dependencies = [ 1486dependencies = [
1372 "bitflags 2.4.1", 1487 "bitflags 2.4.2",
1373 "errno", 1488 "errno",
1374 "libc", 1489 "libc",
1375 "linux-raw-sys", 1490 "linux-raw-sys",
1376 "windows-sys", 1491 "windows-sys 0.52.0",
1377] 1492]
1378 1493
1379[[package]] 1494[[package]]
@@ -1384,9 +1499,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
1384 1499
1385[[package]] 1500[[package]]
1386name = "ryu" 1501name = "ryu"
1387version = "1.0.15" 1502version = "1.0.16"
1388source = "registry+https://github.com/rust-lang/crates.io-index" 1503source = "registry+https://github.com/rust-lang/crates.io-index"
1389checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 1504checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
1390 1505
1391[[package]] 1506[[package]]
1392name = "scopeguard" 1507name = "scopeguard"
@@ -1396,29 +1511,29 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1396 1511
1397[[package]] 1512[[package]]
1398name = "serde" 1513name = "serde"
1399version = "1.0.190" 1514version = "1.0.196"
1400source = "registry+https://github.com/rust-lang/crates.io-index" 1515source = "registry+https://github.com/rust-lang/crates.io-index"
1401checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" 1516checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
1402dependencies = [ 1517dependencies = [
1403 "serde_derive", 1518 "serde_derive",
1404] 1519]
1405 1520
1406[[package]] 1521[[package]]
1407name = "serde_derive" 1522name = "serde_derive"
1408version = "1.0.190" 1523version = "1.0.196"
1409source = "registry+https://github.com/rust-lang/crates.io-index" 1524source = "registry+https://github.com/rust-lang/crates.io-index"
1410checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" 1525checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
1411dependencies = [ 1526dependencies = [
1412 "proc-macro2", 1527 "proc-macro2",
1413 "quote", 1528 "quote",
1414 "syn 2.0.38", 1529 "syn 2.0.48",
1415] 1530]
1416 1531
1417[[package]] 1532[[package]]
1418name = "serde_json" 1533name = "serde_json"
1419version = "1.0.108" 1534version = "1.0.113"
1420source = "registry+https://github.com/rust-lang/crates.io-index" 1535source = "registry+https://github.com/rust-lang/crates.io-index"
1421checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" 1536checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
1422dependencies = [ 1537dependencies = [
1423 "itoa", 1538 "itoa",
1424 "ryu", 1539 "ryu",
@@ -1427,15 +1542,24 @@ dependencies = [
1427 1542
1428[[package]] 1543[[package]]
1429name = "serde_path_to_error" 1544name = "serde_path_to_error"
1430version = "0.1.14" 1545version = "0.1.15"
1431source = "registry+https://github.com/rust-lang/crates.io-index" 1546source = "registry+https://github.com/rust-lang/crates.io-index"
1432checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" 1547checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c"
1433dependencies = [ 1548dependencies = [
1434 "itoa", 1549 "itoa",
1435 "serde", 1550 "serde",
1436] 1551]
1437 1552
1438[[package]] 1553[[package]]
1554name = "serde_spanned"
1555version = "0.6.5"
1556source = "registry+https://github.com/rust-lang/crates.io-index"
1557checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
1558dependencies = [
1559 "serde",
1560]
1561
1562[[package]]
1439name = "serde_urlencoded" 1563name = "serde_urlencoded"
1440version = "0.7.1" 1564version = "0.7.1"
1441source = "registry+https://github.com/rust-lang/crates.io-index" 1565source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1480,9 +1604,9 @@ dependencies = [
1480 1604
1481[[package]] 1605[[package]]
1482name = "signature" 1606name = "signature"
1483version = "2.1.0" 1607version = "2.2.0"
1484source = "registry+https://github.com/rust-lang/crates.io-index" 1608source = "registry+https://github.com/rust-lang/crates.io-index"
1485checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" 1609checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
1486dependencies = [ 1610dependencies = [
1487 "digest", 1611 "digest",
1488 "rand_core", 1612 "rand_core",
@@ -1499,19 +1623,9 @@ dependencies = [
1499 1623
1500[[package]] 1624[[package]]
1501name = "smallvec" 1625name = "smallvec"
1502version = "1.11.1" 1626version = "1.13.1"
1503source = "registry+https://github.com/rust-lang/crates.io-index"
1504checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
1505
1506[[package]]
1507name = "socket2"
1508version = "0.4.10"
1509source = "registry+https://github.com/rust-lang/crates.io-index" 1627source = "registry+https://github.com/rust-lang/crates.io-index"
1510checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" 1628checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
1511dependencies = [
1512 "libc",
1513 "winapi",
1514]
1515 1629
1516[[package]] 1630[[package]]
1517name = "socket2" 1631name = "socket2"
@@ -1520,7 +1634,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1520checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 1634checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
1521dependencies = [ 1635dependencies = [
1522 "libc", 1636 "libc",
1523 "windows-sys", 1637 "windows-sys 0.48.0",
1524] 1638]
1525 1639
1526[[package]] 1640[[package]]
@@ -1540,9 +1654,9 @@ dependencies = [
1540 1654
1541[[package]] 1655[[package]]
1542name = "spki" 1656name = "spki"
1543version = "0.7.2" 1657version = "0.7.3"
1544source = "registry+https://github.com/rust-lang/crates.io-index" 1658source = "registry+https://github.com/rust-lang/crates.io-index"
1545checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" 1659checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
1546dependencies = [ 1660dependencies = [
1547 "base64ct", 1661 "base64ct",
1548 "der", 1662 "der",
@@ -1550,9 +1664,9 @@ dependencies = [
1550 1664
1551[[package]] 1665[[package]]
1552name = "sqlformat" 1666name = "sqlformat"
1553version = "0.2.2" 1667version = "0.2.3"
1554source = "registry+https://github.com/rust-lang/crates.io-index" 1668source = "registry+https://github.com/rust-lang/crates.io-index"
1555checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" 1669checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c"
1556dependencies = [ 1670dependencies = [
1557 "itertools", 1671 "itertools",
1558 "nom", 1672 "nom",
@@ -1561,9 +1675,9 @@ dependencies = [
1561 1675
1562[[package]] 1676[[package]]
1563name = "sqlx" 1677name = "sqlx"
1564version = "0.7.2" 1678version = "0.7.3"
1565source = "registry+https://github.com/rust-lang/crates.io-index" 1679source = "registry+https://github.com/rust-lang/crates.io-index"
1566checksum = "0e50c216e3624ec8e7ecd14c6a6a6370aad6ee5d8cfc3ab30b5162eeeef2ed33" 1680checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf"
1567dependencies = [ 1681dependencies = [
1568 "sqlx-core", 1682 "sqlx-core",
1569 "sqlx-macros", 1683 "sqlx-macros",
@@ -1574,11 +1688,11 @@ dependencies = [
1574 1688
1575[[package]] 1689[[package]]
1576name = "sqlx-core" 1690name = "sqlx-core"
1577version = "0.7.2" 1691version = "0.7.3"
1578source = "registry+https://github.com/rust-lang/crates.io-index" 1692source = "registry+https://github.com/rust-lang/crates.io-index"
1579checksum = "8d6753e460c998bbd4cd8c6f0ed9a64346fcca0723d6e75e52fdc351c5d2169d" 1693checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd"
1580dependencies = [ 1694dependencies = [
1581 "ahash 0.8.6", 1695 "ahash",
1582 "atoi", 1696 "atoi",
1583 "byteorder", 1697 "byteorder",
1584 "bytes", 1698 "bytes",
@@ -1614,9 +1728,9 @@ dependencies = [
1614 1728
1615[[package]] 1729[[package]]
1616name = "sqlx-macros" 1730name = "sqlx-macros"
1617version = "0.7.2" 1731version = "0.7.3"
1618source = "registry+https://github.com/rust-lang/crates.io-index" 1732source = "registry+https://github.com/rust-lang/crates.io-index"
1619checksum = "9a793bb3ba331ec8359c1853bd39eed32cdd7baaf22c35ccf5c92a7e8d1189ec" 1733checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5"
1620dependencies = [ 1734dependencies = [
1621 "proc-macro2", 1735 "proc-macro2",
1622 "quote", 1736 "quote",
@@ -1627,10 +1741,11 @@ dependencies = [
1627 1741
1628[[package]] 1742[[package]]
1629name = "sqlx-macros-core" 1743name = "sqlx-macros-core"
1630version = "0.7.2" 1744version = "0.7.3"
1631source = "registry+https://github.com/rust-lang/crates.io-index" 1745source = "registry+https://github.com/rust-lang/crates.io-index"
1632checksum = "0a4ee1e104e00dedb6aa5ffdd1343107b0a4702e862a84320ee7cc74782d96fc" 1746checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841"
1633dependencies = [ 1747dependencies = [
1748 "atomic-write-file",
1634 "dotenvy", 1749 "dotenvy",
1635 "either", 1750 "either",
1636 "heck", 1751 "heck",
@@ -1653,13 +1768,13 @@ dependencies = [
1653 1768
1654[[package]] 1769[[package]]
1655name = "sqlx-mysql" 1770name = "sqlx-mysql"
1656version = "0.7.2" 1771version = "0.7.3"
1657source = "registry+https://github.com/rust-lang/crates.io-index" 1772source = "registry+https://github.com/rust-lang/crates.io-index"
1658checksum = "864b869fdf56263f4c95c45483191ea0af340f9f3e3e7b4d57a61c7c87a970db" 1773checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4"
1659dependencies = [ 1774dependencies = [
1660 "atoi", 1775 "atoi",
1661 "base64 0.21.5", 1776 "base64",
1662 "bitflags 2.4.1", 1777 "bitflags 2.4.2",
1663 "byteorder", 1778 "byteorder",
1664 "bytes", 1779 "bytes",
1665 "crc", 1780 "crc",
@@ -1695,13 +1810,13 @@ dependencies = [
1695 1810
1696[[package]] 1811[[package]]
1697name = "sqlx-postgres" 1812name = "sqlx-postgres"
1698version = "0.7.2" 1813version = "0.7.3"
1699source = "registry+https://github.com/rust-lang/crates.io-index" 1814source = "registry+https://github.com/rust-lang/crates.io-index"
1700checksum = "eb7ae0e6a97fb3ba33b23ac2671a5ce6e3cabe003f451abd5a56e7951d975624" 1815checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24"
1701dependencies = [ 1816dependencies = [
1702 "atoi", 1817 "atoi",
1703 "base64 0.21.5", 1818 "base64",
1704 "bitflags 2.4.1", 1819 "bitflags 2.4.2",
1705 "byteorder", 1820 "byteorder",
1706 "crc", 1821 "crc",
1707 "dotenvy", 1822 "dotenvy",
@@ -1734,9 +1849,9 @@ dependencies = [
1734 1849
1735[[package]] 1850[[package]]
1736name = "sqlx-sqlite" 1851name = "sqlx-sqlite"
1737version = "0.7.2" 1852version = "0.7.3"
1738source = "registry+https://github.com/rust-lang/crates.io-index" 1853source = "registry+https://github.com/rust-lang/crates.io-index"
1739checksum = "d59dc83cf45d89c555a577694534fcd1b55c545a816c816ce51f20bbe56a4f3f" 1854checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490"
1740dependencies = [ 1855dependencies = [
1741 "atoi", 1856 "atoi",
1742 "flume", 1857 "flume",
@@ -1752,6 +1867,7 @@ dependencies = [
1752 "sqlx-core", 1867 "sqlx-core",
1753 "tracing", 1868 "tracing",
1754 "url", 1869 "url",
1870 "urlencoding",
1755] 1871]
1756 1872
1757[[package]] 1873[[package]]
@@ -1781,7 +1897,7 @@ dependencies = [
1781 "parking_lot", 1897 "parking_lot",
1782 "pnet_packet", 1898 "pnet_packet",
1783 "rand", 1899 "rand",
1784 "socket2 0.5.5", 1900 "socket2",
1785 "thiserror", 1901 "thiserror",
1786 "tokio", 1902 "tokio",
1787 "tracing", 1903 "tracing",
@@ -1800,9 +1916,9 @@ dependencies = [
1800 1916
1801[[package]] 1917[[package]]
1802name = "syn" 1918name = "syn"
1803version = "2.0.38" 1919version = "2.0.48"
1804source = "registry+https://github.com/rust-lang/crates.io-index" 1920source = "registry+https://github.com/rust-lang/crates.io-index"
1805checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" 1921checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
1806dependencies = [ 1922dependencies = [
1807 "proc-macro2", 1923 "proc-macro2",
1808 "quote", 1924 "quote",
@@ -1817,35 +1933,34 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
1817 1933
1818[[package]] 1934[[package]]
1819name = "tempfile" 1935name = "tempfile"
1820version = "3.8.1" 1936version = "3.10.0"
1821source = "registry+https://github.com/rust-lang/crates.io-index" 1937source = "registry+https://github.com/rust-lang/crates.io-index"
1822checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" 1938checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"
1823dependencies = [ 1939dependencies = [
1824 "cfg-if", 1940 "cfg-if",
1825 "fastrand", 1941 "fastrand",
1826 "redox_syscall",
1827 "rustix", 1942 "rustix",
1828 "windows-sys", 1943 "windows-sys 0.52.0",
1829] 1944]
1830 1945
1831[[package]] 1946[[package]]
1832name = "thiserror" 1947name = "thiserror"
1833version = "1.0.50" 1948version = "1.0.57"
1834source = "registry+https://github.com/rust-lang/crates.io-index" 1949source = "registry+https://github.com/rust-lang/crates.io-index"
1835checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" 1950checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b"
1836dependencies = [ 1951dependencies = [
1837 "thiserror-impl", 1952 "thiserror-impl",
1838] 1953]
1839 1954
1840[[package]] 1955[[package]]
1841name = "thiserror-impl" 1956name = "thiserror-impl"
1842version = "1.0.50" 1957version = "1.0.57"
1843source = "registry+https://github.com/rust-lang/crates.io-index" 1958source = "registry+https://github.com/rust-lang/crates.io-index"
1844checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" 1959checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
1845dependencies = [ 1960dependencies = [
1846 "proc-macro2", 1961 "proc-macro2",
1847 "quote", 1962 "quote",
1848 "syn 2.0.38", 1963 "syn 2.0.48",
1849] 1964]
1850 1965
1851[[package]] 1966[[package]]
@@ -1860,13 +1975,14 @@ dependencies = [
1860 1975
1861[[package]] 1976[[package]]
1862name = "time" 1977name = "time"
1863version = "0.3.30" 1978version = "0.3.34"
1864source = "registry+https://github.com/rust-lang/crates.io-index" 1979source = "registry+https://github.com/rust-lang/crates.io-index"
1865checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" 1980checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
1866dependencies = [ 1981dependencies = [
1867 "deranged", 1982 "deranged",
1868 "itoa", 1983 "itoa",
1869 "libc", 1984 "libc",
1985 "num-conv",
1870 "num_threads", 1986 "num_threads",
1871 "powerfmt", 1987 "powerfmt",
1872 "serde", 1988 "serde",
@@ -1882,14 +1998,24 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
1882 1998
1883[[package]] 1999[[package]]
1884name = "time-macros" 2000name = "time-macros"
1885version = "0.2.15" 2001version = "0.2.17"
1886source = "registry+https://github.com/rust-lang/crates.io-index" 2002source = "registry+https://github.com/rust-lang/crates.io-index"
1887checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" 2003checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
1888dependencies = [ 2004dependencies = [
2005 "num-conv",
1889 "time-core", 2006 "time-core",
1890] 2007]
1891 2008
1892[[package]] 2009[[package]]
2010name = "tiny-keccak"
2011version = "2.0.2"
2012source = "registry+https://github.com/rust-lang/crates.io-index"
2013checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
2014dependencies = [
2015 "crunchy",
2016]
2017
2018[[package]]
1893name = "tinyvec" 2019name = "tinyvec"
1894version = "1.6.0" 2020version = "1.6.0"
1895source = "registry+https://github.com/rust-lang/crates.io-index" 2021source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1906,9 +2032,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1906 2032
1907[[package]] 2033[[package]]
1908name = "tokio" 2034name = "tokio"
1909version = "1.33.0" 2035version = "1.36.0"
1910source = "registry+https://github.com/rust-lang/crates.io-index" 2036source = "registry+https://github.com/rust-lang/crates.io-index"
1911checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" 2037checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
1912dependencies = [ 2038dependencies = [
1913 "backtrace", 2039 "backtrace",
1914 "bytes", 2040 "bytes",
@@ -1916,20 +2042,20 @@ dependencies = [
1916 "mio", 2042 "mio",
1917 "num_cpus", 2043 "num_cpus",
1918 "pin-project-lite", 2044 "pin-project-lite",
1919 "socket2 0.5.5", 2045 "socket2",
1920 "tokio-macros", 2046 "tokio-macros",
1921 "windows-sys", 2047 "windows-sys 0.48.0",
1922] 2048]
1923 2049
1924[[package]] 2050[[package]]
1925name = "tokio-macros" 2051name = "tokio-macros"
1926version = "2.1.0" 2052version = "2.2.0"
1927source = "registry+https://github.com/rust-lang/crates.io-index" 2053source = "registry+https://github.com/rust-lang/crates.io-index"
1928checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 2054checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
1929dependencies = [ 2055dependencies = [
1930 "proc-macro2", 2056 "proc-macro2",
1931 "quote", 2057 "quote",
1932 "syn 2.0.38", 2058 "syn 2.0.48",
1933] 2059]
1934 2060
1935[[package]] 2061[[package]]
@@ -1945,9 +2071,9 @@ dependencies = [
1945 2071
1946[[package]] 2072[[package]]
1947name = "tokio-tungstenite" 2073name = "tokio-tungstenite"
1948version = "0.20.1" 2074version = "0.21.0"
1949source = "registry+https://github.com/rust-lang/crates.io-index" 2075source = "registry+https://github.com/rust-lang/crates.io-index"
1950checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" 2076checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"
1951dependencies = [ 2077dependencies = [
1952 "futures-util", 2078 "futures-util",
1953 "log", 2079 "log",
@@ -1956,12 +2082,51 @@ dependencies = [
1956] 2082]
1957 2083
1958[[package]] 2084[[package]]
2085name = "tokio-util"
2086version = "0.7.10"
2087source = "registry+https://github.com/rust-lang/crates.io-index"
2088checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
2089dependencies = [
2090 "bytes",
2091 "futures-core",
2092 "futures-sink",
2093 "pin-project-lite",
2094 "tokio",
2095 "tracing",
2096]
2097
2098[[package]]
1959name = "toml" 2099name = "toml"
1960version = "0.5.11" 2100version = "0.8.10"
1961source = "registry+https://github.com/rust-lang/crates.io-index" 2101source = "registry+https://github.com/rust-lang/crates.io-index"
1962checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 2102checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290"
1963dependencies = [ 2103dependencies = [
1964 "serde", 2104 "serde",
2105 "serde_spanned",
2106 "toml_datetime",
2107 "toml_edit",
2108]
2109
2110[[package]]
2111name = "toml_datetime"
2112version = "0.6.5"
2113source = "registry+https://github.com/rust-lang/crates.io-index"
2114checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
2115dependencies = [
2116 "serde",
2117]
2118
2119[[package]]
2120name = "toml_edit"
2121version = "0.22.4"
2122source = "registry+https://github.com/rust-lang/crates.io-index"
2123checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951"
2124dependencies = [
2125 "indexmap",
2126 "serde",
2127 "serde_spanned",
2128 "toml_datetime",
2129 "winnow",
1965] 2130]
1966 2131
1967[[package]] 2132[[package]]
@@ -2012,7 +2177,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
2012dependencies = [ 2177dependencies = [
2013 "proc-macro2", 2178 "proc-macro2",
2014 "quote", 2179 "quote",
2015 "syn 2.0.38", 2180 "syn 2.0.48",
2016] 2181]
2017 2182
2018[[package]] 2183[[package]]
@@ -2026,10 +2191,20 @@ dependencies = [
2026] 2191]
2027 2192
2028[[package]] 2193[[package]]
2194name = "tracing-error"
2195version = "0.2.0"
2196source = "registry+https://github.com/rust-lang/crates.io-index"
2197checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
2198dependencies = [
2199 "tracing",
2200 "tracing-subscriber",
2201]
2202
2203[[package]]
2029name = "tracing-log" 2204name = "tracing-log"
2030version = "0.1.4" 2205version = "0.2.0"
2031source = "registry+https://github.com/rust-lang/crates.io-index" 2206source = "registry+https://github.com/rust-lang/crates.io-index"
2032checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" 2207checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
2033dependencies = [ 2208dependencies = [
2034 "log", 2209 "log",
2035 "once_cell", 2210 "once_cell",
@@ -2038,9 +2213,9 @@ dependencies = [
2038 2213
2039[[package]] 2214[[package]]
2040name = "tracing-subscriber" 2215name = "tracing-subscriber"
2041version = "0.3.17" 2216version = "0.3.18"
2042source = "registry+https://github.com/rust-lang/crates.io-index" 2217source = "registry+https://github.com/rust-lang/crates.io-index"
2043checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" 2218checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
2044dependencies = [ 2219dependencies = [
2045 "matchers", 2220 "matchers",
2046 "nu-ansi-term", 2221 "nu-ansi-term",
@@ -2056,16 +2231,10 @@ dependencies = [
2056] 2231]
2057 2232
2058[[package]] 2233[[package]]
2059name = "try-lock"
2060version = "0.2.4"
2061source = "registry+https://github.com/rust-lang/crates.io-index"
2062checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
2063
2064[[package]]
2065name = "tungstenite" 2234name = "tungstenite"
2066version = "0.20.1" 2235version = "0.21.0"
2067source = "registry+https://github.com/rust-lang/crates.io-index" 2236source = "registry+https://github.com/rust-lang/crates.io-index"
2068checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" 2237checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"
2069dependencies = [ 2238dependencies = [
2070 "byteorder", 2239 "byteorder",
2071 "bytes", 2240 "bytes",
@@ -2094,9 +2263,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
2094 2263
2095[[package]] 2264[[package]]
2096name = "unicode-bidi" 2265name = "unicode-bidi"
2097version = "0.3.13" 2266version = "0.3.15"
2098source = "registry+https://github.com/rust-lang/crates.io-index" 2267source = "registry+https://github.com/rust-lang/crates.io-index"
2099checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 2268checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
2100 2269
2101[[package]] 2270[[package]]
2102name = "unicode-ident" 2271name = "unicode-ident"
@@ -2115,9 +2284,9 @@ dependencies = [
2115 2284
2116[[package]] 2285[[package]]
2117name = "unicode-segmentation" 2286name = "unicode-segmentation"
2118version = "1.10.1" 2287version = "1.11.0"
2119source = "registry+https://github.com/rust-lang/crates.io-index" 2288source = "registry+https://github.com/rust-lang/crates.io-index"
2120checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 2289checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
2121 2290
2122[[package]] 2291[[package]]
2123name = "unicode_categories" 2292name = "unicode_categories"
@@ -2127,9 +2296,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
2127 2296
2128[[package]] 2297[[package]]
2129name = "url" 2298name = "url"
2130version = "2.4.1" 2299version = "2.5.0"
2131source = "registry+https://github.com/rust-lang/crates.io-index" 2300source = "registry+https://github.com/rust-lang/crates.io-index"
2132checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" 2301checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
2133dependencies = [ 2302dependencies = [
2134 "form_urlencoded", 2303 "form_urlencoded",
2135 "idna", 2304 "idna",
@@ -2137,6 +2306,12 @@ dependencies = [
2137] 2306]
2138 2307
2139[[package]] 2308[[package]]
2309name = "urlencoding"
2310version = "2.1.3"
2311source = "registry+https://github.com/rust-lang/crates.io-index"
2312checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
2313
2314[[package]]
2140name = "utf-8" 2315name = "utf-8"
2141version = "0.7.6" 2316version = "0.7.6"
2142source = "registry+https://github.com/rust-lang/crates.io-index" 2317source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2144,9 +2319,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
2144 2319
2145[[package]] 2320[[package]]
2146name = "uuid" 2321name = "uuid"
2147version = "1.5.0" 2322version = "1.7.0"
2148source = "registry+https://github.com/rust-lang/crates.io-index" 2323source = "registry+https://github.com/rust-lang/crates.io-index"
2149checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" 2324checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
2150dependencies = [ 2325dependencies = [
2151 "getrandom", 2326 "getrandom",
2152 "rand", 2327 "rand",
@@ -2171,15 +2346,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2171checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2346checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
2172 2347
2173[[package]] 2348[[package]]
2174name = "want"
2175version = "0.3.1"
2176source = "registry+https://github.com/rust-lang/crates.io-index"
2177checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
2178dependencies = [
2179 "try-lock",
2180]
2181
2182[[package]]
2183name = "wasi" 2349name = "wasi"
2184version = "0.11.0+wasi-snapshot-preview1" 2350version = "0.11.0+wasi-snapshot-preview1"
2185source = "registry+https://github.com/rust-lang/crates.io-index" 2351source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2187,13 +2353,13 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
2187 2353
2188[[package]] 2354[[package]]
2189name = "webol" 2355name = "webol"
2190version = "0.3.0" 2356version = "0.3.1"
2191dependencies = [ 2357dependencies = [
2192 "axum", 2358 "axum",
2193 "axum-macros", 2359 "axum-macros",
2360 "color-eyre",
2194 "config", 2361 "config",
2195 "dashmap", 2362 "dashmap",
2196 "once_cell",
2197 "serde", 2363 "serde",
2198 "serde_json", 2364 "serde_json",
2199 "sqlx", 2365 "sqlx",
@@ -2239,7 +2405,16 @@ version = "0.48.0"
2239source = "registry+https://github.com/rust-lang/crates.io-index" 2405source = "registry+https://github.com/rust-lang/crates.io-index"
2240checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2406checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
2241dependencies = [ 2407dependencies = [
2242 "windows-targets", 2408 "windows-targets 0.48.5",
2409]
2410
2411[[package]]
2412name = "windows-sys"
2413version = "0.52.0"
2414source = "registry+https://github.com/rust-lang/crates.io-index"
2415checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
2416dependencies = [
2417 "windows-targets 0.52.0",
2243] 2418]
2244 2419
2245[[package]] 2420[[package]]
@@ -2248,13 +2423,28 @@ version = "0.48.5"
2248source = "registry+https://github.com/rust-lang/crates.io-index" 2423source = "registry+https://github.com/rust-lang/crates.io-index"
2249checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2424checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
2250dependencies = [ 2425dependencies = [
2251 "windows_aarch64_gnullvm", 2426 "windows_aarch64_gnullvm 0.48.5",
2252 "windows_aarch64_msvc", 2427 "windows_aarch64_msvc 0.48.5",
2253 "windows_i686_gnu", 2428 "windows_i686_gnu 0.48.5",
2254 "windows_i686_msvc", 2429 "windows_i686_msvc 0.48.5",
2255 "windows_x86_64_gnu", 2430 "windows_x86_64_gnu 0.48.5",
2256 "windows_x86_64_gnullvm", 2431 "windows_x86_64_gnullvm 0.48.5",
2257 "windows_x86_64_msvc", 2432 "windows_x86_64_msvc 0.48.5",
2433]
2434
2435[[package]]
2436name = "windows-targets"
2437version = "0.52.0"
2438source = "registry+https://github.com/rust-lang/crates.io-index"
2439checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
2440dependencies = [
2441 "windows_aarch64_gnullvm 0.52.0",
2442 "windows_aarch64_msvc 0.52.0",
2443 "windows_i686_gnu 0.52.0",
2444 "windows_i686_msvc 0.52.0",
2445 "windows_x86_64_gnu 0.52.0",
2446 "windows_x86_64_gnullvm 0.52.0",
2447 "windows_x86_64_msvc 0.52.0",
2258] 2448]
2259 2449
2260[[package]] 2450[[package]]
@@ -2264,42 +2454,93 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2264checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2454checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
2265 2455
2266[[package]] 2456[[package]]
2457name = "windows_aarch64_gnullvm"
2458version = "0.52.0"
2459source = "registry+https://github.com/rust-lang/crates.io-index"
2460checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
2461
2462[[package]]
2267name = "windows_aarch64_msvc" 2463name = "windows_aarch64_msvc"
2268version = "0.48.5" 2464version = "0.48.5"
2269source = "registry+https://github.com/rust-lang/crates.io-index" 2465source = "registry+https://github.com/rust-lang/crates.io-index"
2270checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2466checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
2271 2467
2272[[package]] 2468[[package]]
2469name = "windows_aarch64_msvc"
2470version = "0.52.0"
2471source = "registry+https://github.com/rust-lang/crates.io-index"
2472checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
2473
2474[[package]]
2273name = "windows_i686_gnu" 2475name = "windows_i686_gnu"
2274version = "0.48.5" 2476version = "0.48.5"
2275source = "registry+https://github.com/rust-lang/crates.io-index" 2477source = "registry+https://github.com/rust-lang/crates.io-index"
2276checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2478checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
2277 2479
2278[[package]] 2480[[package]]
2481name = "windows_i686_gnu"
2482version = "0.52.0"
2483source = "registry+https://github.com/rust-lang/crates.io-index"
2484checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
2485
2486[[package]]
2279name = "windows_i686_msvc" 2487name = "windows_i686_msvc"
2280version = "0.48.5" 2488version = "0.48.5"
2281source = "registry+https://github.com/rust-lang/crates.io-index" 2489source = "registry+https://github.com/rust-lang/crates.io-index"
2282checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2490checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
2283 2491
2284[[package]] 2492[[package]]
2493name = "windows_i686_msvc"
2494version = "0.52.0"
2495source = "registry+https://github.com/rust-lang/crates.io-index"
2496checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
2497
2498[[package]]
2285name = "windows_x86_64_gnu" 2499name = "windows_x86_64_gnu"
2286version = "0.48.5" 2500version = "0.48.5"
2287source = "registry+https://github.com/rust-lang/crates.io-index" 2501source = "registry+https://github.com/rust-lang/crates.io-index"
2288checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2502checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
2289 2503
2290[[package]] 2504[[package]]
2505name = "windows_x86_64_gnu"
2506version = "0.52.0"
2507source = "registry+https://github.com/rust-lang/crates.io-index"
2508checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
2509
2510[[package]]
2291name = "windows_x86_64_gnullvm" 2511name = "windows_x86_64_gnullvm"
2292version = "0.48.5" 2512version = "0.48.5"
2293source = "registry+https://github.com/rust-lang/crates.io-index" 2513source = "registry+https://github.com/rust-lang/crates.io-index"
2294checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2514checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
2295 2515
2296[[package]] 2516[[package]]
2517name = "windows_x86_64_gnullvm"
2518version = "0.52.0"
2519source = "registry+https://github.com/rust-lang/crates.io-index"
2520checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
2521
2522[[package]]
2297name = "windows_x86_64_msvc" 2523name = "windows_x86_64_msvc"
2298version = "0.48.5" 2524version = "0.48.5"
2299source = "registry+https://github.com/rust-lang/crates.io-index" 2525source = "registry+https://github.com/rust-lang/crates.io-index"
2300checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2526checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
2301 2527
2302[[package]] 2528[[package]]
2529name = "windows_x86_64_msvc"
2530version = "0.52.0"
2531source = "registry+https://github.com/rust-lang/crates.io-index"
2532checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
2533
2534[[package]]
2535name = "winnow"
2536version = "0.5.39"
2537source = "registry+https://github.com/rust-lang/crates.io-index"
2538checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29"
2539dependencies = [
2540 "memchr",
2541]
2542
2543[[package]]
2303name = "yaml-rust" 2544name = "yaml-rust"
2304version = "0.4.5" 2545version = "0.4.5"
2305source = "registry+https://github.com/rust-lang/crates.io-index" 2546source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2310,26 +2551,26 @@ dependencies = [
2310 2551
2311[[package]] 2552[[package]]
2312name = "zerocopy" 2553name = "zerocopy"
2313version = "0.7.23" 2554version = "0.7.32"
2314source = "registry+https://github.com/rust-lang/crates.io-index" 2555source = "registry+https://github.com/rust-lang/crates.io-index"
2315checksum = "e50cbb27c30666a6108abd6bc7577556265b44f243e2be89a8bc4e07a528c107" 2556checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
2316dependencies = [ 2557dependencies = [
2317 "zerocopy-derive", 2558 "zerocopy-derive",
2318] 2559]
2319 2560
2320[[package]] 2561[[package]]
2321name = "zerocopy-derive" 2562name = "zerocopy-derive"
2322version = "0.7.23" 2563version = "0.7.32"
2323source = "registry+https://github.com/rust-lang/crates.io-index" 2564source = "registry+https://github.com/rust-lang/crates.io-index"
2324checksum = "a25f293fe55f0a48e7010d65552bb63704f6ceb55a1a385da10d41d8f78e4a3d" 2565checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
2325dependencies = [ 2566dependencies = [
2326 "proc-macro2", 2567 "proc-macro2",
2327 "quote", 2568 "quote",
2328 "syn 2.0.38", 2569 "syn 2.0.48",
2329] 2570]
2330 2571
2331[[package]] 2572[[package]]
2332name = "zeroize" 2573name = "zeroize"
2333version = "1.6.0" 2574version = "1.7.0"
2334source = "registry+https://github.com/rust-lang/crates.io-index" 2575source = "registry+https://github.com/rust-lang/crates.io-index"
2335checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" 2576checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
diff --git a/Cargo.toml b/Cargo.toml
index 3207453..0fb250a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,22 +1,22 @@
1[package] 1[package]
2name = "webol" 2name = "webol"
3version = "0.3.0" 3version = "0.3.1"
4edition = "2021" 4edition = "2021"
5 5
6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 7
8[dependencies] 8[dependencies]
9axum = { version = "0.6.20", features = ["headers", "ws"] } 9axum = { version = "0.7", features = ["ws"] }
10tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread"] } 10tokio = { version = "1.34", features = ["macros", "rt-multi-thread"] }
11tracing = "0.1.40" 11tracing = "0.1"
12tracing-subscriber = { version = "0.3.17", features = ["env-filter", "local-time", "time"] } 12tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time", "time"] }
13time = { version = "0.3.30", features = ["macros"] } 13time = { version = "0.3", features = ["macros"] }
14serde = { version = "1.0.190", features = ["derive"] } 14serde = { version = "1.0", features = ["derive"] }
15serde_json = "1.0.107" 15serde_json = "1.0"
16config = "0.13.3" 16config = "0.14"
17once_cell = "1.18.0" 17sqlx = { version = "0.7", features = ["postgres", "runtime-tokio"]}
18sqlx = { version = "0.7.2", features = ["postgres", "runtime-tokio"]} 18surge-ping = "0.8"
19surge-ping = "0.8.0" 19axum-macros = "0.4"
20axum-macros = "0.3.8" 20uuid = { version = "1.6", features = ["v4", "fast-rng"] }
21uuid = { version = "1.5.0", features = ["v4", "fast-rng"] } 21dashmap = "5.5"
22dashmap = "5.5.3" 22color-eyre = "0.6"
diff --git a/Dockerfile b/Dockerfile
index d4473e9..3336fe2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,22 +5,15 @@ RUN cd /tmp && \
5 mkdir /dpkg && \ 5 mkdir /dpkg && \
6 for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done 6 for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done
7 7
8FROM lukemathwalker/cargo-chef:latest-rust-1.73.0 as chef 8FROM rust:1.76 as builder
9WORKDIR app 9WORKDIR /app
10
11FROM chef AS planner
12COPY . . 10COPY . .
13RUN cargo chef prepare --recipe-path recipe.json 11RUN cargo install --path .
14 12
15FROM chef as builder
16COPY --from=planner /app/recipe.json recipe.json
17RUN cargo chef cook --release --recipe-path recipe.json
18COPY . .
19RUN cargo build --release
20 13
21FROM gcr.io/distroless/cc 14FROM gcr.io/distroless/cc
22COPY --from=builder /app/target/release/webol / 15COPY --from=builder /app/target/release/webol /
23COPY --from=deb_extractor /dpkg / 16COPY --from=deb_extractor /dpkg /
24 17
25EXPOSE 7229 18EXPOSE 7229
26ENTRYPOINT ["./webol"] \ No newline at end of file 19ENTRYPOINT ["./webol"]
diff --git a/README.md b/README.md
index e4a6c44..eabc051 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,4 @@ WEBOL_APIKEY: `String`
6 6
7WEBOL_SERVERADDR: `Option<String>` (0.0.0.0:7229) 7WEBOL_SERVERADDR: `Option<String>` (0.0.0.0:7229)
8 8
9WEBOL_BINDADDR: `Option<String>` (0.0.0.0:1111) 9WEBOL_PINGTIMEOUT: `Option<i64>` (10)
10
11WEBOL_PINGTIMEOUT: `Option<i64>` (10) \ No newline at end of file
diff --git a/src/auth.rs b/src/auth.rs
index e4b1c2f..feca652 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -1,18 +1,15 @@
1use axum::headers::HeaderValue; 1use axum::http::{StatusCode, HeaderValue};
2use axum::http::StatusCode;
3use axum::http::header::ToStrError; 2use axum::http::header::ToStrError;
4use tracing::{debug, error, trace}; 3use tracing::{debug, error, trace};
5use crate::auth::AuthError::{MissingSecret, WrongSecret}; 4use crate::auth::Error::{MissingSecret, WrongSecret};
6use crate::config::SETTINGS; 5use crate::config::Config;
7 6
8pub fn auth(secret: Option<&HeaderValue>) -> Result<bool, AuthError> { 7pub fn auth(config: &Config, secret: Option<&HeaderValue>) -> Result<bool, Error> {
9 debug!("auth request with secret {:?}", secret); 8 debug!("auth request with secret {:?}", secret);
10 if let Some(value) = secret { 9 if let Some(value) = secret {
11 trace!("value exists"); 10 trace!("value exists");
12 let key = SETTINGS 11 let key = &config.apikey;
13 .get_string("apikey") 12 if value.to_str().map_err(Error::HeaderToStr)? == key.as_str() {
14 .map_err(AuthError::Config)?;
15 if value.to_str().map_err(AuthError::HeaderToStr)? == key.as_str() {
16 debug!("successful auth"); 13 debug!("successful auth");
17 Ok(true) 14 Ok(true)
18 } else { 15 } else {
@@ -26,22 +23,17 @@ pub fn auth(secret: Option<&HeaderValue>) -> Result<bool, AuthError> {
26} 23}
27 24
28#[derive(Debug)] 25#[derive(Debug)]
29pub enum AuthError { 26pub enum Error {
30 WrongSecret, 27 WrongSecret,
31 MissingSecret, 28 MissingSecret,
32 Config(config::ConfigError),
33 HeaderToStr(ToStrError) 29 HeaderToStr(ToStrError)
34} 30}
35 31
36impl AuthError { 32impl Error {
37 pub fn get(self) -> (StatusCode, &'static str) { 33 pub fn get(self) -> (StatusCode, &'static str) {
38 match self { 34 match self {
39 Self::WrongSecret => (StatusCode::UNAUTHORIZED, "Wrong credentials"), 35 Self::WrongSecret => (StatusCode::UNAUTHORIZED, "Wrong credentials"),
40 Self::MissingSecret => (StatusCode::BAD_REQUEST, "Missing credentials"), 36 Self::MissingSecret => (StatusCode::BAD_REQUEST, "Missing credentials"),
41 Self::Config(err) => {
42 error!("server error: {}", err.to_string());
43 (StatusCode::INTERNAL_SERVER_ERROR, "Server Error")
44 },
45 Self::HeaderToStr(err) => { 37 Self::HeaderToStr(err) => {
46 error!("server error: {}", err.to_string()); 38 error!("server error: {}", err.to_string());
47 (StatusCode::INTERNAL_SERVER_ERROR, "Server Error") 39 (StatusCode::INTERNAL_SERVER_ERROR, "Server Error")
diff --git a/src/config.rs b/src/config.rs
index 4c79810..4319ffc 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,11 +1,25 @@
1use config::Config; 1use config::File;
2use once_cell::sync::Lazy; 2use serde::Deserialize;
3 3
4pub static SETTINGS: Lazy<Config> = Lazy::new(setup); 4#[derive(Debug, Clone, Deserialize)]
5pub struct Config {
6 pub database_url: String,
7 pub apikey: String,
8 pub serveraddr: String,
9 pub pingtimeout: i64,
10}
11
12impl Config {
13 pub fn load() -> Result<Self, config::ConfigError> {
14 let config = config::Config::builder()
15 .set_default("serveraddr", "0.0.0.0:7229")?
16 .set_default("pingtimeout", 10)?
17 .add_source(File::with_name("config.toml").required(false))
18 .add_source(File::with_name("config.dev.toml").required(false))
19 .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_"))
20 .build()?;
21
22 config.try_deserialize()
23 }
24}
5 25
6fn setup() -> Config {
7 Config::builder()
8 .add_source(config::Environment::with_prefix("WEBOL").separator("_"))
9 .build()
10 .unwrap()
11} \ No newline at end of file
diff --git a/src/db.rs b/src/db.rs
index 8a6b16e..489a000 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -1,13 +1,7 @@
1#[cfg(debug_assertions)]
2use std::env;
3
4use serde::Serialize; 1use serde::Serialize;
5use sqlx::{PgPool, postgres::PgPoolOptions}; 2use sqlx::{PgPool, postgres::PgPoolOptions};
6use tracing::{debug, info}; 3use tracing::{debug, info};
7 4
8#[cfg(not(debug_assertions))]
9use crate::config::SETTINGS;
10
11#[derive(Serialize, Debug)] 5#[derive(Serialize, Debug)]
12pub struct Device { 6pub struct Device {
13 pub id: String, 7 pub id: String,
@@ -17,18 +11,12 @@ pub struct Device {
17 pub times: Option<Vec<i64>> 11 pub times: Option<Vec<i64>>
18} 12}
19 13
20pub async fn init_db_pool() -> PgPool { 14pub async fn init_db_pool(db_url: &str) -> PgPool {
21 #[cfg(not(debug_assertions))]
22 let db_url = SETTINGS.get_string("database.url").unwrap();
23
24 #[cfg(debug_assertions)]
25 let db_url = env::var("DATABASE_URL").unwrap();
26
27 debug!("attempt to connect dbPool to '{}'", db_url); 15 debug!("attempt to connect dbPool to '{}'", db_url);
28 16
29 let pool = PgPoolOptions::new() 17 let pool = PgPoolOptions::new()
30 .max_connections(5) 18 .max_connections(5)
31 .connect(&db_url) 19 .connect(db_url)
32 .await 20 .await
33 .unwrap(); 21 .unwrap();
34 22
diff --git a/src/error.rs b/src/error.rs
index 5b82534..56d6c52 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -4,10 +4,10 @@ use axum::Json;
4use axum::response::{IntoResponse, Response}; 4use axum::response::{IntoResponse, Response};
5use serde_json::json; 5use serde_json::json;
6use tracing::error; 6use tracing::error;
7use crate::auth::AuthError; 7use crate::auth::Error as AuthError;
8 8
9#[derive(Debug)] 9#[derive(Debug)]
10pub enum WebolError { 10pub enum Error {
11 Generic, 11 Generic,
12 Auth(AuthError), 12 Auth(AuthError),
13 DB(sqlx::Error), 13 DB(sqlx::Error),
@@ -16,7 +16,7 @@ pub enum WebolError {
16 Broadcast(io::Error), 16 Broadcast(io::Error),
17} 17}
18 18
19impl IntoResponse for WebolError { 19impl IntoResponse for Error {
20 fn into_response(self) -> Response { 20 fn into_response(self) -> Response {
21 let (status, error_message) = match self { 21 let (status, error_message) = match self {
22 Self::Auth(err) => { 22 Self::Auth(err) => {
@@ -45,4 +45,4 @@ impl IntoResponse for WebolError {
45 })); 45 }));
46 (status, body).into_response() 46 (status, body).into_response()
47 } 47 }
48} \ No newline at end of file 48}
diff --git a/src/main.rs b/src/main.rs
index e96b736..4ef129b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,12 +8,12 @@ use time::util::local_offset;
8use tokio::sync::broadcast::{channel, Sender}; 8use tokio::sync::broadcast::{channel, Sender};
9use tracing::{info, level_filters::LevelFilter}; 9use tracing::{info, level_filters::LevelFilter};
10use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*}; 10use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*};
11use crate::config::SETTINGS; 11use crate::config::Config;
12use crate::db::init_db_pool; 12use crate::db::init_db_pool;
13use crate::routes::device::{get_device, post_device, put_device}; 13use crate::routes::device;
14use crate::routes::start::start; 14use crate::routes::start::start;
15use crate::routes::status::status; 15use crate::routes::status::status;
16use crate::services::ping::{BroadcastCommands, PingMap}; 16use crate::services::ping::{BroadcastCommands, StatusMap};
17 17
18mod auth; 18mod auth;
19mod config; 19mod config;
@@ -24,7 +24,10 @@ mod error;
24mod services; 24mod services;
25 25
26#[tokio::main] 26#[tokio::main]
27async fn main() { 27async fn main() -> color_eyre::eyre::Result<()> {
28
29 color_eyre::install()?;
30
28 unsafe { local_offset::set_soundness(local_offset::Soundness::Unsound); } 31 unsafe { local_offset::set_soundness(local_offset::Soundness::Unsound); }
29 let time_format = 32 let time_format =
30 time::macros::format_description!("[year]-[month]-[day] [hour]:[minute]:[second]"); 33 time::macros::format_description!("[year]-[month]-[day] [hour]:[minute]:[second]");
@@ -43,35 +46,39 @@ async fn main() {
43 46
44 let version = env!("CARGO_PKG_VERSION"); 47 let version = env!("CARGO_PKG_VERSION");
45 48
49 let config = Config::load()?;
50
46 info!("start webol v{}", version); 51 info!("start webol v{}", version);
47 52
48 let db = init_db_pool().await; 53 let db = init_db_pool(&config.database_url).await;
49 sqlx::migrate!().run(&db).await.unwrap(); 54 sqlx::migrate!().run(&db).await.unwrap();
50 55
51 let (tx, _) = channel(32); 56 let (tx, _) = channel(32);
52 57
53 let ping_map: PingMap = DashMap::new(); 58 let ping_map: StatusMap = DashMap::new();
54 59
55 let shared_state = Arc::new(AppState { db, ping_send: tx, ping_map }); 60 let shared_state = Arc::new(AppState { db, config: config.clone(), ping_send: tx, ping_map });
56 61
57 let app = Router::new() 62 let app = Router::new()
58 .route("/start", post(start)) 63 .route("/start", post(start))
59 .route("/device", get(get_device)) 64 .route("/device", get(device::get))
60 .route("/device", put(put_device)) 65 .route("/device", put(device::put))
61 .route("/device", post(post_device)) 66 .route("/device", post(device::post))
62 .route("/status", get(status)) 67 .route("/status", get(status))
63 .with_state(shared_state); 68 .with_state(shared_state);
64 69
65 let addr = SETTINGS.get_string("serveraddr").unwrap_or("0.0.0.0:7229".to_string()); 70 let addr = config.serveraddr;
66 info!("start server on {}", addr); 71 info!("start server on {}", addr);
67 axum::Server::bind(&addr.parse().unwrap()) 72 let listener = tokio::net::TcpListener::bind(addr)
68 .serve(app.into_make_service()) 73 .await?;
69 .await 74 axum::serve(listener, app).await?;
70 .unwrap(); 75
76 Ok(())
71} 77}
72 78
73pub struct AppState { 79pub struct AppState {
74 db: PgPool, 80 db: PgPool,
81 config: Config,
75 ping_send: Sender<BroadcastCommands>, 82 ping_send: Sender<BroadcastCommands>,
76 ping_map: PingMap, 83 ping_map: StatusMap,
77} \ No newline at end of file 84}
diff --git a/src/routes/device.rs b/src/routes/device.rs
index 678d117..c85df1b 100644
--- a/src/routes/device.rs
+++ b/src/routes/device.rs
@@ -1,18 +1,18 @@
1use std::sync::Arc; 1use std::sync::Arc;
2use axum::extract::State; 2use axum::extract::State;
3use axum::headers::HeaderMap;
4use axum::Json; 3use axum::Json;
4use axum::http::HeaderMap;
5use serde::{Deserialize, Serialize}; 5use serde::{Deserialize, Serialize};
6use serde_json::{json, Value}; 6use serde_json::{json, Value};
7use tracing::{debug, info}; 7use tracing::{debug, info};
8use crate::auth::auth; 8use crate::auth::auth;
9use crate::db::Device; 9use crate::db::Device;
10use crate::error::WebolError; 10use crate::error::Error;
11 11
12pub async fn get_device(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<GetDevicePayload>) -> Result<Json<Value>, WebolError> { 12pub async fn get(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<GetDevicePayload>) -> Result<Json<Value>, Error> {
13 info!("add device {}", payload.id); 13 info!("add device {}", payload.id);
14 let secret = headers.get("authorization"); 14 let secret = headers.get("authorization");
15 if auth(secret).map_err(WebolError::Auth)? { 15 if auth(&state.config, secret).map_err(Error::Auth)? {
16 let device = sqlx::query_as!( 16 let device = sqlx::query_as!(
17 Device, 17 Device,
18 r#" 18 r#"
@@ -21,13 +21,13 @@ pub async fn get_device(State(state): State<Arc<crate::AppState>>, headers: Head
21 WHERE id = $1; 21 WHERE id = $1;
22 "#, 22 "#,
23 payload.id 23 payload.id
24 ).fetch_one(&state.db).await.map_err(WebolError::DB)?; 24 ).fetch_one(&state.db).await.map_err(Error::DB)?;
25 25
26 debug!("got device {:?}", device); 26 debug!("got device {:?}", device);
27 27
28 Ok(Json(json!(device))) 28 Ok(Json(json!(device)))
29 } else { 29 } else {
30 Err(WebolError::Generic) 30 Err(Error::Generic)
31 } 31 }
32} 32}
33 33
@@ -36,10 +36,10 @@ pub struct GetDevicePayload {
36 id: String, 36 id: String,
37} 37}
38 38
39pub async fn put_device(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PutDevicePayload>) -> Result<Json<Value>, WebolError> { 39pub async fn put(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PutDevicePayload>) -> Result<Json<Value>, Error> {
40 info!("add device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip); 40 info!("add device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip);
41 let secret = headers.get("authorization"); 41 let secret = headers.get("authorization");
42 if auth(secret).map_err(WebolError::Auth)? { 42 if auth(&state.config, secret).map_err(Error::Auth)? {
43 sqlx::query!( 43 sqlx::query!(
44 r#" 44 r#"
45 INSERT INTO devices (id, mac, broadcast_addr, ip) 45 INSERT INTO devices (id, mac, broadcast_addr, ip)
@@ -49,11 +49,11 @@ pub async fn put_device(State(state): State<Arc<crate::AppState>>, headers: Head
49 payload.mac, 49 payload.mac,
50 payload.broadcast_addr, 50 payload.broadcast_addr,
51 payload.ip 51 payload.ip
52 ).execute(&state.db).await.map_err(WebolError::DB)?; 52 ).execute(&state.db).await.map_err(Error::DB)?;
53 53
54 Ok(Json(json!(PutDeviceResponse { success: true }))) 54 Ok(Json(json!(PutDeviceResponse { success: true })))
55 } else { 55 } else {
56 Err(WebolError::Generic) 56 Err(Error::Generic)
57 } 57 }
58} 58}
59 59
@@ -70,10 +70,10 @@ pub struct PutDeviceResponse {
70 success: bool 70 success: bool
71} 71}
72 72
73pub async fn post_device(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PostDevicePayload>) -> Result<Json<Value>, WebolError> { 73pub async fn post(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PostDevicePayload>) -> Result<Json<Value>, Error> {
74 info!("edit device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip); 74 info!("edit device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip);
75 let secret = headers.get("authorization"); 75 let secret = headers.get("authorization");
76 if auth(secret).map_err(WebolError::Auth)? { 76 if auth(&state.config, secret).map_err(Error::Auth)? {
77 let device = sqlx::query_as!( 77 let device = sqlx::query_as!(
78 Device, 78 Device,
79 r#" 79 r#"
@@ -85,11 +85,11 @@ pub async fn post_device(State(state): State<Arc<crate::AppState>>, headers: Hea
85 payload.broadcast_addr, 85 payload.broadcast_addr,
86 payload.ip, 86 payload.ip,
87 payload.id 87 payload.id
88 ).fetch_one(&state.db).await.map_err(WebolError::DB)?; 88 ).fetch_one(&state.db).await.map_err(Error::DB)?;
89 89
90 Ok(Json(json!(device))) 90 Ok(Json(json!(device)))
91 } else { 91 } else {
92 Err(WebolError::Generic) 92 Err(Error::Generic)
93 } 93 }
94} 94}
95 95
diff --git a/src/routes/start.rs b/src/routes/start.rs
index 1555db3..ce95bf3 100644
--- a/src/routes/start.rs
+++ b/src/routes/start.rs
@@ -1,23 +1,26 @@
1use axum::headers::HeaderMap; 1use crate::auth::auth;
2use crate::db::Device;
3use crate::error::Error;
4use crate::services::ping::Value as PingValue;
5use crate::wol::{create_buffer, send_packet};
6use axum::extract::State;
7use axum::http::HeaderMap;
2use axum::Json; 8use axum::Json;
3use serde::{Deserialize, Serialize}; 9use serde::{Deserialize, Serialize};
4use std::sync::Arc;
5use axum::extract::State;
6use serde_json::{json, Value}; 10use serde_json::{json, Value};
11use std::sync::Arc;
7use tracing::{debug, info}; 12use tracing::{debug, info};
8use uuid::Uuid; 13use uuid::Uuid;
9use crate::auth::auth;
10use crate::config::SETTINGS;
11use crate::wol::{create_buffer, send_packet};
12use crate::db::Device;
13use crate::error::WebolError;
14use crate::services::ping::PingValue;
15 14
16#[axum_macros::debug_handler] 15#[axum_macros::debug_handler]
17pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<StartPayload>) -> Result<Json<Value>, WebolError> { 16pub async fn start(
17 State(state): State<Arc<crate::AppState>>,
18 headers: HeaderMap,
19 Json(payload): Json<Payload>,
20) -> Result<Json<Value>, Error> {
18 info!("POST request"); 21 info!("POST request");
19 let secret = headers.get("authorization"); 22 let secret = headers.get("authorization");
20 let authorized = auth(secret).map_err(WebolError::Auth)?; 23 let authorized = auth(&state.config, secret).map_err(Error::Auth)?;
21 if authorized { 24 if authorized {
22 let device = sqlx::query_as!( 25 let device = sqlx::query_as!(
23 Device, 26 Device,
@@ -27,18 +30,19 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
27 WHERE id = $1; 30 WHERE id = $1;
28 "#, 31 "#,
29 payload.id 32 payload.id
30 ).fetch_one(&state.db).await.map_err(WebolError::DB)?; 33 )
34 .fetch_one(&state.db)
35 .await
36 .map_err(Error::DB)?;
31 37
32 info!("starting {}", device.id); 38 info!("starting {}", device.id);
33 39
34 let bind_addr = SETTINGS 40 let bind_addr = "0.0.0.0:0";
35 .get_string("bindaddr")
36 .unwrap_or("0.0.0.0:1111".to_string());
37 41
38 let _ = send_packet( 42 let _ = send_packet(
39 &bind_addr.parse().map_err(WebolError::IpParse)?, 43 &bind_addr.parse().map_err(Error::IpParse)?,
40 &device.broadcast_addr.parse().map_err(WebolError::IpParse)?, 44 &device.broadcast_addr.parse().map_err(Error::IpParse)?,
41 create_buffer(&device.mac)? 45 &create_buffer(&device.mac)?,
42 )?; 46 )?;
43 let dev_id = device.id.clone(); 47 let dev_id = device.id.clone();
44 let uuid = if payload.ping.is_some_and(|ping| ping) { 48 let uuid = if payload.ping.is_some_and(|ping| ping) {
@@ -49,7 +53,7 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
49 uuid = Some(key); 53 uuid = Some(key);
50 break; 54 break;
51 } 55 }
52 }; 56 }
53 let uuid_gen = match uuid { 57 let uuid_gen = match uuid {
54 Some(u) => u, 58 Some(u) => u,
55 None => Uuid::new_v4().to_string(), 59 None => Uuid::new_v4().to_string(),
@@ -58,26 +62,46 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
58 62
59 tokio::spawn(async move { 63 tokio::spawn(async move {
60 debug!("init ping service"); 64 debug!("init ping service");
61 state.ping_map.insert(uuid_gen.clone(), PingValue { ip: device.ip.clone(), online: false }); 65 state.ping_map.insert(
66 uuid_gen.clone(),
67 PingValue {
68 ip: device.ip.clone(),
69 online: false,
70 },
71 );
62 72
63 crate::services::ping::spawn(state.ping_send.clone(), device, uuid_gen.clone(), &state.ping_map, &state.db).await 73 crate::services::ping::spawn(
74 state.ping_send.clone(),
75 &state.config,
76 device,
77 uuid_gen.clone(),
78 &state.ping_map,
79 &state.db,
80 )
81 .await;
64 }); 82 });
65 Some(uuid_genc) 83 Some(uuid_genc)
66 } else { None }; 84 } else {
67 Ok(Json(json!(StartResponse { id: dev_id, boot: true, uuid }))) 85 None
86 };
87 Ok(Json(json!(Response {
88 id: dev_id,
89 boot: true,
90 uuid
91 })))
68 } else { 92 } else {
69 Err(WebolError::Generic) 93 Err(Error::Generic)
70 } 94 }
71} 95}
72 96
73#[derive(Deserialize)] 97#[derive(Deserialize)]
74pub struct StartPayload { 98pub struct Payload {
75 id: String, 99 id: String,
76 ping: Option<bool>, 100 ping: Option<bool>,
77} 101}
78 102
79#[derive(Serialize)] 103#[derive(Serialize)]
80struct StartResponse { 104struct Response {
81 id: String, 105 id: String,
82 boot: bool, 106 boot: bool,
83 uuid: Option<String>, 107 uuid: Option<String>,
diff --git a/src/routes/status.rs b/src/routes/status.rs
index 45f3e51..31ef996 100644
--- a/src/routes/status.rs
+++ b/src/routes/status.rs
@@ -7,4 +7,4 @@ use crate::services::ping::status_websocket;
7#[axum_macros::debug_handler] 7#[axum_macros::debug_handler]
8pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response { 8pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response {
9 ws.on_upgrade(move |socket| status_websocket(socket, state)) 9 ws.on_upgrade(move |socket| status_websocket(socket, state))
10} \ No newline at end of file 10}
diff --git a/src/services/ping.rs b/src/services/ping.rs
index c3bdced..9b164c8 100644
--- a/src/services/ping.rs
+++ b/src/services/ping.rs
@@ -2,26 +2,26 @@ use std::str::FromStr;
2use std::net::IpAddr; 2use std::net::IpAddr;
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use axum::extract::{ws::WebSocket}; 5use axum::extract::ws::WebSocket;
6use axum::extract::ws::Message; 6use axum::extract::ws::Message;
7use dashmap::DashMap; 7use dashmap::DashMap;
8use sqlx::PgPool; 8use sqlx::PgPool;
9use time::{Duration, Instant}; 9use time::{Duration, Instant};
10use tokio::sync::broadcast::{Sender}; 10use tokio::sync::broadcast::Sender;
11use tracing::{debug, error, trace}; 11use tracing::{debug, error, trace};
12use crate::AppState; 12use crate::AppState;
13use crate::config::SETTINGS; 13use crate::config::Config;
14use crate::db::Device; 14use crate::db::Device;
15 15
16pub type PingMap = DashMap<String, PingValue>; 16pub type StatusMap = DashMap<String, Value>;
17 17
18#[derive(Debug, Clone)] 18#[derive(Debug, Clone)]
19pub struct PingValue { 19pub struct Value {
20 pub ip: String, 20 pub ip: String,
21 pub online: bool 21 pub online: bool
22} 22}
23 23
24pub async fn spawn(tx: Sender<BroadcastCommands>, device: Device, uuid: String, ping_map: &PingMap, db: &PgPool) { 24pub async fn spawn(tx: Sender<BroadcastCommands>, config: &Config, device: Device, uuid: String, ping_map: &StatusMap, db: &PgPool) {
25 let timer = Instant::now(); 25 let timer = Instant::now();
26 let payload = [0; 8]; 26 let payload = [0; 8];
27 27
@@ -40,7 +40,7 @@ pub async fn spawn(tx: Sender<BroadcastCommands>, device: Device, uuid: String,
40 error!("{}", ping.to_string()); 40 error!("{}", ping.to_string());
41 msg = Some(BroadcastCommands::Error(uuid.clone())); 41 msg = Some(BroadcastCommands::Error(uuid.clone()));
42 } 42 }
43 if timer.elapsed() >= Duration::minutes(SETTINGS.get_int("pingtimeout").unwrap_or(10)) { 43 if timer.elapsed() >= Duration::minutes(config.pingtimeout) {
44 msg = Some(BroadcastCommands::Timeout(uuid.clone())); 44 msg = Some(BroadcastCommands::Timeout(uuid.clone()));
45 } 45 }
46 } else { 46 } else {
@@ -63,7 +63,7 @@ pub async fn spawn(tx: Sender<BroadcastCommands>, device: Device, uuid: String,
63 timer.elapsed().whole_seconds(), 63 timer.elapsed().whole_seconds(),
64 device.id 64 device.id
65 ).execute(db).await.unwrap(); 65 ).execute(db).await.unwrap();
66 ping_map.insert(uuid.clone(), PingValue { ip: device.ip.clone(), online: true }); 66 ping_map.insert(uuid.clone(), Value { ip: device.ip.clone(), online: true });
67 tokio::time::sleep(tokio::time::Duration::from_secs(60)).await; 67 tokio::time::sleep(tokio::time::Duration::from_secs(60)).await;
68 } 68 }
69 trace!("remove {} from ping_map", uuid); 69 trace!("remove {} from ping_map", uuid);
@@ -85,17 +85,14 @@ pub async fn status_websocket(mut socket: WebSocket, state: Arc<AppState>) {
85 trace!("Search for uuid: {}", uuid); 85 trace!("Search for uuid: {}", uuid);
86 86
87 let eta = get_eta(&state.db).await; 87 let eta = get_eta(&state.db).await;
88 let _ = socket.send(Message::Text(format!("eta_{}_{}", eta, uuid))).await; 88 let _ = socket.send(Message::Text(format!("eta_{eta}_{uuid}"))).await;
89 89
90 let device_exists = state.ping_map.contains_key(&uuid); 90 let device_exists = state.ping_map.contains_key(&uuid);
91 match device_exists { 91 if device_exists {
92 true => { 92 let _ = socket.send(process_device(state.clone(), uuid).await).await;
93 let _ = socket.send(process_device(state.clone(), uuid).await).await; 93 } else {
94 }, 94 debug!("didn't find any device");
95 false => { 95 let _ = socket.send(Message::Text(format!("notfound_{uuid}"))).await;
96 debug!("didn't find any device");
97 let _ = socket.send(Message::Text(format!("notfound_{}", uuid))).await;
98 },
99 }; 96 };
100 97
101 let _ = socket.close().await; 98 let _ = socket.close().await;
@@ -110,7 +107,7 @@ async fn get_eta(db: &PgPool) -> i64 {
110 None => { vec![0] }, 107 None => { vec![0] },
111 Some(t) => t, 108 Some(t) => t,
112 }; 109 };
113 times.iter().sum::<i64>() / times.len() as i64 110 times.iter().sum::<i64>() / i64::try_from(times.len()).unwrap()
114 111
115} 112}
116 113
@@ -118,34 +115,31 @@ async fn process_device(state: Arc<AppState>, uuid: String) -> Message {
118 let pm = state.ping_map.clone().into_read_only(); 115 let pm = state.ping_map.clone().into_read_only();
119 let device = pm.get(&uuid).expect("fatal error"); 116 let device = pm.get(&uuid).expect("fatal error");
120 debug!("got device: {} (online: {})", device.ip, device.online); 117 debug!("got device: {} (online: {})", device.ip, device.online);
121 match device.online { 118 if device.online {
122 true => { 119 debug!("already started");
123 debug!("already started"); 120 Message::Text(format!("start_{uuid}"))
124 Message::Text(format!("start_{}", uuid)) 121 } else {
125 }, 122 loop {
126 false => { 123 trace!("wait for tx message");
127 loop{ 124 let message = state.ping_send.subscribe().recv().await.expect("fatal error");
128 trace!("wait for tx message"); 125 trace!("got message {:?}", message);
129 let message = state.ping_send.subscribe().recv().await.expect("fatal error"); 126 return match message {
130 trace!("got message {:?}", message); 127 BroadcastCommands::Success(msg_uuid) => {
131 return match message { 128 if msg_uuid != uuid { continue; }
132 BroadcastCommands::Success(msg_uuid) => { 129 trace!("message == uuid success");
133 if msg_uuid != uuid { continue; } 130 Message::Text(format!("start_{uuid}"))
134 trace!("message == uuid success"); 131 },
135 Message::Text(format!("start_{}", uuid)) 132 BroadcastCommands::Timeout(msg_uuid) => {
136 }, 133 if msg_uuid != uuid { continue; }
137 BroadcastCommands::Timeout(msg_uuid) => { 134 trace!("message == uuid timeout");
138 if msg_uuid != uuid { continue; } 135 Message::Text(format!("timeout_{uuid}"))
139 trace!("message == uuid timeout"); 136 },
140 Message::Text(format!("timeout_{}", uuid)) 137 BroadcastCommands::Error(msg_uuid) => {
141 }, 138 if msg_uuid != uuid { continue; }
142 BroadcastCommands::Error(msg_uuid) => { 139 trace!("message == uuid error");
143 if msg_uuid != uuid { continue; } 140 Message::Text(format!("error_{uuid}"))
144 trace!("message == uuid error");
145 Message::Text(format!("error_{}", uuid))
146 }
147 } 141 }
148 } 142 }
149 } 143 }
150 } 144 }
151} \ No newline at end of file 145}
diff --git a/src/wol.rs b/src/wol.rs
index 0cdcae3..83c0ee6 100644
--- a/src/wol.rs
+++ b/src/wol.rs
@@ -1,17 +1,17 @@
1use std::net::{SocketAddr, UdpSocket}; 1use std::net::{SocketAddr, UdpSocket};
2 2
3use crate::error::WebolError; 3use crate::error::Error;
4 4
5/// Creates the magic packet from a mac address 5/// Creates the magic packet from a mac address
6/// 6///
7/// # Panics 7/// # Panics
8/// 8///
9/// Panics if `mac_addr` is an invalid mac 9/// Panics if `mac_addr` is an invalid mac
10pub fn create_buffer(mac_addr: &str) -> Result<Vec<u8>, WebolError> { 10pub fn create_buffer(mac_addr: &str) -> Result<Vec<u8>, Error> {
11 let mut mac = Vec::new(); 11 let mut mac = Vec::new();
12 let sp = mac_addr.split(':'); 12 let sp = mac_addr.split(':');
13 for f in sp { 13 for f in sp {
14 mac.push(u8::from_str_radix(f, 16).map_err(WebolError::BufferParse)?) 14 mac.push(u8::from_str_radix(f, 16).map_err(Error::BufferParse)?);
15 }; 15 };
16 let mut buf = vec![255; 6]; 16 let mut buf = vec![255; 6];
17 for _ in 0..16 { 17 for _ in 0..16 {
@@ -23,8 +23,8 @@ pub fn create_buffer(mac_addr: &str) -> Result<Vec<u8>, WebolError> {
23} 23}
24 24
25/// Sends a buffer on UDP broadcast 25/// Sends a buffer on UDP broadcast
26pub fn send_packet(bind_addr: &SocketAddr, broadcast_addr: &SocketAddr, buffer: Vec<u8>) -> Result<usize, WebolError> { 26pub fn send_packet(bind_addr: &SocketAddr, broadcast_addr: &SocketAddr, buffer: &[u8]) -> Result<usize, Error> {
27 let socket = UdpSocket::bind(bind_addr).map_err(WebolError::Broadcast)?; 27 let socket = UdpSocket::bind(bind_addr).map_err(Error::Broadcast)?;
28 socket.set_broadcast(true).map_err(WebolError::Broadcast)?; 28 socket.set_broadcast(true).map_err(Error::Broadcast)?;
29 socket.send_to(&buffer, broadcast_addr).map_err(WebolError::Broadcast) 29 socket.send_to(buffer, broadcast_addr).map_err(Error::Broadcast)
30} 30}