Skip to content

feat: Implement huaweicloud obs service read support #540

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

Merged
merged 9 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 8 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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ 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"
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 @@ -134,6 +134,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(),
Scheme::Custom(v) => {
return Err(other(BackendError::new(
HashMap::default(),
Expand Down
5 changes: 5 additions & 0 deletions src/scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pub enum Scheme {
Memory,
/// [s3][crate::services::s3]: AWS S3 alike services.
S3,
/// [obs][crate::services::obs]: Huaweicloud OBS services.
Obs,
/// Custom that allow users to implement services outside of OpenDAL.
///
/// # NOTE
Expand Down Expand Up @@ -71,6 +73,7 @@ impl Display for Scheme {
Scheme::Memory => write!(f, "memory"),
Scheme::S3 => write!(f, "s3"),
Scheme::Custom(v) => write!(f, "{v}"),
Scheme::Obs => write!(f, "obs"),
}
}
}
Expand All @@ -90,6 +93,7 @@ impl FromStr for Scheme {
"gcs" => Ok(Scheme::Gcs),
"memory" => Ok(Scheme::Memory),
"s3" => Ok(Scheme::S3),
"obs" => Ok(Scheme::Obs),
_ => Ok(Scheme::Custom(Box::leak(s.into_boxed_str()))),
}
}
Expand All @@ -107,6 +111,7 @@ impl From<Scheme> for &'static str {
Scheme::Gcs => "gcs",
Scheme::Memory => "memory",
Scheme::S3 => "s3",
Scheme::Obs => "obs",
Scheme::Custom(v) => v,
}
}
Expand Down
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