StaticRedactionRule class

A redaction rule using a regular expression to match and replace secrets.

Implemented types

Constructors

StaticRedactionRule({required String id, required String description, required RegExp pattern, required String marker, required String sampleSecret, required String formatSample(String secret), required String redactor(RegExp pattern, String marker, String input)})
Creates a new StaticRedactionRule.
const

Properties

description String
Human-readable description of what this rule redacts.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier of this rule.
final
marker String
The stable, non-reversible marker substituted for secrets.
final
pattern RegExp
The regex pattern used to locate secrets.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleSecret String
A sample secret value of the shape targeted by this rule.
final

Methods

formatSample(String secret) String
Formats the sample secret into a diagnostic string for testing.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redact(String input, Map<String, String> environment) String
Performs write-time redaction on input.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited