Documentation
¶
Overview ¶
Package redact provides product-neutral helpers for removing secret-like values from strings and JSON/YAML-like documents.
Index ¶
Constants ¶
View Source
const (
// Value is the default marker used in place of redacted content.
Value = "${redacted}"
)
Variables ¶
This section is empty.
Functions ¶
func SensitiveKey ¶
SensitiveKey reports whether a key name usually carries a secret value.
Types ¶
type Options ¶
type Options struct {
Marker string
ExtraSensitiveKeys []string
// ExactSensitiveKeys adds case-insensitive whole-key matches. Common key
// separators are normalized, so raw-capture and raw_capture are equivalent.
// Use this for domain-specific keys whose names are unsafe only as complete
// fields; ExtraSensitiveKeys intentionally retains substring matching.
ExactSensitiveKeys []string
ExtraPatterns []*regexp.Regexp
}
Options configures redaction behavior for one call.
Click to show internal directories.
Click to hide internal directories.