metascrub

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

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 []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