Skip to content

Commit

Permalink
feat(services): add upyun support (#3790)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoslo authored Dec 22, 2023
1 parent ff6de9a commit 5e369d2
Show file tree
Hide file tree
Showing 16 changed files with 1,425 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,9 @@ OPENDAL_SEAFILE_ROOT=/path/to/dir
OPENDAL_SEAFILE_ENDPOINT=<endpoint>
OPENDAL_SEAFILE_USERNAME=<usernmae>
OPENDAL_SEAFILE_PASSWORD=<password>
OPENDAL_SEAFILE_REPO_NAME=<repo_name>
OPENDAL_SEAFILE_REPO_NAME=<repo_name>
# upyun
OPENDAL_UPYUN_ROOT=/path/to/dir
OPENDAL_UPYUN_BUCKET=<bucket>
OPENDAL_UPYUN_OPERATOR=<operator>
OPENDAL_UPYUN_PASSWORD=<password>
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ services-all = [
"services-alluxio",
"services-b2",
"services-seafile",
"services-upyun",
]

# Default services provided by opendal.
Expand All @@ -113,6 +114,7 @@ services-webhdfs = ["opendal/services-webhdfs"]
services-alluxio = ["opendal/services-alluxio"]
services-azfile = ["opendal/services-azfile"]
services-b2 = ["opendal/services-b2"]
services-upyun = ["opendal/services-upyun"]
services-cacache = ["opendal/services-cacache"]
services-dashmap = ["opendal/services-dashmap"]
services-dropbox = ["opendal/services-dropbox"]
Expand Down
2 changes: 2 additions & 0 deletions bindings/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ services-all = [
"services-alluxio",
"services-b2",
"services-seafile",
"services-upyun",
]

# Default services provided by opendal.
Expand All @@ -107,6 +108,7 @@ services-webhdfs = ["opendal/services-webhdfs"]
# Optional services provided by opendal.
services-alluxio = ["opendal/services-alluxio"]
services-azfile = ["opendal/services-azfile"]
services-upyun = ["opendal/services-upyun"]
services-b2 = ["opendal/services-b2"]
services-cacache = ["opendal/services-cacache"]
services-dashmap = ["opendal/services-dashmap"]
Expand Down
2 changes: 2 additions & 0 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ services-all = [
"services-alluxio",
"services-b2",
"services-seafile",
"services-upyun",
]

# Default services provided by opendal.
Expand All @@ -107,6 +108,7 @@ services-webhdfs = ["opendal/services-webhdfs"]
services-alluxio = ["opendal/services-alluxio"]
services-azfile = ["opendal/services-azfile"]
services-b2 = ["opendal/services-b2"]
services-upyun = ["opendal/services-upyun"]
services-cacache = ["opendal/services-cacache"]
services-dashmap = ["opendal/services-dashmap"]
services-dropbox = ["opendal/services-dropbox"]
Expand Down
5 changes: 4 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ services-azdls = [
services-azfile = []
services-b2 = []
services-seafile = []
services-upyun = ["dep:hmac", "dep:sha1"]
services-cacache = ["dep:cacache"]
services-cloudflare-kv = []
services-cos = [
Expand Down Expand Up @@ -293,6 +294,8 @@ rusqlite = { version = "0.29.0", optional = true, features = ["bundled"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = { version = "0.10", optional = true }
hmac = { version = "0.12.1", optional = true }
sha1 = { version = "0.10.6", optional = true }
sled = { version = "0.34.7", optional = true }
suppaftp = { version = "5.2", default-features = false, features = [
"async-secure",
Expand Down Expand Up @@ -326,4 +329,4 @@ tracing-subscriber = { version = "0.3", features = [
"env-filter",
"tracing-log",
] }
wiremock = "0.5"
wiremock = "0.5"
7 changes: 7 additions & 0 deletions core/src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,10 @@ mod seafile;
pub use seafile::Seafile;
#[cfg(feature = "services-seafile")]
pub use seafile::SeafileConfig;

#[cfg(feature = "services-upyun")]
mod upyun;
#[cfg(feature = "services-upyun")]
pub use upyun::Upyun;
#[cfg(feature = "services-upyun")]
pub use upyun::UpyunConfig;
Loading

0 comments on commit 5e369d2

Please sign in to comment.