WIP clean and refactoring according to issue #35

This commit is contained in:
ghassmo
2022-01-08 04:08:45 +04:00
parent 9888739171
commit a591bb526d
46 changed files with 579 additions and 4607 deletions

View File

@@ -10,17 +10,6 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize};
use crate::{Error, Result};
pub fn load_keypair_to_str(path: PathBuf) -> Result<String> {
if Path::new(&path).exists() {
let key = fs::read(&path)?;
let str_buff = str::from_utf8(&key)?;
Ok(str_buff.to_string())
} else {
println!("Could not parse keypair path");
Err(Error::KeypairPathNotFound)
}
}
#[derive(Clone, Default)]
pub struct Config<T> {
config: PhantomData<T>,

View File

@@ -2,4 +2,5 @@ pub mod cli_config;
pub mod cli_parser;
pub use cli_config::{CashierdConfig, Config, DarkfidConfig, DrkConfig, GatewaydConfig};
pub use cli_parser::{CliCashierd, CliDarkfid, CliDrk, CliDrkSubCommands, CliGatewayd};