masker

package
v1.26.2-125.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFieldNames     = []string{"Password", "KeyData"}
	DefaultYAMLFieldNames = []string{"password", "keyData"}
)

Functions

func MaskStruct

func MaskStruct(strct interface{}, fieldNamesToMask []string) interface{}

MaskStruct replace password values with mask and returns copy of the strct. Original strct value is not modified. Doesn't go recursively through strct properties.

func MaskYaml

func MaskYaml(yamlStr string, fieldNamesToMask []string) (string, error)

MaskYaml replace password values with mask and returns copy of the string. Does recursive replacement for entire yamlStr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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