use std::pin::Pin;
use crate::Exception;
pub trait ObjectStorage {
type ObjectMeta;
fn list<'a>(&'a self, object_key_prefix: &'a str) -> Pin<Box<dyn Future<Output = Result<Vec<Self::ObjectMeta>, Exception>> + Send + 'a>>;
fn upload_bytes<'a>(&'a self, object_key: &'a str, data: Vec<u8>) -> Pin<Box<dyn Future<Output = Result<(), Exception>> + Send + 'a>>;
fn upload_file<'a>(&'a self, object_key: &'a str, file_path: &'a str) -> Pin<Box<dyn Future<Output = Result<(), Exception>> + Send + 'a>>;
fn download_bytes<'a>(&'a self, object_key: &'a str) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Exception>> + Send + 'a>>;
fn download_file<'a>(&'a self, object_key: &'a str, file_path: &'a str, overwrite: bool) -> Pin<Box<dyn Future<Output = Result<(), Exception>> + Send + 'a>>;
fn url_sign(&self, object_key: &str) -> Result<String, Exception>;
}