pii_redactor

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ context.Context, next http.Handler, cfg *Config, name string) (http.Handler, error)

New creates a new redaction middleware.

Types

type Config

type Config struct {
	MaskReplacement string   `json:"maskReplacement,omitempty"`
	BypassHeaders   []string `json:"bypassHeaders,omitempty"`
	MaxBodyBytes    int64    `json:"maxBodyBytes,omitempty"`
	HashIDs         bool     `json:"hashIDs,omitempty"`
}

Config holds middleware configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig returns the default plugin configuration.

type Middleware

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

Middleware implements http.Handler and performs redaction.

func (*Middleware) ServeHTTP

func (m *Middleware) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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