use async_trait::async_trait;
use super::plugin::FileMeta;
#[async_trait]
pub trait StorageBackend: Send + Sync {
fn backend_type(&self) -> &str;
async fn write(&self, original_name: &str, data: &[u8]) -> Result<FileMeta, String>;
async fn read(&self, stored_path: &str) -> Result<Vec<u8>, String>;
async fn delete(&self, stored_path: &str) -> Result<(), String>;
async fn exists(&self, stored_path: &str) -> bool;
async fn presign_download_url(
&self,
_stored_path: &str,
_expiry_secs: Option<u64>,
) -> Result<String, String> {
Ok(String::new())
}
async fn health_check(&self) -> Result<(), String> {
Ok(())
}
}