masking

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSensitiveKey

func IsSensitiveKey(key string) bool

IsSensitiveKey checks if a key name indicates sensitive data

func MaskConfig

func MaskConfig(cfg interface{}) map[string]interface{}

MaskConfig masks sensitive fields in a configuration struct or map

func MaskSensitiveEnvVars

func MaskSensitiveEnvVars(environ []string) map[string]interface{}

MaskSensitiveEnvVars parses environment variables and masks sensitive ones

func MaskSensitiveMap

func MaskSensitiveMap(data map[string]interface{}) map[string]interface{}

MaskSensitiveMap masks sensitive values in a map

Types

type MaskedValue

type MaskedValue struct {
	Masked string `json:"masked"`
}

MaskedValue represents a masked sensitive value in structured log format

func MaskValue

func MaskValue(value string) MaskedValue

MaskValue returns a masked version of sensitive data wrapped in a MaskedValue struct

Source Files

  • masking.go

Jump to

Keyboard shortcuts

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