privacy

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFilterLevel = Moderate

DefaultFilterLevel is used by Filter() when no level is specified.

Functions

func Filter

func Filter(content string) string

Filter replaces secrets in content with [REDACTED] using DefaultFilterLevel.

func FilterWithLevel added in v0.5.0

func FilterWithLevel(content string, level FilterLevel) string

FilterWithLevel replaces secrets in content with [REDACTED] at the specified level.

func IsLikelySecret

func IsLikelySecret(token string) bool

IsLikelySecret heuristically determines if a token string is a secret.

Types

type FilterLevel added in v0.5.0

type FilterLevel int

FilterLevel controls how aggressively content is filtered.

const (
	// Strict strips everything (emails, IPs, phones, secrets).
	Strict FilterLevel = iota
	// Moderate keeps infrastructure IPs (10.x, 192.168.x) and work-related emails.
	Moderate
	// Minimal only strips high-entropy secrets and explicit API keys.
	Minimal
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL