All checks were successful
Run Check Script / check (pull_request) Successful in 59s
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>
17 lines
557 B
Rust
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>;
|
|
}
|