protosanitizer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package protosanitizer supports logging of gRPC messages without accidentally revealing sensitive fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripReplicationSecrets

func StripReplicationSecrets(msg interface{}) fmt.Stringer

StripReplicationSecrets returns a wrapper around the original Replication gRPC message which has a Stringer implementation that serializes the message as one-line JSON, but without including secret information. Instead of the secret value(s), the string "***stripped***" is included in the result.

StripReplicationSecrets relies on an extension in Replication and thus can only be used for messages based on that or a more recent spec!

StripReplicationSecrets itself is fast and therefore it is cheap to pass the result to logging functions which may or may not end up serializing the parameter depending on the current log level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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