Table of Contents

Interface IAuditAnnotationStore

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Stores annotations (tags, bookmarks, notes) linked to audit events.

public interface IAuditAnnotationStore

Remarks

Annotations are additive — they never modify the original AuditEvent or its hash chain. Each annotation is a separate record linked by event ID.

Implementations must be thread-safe. Duplicate tags on the same event are idempotent.

Methods

AnnotateAsync(string, string, CancellationToken)

Adds a free-text note to an audit event.

Task<AuditAnnotationId> AnnotateAsync(string eventId, string note, CancellationToken cancellationToken)

Parameters

eventId string

The audit event to annotate.

note string

The note text.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<AuditAnnotationId>

The identifier of the created annotation.

BookmarkAsync(string, string?, CancellationToken)

Bookmarks an event for the current actor with an optional label.

Task BookmarkAsync(string eventId, string? label, CancellationToken cancellationToken)

Parameters

eventId string

The audit event to bookmark.

label string

An optional label for the bookmark.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task

GetAnnotationsAsync(string, CancellationToken)

Retrieves all annotations for a given audit event.

Task<AuditAnnotations> GetAnnotationsAsync(string eventId, CancellationToken cancellationToken)

Parameters

eventId string

The audit event to retrieve annotations for.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<AuditAnnotations>

The aggregated annotations for the event.

QueryByAnnotationAsync(AuditAnnotationQuery, CancellationToken)

Queries events by annotation criteria (tags, bookmarked, has-notes).

Task<IReadOnlyList<string>> QueryByAnnotationAsync(AuditAnnotationQuery query, CancellationToken cancellationToken)

Parameters

query AuditAnnotationQuery

The annotation query parameters.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<IReadOnlyList<string>>

A list of matching audit event IDs.

RemoveBookmarkAsync(string, CancellationToken)

Removes a bookmark from an event for the current actor.

Task RemoveBookmarkAsync(string eventId, CancellationToken cancellationToken)

Parameters

eventId string

The audit event to remove the bookmark from.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task

TagAsync(string, IReadOnlyList<string>, CancellationToken)

Adds tags to an audit event. Duplicate tags are idempotent.

Task TagAsync(string eventId, IReadOnlyList<string> tags, CancellationToken cancellationToken)

Parameters

eventId string

The audit event to tag.

tags IReadOnlyList<string>

The tag labels to apply.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task