logutil

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package logutil contains functionality for working with logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scrubber

type Scrubber struct {
	// contains filtered or unexported fields
}

A Scrubber scrubs potentially sensitive strings from protobuf messages.

func NewScrubber

func NewScrubber(key string) *Scrubber

NewScrubber creates a new Scrubber.

func (*Scrubber) ScrubProto

func (s *Scrubber) ScrubProto(msg proto.Message) proto.Message

ScrubProto takes in a protobuf message, clones it and scrubs any non-whitelisted strings.

func (*Scrubber) Whitelist

func (s *Scrubber) Whitelist(typeName string, fieldNames ...string) *Scrubber

Whitelist whitelists fields for a given type. The type name should be the full protobuf typename (ie google.protobuf.Any).

Jump to

Keyboard shortcuts

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