added storage library

This commit is contained in:
wymiller committed 2025-06-30 22:58:25 -04:00
1 parent 585728de9d
commit a6b4f6917b
8 files changed
+3814

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
pub mod aws;
pub mod azure;
use async_trait::async_trait;
#[async_trait]
pub trait ObjectStorageClient {
type Error;
async fn put_object(&self, bucket: &str, key: &str, data: Vec<u8>) -> Result<(), Self::Error>;
async fn get_object(&self, bucket: &str, key: &str) -> Result<Vec<u8>, Self::Error>;
async fn delete_object(&self, bucket: &str, key: &str) -> Result<(), Self::Error>;
async fn list_objects(
&self,
bucket: &str,
prefix: Option<&str>,
) -> Result<Vec<String>, Self::Error>;
async fn object_exists(&self, bucket: &str, key: &str) -> Result<bool, Self::Error>;
}