use crate::error::Result;
use async_trait::async_trait;
use std::path::{Path, PathBuf};
#[async_trait]
pub trait TransactionStorage: Send + Sync {
async fn write_transaction(&self, file_path: &Path, data: &[String]) -> Result<PathBuf>;
async fn write_transaction_from_file(&self, file_path: &Path) -> Result<(PathBuf, usize)>;
async fn read_transaction(&self, file_path: &Path, start_index: usize) -> Result<Vec<String>>;
async fn delete_transaction(&self, file_path: &Path) -> Result<()>;
async fn file_exists(&self, file_path: &Path) -> bool;
fn file_extension(&self) -> &str;
fn transform_path(&self, base_path: &Path) -> PathBuf;
}