From 13bcfb013c4a5ac5ea15c7ebe04f243431165c03 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 15 Aug 2021 15:13:34 +0300 Subject: Added a WIP file backend Currently unavailable for use and only has basic GET and POST operations implemented. A lot more work is needed to make it truly usable. Locking is implemented using flock() system call on Linux. --- Cargo.lock | 238 +++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 185 insertions(+), 53 deletions(-) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index fecebc8..b6ce993 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,13 +62,22 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "aho-corasick" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" +dependencies = [ + "memchr 0.1.11", +] + [[package]] name = "aho-corasick" version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ - "memchr", + "memchr 2.4.0", ] [[package]] @@ -174,7 +183,7 @@ dependencies = [ "http-types", "httparse", "lazy_static", - "log", + "log 0.4.14", "pin-project", ] @@ -187,14 +196,14 @@ dependencies = [ "concurrent-queue", "futures-lite", "libc", - "log", + "log 0.4.14", "once_cell", "parking", "polling", "slab", "socket2", "waker-fn", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -229,7 +238,7 @@ dependencies = [ "libc", "once_cell", "signal-hook", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -262,8 +271,8 @@ dependencies = [ "async-channel", "async-std", "http-types", - "log", - "memchr", + "log 0.4.14", + "memchr 2.4.0", "pin-project-lite 0.1.12", ] @@ -286,8 +295,8 @@ dependencies = [ "futures-lite", "gloo-timers", "kv-log-macro", - "log", - "memchr", + "log 0.4.14", + "memchr 2.4.0", "num_cpus", "once_cell", "pin-project-lite 0.2.7", @@ -310,7 +319,7 @@ checksum = "ba5fa6ed76cb2aa820707b4eb9ec46f42da9ce70b0eafab5e5e34942b38a44d5" dependencies = [ "libc", "wasm-bindgen", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -351,7 +360,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -494,7 +503,7 @@ dependencies = [ "num-traits", "serde", "time 0.1.44", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -514,7 +523,7 @@ checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" dependencies = [ "atty", "lazy_static", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -525,7 +534,7 @@ checksum = "a2d47c1b11006b87e492b53b313bb699ce60e16613c4dddaa91f8f7c220ab2fa" dependencies = [ "bytes", "futures-util", - "memchr", + "memchr 2.4.0", "pin-project-lite 0.2.7", "tokio", ] @@ -781,7 +790,7 @@ checksum = "18a857bc01b5ae04874234f6b5d16b8b8fa86910aa5777479c2669b5df607fce" dependencies = [ "html5ever", "kuchiki", - "regex", + "regex 1.5.4", ] [[package]] @@ -802,6 +811,16 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "env_logger" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f" +dependencies = [ + "log 0.3.9", + "regex 0.1.80", +] + [[package]] name = "env_logger" version = "0.8.4" @@ -810,8 +829,8 @@ checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" dependencies = [ "atty", "humantime", - "log", - "regex", + "log 0.4.14", + "regex 1.5.4", "termcolor", ] @@ -830,6 +849,17 @@ dependencies = [ "instant", ] +[[package]] +name = "fd-lock" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8806dd91a06a7a403a8e596f9bfbfb34e469efbc363fc9c9713e79e26472e36" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "winapi 0.3.9", +] + [[package]] name = "femme" version = "2.1.1" @@ -838,7 +868,7 @@ checksum = "2af1a24f391a5a94d756db5092c6576aad494b88a71a5a36b20c67b63e0df034" dependencies = [ "cfg-if 0.1.10", "js-sys", - "log", + "log 0.4.14", "serde", "serde_derive", "serde_json", @@ -947,7 +977,7 @@ dependencies = [ "fastrand", "futures-core", "futures-io", - "memchr", + "memchr 2.4.0", "parking", "pin-project-lite 0.2.7", "waker-fn", @@ -997,7 +1027,7 @@ dependencies = [ "futures-macro", "futures-sink", "futures-task", - "memchr", + "memchr 2.4.0", "pin-project-lite 0.2.7", "pin-utils", "proc-macro-hack", @@ -1120,7 +1150,7 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b" dependencies = [ - "log", + "log 0.4.14", "mac", "markup5ever", "proc-macro2", @@ -1143,7 +1173,7 @@ dependencies = [ "deadpool", "futures", "http-types", - "log", + "log 0.4.14", "rustls", ] @@ -1222,6 +1252,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "kittybox" version = "0.1.0" @@ -1232,18 +1272,20 @@ dependencies = [ "chrono", "easy-scraper", "ellipse", - "env_logger", + "env_logger 0.8.4", + "fd-lock", "futures", "futures-util", "http-types", "lazy_static", - "log", + "log 0.4.14", "markdown", "markup", "mobc", "mobc-redis", "mockito", "newbase60", + "paste", "prometheus", "retainer", "serde", @@ -1251,6 +1293,7 @@ dependencies = [ "serde_urlencoded", "surf", "tempdir", + "test-logger", "tide", "tide-testing", "url", @@ -1274,7 +1317,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ - "log", + "log 0.4.14", ] [[package]] @@ -1311,6 +1354,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "log" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +dependencies = [ + "log 0.4.14", +] + [[package]] name = "log" version = "0.4.14" @@ -1335,7 +1387,7 @@ checksum = "ef3aab6a1d529b112695f72beec5ee80e729cb45af58663ec902c8fac764ecdd" dependencies = [ "lazy_static", "pipeline", - "regex", + "regex 1.5.4", ] [[package]] @@ -1365,7 +1417,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" dependencies = [ - "log", + "log 0.4.14", "phf", "phf_codegen", "string_cache", @@ -1379,6 +1431,15 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +[[package]] +name = "memchr" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.4.0" @@ -1423,7 +1484,7 @@ dependencies = [ "futures-core", "futures-timer", "futures-util", - "log", + "log 0.4.14", "tokio", ] @@ -1448,9 +1509,9 @@ dependencies = [ "difference", "httparse", "lazy_static", - "log", + "log 0.4.14", "rand 0.8.4", - "regex", + "regex 1.5.4", "serde_json", "serde_urlencoded", ] @@ -1480,7 +1541,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "lexical-core", - "memchr", + "memchr 2.4.0", "version_check", ] @@ -1553,9 +1614,15 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "winapi", + "winapi 0.3.9", ] +[[package]] +name = "paste" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1668,9 +1735,9 @@ checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" dependencies = [ "cfg-if 1.0.0", "libc", - "log", + "log 0.4.14", "wepoll-ffi", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1741,7 +1808,7 @@ dependencies = [ "fnv", "lazy_static", "libc", - "memchr", + "memchr 2.4.0", "parking_lot", "procfs", "protobuf", @@ -1773,7 +1840,7 @@ dependencies = [ "libc", "rand_core 0.3.1", "rdrand", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1921,17 +1988,36 @@ dependencies = [ "bitflags", ] +[[package]] +name = "regex" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" +dependencies = [ + "aho-corasick 0.5.3", + "memchr 0.1.11", + "regex-syntax 0.3.9", + "thread_local", + "utf8-ranges", +] + [[package]] name = "regex" version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "aho-corasick 0.7.18", + "memchr 2.4.0", + "regex-syntax 0.6.25", ] +[[package]] +name = "regex-syntax" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" + [[package]] name = "regex-syntax" version = "0.6.25" @@ -1944,7 +2030,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1955,7 +2041,7 @@ checksum = "59039dbf4a344af919780e9acdf7f9ce95deffb0152a72eca94b89d6a2bf66c0" dependencies = [ "async-lock", "async-timer", - "log", + "log 0.4.14", "rand 0.8.4", ] @@ -1971,7 +2057,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1996,7 +2082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ "base64 0.12.3", - "log", + "log 0.4.14", "ring", "sct", "webpki", @@ -2034,7 +2120,7 @@ dependencies = [ "cssparser", "derive_more", "fxhash", - "log", + "log 0.4.14", "matches", "phf", "phf_codegen", @@ -2196,7 +2282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2319,7 +2405,7 @@ dependencies = [ "futures-util", "http-client", "http-types", - "log", + "log 0.4.14", "mime_guess", "pin-project-lite 0.2.7", "serde", @@ -2374,6 +2460,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "test-logger" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55ec868b79cb8e63f8921843c10e3083137cfaa171a67209e6a2656ccd4d8a" +dependencies = [ + "env_logger 0.3.5", +] + [[package]] name = "thin-slice" version = "0.1.1" @@ -2400,6 +2495,25 @@ dependencies = [ "syn", ] +[[package]] +name = "thread-id" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" +dependencies = [ + "kernel32-sys", + "libc", +] + +[[package]] +name = "thread_local" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" +dependencies = [ + "thread-id", +] + [[package]] name = "tide" version = "0.16.0" @@ -2416,7 +2530,7 @@ dependencies = [ "http-client", "http-types", "kv-log-macro", - "log", + "log 0.4.14", "pin-project-lite 0.2.7", "route-recognizer", "serde", @@ -2443,7 +2557,7 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2458,7 +2572,7 @@ dependencies = [ "stdweb", "time-macros", "version_check", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2507,7 +2621,7 @@ checksum = "98c8b05dc14c75ea83d63dd391100353789f5f24b8b3866542a5e85c8be8e985" dependencies = [ "autocfg", "bytes", - "memchr", + "memchr 2.4.0", "num_cpus", "pin-project-lite 0.2.7", ] @@ -2521,7 +2635,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "log", + "log 0.4.14", "pin-project-lite 0.2.7", "tokio", ] @@ -2606,6 +2720,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8-ranges" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" + [[package]] name = "value-bag" version = "1.0.0-alpha.7" @@ -2661,7 +2781,7 @@ checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" dependencies = [ "bumpalo", "lazy_static", - "log", + "log 0.4.14", "proc-macro2", "quote", "syn", @@ -2747,6 +2867,12 @@ dependencies = [ "cc", ] +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -2757,6 +2883,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2769,7 +2901,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] -- cgit 1.4.1