pub struct SigningAuditLog { /* private fields */ }Expand description
Encrypted signing audit log with hash chain integrity.
Implementations§
Source§impl SigningAuditLog
impl SigningAuditLog
Sourcepub fn open(path: &Path, data_key: &SecretKey) -> Result<Self>
pub fn open(path: &Path, data_key: &SecretKey) -> Result<Self>
Open or create a signing audit log at the given path.
Sourcepub fn set_retention(&mut self, policy: RetentionPolicy)
pub fn set_retention(&mut self, policy: RetentionPolicy)
Set the retention policy.
Sourcepub fn apply_retention(&mut self, data_key: &SecretKey) -> Result<usize>
pub fn apply_retention(&mut self, data_key: &SecretKey) -> Result<usize>
Apply the retention policy, returning the number of entries removed.
Sourcepub fn log(
&mut self,
entry: SigningAuditEntry,
data_key: &SecretKey,
) -> Result<()>
pub fn log( &mut self, entry: SigningAuditEntry, data_key: &SecretKey, ) -> Result<()>
Log a signing audit entry.
Sourcepub fn read_all(&self, data_key: &SecretKey) -> Result<Vec<SigningAuditEntry>>
pub fn read_all(&self, data_key: &SecretKey) -> Result<Vec<SigningAuditEntry>>
Read all entries.
Sourcepub fn read_page(
&self,
data_key: &SecretKey,
offset: usize,
limit: usize,
caller_filter: Option<&str>,
) -> Result<Vec<SigningAuditEntry>>
pub fn read_page( &self, data_key: &SecretKey, offset: usize, limit: usize, caller_filter: Option<&str>, ) -> Result<Vec<SigningAuditEntry>>
Read a page of entries (newest first), optionally filtered by caller.
Sourcepub fn read_page_with_metadata(
&self,
data_key: &SecretKey,
offset: usize,
limit: usize,
caller_filter: Option<&str>,
) -> Result<(Vec<SigningAuditEntry>, Vec<String>, usize)>
pub fn read_page_with_metadata( &self, data_key: &SecretKey, offset: usize, limit: usize, caller_filter: Option<&str>, ) -> Result<(Vec<SigningAuditEntry>, Vec<String>, usize)>
Read a page and return metadata (distinct callers, total count) in a single pass.
Sourcepub fn distinct_callers(&self, data_key: &SecretKey) -> Result<Vec<String>>
pub fn distinct_callers(&self, data_key: &SecretKey) -> Result<Vec<String>>
Get distinct callers, most recently active first.
Auto Trait Implementations§
impl Forget for SigningAuditLog
impl Freeze for SigningAuditLog
impl Move for SigningAuditLog
impl RefUnwindSafe for SigningAuditLog
impl Send for SigningAuditLog
impl Sync for SigningAuditLog
impl Unpin for SigningAuditLog
impl UnsafeUnpin for SigningAuditLog
impl UnwindSafe for SigningAuditLog
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