clean up
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
use crate::error::Result;
|
||||
|
||||
mod config;
|
||||
mod daemon;
|
||||
mod error;
|
||||
mod validation;
|
||||
|
||||
pub use config::StoreConfig;
|
||||
pub use daemon::DaemonStore;
|
||||
pub use validation::validate_store_path;
|
||||
|
||||
pub trait Store: Send + Sync {
|
||||
fn get_store_dir(&self) -> &str;
|
||||
|
||||
fn is_valid_path(&self, path: &str) -> Result<bool>;
|
||||
|
||||
fn ensure_path(&self, path: &str) -> Result<()>;
|
||||
|
||||
fn add_to_store(
|
||||
&self,
|
||||
name: &str,
|
||||
content: &[u8],
|
||||
recursive: bool,
|
||||
references: Vec<String>,
|
||||
) -> Result<String>;
|
||||
|
||||
fn add_to_store_from_path(
|
||||
&self,
|
||||
name: &str,
|
||||
source_path: &std::path::Path,
|
||||
references: Vec<String>,
|
||||
) -> Result<String>;
|
||||
|
||||
fn add_text_to_store(
|
||||
&self,
|
||||
name: &str,
|
||||
content: &str,
|
||||
references: Vec<String>,
|
||||
) -> Result<String>;
|
||||
}
|
||||
Reference in New Issue
Block a user