INNER CODE UNIT · Rust
build_storage_location_info
splitgraph/seafowl · object_store_factory/src/lib.rs:93
pub fn build_storage_location_info(
&self,
) -> Result<StorageLocationInfo, object_store::Error> {
match self {
ObjectStoreConfig::AmazonS3(aws_config) => Ok(StorageLocationInfo {
object_store: aws_config.build_amazon_s3()?,
options: aws_config.to_hashmap(),
url: aws_config.bucket_to_url(),
}),
ObjectStoreConfig::GoogleCloudStorage(google_config) => {
Ok(StorageLocationInfo {
object_store: google_config.build_google_cloud_storage()?,
options: google_config.to_hashmap(),
url: google_config.bucket_to_url(),
})
}
_ => {
unimplemented!();