sofie-storage 0.2.0

Files kept under keys the framework generates: a local directory or an S3-compatible bucket.
Documentation
[package]
name = "sofie-storage"
description = "Files kept under keys the framework generates: a local directory or an S3-compatible bucket."
edition.workspace = true
rust-version.workspace = true
version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true

[features]
# Downloads through sofie-http's signed `/_sofie/files/` links.
local = ["dep:sofie-auth", "dep:tokio", "tokio/fs", "tokio/io-util"]
# Any S3-compatible bucket.
s3 = ["dep:sofie-client", "dep:ring", "dep:tokio"]
# Smaller copies of an image under keys derived from its own, made by a `Resizer` the app brings.
variants = ["dep:ring", "dep:tokio"]

[dependencies]
bytes.workspace = true
sofie-auth = { workspace = true, optional = true }
sofie-client = { workspace = true, optional = true }
sofie-core.workspace = true
ring = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
tracing.workspace = true

[dev-dependencies]
# So `tests/variants.rs` runs in every test run.
sofie-storage = { path = ".", features = ["local", "variants"] }
sofie-auth = { path = "../sofie-auth" }
sofie-client = { path = "../sofie-client" }
sofie-core = { path = "../sofie-core", features = ["testing"] }
http.workspace = true
http-body-util.workspace = true
hyper.workspace = true
hyper-util.workspace = true
ring.workspace = true
tokio = { workspace = true, features = ["macros", "net", "rt-multi-thread", "sync"] }

[lints]
workspace = true

[package.metadata.docs.rs]
all-features = true