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

feature: Google Cloud Storage support skeleton #513

Merged
merged 17 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ serde = ["time/serde"]
services-hdfs = ["hdrs"]
# Enable services http support
services-http = ["radix_trie"]
# Enable services google cloud storage support
services-gcs = []
ClSlaid marked this conversation as resolved.
Show resolved Hide resolved

[lib]
bench = false
Expand Down
7 changes: 7 additions & 0 deletions src/scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ pub enum Scheme {
/// [http][crate::services::http]: HTTP backend.
#[cfg(feature = "services-http")]
Http,
/// [gcs][crate::services::gcs]: Google Cloud Storage backend.
#[cfg(feature = "services-gcs")]
ClSlaid marked this conversation as resolved.
Show resolved Hide resolved
Gcs,
/// [memory][crate::services::memory]: In memory backend support.
Memory,
/// [s3][crate::services::s3]: AWS S3 alike services.
Expand All @@ -53,6 +56,8 @@ impl Display for Scheme {
Scheme::Fs => write!(f, "fs"),
#[cfg(feature = "services-hdfs")]
Scheme::Hdfs => write!(f, "hdfs"),
#[cfg(feature = "services-gcs")]
Scheme::Gcs => write!(f, "gcs"),
ClSlaid marked this conversation as resolved.
Show resolved Hide resolved
#[cfg(feature = "services-http")]
Scheme::Http => write!(f, "http"),
Scheme::Memory => write!(f, "memory"),
Expand All @@ -73,6 +78,8 @@ impl FromStr for Scheme {
"hdfs" => Ok(Scheme::Hdfs),
#[cfg(feature = "services-http")]
"http" | "https" => Ok(Scheme::Http),
#[cfg(feature = "services-gcs")]
"gcs" => Ok(Scheme::Gcs),
Xuanwo marked this conversation as resolved.
Show resolved Hide resolved
"memory" => Ok(Scheme::Memory),
"s3" => Ok(Scheme::S3),
v => Err(other(BackendError::new(
Expand Down
Loading