redaction

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(value any, redact func(string) string) any

Any redacts supported JSON-shaped values and returns redacted copies for maps and slices.

func AnyMap

func AnyMap(values map[string]any, redact func(string) string)

AnyMap redacts JSON-shaped map keys and values in place.

func AnyMapCopy

func AnyMapCopy(values map[string]any, redact func(string) string) map[string]any

AnyMapCopy returns a redacted JSON-shaped map without mutating the input map.

func AnySlice

func AnySlice(values []any, redact func(string) string)

AnySlice redacts JSON-shaped slice elements in place.

func RawJSON

func RawJSON(raw json.RawMessage, redact func(string) string) json.RawMessage

RawJSON decodes, redacts, and re-encodes JSON while falling back to whole-string redaction.

func StringMap

func StringMap(values map[string]string, redact func(string) string)

StringMap redacts string map keys and values in place.

func StringMapCopy

func StringMapCopy(values map[string]string, redact func(string) string) map[string]string

StringMapCopy returns a redacted string map without mutating the input map.

func StringSlice

func StringSlice(values []string, redact func(string) string)

StringSlice redacts every string element in place.

func StringSliceCopy

func StringSliceCopy(values []string, redact func(string) string) []string

StringSliceCopy returns a redacted string slice without mutating the input slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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