Documentation
¶
Overview ¶
Package redact removes secret-looking values from text before it reaches evidence rings, spools, transmission, or diagnostics (PRD L6, 10).
Index ¶
Constants ¶
View Source
const Placeholder = "<redacted>"
Placeholder replaces every redacted value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ExtraKeys are additional key names whose values are always redacted.
ExtraKeys []string
// ExtraPatterns are additional regular expressions whose matches are replaced.
ExtraPatterns []string
}
Config customizes a Redactor.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a slog.Handler that redacts messages and string attributes before any sink.
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor applies an ordered list of redaction rules.
func (*Redactor) IsSecretKey ¶
IsSecretKey reports whether a field or label name always holds a secret.
Click to show internal directories.
Click to hide internal directories.