Interface IAsiBackboneAuditLedgerStore
- Namespace
- AsiBackbone.Core.Audit
- Assembly
- AsiBackbone.Core.dll
Defines the framework-neutral storage contract for persistent AsiBackbone audit ledger records.
public interface IAsiBackboneAuditLedgerStore
Methods
AppendAsync(AuditLedgerRecord, CancellationToken)
Appends an audit ledger record to durable host-owned storage.
ValueTask<OperationResult<AuditLedgerRecord>> AppendAsync(AuditLedgerRecord record, CancellationToken cancellationToken = default)
Parameters
recordAuditLedgerRecordThe record to append.
cancellationTokenCancellationTokenA token that can cancel the append operation.
Returns
- ValueTask<OperationResult<AuditLedgerRecord>>
The append operation result.
FindByActorIdAsync(string, CancellationToken)
Finds audit ledger records associated with an actor identifier.
ValueTask<IReadOnlyList<AuditLedgerRecord>> FindByActorIdAsync(string actorId, CancellationToken cancellationToken = default)
Parameters
actorIdstringThe actor identifier.
cancellationTokenCancellationTokenA token that can cancel the lookup operation.
Returns
- ValueTask<IReadOnlyList<AuditLedgerRecord>>
The matching audit ledger records.
FindByCorrelationIdAsync(string, CancellationToken)
Finds audit ledger records associated with a correlation identifier.
ValueTask<IReadOnlyList<AuditLedgerRecord>> FindByCorrelationIdAsync(string correlationId, CancellationToken cancellationToken = default)
Parameters
correlationIdstringThe correlation identifier.
cancellationTokenCancellationTokenA token that can cancel the lookup operation.
Returns
- ValueTask<IReadOnlyList<AuditLedgerRecord>>
The matching audit ledger records.
FindByRecordIdAsync(string, CancellationToken)
Finds an audit ledger record by its stable record identifier.
ValueTask<AuditLedgerRecord?> FindByRecordIdAsync(string recordId, CancellationToken cancellationToken = default)
Parameters
recordIdstringThe stable record identifier.
cancellationTokenCancellationTokenA token that can cancel the lookup operation.
Returns
- ValueTask<AuditLedgerRecord>
The matching record, or null when no record exists.
FindByRecordedUtcRangeAsync(DateTimeOffset, DateTimeOffset, CancellationToken)
Finds audit ledger records recorded within the inclusive UTC date range.
ValueTask<IReadOnlyList<AuditLedgerRecord>> FindByRecordedUtcRangeAsync(DateTimeOffset recordedFromUtc, DateTimeOffset recordedToUtc, CancellationToken cancellationToken = default)
Parameters
recordedFromUtcDateTimeOffsetThe inclusive lower recorded UTC bound.
recordedToUtcDateTimeOffsetThe inclusive upper recorded UTC bound.
cancellationTokenCancellationTokenA token that can cancel the lookup operation.
Returns
- ValueTask<IReadOnlyList<AuditLedgerRecord>>
The matching audit ledger records.
FindByTraceIdAsync(string, CancellationToken)
Finds audit ledger records associated with a trace identifier.
ValueTask<IReadOnlyList<AuditLedgerRecord>> FindByTraceIdAsync(string traceId, CancellationToken cancellationToken = default)
Parameters
traceIdstringThe trace identifier.
cancellationTokenCancellationTokenA token that can cancel the lookup operation.
Returns
- ValueTask<IReadOnlyList<AuditLedgerRecord>>
The matching audit ledger records.