regexreplace

package
v0.124.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	helper.TransformerConfig `mapstructure:",squash"`
	RegexName                string      `mapstructure:"regex_name"`
	Regex                    string      `mapstructure:"regex"`
	ReplaceWith              string      `mapstructure:"replace_with"`
	Field                    entry.Field `mapstructure:"field"`
}

Config is the configuration of an ansi_control_sequences operator.

func NewConfig

func NewConfig() *Config

NewConfig creates a new ansi_control_sequences config with default values

func NewConfigWithID

func NewConfigWithID(operatorID string) *Config

NewConfigWithID creates a new ansi_control_sequences config with default values

func (Config) Build

Build will build an ansi_control_sequences operator.

type Transformer

type Transformer struct {
	helper.TransformerOperator
	// contains filtered or unexported fields
}

Transformer is an operator that performs a regex-replace on a string field.

func (*Transformer) Process

func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error

func (*Transformer) ProcessBatch

func (t *Transformer) ProcessBatch(ctx context.Context, entries []*entry.Entry) error

Jump to

Keyboard shortcuts

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