Documentation
¶
Index ¶
Constants ¶
View Source
const MAX_WRITE_RETRIES = 10
View Source
const REDACTION_TERMS string = "internal_redaction_terms"
REDACTION_TERMS ([]string) arbitrary literal terms to redact from analytics/log output, in addition to the token/OAuth-derived terms GetScrubDictFromConfig already adds. Lives here rather than pkg/configuration since this package is its only reader, matching the precedent of local_workflows.ConfigurationNewAuthenticationToken.
View Source
const SANITIZE_REPLACEMENT_STRING string = "***"
Variables ¶
View Source
var SENSITIVE_FIELD_NAMES = []string{
"headers",
"user",
"passw",
"token",
"key",
"secret",
}
SENSITIVE_FIELD_NAMES is a list of field names that should be sanitized.
Functions ¶
func NewScrubbingIoWriter ¶
func NewScrubbingIoWriter(writer io.Writer, scrubDict ScrubbingDict) io.Writer
func NewScrubbingWriter ¶
func NewScrubbingWriter(writer zerolog.LevelWriter, scrubDict ScrubbingDict) zerolog.LevelWriter
func Scrub ¶ added in v0.15.1
func Scrub(data []byte, scrubDict ScrubbingDict) []byte
Scrub applies scrubDict's redaction rules to data, the same logic used internally by ScrubbingLogWriter.
Types ¶
type ScrubbingDict ¶
type ScrubbingDict map[string]scrubStruct
func GetScrubDictFromConfig ¶
func GetScrubDictFromConfig(config configuration.Configuration) ScrubbingDict
Click to show internal directories.
Click to hide internal directories.