scrubber

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyInput

type ApplyInput struct {
	Files    []string
	Registry *detector.Registry
}

ApplyInput configures a scrub apply operation.

type ApplyResult

type ApplyResult struct {
	FilesModified int
	Redactions    int
	CountsByType  map[string]int
}

ApplyResult holds the outcome of applying redactions.

func Apply

func Apply(ctx context.Context, input ApplyInput) (ApplyResult, error)

Apply scrubs credential patterns from the given files, writing changes back to disk. Call Preview first to discover which files need scrubbing.

type PreviewInput

type PreviewInput struct {
	Files    []string
	Registry *detector.Registry
}

PreviewInput configures a read-only scrub preview.

type PreviewResult

type PreviewResult struct {
	FilesScanned int
	Files        []string
	Redactions   int
	CountsByType map[string]int
}

PreviewResult holds the outcome of previewing files for redactable content. Files lists the paths that contain redactable content.

func Preview

func Preview(ctx context.Context, input PreviewInput) (PreviewResult, error)

Preview reads files and counts what would be redacted without writing.

Jump to

Keyboard shortcuts

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