privacy

package
v0.107.26 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearMemory

func ClearMemory()

func Enabled

func Enabled() bool

func MaskText

func MaskText(text string) (string, map[string]string)

func RedactText added in v0.107.6

func RedactText(text string) (string, bool)

RedactText irreversibly masks recognized sensitive values without retaining a restoration map. Use this when forwarding evidence to a separate reviewer.

func RedactTextFunc added in v0.107.6

func RedactTextFunc(text string, replace func(kind, value string) (string, bool)) (string, bool)

RedactTextFunc is RedactText with a caller-chosen replacement for each recognized value; changed reports whether any replace call returned true.

func RedactTextIdentity added in v0.107.6

func RedactTextIdentity(text string, replace func(kind, value, identity string) (string, bool)) (string, bool)

RedactTextIdentity is RedactTextFunc that also reports an identity for each value: the value itself, or the address extended over its ambiguous start ("0:fe80::1" for "eth0:fe80::1", see ipv6AmbiguousStart). Callers that treat equal values as the same thing compare identities.

func SetEnabled

func SetEnabled(on bool)

func Toggle

func Toggle() bool

func WrapTransport

func WrapTransport(base http.RoundTripper) http.RoundTripper

Types

type Status

type Status struct {
	Enabled         bool
	Rules           int
	Remembered      int
	MaxBodyBytes    int64
	TokenTTLSeconds int64
}

func Snapshot

func Snapshot() Status

type Transport

type Transport struct{ Base http.RoundTripper }

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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