Documentation ¶
Index ¶
- Constants
- Variables
- func NeedRedact(originalString string, regexP *regexp.Regexp) bool
- func RedactString(fmtedString string) string
- type Log
- func (l *Log) Debug(fmtString string)
- func (l *Log) Debugf(fmtString string, args ...interface{})
- func (l *Log) Error(fmtString string)
- func (l *Log) Errorf(fmtString string, args ...interface{})
- func (l *Log) Info(fmtString string)
- func (l *Log) Infof(fmtString string, args ...interface{})
- func (l *Log) Redact(fmtedString string) string
- func (l *Log) Warn(fmtString string)
- func (l *Log) Warnf(fmtString string, args ...interface{})
Constants ¶
View Source
const (
RedactValue = "XXXXXXXX"
)
Variables ¶
View Source
var RedactKeyList = []*regexp.Regexp{ regexp.MustCompile(`(\\?"password\\?":\\?")([^"]*)(\\?")`), regexp.MustCompile(`(\\?"additional_trust_bundle\\?":\\?")([^"]*)(\\?")`), regexp.MustCompile(`(-----BEGIN CERTIFICATE-----)([^-----]*)(-----END CERTIFICATE-----)`), regexp.MustCompile(`(password\s*=\s*)([^\n\\\n]+)([\n\\\n]+)`), regexp.MustCompile(`(aws_(billing)?_?account_id[\s]*=[\s\\]*"?)([0-9]{12})([\\"]*)`), regexp.MustCompile(`(arn:aws:[^:]*:[a-z0-9-]*:)([0-9]{12})([^\n\"\\]*)`), }
Functions ¶
func NeedRedact ¶ added in v1.6.4
func RedactString ¶ added in v1.6.4
Types ¶
Click to show internal directories.
Click to hide internal directories.