redact

package
v0.0.0-...-f7f8870 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Label = "xxREDACTEDxx"

Label is generated by the Simple redactor

Variables

View Source
var Default = Decorator()

Default is the default redacting logger.Decorator

Functions

func Decorator

func Decorator() logger.Decorator

Decorator returns a decorator scans log arguments for those that implement Interface and, when found, invokes Redacted to obtain a replacement value.

Types

type Func

type Func func() interface{}

Func is a functional adapter for Interface

func (Func) Redacted

func (f Func) Redacted() interface{}

Redacted implements Interface

type Interface

type Interface interface {
	Redacted() interface{}
}

Interface is implemented by types containing possibly sensitive information that should not appear in a log stream.

func Blackout

func Blackout(s string) Interface

Blackout generates a redactor that replaces each char of the given string with 'x'

type Simple

type Simple int

Simple impements Interface

func (Simple) Redacted

func (x Simple) Redacted() interface{}

Redacted returns the contents of Label

Jump to

Keyboard shortcuts

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