v3alpha

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_contrib_envoy_extensions_matching_input_matchers_hyperscan_v3alpha_hyperscan_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Hyperscan

type Hyperscan struct {

	// Specifies a set of regex expressions that the input should match on.
	Regexes []*Hyperscan_Regex `protobuf:"bytes,1,rep,name=regexes,proto3" json:"regexes,omitempty"`
	// contains filtered or unexported fields
}

`Hyperscan <https://github.com/intel/hyperscan>`_ regex matcher. The engine of the matcher uses hybrid automata techniques to allow simultaneous matching of large numbers of regular expressions across streams of data.

The matcher follows PCRE pattern syntax, and the regex string must adhere to the documented `pattern support <https://intel.github.io/hyperscan/dev-reference/compilation.html#pattern-support>`_. The syntax is not compatible with the default RE2 regex matcher. Depending on configured expressions, swapping regex matcher may cause match rules to no longer be valid.

func (*Hyperscan) Descriptor deprecated

func (*Hyperscan) Descriptor() ([]byte, []int)

Deprecated: Use Hyperscan.ProtoReflect.Descriptor instead.

func (*Hyperscan) GetRegexes

func (x *Hyperscan) GetRegexes() []*Hyperscan_Regex

func (*Hyperscan) ProtoMessage

func (*Hyperscan) ProtoMessage()

func (*Hyperscan) ProtoReflect

func (x *Hyperscan) ProtoReflect() protoreflect.Message

func (*Hyperscan) Reset

func (x *Hyperscan) Reset()

func (*Hyperscan) String

func (x *Hyperscan) String() string

func (*Hyperscan) Validate

func (m *Hyperscan) Validate() error

Validate checks the field values on Hyperscan with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Hyperscan) ValidateAll

func (m *Hyperscan) ValidateAll() error

ValidateAll checks the field values on Hyperscan with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HyperscanMultiError, or nil if none found.

type HyperscanMultiError

type HyperscanMultiError []error

HyperscanMultiError is an error wrapping multiple validation errors returned by Hyperscan.ValidateAll() if the designated constraints aren't met.

func (HyperscanMultiError) AllErrors

func (m HyperscanMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HyperscanMultiError) Error

func (m HyperscanMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HyperscanValidationError

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

HyperscanValidationError is the validation error returned by Hyperscan.Validate if the designated constraints aren't met.

func (HyperscanValidationError) Cause

func (e HyperscanValidationError) Cause() error

Cause function returns cause value.

func (HyperscanValidationError) Error

func (e HyperscanValidationError) Error() string

Error satisfies the builtin error interface

func (HyperscanValidationError) ErrorName

func (e HyperscanValidationError) ErrorName() string

ErrorName returns error name.

func (HyperscanValidationError) Field

func (e HyperscanValidationError) Field() string

Field function returns field value.

func (HyperscanValidationError) Key

Key function returns key value.

func (HyperscanValidationError) Reason

func (e HyperscanValidationError) Reason() string

Reason function returns reason value.

type Hyperscan_Regex

type Hyperscan_Regex struct {

	// The regex expression.
	//
	// The expression must represent only the pattern to be matched, with no delimiters or flags.
	Regex string `protobuf:"bytes,1,opt,name=regex,proto3" json:"regex,omitempty"`
	// The ID of the regex expression.
	//
	// This option is designed to be used on the sub-expressions in logical combinations.
	Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// Matching will be performed case-insensitively.
	//
	// The expression may still use PCRE tokens (notably `(?i)` and `(?-i)`) to switch
	// case-insensitive matching on and off.
	Caseless bool `protobuf:"varint,3,opt,name=caseless,proto3" json:"caseless,omitempty"`
	// Matching a `.` will not exclude newlines.
	DotAll bool `protobuf:"varint,4,opt,name=dot_all,json=dotAll,proto3" json:"dot_all,omitempty"`
	// `^` and `$` anchors match any newlines in data.
	Multiline bool `protobuf:"varint,5,opt,name=multiline,proto3" json:"multiline,omitempty"`
	// Allow expressions which can match against an empty string.
	//
	// This option instructs the compiler to allow expressions that can match against empty buffers,
	// such as `.?`, `.*`, `(a|)`. Since Hyperscan can return every possible match for an expression,
	// such expressions generally execute very slowly.
	AllowEmpty bool `protobuf:"varint,6,opt,name=allow_empty,json=allowEmpty,proto3" json:"allow_empty,omitempty"`
	// Treat the pattern as a sequence of UTF-8 characters.
	Utf8 bool `protobuf:"varint,7,opt,name=utf8,proto3" json:"utf8,omitempty"`
	// Use Unicode properties for character classes.
	//
	// This option instructs Hyperscan to use Unicode properties, rather than the default ASCII
	// interpretations, for character mnemonics like `\w` and `\s` as well as the POSIX character
	// classes. It is only meaningful in conjunction with `utf8`.
	Ucp bool `protobuf:"varint,8,opt,name=ucp,proto3" json:"ucp,omitempty"`
	// Logical combination.
	//
	// This option instructs Hyperscan to parse this expression as logical combination syntax.
	// Logical constraints consist of operands, operators and parentheses. The operands are
	// expression indices, and operators can be `!`, `&` or `|`.
	Combination bool `protobuf:"varint,9,opt,name=combination,proto3" json:"combination,omitempty"`
	// Don’t do any match reporting.
	//
	// This option instructs Hyperscan to ignore match reporting for this expression. It is
	// designed to be used on the sub-expressions in logical combinations.
	Quiet bool `protobuf:"varint,10,opt,name=quiet,proto3" json:"quiet,omitempty"`
	// contains filtered or unexported fields
}

[#next-free-field: 11]

func (*Hyperscan_Regex) Descriptor deprecated

func (*Hyperscan_Regex) Descriptor() ([]byte, []int)

Deprecated: Use Hyperscan_Regex.ProtoReflect.Descriptor instead.

func (*Hyperscan_Regex) GetAllowEmpty

func (x *Hyperscan_Regex) GetAllowEmpty() bool

func (*Hyperscan_Regex) GetCaseless

func (x *Hyperscan_Regex) GetCaseless() bool

func (*Hyperscan_Regex) GetCombination

func (x *Hyperscan_Regex) GetCombination() bool

func (*Hyperscan_Regex) GetDotAll

func (x *Hyperscan_Regex) GetDotAll() bool

func (*Hyperscan_Regex) GetId

func (x *Hyperscan_Regex) GetId() uint32

func (*Hyperscan_Regex) GetMultiline

func (x *Hyperscan_Regex) GetMultiline() bool

func (*Hyperscan_Regex) GetQuiet

func (x *Hyperscan_Regex) GetQuiet() bool

func (*Hyperscan_Regex) GetRegex

func (x *Hyperscan_Regex) GetRegex() string

func (*Hyperscan_Regex) GetUcp

func (x *Hyperscan_Regex) GetUcp() bool

func (*Hyperscan_Regex) GetUtf8

func (x *Hyperscan_Regex) GetUtf8() bool

func (*Hyperscan_Regex) ProtoMessage

func (*Hyperscan_Regex) ProtoMessage()

func (*Hyperscan_Regex) ProtoReflect

func (x *Hyperscan_Regex) ProtoReflect() protoreflect.Message

func (*Hyperscan_Regex) Reset

func (x *Hyperscan_Regex) Reset()

func (*Hyperscan_Regex) String

func (x *Hyperscan_Regex) String() string

func (*Hyperscan_Regex) Validate

func (m *Hyperscan_Regex) Validate() error

Validate checks the field values on Hyperscan_Regex with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Hyperscan_Regex) ValidateAll

func (m *Hyperscan_Regex) ValidateAll() error

ValidateAll checks the field values on Hyperscan_Regex with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in Hyperscan_RegexMultiError, or nil if none found.

type Hyperscan_RegexMultiError

type Hyperscan_RegexMultiError []error

Hyperscan_RegexMultiError is an error wrapping multiple validation errors returned by Hyperscan_Regex.ValidateAll() if the designated constraints aren't met.

func (Hyperscan_RegexMultiError) AllErrors

func (m Hyperscan_RegexMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (Hyperscan_RegexMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type Hyperscan_RegexValidationError

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

Hyperscan_RegexValidationError is the validation error returned by Hyperscan_Regex.Validate if the designated constraints aren't met.

func (Hyperscan_RegexValidationError) Cause

Cause function returns cause value.

func (Hyperscan_RegexValidationError) Error

Error satisfies the builtin error interface

func (Hyperscan_RegexValidationError) ErrorName

func (e Hyperscan_RegexValidationError) ErrorName() string

ErrorName returns error name.

func (Hyperscan_RegexValidationError) Field

Field function returns field value.

func (Hyperscan_RegexValidationError) Key

Key function returns key value.

func (Hyperscan_RegexValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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