regex

package
v0.29.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegexParser

type RegexParser struct {
	helper.ParserOperator
	// contains filtered or unexported fields
}

RegexParser is an operator that parses regex in an entry.

func (*RegexParser) Process

func (r *RegexParser) Process(ctx context.Context, entry *entry.Entry) error

Process will parse an entry for regex.

type RegexParserConfig

type RegexParserConfig struct {
	helper.ParserConfig `mapstructure:",squash" yaml:",inline"`

	Regex string `mapstructure:"regex" json:"regex" yaml:"regex"`

	Cache struct {
		Size uint16 `json:"size" yaml:"size"`
	} `mapstructure:"cache" json:"cache" yaml:"cache"`
}

RegexParserConfig is the configuration of a regex parser operator.

func NewRegexParserConfig

func NewRegexParserConfig(operatorID string) *RegexParserConfig

NewRegexParserConfig creates a new regex parser config with default values

func (RegexParserConfig) Build

Build will build a regex parser operator.

Jump to

Keyboard shortcuts

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