pub struct AuditContext {
pub git_commit: Option<String>,
pub git_branch: Option<String>,
pub hostname: Option<String>,
pub working_dir: Option<String>,
pub ci_pipeline: Option<String>,
pub ci_job: Option<String>,
pub metadata: HashMap<String, String>,
}Expand description
Context about the environment when the audit event occurred
Fields§
§git_commit: Option<String>Git commit hash (if in a git repo)
git_branch: Option<String>Git branch
hostname: Option<String>Hostname where the action occurred
working_dir: Option<String>Working directory
ci_pipeline: Option<String>CI/CD pipeline identifier
ci_job: Option<String>CI/CD job identifier
metadata: HashMap<String, String>Additional context metadata
Implementations§
Source§impl AuditContext
impl AuditContext
Sourcepub fn from_environment() -> Self
pub fn from_environment() -> Self
Create context from current environment
Trait Implementations§
Source§impl Clone for AuditContext
impl Clone for AuditContext
Source§fn clone(&self) -> AuditContext
fn clone(&self) -> AuditContext
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 AuditContext
impl Debug for AuditContext
Source§impl Default for AuditContext
impl Default for AuditContext
Source§fn default() -> AuditContext
fn default() -> AuditContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AuditContext
impl<'de> Deserialize<'de> for AuditContext
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 AuditContext
impl RefUnwindSafe for AuditContext
impl Send for AuditContext
impl Sync for AuditContext
impl Unpin for AuditContext
impl UnwindSafe for AuditContext
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