FakeAuditLog class final
The audit rows of the fake in ascending seq, each an AuditEvent as JSON.
Example:
final log = server.audit;
log.add(world, action: 'grant.create', actor: alex.id);
log.tamper(1); // the check now reports seq 1 as broken
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastCheckpointSeq ↔ int?
-
The
seqof the last checkpoint, or null without one; a check without a range starts after it (M1-50).getter/setter pair - nextCorrelationId → String
-
A correlation ID for the rows of one request, in the shape of
CorrelationId: the ID the next row would get on its own, so it never repeats the ID of an earlier row (10 11 point 4: every audit row of one request carries the samecorrelation_id).no setter -
rows
→ List<
JsonMap> -
The rows in ascending
seq.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
warnings
→ List<
String> -
The
warningsof every check, for examplecheckpoint_sink_not_configured.final
Methods
-
add(
FakeWorld world, {required String action, String decision = 'allow', String? actor, String? denyReason, String? resourceKind, String? resourceId, JsonMap details = const {}, DateTime? at, String? correlationId}) → JsonMap - Appends a row and returns it; the hash links it to the row before.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tamper(
int seq) → void -
Changes the
detailsof the rowseqwithout its hash, so the chain breaks there. -
toString(
) → String -
A string representation of this object.
inherited
-
verify(
{int? fromSeq, int? toSeq}) → FakeAuditCheck -
Checks the rows
fromSeqtotoSeq(both inclusive); withoutfromSeqit starts after lastCheckpointSeq (or at 1), withouttoSeqit ends at the last row.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited