outmask

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package outmask masks a command's output before it leaves the console: what the profile's detectors find becomes a keyed pseudonym (⟦email:7F3KQ2M9ZD4X⟧, stable within the console run, so "the same address" still reads as the same), a secret becomes ⟦secret⟧, and invalid UTF-8 becomes U+FFFD.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Masker

type Masker struct {
	// contains filtered or unexported fields
}

Masker masks text with a set of detectors and one pseudonym epoch.

func New

func New(ds []pii.Detector, ps *pii.Pseudonymizer) *Masker

New returns a masker. ps may be nil: every match is then redacted by kind only.

func (*Masker) Mask

func (m *Masker) Mask(s string) Result

Mask masks s.

type Result

type Result struct {
	Text string
	// Kinds counts the masked values by kind.
	Kinds map[string]int
}

Result is one masked text and what was masked in it.

Jump to

Keyboard shortcuts

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