Unify dependencies

This commit is contained in:
Adrian Woźniak 2021-08-13 14:01:00 +02:00
parent 4351483b2e
commit 2d79c91087
No known key found for this signature in database
GPG Key ID: DE43476F72AD3F6C
10 changed files with 216 additions and 144 deletions

312
Cargo.lock generated
View File

@ -21,8 +21,8 @@ dependencies = [
"parking_lot",
"pin-project 0.4.28",
"smallvec",
"tokio",
"tokio-util",
"tokio 0.2.25",
"tokio-util 0.3.1",
"trust-dns-proto",
"trust-dns-resolver",
]
@ -39,8 +39,8 @@ dependencies = [
"futures-sink",
"log",
"pin-project 0.4.28",
"tokio",
"tokio-util",
"tokio 0.2.25",
"tokio-util 0.3.1",
]
[[package]]
@ -122,7 +122,7 @@ dependencies = [
"futures-core",
"futures-util",
"fxhash",
"h2",
"h2 0.2.7",
"http",
"httparse",
"indexmap",
@ -196,7 +196,7 @@ dependencies = [
"futures-channel",
"futures-util",
"smallvec",
"tokio",
"tokio 0.2.25",
]
[[package]]
@ -212,11 +212,11 @@ dependencies = [
"futures-channel",
"futures-util",
"log",
"mio",
"mio 0.6.23",
"mio-uds",
"num_cpus",
"slab",
"socket2",
"socket2 0.3.19",
]
[[package]]
@ -240,7 +240,7 @@ dependencies = [
"actix-server",
"actix-service",
"log",
"socket2",
"socket2 0.3.19",
]
[[package]]
@ -323,7 +323,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
"socket2",
"socket2 0.3.19",
"time 0.2.27",
"tinyvec",
"url",
@ -387,20 +387,17 @@ name = "amazon-actor"
version = "0.1.0"
dependencies = [
"actix",
"bytes 0.5.6",
"bytes 1.0.1",
"common",
"env_logger",
"futures",
"jirs-config",
"libc",
"log",
"openssl-sys",
"pretty_env_logger",
"rusoto_core",
"rusoto_s3",
"rusoto_signature",
"serde",
"tokio",
"tokio 0.2.25",
"uuid 0.8.2",
]
@ -502,12 +499,6 @@ dependencies = [
"byteorder",
]
[[package]]
name = "base64"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
[[package]]
name = "base64"
version = "0.13.0"
@ -679,7 +670,7 @@ dependencies = [
"num-integer",
"num-traits",
"serde",
"time 0.1.44",
"time 0.1.43",
"wasm-bindgen",
"winapi 0.3.9",
]
@ -719,6 +710,7 @@ dependencies = [
"actix-web",
"actix-web-actors",
"actix_derive",
"bytes 0.5.6",
"env_logger",
"log",
"pretty_env_logger",
@ -842,9 +834,9 @@ dependencies = [
[[package]]
name = "crypto-mac"
version = "0.8.0"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
dependencies = [
"generic-array 0.14.4",
"subtle",
@ -877,7 +869,7 @@ dependencies = [
"pq-sys",
"r2d2",
"serde",
"time 0.1.44",
"time 0.1.43",
"toml",
"url",
"uuid 0.8.2",
@ -940,7 +932,7 @@ dependencies = [
"pq-sys",
"r2d2",
"serde_json",
"time 0.1.44",
"time 0.1.43",
"uuid 0.6.5",
"uuid 0.8.2",
]
@ -975,20 +967,20 @@ dependencies = [
]
[[package]]
name = "dirs"
version = "2.0.2"
name = "dirs-next"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
dependencies = [
"cfg-if 0.1.10",
"dirs-sys",
"cfg-if 1.0.0",
"dirs-sys-next",
]
[[package]]
name = "dirs-sys"
version = "0.3.6"
name = "dirs-sys-next"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users",
@ -1024,7 +1016,7 @@ dependencies = [
"encoding",
"lazy_static",
"rand 0.4.6",
"time 0.1.44",
"time 0.1.43",
"version_check 0.1.5",
]
@ -1159,11 +1151,10 @@ version = "0.1.0"
dependencies = [
"actix",
"actix-files",
"bytes 0.5.6",
"common",
"futures",
"jirs-config",
"tokio",
"tokio 0.2.25",
]
[[package]]
@ -1382,7 +1373,7 @@ dependencies = [
"cfg-if 1.0.0",
"js-sys",
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"wasi 0.10.2+wasi-snapshot-preview1",
"wasm-bindgen",
]
@ -1436,12 +1427,31 @@ dependencies = [
"http",
"indexmap",
"slab",
"tokio",
"tokio-util",
"tokio 0.2.25",
"tokio-util 0.3.1",
"tracing",
"tracing-futures",
]
[[package]]
name = "h2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726"
dependencies = [
"bytes 1.0.1",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"slab",
"tokio 1.10.0",
"tokio-util 0.6.7",
"tracing",
]
[[package]]
name = "hashbrown"
version = "0.11.2"
@ -1491,9 +1501,9 @@ dependencies = [
[[package]]
name = "hmac"
version = "0.8.1"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [
"crypto-mac",
"digest 0.9.0",
@ -1533,12 +1543,13 @@ dependencies = [
[[package]]
name = "http-body"
version = "0.3.1"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5"
dependencies = [
"bytes 0.5.6",
"bytes 1.0.1",
"http",
"pin-project-lite 0.2.7",
]
[[package]]
@ -1549,9 +1560,9 @@ checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68"
[[package]]
name = "httpdate"
version = "0.3.2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440"
[[package]]
name = "humantime"
@ -1564,23 +1575,23 @@ dependencies = [
[[package]]
name = "hyper"
version = "0.13.10"
version = "0.14.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
checksum = "0b61cf2d1aebcf6e6352c97b81dc2244ca29194be1b276f5d8ad5c6330fffb11"
dependencies = [
"bytes 0.5.6",
"bytes 1.0.1",
"futures-channel",
"futures-core",
"futures-util",
"h2",
"h2 0.3.3",
"http",
"http-body",
"httparse",
"httpdate",
"itoa",
"pin-project 1.0.8",
"socket2",
"tokio",
"pin-project-lite 0.2.7",
"socket2 0.4.1",
"tokio 1.10.0",
"tower-service",
"tracing",
"want",
@ -1588,15 +1599,15 @@ dependencies = [
[[package]]
name = "hyper-tls"
version = "0.4.3"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
"bytes 0.5.6",
"bytes 1.0.1",
"hyper",
"native-tls",
"tokio",
"tokio-tls",
"tokio 1.10.0",
"tokio-native-tls",
]
[[package]]
@ -1644,7 +1655,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7"
dependencies = [
"socket2",
"socket2 0.3.19",
"widestring",
"winapi 0.3.9",
"winreg",
@ -1753,8 +1764,8 @@ dependencies = [
"pretty_env_logger",
"serde",
"serde_json",
"time 0.1.44",
"tokio",
"time 0.1.43",
"tokio 0.2.25",
"toml",
"url",
"uuid 0.8.2",
@ -1852,7 +1863,7 @@ dependencies = [
"email",
"lettre",
"mime",
"time 0.1.44",
"time 0.1.43",
"uuid 0.7.4",
]
@ -1947,10 +1958,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "md5"
version = "0.7.0"
name = "md-5"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15"
dependencies = [
"block-buffer 0.9.0",
"digest 0.9.0",
"opaque-debug 0.3.0",
]
[[package]]
name = "memchr"
@ -2010,14 +2026,15 @@ dependencies = [
]
[[package]]
name = "mio-named-pipes"
version = "0.1.7"
name = "mio"
version = "0.7.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656"
checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16"
dependencies = [
"libc",
"log",
"mio",
"miow 0.3.7",
"ntapi",
"winapi 0.3.9",
]
@ -2029,7 +2046,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0"
dependencies = [
"iovec",
"libc",
"mio",
"mio 0.6.23",
]
[[package]]
@ -2092,6 +2109,15 @@ dependencies = [
"version_check 0.1.5",
]
[[package]]
name = "ntapi"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "num-bigint"
version = "0.2.6"
@ -2738,13 +2764,13 @@ dependencies = [
[[package]]
name = "rusoto_core"
version = "0.45.0"
version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e977941ee0658df96fca7291ecc6fc9a754600b21ad84b959eb1dbbc9d5abcc7"
checksum = "5b4f000e8934c1b4f70adde180056812e7ea6b1a247952db8ee98c94cd3116cc"
dependencies = [
"async-trait",
"base64 0.12.3",
"bytes 0.5.6",
"base64 0.13.0",
"bytes 1.0.1",
"crc32fast",
"futures",
"http",
@ -2752,46 +2778,41 @@ dependencies = [
"hyper-tls",
"lazy_static",
"log",
"md5",
"percent-encoding",
"pin-project 0.4.28",
"rusoto_credential",
"rusoto_signature",
"rustc_version 0.2.3",
"rustc_version 0.4.0",
"serde",
"serde_json",
"tokio",
"tokio 1.10.0",
"xml-rs",
]
[[package]]
name = "rusoto_credential"
version = "0.45.0"
version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ac05563f83489b19b4d413607a30821ab08bbd9007d14fa05618da3ef09d8b"
checksum = "6a46b67db7bb66f5541e44db22b0a02fed59c9603e146db3a9e633272d3bac2f"
dependencies = [
"async-trait",
"chrono",
"dirs",
"dirs-next",
"futures",
"hyper",
"pin-project 0.4.28",
"regex",
"serde",
"serde_json",
"shlex",
"tokio",
"tokio 1.10.0",
"zeroize",
]
[[package]]
name = "rusoto_s3"
version = "0.45.0"
version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1146e37a7c1df56471ea67825fe09bbbd37984b5f6e201d8b2e0be4ee15643d8"
checksum = "048c2fe811a823ad5a9acc976e8bf4f1d910df719dcf44b15c3e96c5b7a51027"
dependencies = [
"async-trait",
"bytes 0.5.6",
"bytes 1.0.1",
"futures",
"rusoto_core",
"xml-rs",
@ -2799,27 +2820,28 @@ dependencies = [
[[package]]
name = "rusoto_signature"
version = "0.45.0"
version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97a740a88dde8ded81b6f2cff9cd5e054a5a2e38a38397260f7acdd2c85d17dd"
checksum = "6264e93384b90a747758bcc82079711eacf2e755c3a8b5091687b5349d870bcc"
dependencies = [
"base64 0.12.3",
"bytes 0.5.6",
"base64 0.13.0",
"bytes 1.0.1",
"chrono",
"digest 0.9.0",
"futures",
"hex",
"hmac",
"http",
"hyper",
"log",
"md5",
"md-5",
"percent-encoding",
"pin-project 0.4.28",
"pin-project-lite 0.2.7",
"rusoto_credential",
"rustc_version 0.2.3",
"rustc_version 0.4.0",
"serde",
"sha2",
"time 0.2.27",
"tokio",
"tokio 1.10.0",
]
[[package]]
@ -2840,6 +2862,15 @@ dependencies = [
"semver 0.11.0",
]
[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver 1.0.4",
]
[[package]]
name = "ryu"
version = "1.0.5"
@ -2958,6 +2989,12 @@ dependencies = [
"semver-parser 0.10.2",
]
[[package]]
name = "semver"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012"
[[package]]
name = "semver-parser"
version = "0.7.0"
@ -3068,9 +3105,9 @@ checksum = "b6fa3938c99da4914afedd13bf3d79bcb6c277d1b2c398d23257a304d9e1b074"
[[package]]
name = "shlex"
version = "0.1.1"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
[[package]]
name = "signal-hook-registry"
@ -3114,6 +3151,16 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "socket2"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]]
name = "spin"
version = "0.5.2"
@ -3304,12 +3351,11 @@ dependencies = [
[[package]]
name = "time"
version = "0.1.44"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi 0.3.9",
]
@ -3379,21 +3425,38 @@ dependencies = [
"lazy_static",
"libc",
"memchr",
"mio",
"mio-named-pipes",
"mio 0.6.23",
"mio-uds",
"pin-project-lite 0.1.12",
"signal-hook-registry",
"slab",
"winapi 0.3.9",
]
[[package]]
name = "tokio"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b"
dependencies = [
"autocfg 1.0.1",
"bytes 1.0.1",
"libc",
"memchr",
"mio 0.7.13",
"num_cpus",
"once_cell",
"pin-project-lite 0.2.7",
"signal-hook-registry",
"tokio-macros",
"winapi 0.3.9",
]
[[package]]
name = "tokio-macros"
version = "0.2.6"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a"
checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110"
dependencies = [
"proc-macro2",
"quote",
@ -3401,13 +3464,13 @@ dependencies = [
]
[[package]]
name = "tokio-tls"
version = "0.3.1"
name = "tokio-native-tls"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
"native-tls",
"tokio",
"tokio 1.10.0",
]
[[package]]
@ -3422,7 +3485,21 @@ dependencies = [
"futures-sink",
"log",
"pin-project-lite 0.1.12",
"tokio",
"tokio 0.2.25",
]
[[package]]
name = "tokio-util"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592"
dependencies = [
"bytes 1.0.1",
"futures-core",
"futures-sink",
"log",
"pin-project-lite 0.2.7",
"tokio 1.10.0",
]
[[package]]
@ -3493,7 +3570,7 @@ dependencies = [
"rand 0.7.3",
"smallvec",
"thiserror",
"tokio",
"tokio 0.2.25",
"url",
]
@ -3512,7 +3589,7 @@ dependencies = [
"resolv-conf",
"smallvec",
"thiserror",
"tokio",
"tokio 0.2.25",
"trust-dns-proto",
]
@ -3745,9 +3822,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
version = "0.10.2+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]]
name = "wasm-bindgen"
@ -3860,7 +3937,6 @@ dependencies = [
"actix-multipart",
"amazon-actor",
"bincode",
"bytes 0.5.6",
"common",
"database-actor",
"filesystem-actor",
@ -3871,7 +3947,7 @@ dependencies = [
"mail-actor",
"openssl-sys",
"serde",
"tokio",
"tokio 0.2.25",
"toml",
"uuid 0.8.2",
"websocket-actor",

View File

@ -15,19 +15,14 @@ path = "./src/lib.rs"
[dependencies]
common = { path = "../../shared/common" }
actix = { version = "0.10.0" }
bytes = { version = "1.0.0" }
serde = { version = "*" }
bytes = { version = "0.5.6" }
futures = { version = "0.3.8" }
openssl-sys = { version = "*", features = ["vendored"] }
libc = { version = "0.2.0", default-features = false }
log = "0.4"
pretty_env_logger = "0.4"
env_logger = "0.7"
uuid = { version = "0.8.1", features = ["serde", "v4", "v5"] }
[dependencies.jirs-config]
@ -36,13 +31,13 @@ features = ["mail", "web", "local-storage"]
# Amazon S3
[dependencies.rusoto_s3]
version = "0.45.0"
version = "0.47.0"
[dependencies.rusoto_core]
version = "0.45.0"
version = "0.47.0"
[dependencies.rusoto_signature]
version = "0.45.0"
version = "0.47.0"
[dependencies.tokio]
version = "0.2.23"

View File

@ -21,7 +21,7 @@ impl actix::Actor for AmazonExecutor {
#[derive(actix::Message)]
#[rtype(result = "Result<String, AmazonError>")]
pub struct S3PutObject {
pub source: tokio::sync::broadcast::Receiver<bytes::Bytes>,
pub source: tokio::sync::broadcast::Receiver<common::bytes::Bytes>,
pub file_name: String,
}
@ -30,6 +30,7 @@ impl actix::Handler<S3PutObject> for AmazonExecutor {
fn handle(&mut self, msg: S3PutObject, _ctx: &mut Self::Context) -> Self::Result {
let S3PutObject {
// source,
mut source,
file_name,
} = msg;
@ -39,16 +40,18 @@ impl actix::Handler<S3PutObject> for AmazonExecutor {
.expect("Failed to start amazon agent")
.block_on(async {
let s3 = jirs_config::amazon::config();
log::debug!("{:?}", s3);
common::log::debug!("{:?}", s3);
// TODO: Unable to upload as stream because there is no size_hint
// use futures::stream::*;
// let stream = source
// .into_stream()
// .map_err(|_e| std::io::Error::from_raw_os_error(1));
// let stream = futures::StreamExt::map(stream, |b| {
// use common::bytes::Buf;
// ::bytes::Bytes::from(b.bytes())
// });
use common::bytes::Buf;
let mut v: Vec<u8> = vec![];
use bytes::Buf;
while let Ok(b) = source.recv().await {
v.extend_from_slice(b.bytes())
}
@ -64,11 +67,11 @@ impl actix::Handler<S3PutObject> for AmazonExecutor {
let id = match client.put_object(put_object).await {
Ok(obj) => obj,
Err(e) => {
log::error!("{}", e);
common::log::error!("{}", e);
return Err(AmazonError::UploadFailed);
}
};
log::debug!("{:?}", id);
common::log::debug!("{:?}", id);
Ok(aws_s3_url(file_name.as_str()))
})
}

View File

@ -19,8 +19,6 @@ actix-files = { version = "0.5.0" }
futures = { version = "0.3.8" }
bytes = { version = "0.5.6" }
[dependencies.jirs-config]
path = "../../shared/jirs-config"
features = ["local-storage"]

View File

@ -42,7 +42,7 @@ impl actix::Actor for FileSystemExecutor {
#[derive(actix::Message)]
#[rtype(result = "Result<usize, FsError>")]
pub struct CreateFile {
pub source: tokio::sync::broadcast::Receiver<bytes::Bytes>,
pub source: tokio::sync::broadcast::Receiver<common::bytes::Bytes>,
pub file_name: String,
}

View File

@ -27,8 +27,6 @@ toml = { version = "*" }
actix-multipart = "*"
bytes = { version = "0.5.6" }
futures = { version = "0.3.8" }
openssl-sys = { version = "*", features = ["vendored"] }
libc = { version = "0.2.0", default-features = false }

View File

@ -97,7 +97,7 @@ pub(crate) async fn handle_image(
}
/// Read file from client
async fn read_form_data(field: &mut Field, sender: Sender<bytes::Bytes>) {
async fn read_form_data(field: &mut Field, sender: Sender<common::bytes::Bytes>) {
while let Some(chunk) = field.next().await {
let data = chunk.unwrap();
if let Err(err) = sender.send(data) {

View File

@ -25,3 +25,5 @@ pretty_env_logger = "0.4"
env_logger = "0.7"
reexport-proc-macro = { version = "*" }
bytes = { version = "0.5.6" }

View File

@ -2,7 +2,7 @@
extern crate reexport_proc_macro;
pub use {
actix_cors, actix_rt, actix_service, actix_web, actix_web_actors, env_logger, log,
actix_cors, actix_rt, actix_service, actix_web, actix_web_actors, bytes, env_logger, log,
pretty_env_logger, serde,
};

View File

@ -29,12 +29,12 @@ toml = { version = "*" }
# Amazon S3
[dependencies.rusoto_s3]
optional = true
version = "0.45.0"
version = "0.47.0"
[dependencies.rusoto_core]
optional = true
version = "0.45.0"
version = "0.47.0"
[dependencies.rusoto_signature]
optional = true
version = "0.45.0"
version = "0.47.0"