Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement huaweicloud obs service read support #540

Merged
merged 9 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ percent-encoding = "2.1"
pin-project = "1.0"
quick-xml = { version = "0.23", features = ["serialize"] }
radix_trie = { version = "0.2", optional = true }
reqsign = "0.3"
regex = "1.6"
reqsign = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
Expand Down
1 change: 1 addition & 0 deletions src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl Operator {
Scheme::Memory => services::memory::Builder::default().build()?.into(),
Scheme::Gcs => services::gcs::Backend::from_iter(it)?.into(),
Scheme::S3 => services::s3::Backend::from_iter(it)?.into(),
Scheme::Obs => services::obs::Backend::from_iter(it)?.into(),
};

Ok(op)
Expand Down
5 changes: 5 additions & 0 deletions src/scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ pub enum Scheme {
Memory,
/// [s3][crate::services::s3]: AWS S3 alike services.
S3,
/// [obs][crate::services::obs]: Huaweicloud OBS services.
Obs,
}

impl Scheme {
Expand Down Expand Up @@ -67,6 +69,7 @@ impl Display for Scheme {
Scheme::Http => write!(f, "http"),
Scheme::Memory => write!(f, "memory"),
Scheme::S3 => write!(f, "s3"),
Scheme::Obs => write!(f, "obs"),
}
}
}
Expand All @@ -86,6 +89,7 @@ impl FromStr for Scheme {
"gcs" => Ok(Scheme::Gcs),
"memory" => Ok(Scheme::Memory),
"s3" => Ok(Scheme::S3),
"obs" => Ok(Scheme::Obs),
v => Err(other(BackendError::new(
Default::default(),
anyhow!("{} is not supported", v),
Expand All @@ -106,6 +110,7 @@ impl From<Scheme> for &'static str {
Scheme::Gcs => "gcs",
Scheme::Memory => "memory",
Scheme::S3 => "s3",
Scheme::Obs => "obs",
}
}
}
1 change: 1 addition & 0 deletions src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ pub mod hdfs;
#[cfg(feature = "services-http")]
pub mod http;
pub mod memory;
pub mod obs;
pub mod s3;
Loading