v3

package
v1.16.10 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_external_envoy_type_matcher_v3_regex_proto protoreflect.FileDescriptor
View Source
var File_github_com_solo_io_gloo_projects_gloo_api_external_envoy_type_matcher_v3_string_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ListStringMatcher

type ListStringMatcher struct {
	Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"`
	// contains filtered or unexported fields
}

Specifies a list of ways to match a string.

func (*ListStringMatcher) Clone added in v1.8.24

func (m *ListStringMatcher) Clone() proto.Message

Clone function

func (*ListStringMatcher) Descriptor deprecated

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

Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead.

func (*ListStringMatcher) Equal

func (m *ListStringMatcher) Equal(that interface{}) bool

Equal function

func (*ListStringMatcher) GetPatterns

func (x *ListStringMatcher) GetPatterns() []*StringMatcher

func (*ListStringMatcher) Hash added in v1.6.0

func (m *ListStringMatcher) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*ListStringMatcher) ProtoMessage

func (*ListStringMatcher) ProtoMessage()

func (*ListStringMatcher) ProtoReflect added in v1.6.0

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

func (*ListStringMatcher) Reset

func (x *ListStringMatcher) Reset()

func (*ListStringMatcher) String

func (x *ListStringMatcher) String() string

type RegexMatchAndSubstitute

type RegexMatchAndSubstitute struct {

	// The regular expression used to find portions of a string (hereafter called
	// the "subject string") that should be replaced. When a new string is
	// produced during the substitution operation, the new string is initially
	// the same as the subject string, but then all matches in the subject string
	// are replaced by the substitution string. If replacing all matches isn't
	// desired, regular expression anchors can be used to ensure a single match,
	// so as to replace just one occurrence of a pattern. Capture groups can be
	// used in the pattern to extract portions of the subject string, and then
	// referenced in the substitution string.
	Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
	// The string that should be substituted into matching portions of the
	// subject string during a substitution operation to produce a new string.
	// Capture groups in the pattern can be referenced in the substitution
	// string. Note, however, that the syntax for referring to capture groups is
	// defined by the chosen regular expression engine. Google's `RE2
	// <https://github.com/google/re2>`_ regular expression engine uses a
	// backslash followed by the capture group number to denote a numbered
	// capture group. E.g., “\1“ refers to capture group 1, and “\2“ refers
	// to capture group 2.
	Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"`
	// contains filtered or unexported fields
}

Describes how to match a string and then produce a new string using a regular expression and a substitution string.

func (*RegexMatchAndSubstitute) Clone added in v1.8.24

Clone function

func (*RegexMatchAndSubstitute) Descriptor deprecated

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

Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead.

func (*RegexMatchAndSubstitute) Equal

func (m *RegexMatchAndSubstitute) Equal(that interface{}) bool

Equal function

func (*RegexMatchAndSubstitute) GetPattern

func (x *RegexMatchAndSubstitute) GetPattern() *RegexMatcher

func (*RegexMatchAndSubstitute) GetSubstitution

func (x *RegexMatchAndSubstitute) GetSubstitution() string

func (*RegexMatchAndSubstitute) Hash added in v1.6.0

func (m *RegexMatchAndSubstitute) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RegexMatchAndSubstitute) ProtoMessage

func (*RegexMatchAndSubstitute) ProtoMessage()

func (*RegexMatchAndSubstitute) ProtoReflect added in v1.6.0

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

func (*RegexMatchAndSubstitute) Reset

func (x *RegexMatchAndSubstitute) Reset()

func (*RegexMatchAndSubstitute) String

func (x *RegexMatchAndSubstitute) String() string

type RegexMatcher

type RegexMatcher struct {

	// Types that are assignable to EngineType:
	//
	//	*RegexMatcher_GoogleRe2
	EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"`
	// The regex match string. The string must be supported by the configured engine.
	Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
	// contains filtered or unexported fields
}

A regex matcher designed for safety when used with untrusted input.

func (*RegexMatcher) Clone added in v1.8.24

func (m *RegexMatcher) Clone() proto.Message

Clone function

func (*RegexMatcher) Descriptor deprecated

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

Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead.

func (*RegexMatcher) Equal

func (m *RegexMatcher) Equal(that interface{}) bool

Equal function

func (*RegexMatcher) GetEngineType

func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType

func (*RegexMatcher) GetGoogleRe2

func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2

func (*RegexMatcher) GetRegex

func (x *RegexMatcher) GetRegex() string

func (*RegexMatcher) Hash added in v1.6.0

func (m *RegexMatcher) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RegexMatcher) ProtoMessage

func (*RegexMatcher) ProtoMessage()

func (*RegexMatcher) ProtoReflect added in v1.6.0

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

func (*RegexMatcher) Reset

func (x *RegexMatcher) Reset()

func (*RegexMatcher) String

func (x *RegexMatcher) String() string

type RegexMatcher_GoogleRE2

type RegexMatcher_GoogleRE2 struct {

	// This field controls the RE2 "program size" which is a rough estimate of how complex a
	// compiled regex is to evaluate. A regex that has a program size greater than the configured
	// value will fail to compile. In this case, the configured max program size can be increased
	// or the regex can be simplified. If not specified, the default is 100.
	//
	// This field is deprecated; regexp validation should be performed on the management server
	// instead of being done by each individual client.
	//
	// Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/type/matcher/v3/regex.proto.
	MaxProgramSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"`
	// contains filtered or unexported fields
}

Google's `RE2 <https://github.com/google/re2>`_ regex engine. The regex string must adhere to the documented `syntax <https://github.com/google/re2/wiki/Syntax>`_. The engine is designed to complete execution in linear time as well as limit the amount of memory used.

Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or complexity that a compiled regex can have before an exception is thrown or a warning is logged, respectively. `re2.max_program_size.error_level` defaults to 100, and `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning).

Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented each time the program size exceeds the warn level threshold.

func (*RegexMatcher_GoogleRE2) Clone added in v1.8.24

Clone function

func (*RegexMatcher_GoogleRE2) Descriptor deprecated

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

Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead.

func (*RegexMatcher_GoogleRE2) Equal

func (m *RegexMatcher_GoogleRE2) Equal(that interface{}) bool

Equal function

func (*RegexMatcher_GoogleRE2) GetMaxProgramSize deprecated

func (x *RegexMatcher_GoogleRE2) GetMaxProgramSize() *wrappers.UInt32Value

Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/type/matcher/v3/regex.proto.

func (*RegexMatcher_GoogleRE2) Hash added in v1.6.0

func (m *RegexMatcher_GoogleRE2) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RegexMatcher_GoogleRE2) ProtoMessage

func (*RegexMatcher_GoogleRE2) ProtoMessage()

func (*RegexMatcher_GoogleRE2) ProtoReflect added in v1.6.0

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

func (*RegexMatcher_GoogleRE2) Reset

func (x *RegexMatcher_GoogleRE2) Reset()

func (*RegexMatcher_GoogleRE2) String

func (x *RegexMatcher_GoogleRE2) String() string

type RegexMatcher_GoogleRe2

type RegexMatcher_GoogleRe2 struct {
	// Google's RE2 regex engine.
	GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"`
}

type StringMatcher

type StringMatcher struct {

	// Types that are assignable to MatchPattern:
	//
	//	*StringMatcher_Exact
	//	*StringMatcher_Prefix
	//	*StringMatcher_Suffix
	//	*StringMatcher_SafeRegex
	MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
	// If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no
	// effect for the safe_regex match.
	// For example, the matcher *data* will match both input string *Data* and *data* if set to true.
	IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"`
	// contains filtered or unexported fields
}

Specifies the way to match a string. [#next-free-field: 7]

func (*StringMatcher) Clone added in v1.8.24

func (m *StringMatcher) Clone() proto.Message

Clone function

func (*StringMatcher) Descriptor deprecated

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

Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead.

func (*StringMatcher) Equal

func (m *StringMatcher) Equal(that interface{}) bool

Equal function

func (*StringMatcher) GetExact

func (x *StringMatcher) GetExact() string

func (*StringMatcher) GetIgnoreCase

func (x *StringMatcher) GetIgnoreCase() bool

func (*StringMatcher) GetMatchPattern

func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern

func (*StringMatcher) GetPrefix

func (x *StringMatcher) GetPrefix() string

func (*StringMatcher) GetSafeRegex

func (x *StringMatcher) GetSafeRegex() *RegexMatcher

func (*StringMatcher) GetSuffix

func (x *StringMatcher) GetSuffix() string

func (*StringMatcher) Hash added in v1.6.0

func (m *StringMatcher) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*StringMatcher) ProtoMessage

func (*StringMatcher) ProtoMessage()

func (*StringMatcher) ProtoReflect added in v1.6.0

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

func (*StringMatcher) Reset

func (x *StringMatcher) Reset()

func (*StringMatcher) String

func (x *StringMatcher) String() string

type StringMatcher_Exact

type StringMatcher_Exact struct {
	// The input string must match exactly the string specified here.
	//
	// Examples:
	//
	// * *abc* only matches the value *abc*.
	Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
}

type StringMatcher_Prefix

type StringMatcher_Prefix struct {
	// The input string must have the prefix specified here.
	// Note: empty prefix is not allowed, please use regex instead.
	//
	// Examples:
	//
	// * *abc* matches the value *abc.xyz*
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
}

type StringMatcher_SafeRegex

type StringMatcher_SafeRegex struct {
	// The input string must match the regular expression specified here.
	SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"`
}

type StringMatcher_Suffix

type StringMatcher_Suffix struct {
	// The input string must have the suffix specified here.
	// Note: empty prefix is not allowed, please use regex instead.
	//
	// Examples:
	//
	// * *abc* matches the value *xyz.abc*
	Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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