Documentation ¶
Overview ¶
Package redact provides utilities for redacting sensitive data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StringRedactor = func(s string) string { return MaskedString(s).String() }
StringRedactor is the default redactor for strings.
Functions ¶
func ContainsRedacted ¶
func ContainsRedacted(x interface{}) bool
Types ¶
type MaskedString ¶
type MaskedString string
MaskedString is a type that masks an actual string data. It implements fmt.Stringer and encoding.TextMarshaler for returning asterisks `*` characters with same length as the actual string value.
func (MaskedString) MarshalText ¶
func (s MaskedString) MarshalText() (text []byte, err error)
func (MaskedString) Redacted ¶
func (s MaskedString) Redacted() interface{}
func (MaskedString) String ¶
func (s MaskedString) String() string
Click to show internal directories.
Click to hide internal directories.