Table of Contents

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

record AuditLedgerRecord

The record to append.

cancellationToken CancellationToken

A 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

actorId string

The actor identifier.

cancellationToken CancellationToken

A 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

correlationId string

The correlation identifier.

cancellationToken CancellationToken

A 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

recordId string

The stable record identifier.

cancellationToken CancellationToken

A 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

recordedFromUtc DateTimeOffset

The inclusive lower recorded UTC bound.

recordedToUtc DateTimeOffset

The inclusive upper recorded UTC bound.

cancellationToken CancellationToken

A 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

traceId string

The trace identifier.

cancellationToken CancellationToken

A token that can cancel the lookup operation.

Returns

ValueTask<IReadOnlyList<AuditLedgerRecord>>

The matching audit ledger records.