use crate::Result;
use std::path::Path;
#[async_trait::async_trait]
pub trait StorageManager {
async fn store_video(&self, path: &Path, metadata: &serde_json::Value) -> Result<String>;
async fn retrieve_video(&self, id: &str) -> Result<Vec<u8>>;
async fn get_video_metadata(&self, id: &str) -> Result<serde_json::Value>;
async fn delete_video(&self, id: &str) -> Result<bool>;
async fn store_commentary(&self, commentary: &serde_json::Value) -> Result<String>;
async fn retrieve_commentary(&self, id: &str) -> Result<serde_json::Value>;
async fn update_commentary(&self, id: &str, commentary: &serde_json::Value) -> Result<bool>;
async fn delete_commentary(&self, id: &str) -> Result<bool>;
async fn list_videos(
&self,
page: u32,
page_size: u32,
) -> Result<Vec<(String, serde_json::Value)>>;
async fn list_commentaries(&self, video_id: &str) -> Result<Vec<(String, serde_json::Value)>>;
}