chore: Reorganize file tree for easier onboarding. Rust project now at the root for simple git clone && cargo run
This commit is contained in:
14
opnsense-config/src/config/manager/mod.rs
Normal file
14
opnsense-config/src/config/manager/mod.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
mod local_file;
|
||||
mod ssh;
|
||||
use async_trait::async_trait;
|
||||
pub use local_file::*;
|
||||
pub use ssh::*;
|
||||
|
||||
use crate::Error;
|
||||
|
||||
#[async_trait]
|
||||
pub trait ConfigManager: std::fmt::Debug + Send + Sync {
|
||||
async fn load_as_str(&self) -> Result<String, Error>;
|
||||
async fn save_config(&self, content: &str) -> Result<(), Error>;
|
||||
async fn apply_new_config(&self, content: &str) -> Result<(), Error>;
|
||||
}
|
||||
Reference in New Issue
Block a user