#![crate_name = "reef"]
use serde::{Deserialize, Serialize};
use std::collections::HashSet;
use std::path::PathBuf;
use std::time::Duration;
#[macro_use]
extern crate error_chain;
pub mod duration;
pub mod errors;
pub enum LogFormat {
Message,
LevelTargetMessage,
}
pub mod logger;
mod path;
pub enum Status {
Unknown,
Ok,
Error,
Warning,
}
mod status;
pub struct Settings {
pub log_path: PathBuf,
pub log_limit: usize,
pub log_to_console: bool,
}
mod settings;
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Env {
pub username: String,
pub hostname: String,
pub distro: String,
pub realname: String,
pub devicename: String,
}
mod env;
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq)]
pub struct Command {
pub dir: PathBuf,
pub name: String,
pub args: Vec<String>,
pub stdout: String,
pub stderr: String,
pub success: bool,
pub exit_code: i32,
pub duration: Duration,
pub timeout: Duration,
pub start: String,
pub env: Env,
pub tags: HashSet<String>,
pub uuid: String,
}
mod command;
pub struct History {
pub commands: Vec<Command>,
}
mod history;