Documentation
¶
Overview ¶
Package scrub redacts sensitive data from structured values and slog records.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a slog handler that redacts sensitive attributes before logging.
func NewHandler ¶
NewHandler wraps next with a redacting slog handler.
type Option ¶
type Option func(*Redactor)
Option configures a Redactor.
func WithReplacement ¶
WithReplacement changes the replacement value used for redacted data.
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor redacts sensitive values from structured data.
func (*Redactor) Any ¶
Any returns a scrubbed copy of value when the value is a supported structured type.
func (*Redactor) SensitiveKey ¶
SensitiveKey reports whether key should be redacted.
Click to show internal directories.
Click to hide internal directories.