json_anonymizer

package module
v0.0.0-...-e1b46ac Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Anonymize JSON docs

  • Replace strings with sha1 hash of string
  • Replace numbers with 0
  • Anonymize both keys and values, or just values
  • Supply a list of regex skip field filters so you can do things like skip keys that start with an underscore (_)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonAnonymizer

type JsonAnonymizer struct {
	Config JsonAnonymizerConfig
}

func NewJsonAnonymizer

func NewJsonAnonymizer(config JsonAnonymizerConfig) *JsonAnonymizer

func (JsonAnonymizer) Anonymize

func (ja JsonAnonymizer) Anonymize(input interface{}) (anonymized interface{}, err error)

func (JsonAnonymizer) ShouldSkip

func (ja JsonAnonymizer) ShouldSkip(key string) bool

type JsonAnonymizerConfig

type JsonAnonymizerConfig struct {
	SkipFieldsMatchingRegex []*regexp.Regexp
	AnonymizeKeys           bool
}

Directories

Path Synopsis
cmd
json-anonymizer command

Jump to

Keyboard shortcuts

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