Skip to main content

allow_report/artifacts/
add.rs

1use allow_core::{AllowEntry, Finding};
2
3use crate::InventoryContext;
4
5#[derive(Debug, Clone, Copy)]
6pub struct AddReport<'a> {
7    pub inventory: InventoryContext<'a>,
8    pub entry: &'a AllowEntry,
9    pub selected_finding: &'a Finding,
10    pub policy_output: Option<&'a str>,
11    pub force: bool,
12}
13
14impl<'a> AddReport<'a> {
15    pub fn new(
16        inventory: InventoryContext<'a>,
17        entry: &'a AllowEntry,
18        selected_finding: &'a Finding,
19        policy_output: Option<&'a str>,
20        force: bool,
21    ) -> Self {
22        Self {
23            inventory,
24            entry,
25            selected_finding,
26            policy_output,
27            force,
28        }
29    }
30}