pub struct AuditTrail { /* private fields */ }Expand description
Audit trail for operation tracking and reversibility
Implementations§
Source§impl AuditTrail
impl AuditTrail
pub fn new(repository: Arc<MemoryRepository>) -> Self
Sourcepub async fn create_merge_entry_tx(
&self,
transaction: &mut Transaction<'_, Postgres>,
group: &SimilarMemoryGroup,
) -> Result<AuditEntry>
pub async fn create_merge_entry_tx( &self, transaction: &mut Transaction<'_, Postgres>, group: &SimilarMemoryGroup, ) -> Result<AuditEntry>
Create a merge audit entry within a transaction
Sourcepub async fn create_merge_entry(
&self,
group: &SimilarMemoryGroup,
) -> Result<AuditEntry>
pub async fn create_merge_entry( &self, group: &SimilarMemoryGroup, ) -> Result<AuditEntry>
Create a merge audit entry (legacy method)
Sourcepub async fn complete_merge_entry_tx(
&self,
transaction: &mut Transaction<'_, Postgres>,
entry_id: Uuid,
result: &MergeResult,
) -> Result<()>
pub async fn complete_merge_entry_tx( &self, transaction: &mut Transaction<'_, Postgres>, entry_id: Uuid, result: &MergeResult, ) -> Result<()>
Complete a merge audit entry within a transaction
Sourcepub async fn complete_merge_entry(
&self,
entry_id: Uuid,
result: &MergeResult,
) -> Result<()>
pub async fn complete_merge_entry( &self, entry_id: Uuid, result: &MergeResult, ) -> Result<()>
Complete a merge audit entry (legacy method)
Sourcepub async fn record_pruning(
&self,
pruned_ids: &[Uuid],
reason: &str,
) -> Result<AuditEntry>
pub async fn record_pruning( &self, pruned_ids: &[Uuid], reason: &str, ) -> Result<AuditEntry>
Record a pruning operation
Sourcepub async fn get_reversible_operations(
&self,
) -> Result<Vec<ReversibleOperation>>
pub async fn get_reversible_operations( &self, ) -> Result<Vec<ReversibleOperation>>
Get reversible operations (within 7 days)
Sourcepub async fn reverse_operation(
&self,
operation_id: Uuid,
) -> Result<ReversalResult>
pub async fn reverse_operation( &self, operation_id: Uuid, ) -> Result<ReversalResult>
Reverse a deduplication or pruning operation
Auto Trait Implementations§
impl Freeze for AuditTrail
impl !RefUnwindSafe for AuditTrail
impl Send for AuditTrail
impl Sync for AuditTrail
impl Unpin for AuditTrail
impl !UnwindSafe for AuditTrail
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more