vidsage-core 0.1.0

Core functionality for VidSage video processing and AI commentary generation
Documentation
//! Storage manager traits

use crate::Result;
use std::path::Path;

/// Trait for storage management functionality
#[async_trait::async_trait]
pub trait StorageManager {
    /// Store a video file
    async fn store_video(&self, path: &Path, metadata: &serde_json::Value) -> Result<String>;

    /// Retrieve a video file
    async fn retrieve_video(&self, id: &str) -> Result<Vec<u8>>;

    /// Get video metadata
    async fn get_video_metadata(&self, id: &str) -> Result<serde_json::Value>;

    /// Delete a video file
    async fn delete_video(&self, id: &str) -> Result<bool>;

    /// Store commentary data
    async fn store_commentary(&self, commentary: &serde_json::Value) -> Result<String>;

    /// Retrieve commentary data
    async fn retrieve_commentary(&self, id: &str) -> Result<serde_json::Value>;

    /// Update commentary data
    async fn update_commentary(&self, id: &str, commentary: &serde_json::Value) -> Result<bool>;

    /// Delete commentary data
    async fn delete_commentary(&self, id: &str) -> Result<bool>;

    /// List videos with pagination
    async fn list_videos(
        &self,
        page: u32,
        page_size: u32,
    ) -> Result<Vec<(String, serde_json::Value)>>;

    /// List commentaries for a video
    async fn list_commentaries(&self, video_id: &str) -> Result<Vec<(String, serde_json::Value)>>;
}