substitution

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldFilter

type FieldFilter interface {
	// Apply accepts src and dst slices of bytes and returns result stored in modified src slice.
	// src slice is needed to avoid unnecessary allocations.
	Apply(src []byte, dst []byte) []byte
	// contains filtered or unexported methods
}

type RegexFilter

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

func (*RegexFilter) Apply

func (r *RegexFilter) Apply(src []byte, dst []byte) []byte

type SubstitutionOp

type SubstitutionOp struct {
	Kind    SubstitutionOpKind
	Data    []string
	Filters []FieldFilter
}

func ParseSubstitution

func ParseSubstitution(substitution string, filtersBuf []byte, logger *zap.Logger) ([]SubstitutionOp, error)

type SubstitutionOpKind

type SubstitutionOpKind int
const (
	SubstitutionOpKindRaw SubstitutionOpKind = iota
	SubstitutionOpKindField
)

type TrimFilter added in v0.24.0

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

func (*TrimFilter) Apply added in v0.24.0

func (t *TrimFilter) Apply(src []byte, _ []byte) []byte

Jump to

Keyboard shortcuts

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