Versions in this module Expand all Collapse all v1 v1.0.0 Oct 3, 2026 Changes in this version + const Placeholder + var DefaultPIIKeys = []string + var GDPRKeys = []string + var LGPDKeys = GDPRKeys + var PCIKeys = []string + func MaskCNPJ(s string) (string, bool) + func MaskCPF(s string) (string, bool) + func MaskEmail(s string) (string, bool) + func MaskIBAN(s string) (string, bool) + func MaskIPv4(s string) (string, bool) + func MaskPAN(s string) (string, bool) + func MaskPhone(s string) (string, bool) + func MaskSSN(s string) (string, bool) + func MaskUUID(s string) (string, bool) + func New(next slog.Handler, opts ...Options) slog.Handler + func NewDefaultPII(next slog.Handler, opts ...Options) slog.Handler + func NewGDPR(next slog.Handler, opts ...Options) slog.Handler + func NewLGPD(next slog.Handler, opts ...Options) slog.Handler + func NewPCI(next slog.Handler, opts ...Options) slog.Handler + func Redact(v slog.Value) slog.Value + type Handler struct + func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool + func (h *Handler) Handle(ctx context.Context, r slog.Record) error + func (h *Handler) WithAttrs(as []slog.Attr) slog.Handler + func (h *Handler) WithGroup(name string) slog.Handler + type Masker func(slog.Value) slog.Value + func Fixed(marker string) Masker + func KeepEnds(first, last int) Masker + func KeepFirst(n int) Masker + func KeepLast(n int) Masker + func MaskMiddle(first, last int) Masker + type Options interface + func JoinOptions(opts ...Options) Options + func WithCompositeScan() Options + func WithContain(secrets ...string) Options + func WithContextAttrs(pulls ...func(context.Context) []slog.Attr) Options + func WithDefaultPII() Options + func WithDefaultPIIKeys() Options + func WithDefaultPIIValues() Options + func WithGDPR() Options + func WithKeyRegex(m Masker, pattern string) Options + func WithKeyRegexp(m Masker, re *regexp.Regexp) Options + func WithKeys(m Masker, keys ...string) Options + func WithKeysContaining(m Masker, keys ...string) Options + func WithLGPD() Options + func WithMapScan() Options + func WithMessageScan() Options + func WithPCI() Options + func WithRedactedValue(msg string) Options + func WithSkipValueScan(keys ...string) Options + func WithSliceScan() Options + func WithStructScan() Options + func WithTag(m Masker, key, value string) Options + func WithType[T any](maskers ...Masker) Options + func WithValueFunc(f ValueFunc) Options + func WithValuePredicate(m Masker, pred func(slog.Value) bool) Options + func WithValueRule(r ValueRule) Options + type ValueFunc func(string) (string, bool) + func DefaultPIIValueFuncs() []ValueFunc + type ValueRule func(slog.Value) (slog.Value, bool)