Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Redact ¶
func Redact(r interface{}) string
Redact returns a redacted version of the supplied item that is safe to use in anonymized reporting.
NB: this interface is obsolete. Use redact.Sprint() directly.
func Safe ¶
Safe wraps the given object into an opaque struct that implements SafeMessager: its contents can be included as-is in PII-free strings in error objects and reports.
NB: this is obsolete. Use redact.Safe instead.
func WithSafeDetails ¶
WithSafeDetails annotates an error with the given reportable details. The format is made available as a PII-free string, alongside with a PII-free representation of every additional argument. Arguments can be reported as-is (without redaction) by wrapping them using the Safe() function.
If the format is empty and there are no arguments, the error argument is returned unchanged.
Detail is shown: - via `errors.GetSafeDetails()` - when formatting with `%+v`. - in Sentry reports.
Types ¶
type SafeMessager ¶
type SafeMessager = redact.SafeMessager
SafeMessager is implemented by objects which have a way of representing themselves suitably redacted for anonymized reporting.
NB: this interface is obsolete. Use redact.SafeFormatter instead.