Files
Oxicloud/src/application/ports/trash_ports.rs
T

21 lines
807 B
Rust
Raw Normal View History

use crate::application::dtos::trash_dto::TrashedItemDto;
use crate::common::errors::Result;
/// Port for trash-related use cases
pub trait TrashUseCase: Send + Sync {
/// List items in the user's trash
async fn get_trash_items(&self, user_id: &str) -> Result<Vec<TrashedItemDto>>;
2026-02-14 01:29:34 +01:00
/// Move a file or folder to trash
async fn move_to_trash(&self, item_id: &str, item_type: &str, user_id: &str) -> Result<()>;
2026-02-14 01:29:34 +01:00
/// Restore an item from trash to its original location
async fn restore_item(&self, trash_id: &str, user_id: &str) -> Result<()>;
2026-02-14 01:29:34 +01:00
/// Permanently delete an item from trash
async fn delete_permanently(&self, trash_id: &str, user_id: &str) -> Result<()>;
2026-02-14 01:29:34 +01:00
/// Empty the trash for a specific user
async fn empty_trash(&self, user_id: &str) -> Result<()>;
2026-02-14 01:29:34 +01:00
}