metascrub

package
v1.58.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MPL-2.0 Imports: 6 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.

Documentation

Overview

Package metascrub computes scrub paths for a metadata type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Computer

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

Computer computes scrub paths for types, caching the computation. It can safely be reused across multiple types for the same metadata. It is not safe for concurrent use.

func New

func New(md *meta.Data, log zerolog.Logger) *Computer

New constructs a new Computer for the given metadata.

func (*Computer) Compute

func (c *Computer) Compute(typ *schema.Type, mode ParseMode) Desc

Compute computes the scrub paths for the given typ. It is not safe for concurrent use.

type Desc

type Desc struct {
	Payload []scrub.Path

	// Headers are the names of headers whose values should be redacted entirely.
	Headers []string

	// Cookies are the names of cookies whose values should be redacted.
	// Use scrub.Cookie to redact them in a Cookie header.
	Cookies []string
}

type ParseMode

type ParseMode int
const (
	// AuthHandler specifies that the type is an auth handler.
	AuthHandler ParseMode = 1 << iota
)

Jump to

Keyboard shortcuts

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