INNER CODE UNIT · Rust
get_allow_http
splitgraph/seafowl · object_store_factory/src/lib.rs:125
pub fn get_allow_http(&self) -> Result<bool, object_store::Error> {
match self {
ObjectStoreConfig::AmazonS3(aws_config) => Ok(aws_config.get_allow_http()),
_ => Err(object_store::Error::Generic {
store: "unsupported_object_store",
source: "Only Amazon S3 is supported".into(),
}),
}
}
}
pub async fn build_object_store_from_opts(
url: &Url,
options: HashMap<String, String>,
) -> Result<Box<dyn ObjectStore>, object_store::Error> {
let (scheme, _) = ObjectStoreScheme::parse(url).unwrap();
match scheme {