Files
harmony/opnsense-config/src/config/manager/mod.rs
Jean-Gabriel Gill-Couture da5a869771
All checks were successful
Run Check Script / check (pull_request) Successful in 59s
feat(opnsense-config): dnsmasq dhcp static mappings (#130)
Co-authored-by: Jean-Gabriel Gill-Couture <jeangabriel.gc@gmail.com>
Co-authored-by: Ian Letourneau <ian@noma.to>
Reviewed-on: #130
Reviewed-by: Ian Letourneau <ian@noma.to>
Co-authored-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Co-committed-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
2025-09-08 19:06:17 +00:00

17 lines
557 B
Rust

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>;
/// Save a new version of the config file, making sure that the hash still represents the file
/// currently stored in /conf/config.xml
async fn save_config(&self, content: &str, hash: &str) -> Result<(), Error>;
async fn apply_new_config(&self, content: &str, hash: &str) -> Result<(), Error>;
}