redact

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedactedString = "** Redacted **"
)

Variables

This section is empty.

Functions

func Redact

func Redact(msg interface{}, val reflect.Value)

Redact - removes data from fields marked as sensitive given a proto message struct

func RedactError added in v0.22.4

func RedactError(msg interface{}, err *error)

RedactError redacts sensitive information from the provided error message. It takes a message of any type and a pointer to an error, and processes the message to remove any sensitive data from error message.

func RedactSensitiveError added in v0.22.4

func RedactSensitiveError(msg interface{}, val reflect.Value, err *error)

RedactSensitiveError traverses the given value and processes fields marked as sensitive, redacting their data from error message. Note: The function modifies the error message in place if sensitive data is found.

func RedactedMessage

func RedactedMessage(msg interface{}) interface{}

RedactedMessage - returns a copy of a proto message struct with data from fields marked as sensitive redacted

Types

This section is empty.

Jump to

Keyboard shortcuts

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