pub struct AuditFilters<'a> {
pub since: Option<&'a str>,
pub until: Option<&'a str>,
pub decision: Option<&'a str>,
pub ecosystem: Option<&'a str>,
}Expand description
Filters for Client::audit (CLEANLIB-813). All fields are optional —
AuditFilters::default() (or any ..Default::default() spread)
queries the full audit log, matching the prior audit(None, None, None) shape byte-for-byte.
Deliberately an options struct rather than positional parameters:
until is the filter this ticket adds (the real server already
accepts it — cleanlib-app/src/verbs.rs — and Go’s SDK already
exposes it; this SDK never did). A 4th positional parameter would
have been ANOTHER breaking signature change on top of the one this
struct already is, and the same problem recurs at the 5th filter.
Every field here is purely additive from a caller’s perspective when
built via AuditFilters { since: Some(x), ..Default::default() } —
a future filter lands as one new field, never another migration.
Fields§
§since: Option<&'a str>Only entries at or after this RFC 3339 timestamp.
until: Option<&'a str>CLEANLIB-813: only entries at or before this RFC 3339 timestamp — bounds the END of the query window. The gap this ticket closes.
decision: Option<&'a str>Only entries with this decision (ALLOW / INSUFFICIENT / DENY
— see cleanlib-cli’s VALID_DECISION_FILTERS for the
client-side-validated domain).
ecosystem: Option<&'a str>Only entries for this ecosystem.
Trait Implementations§
Source§impl<'a> Clone for AuditFilters<'a>
impl<'a> Clone for AuditFilters<'a>
Source§fn clone(&self) -> AuditFilters<'a>
fn clone(&self) -> AuditFilters<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more