pub struct AuditEntry {Show 13 fields
pub ts: String,
pub agent_did: Option<String>,
pub action: Option<String>,
pub target: Option<String>,
pub decision: String,
pub deciding_pack: Option<String>,
pub deciding_rule: Option<String>,
pub deciding_layer: Option<String>,
pub deny_reason: Option<String>,
pub decision_ms: u64,
pub payload_sha256: String,
pub receipt_id: Option<String>,
pub upstream_error: bool,
}Fields§
§ts: String§agent_did: Option<String>§action: Option<String>§target: Option<String>§decision: String§deciding_pack: Option<String>§deciding_rule: Option<String>§deciding_layer: Option<String>§deny_reason: Option<String>§decision_ms: u64§payload_sha256: String§receipt_id: Option<String>Upstream receipt id (e.g. Velo’s rcp_…) when –upstream-protect is
configured and the upstream POST succeeds. NULL otherwise.
upstream_error: boolTrue when –upstream-protect was configured but the upstream POST failed (network error, 5xx, malformed response). The daemon falls back to its local decision in that case; this column lets auditors see the degraded path.
Implementations§
Source§impl AuditEntry
impl AuditEntry
Sourcepub fn build(
agent_did: Option<String>,
action: Option<String>,
target: Option<String>,
decision: String,
deciding_pack: Option<String>,
deciding_rule: Option<String>,
deciding_layer: Option<String>,
deny_reason: Option<String>,
decision_ms: u64,
) -> Self
pub fn build( agent_did: Option<String>, action: Option<String>, target: Option<String>, decision: String, deciding_pack: Option<String>, deciding_rule: Option<String>, deciding_layer: Option<String>, deny_reason: Option<String>, decision_ms: u64, ) -> Self
Build an entry from the evaluation result + payload, computing the canonical payload_sha256 the same way the Python ref does: sha256(json.dumps(entry, sort_keys=True, separators=(“,”, “:”)))
Sourcepub fn build_with_receipt(
agent_did: Option<String>,
action: Option<String>,
target: Option<String>,
decision: String,
deciding_pack: Option<String>,
deciding_rule: Option<String>,
deciding_layer: Option<String>,
deny_reason: Option<String>,
decision_ms: u64,
receipt_id: Option<String>,
upstream_error: bool,
) -> Self
pub fn build_with_receipt( agent_did: Option<String>, action: Option<String>, target: Option<String>, decision: String, deciding_pack: Option<String>, deciding_rule: Option<String>, deciding_layer: Option<String>, deny_reason: Option<String>, decision_ms: u64, receipt_id: Option<String>, upstream_error: bool, ) -> Self
Same as build, plus the upstream receipt_id and upstream_error
flag. The payload_sha256 covers the receipt_id too — auditors can
detect tampering on the upstream link.
Trait Implementations§
Source§impl Clone for AuditEntry
impl Clone for AuditEntry
Source§fn clone(&self) -> AuditEntry
fn clone(&self) -> AuditEntry
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 AuditEntry
impl Debug for AuditEntry
Source§impl<'de> Deserialize<'de> for AuditEntry
impl<'de> Deserialize<'de> for AuditEntry
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 AuditEntry
impl RefUnwindSafe for AuditEntry
impl Send for AuditEntry
impl Sync for AuditEntry
impl Unpin for AuditEntry
impl UnsafeUnpin for AuditEntry
impl UnwindSafe for AuditEntry
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