pub struct ProjectConfig {
pub version: String,
pub default_definition: Option<String>,
pub default_ignore: Option<String>,
pub approver_name: Option<String>,
pub mask_secrets: bool,
pub custom_mask_patterns: Vec<String>,
}Expand description
The project-level configuration document.
Fields§
§version: StringSchema version. Currently "1".
default_definition: Option<String>Default audit definition path, relative to project root.
default_ignore: Option<String>Default .aaaiignore path, relative to project root.
approver_name: Option<String>Default approver name stamped on approvals (overridden by CLI flag).
mask_secrets: boolEnable secret masking by default.
custom_mask_patterns: Vec<String>Custom regex patterns added to the masking engine.
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn load(path: &Path) -> Result<Option<Self>>
pub fn load(path: &Path) -> Result<Option<Self>>
Load from path. Returns None when the file does not exist.
Sourcepub fn discover(start_dir: &Path) -> Result<Option<(Self, PathBuf)>>
pub fn discover(start_dir: &Path) -> Result<Option<(Self, PathBuf)>>
Discover .aaai.yaml by walking up from start_dir.
Returns the config and the directory in which it was found.
Sourcepub fn save(&self, path: &Path) -> Result<()>
pub fn save(&self, path: &Path) -> Result<()>
Write to path, creating parent directories as needed.
Sourcepub fn starter_yaml() -> &'static str
pub fn starter_yaml() -> &'static str
Generate a starter config with helpful comments embedded as YAML string.
Trait Implementations§
Source§impl Clone for ProjectConfig
impl Clone for ProjectConfig
Source§fn clone(&self) -> ProjectConfig
fn clone(&self) -> ProjectConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl Default for ProjectConfig
impl Default for ProjectConfig
Source§fn default() -> ProjectConfig
fn default() -> ProjectConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProjectConfig
impl<'de> Deserialize<'de> for ProjectConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more