pub mod s3;

use anyhow::Result;
use async_trait::async_trait;

pub const MIN_CHUNK_SIZE: usize = 10 * 1024 * 1024;

#[allow(async_fn_in_trait)]
#[async_trait]
pub trait Storage: Sync + Send {
    async fn upload_file(&self, key: &str, file_path: &str) -> Result<()>;
    async fn upload_large_file(&self, key: &str, file_path: &str) -> Result<()>;
    async fn upload_string(&self, key: &str, content: &str) -> Result<()>;
    async fn read_file(&self, key: &str) -> Result<String>;
    async fn download_file(&self, key: &str, file_path: &str) -> Result<()>;
    async fn delete_file(&self, key: &str) -> Result<()>;
    async fn expire_file(&self, key: &str, keep_days: i64) -> Result<()>;
    async fn list_files(&self, path: &str) -> Result<Vec<String>>;
    async fn move_file(&self, from_key: &str, to_key: &str) -> Result<()>;
}
