Documentation ¶
Index ¶
- func DeRedact(remove bool, input io.Reader, output io.Writer, sep string) error
- func DeRedactFile(remove bool, input string, output string) error
- func InitRedact(redactLog bool)
- func Key(key []byte) string
- func NeedRedact() bool
- func String(mode string, input string) string
- func Stringer(mode string, input fmt.Stringer) redactStringer
- func Value(arg string) string
- func WriteRedact(build *strings.Builder, v string, redact string)
- type TaskInfoRedacted
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeRedact ¶
DeRedact is similar to DeRedactFile, but act on reader/writer, it works line by line.
func DeRedactFile ¶
DeRedactFile will deredact the input file, either removing marked contents, or remove the marker. It works line by line.
func String ¶
String will redact the input string according to 'mode'. Check 'tidb_redact_log': https://github.com/pingcap/tidb/blob/acf9e3128693a5a13f31027f05f4de41edf8d7b2/pkg/sessionctx/variable/sysvar.go#L2154.
Types ¶
type TaskInfoRedacted ¶
type TaskInfoRedacted struct {
Info *backup.StreamBackupTaskInfo
}
TaskInfoRedacted is a wrapper of backup.StreamBackupTaskInfo to redact sensitive information
func (TaskInfoRedacted) String ¶
func (t TaskInfoRedacted) String() string
String returns the redacted string of the task info
Click to show internal directories.
Click to hide internal directories.