#[derive(Clone)]
#[cfg_attr(test, derive(Debug))]
pub struct VariableValue {
pub id: Option<i32>,
pub flat_root_cmd: String,
pub flat_variable: String,
pub value: String,
}
impl VariableValue {
pub fn new(
flat_root_cmd: impl Into<String>,
flat_variable_name: impl Into<String>,
value: impl Into<String>,
) -> Self {
Self {
id: None,
flat_root_cmd: flat_root_cmd.into(),
flat_variable: flat_variable_name.into(),
value: value.into(),
}
}
}
#[cfg_attr(test, derive(Debug))]
pub enum VariableSuggestion {
Secret,
New,
Previous(String),
Environment {
env_var_name: String,
value: Option<String>,
},
Existing(VariableValue),
Completion(String),
Derived(String),
}