Documentation ¶
Index ¶
- Variables
- type RegexMatchAndSubstitute
- func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int)deprecated
- func (x *RegexMatchAndSubstitute) GetRegex() string
- func (x *RegexMatchAndSubstitute) GetSubstitution() string
- func (*RegexMatchAndSubstitute) ProtoMessage()
- func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message
- func (x *RegexMatchAndSubstitute) Reset()
- func (x *RegexMatchAndSubstitute) String() string
- func (m *RegexMatchAndSubstitute) Validate() error
- func (m *RegexMatchAndSubstitute) ValidateAll() error
- type RegexMatchAndSubstituteMultiError
- type RegexMatchAndSubstituteValidationError
- func (e RegexMatchAndSubstituteValidationError) Cause() error
- func (e RegexMatchAndSubstituteValidationError) Error() string
- func (e RegexMatchAndSubstituteValidationError) ErrorName() string
- func (e RegexMatchAndSubstituteValidationError) Field() string
- func (e RegexMatchAndSubstituteValidationError) Key() bool
- func (e RegexMatchAndSubstituteValidationError) Reason() string
- type StringMatcher
- func (*StringMatcher) Descriptor() ([]byte, []int)deprecated
- func (x *StringMatcher) GetContains() string
- func (x *StringMatcher) GetExact() string
- func (x *StringMatcher) GetIgnoreCase() bool
- func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern
- func (x *StringMatcher) GetPrefix() string
- func (x *StringMatcher) GetRegex() string
- func (x *StringMatcher) GetSuffix() string
- func (*StringMatcher) ProtoMessage()
- func (x *StringMatcher) ProtoReflect() protoreflect.Message
- func (x *StringMatcher) Reset()
- func (x *StringMatcher) String() string
- func (m *StringMatcher) Validate() error
- func (m *StringMatcher) ValidateAll() error
- type StringMatcherMultiError
- type StringMatcherValidationError
- func (e StringMatcherValidationError) Cause() error
- func (e StringMatcherValidationError) Error() string
- func (e StringMatcherValidationError) ErrorName() string
- func (e StringMatcherValidationError) Field() string
- func (e StringMatcherValidationError) Key() bool
- func (e StringMatcherValidationError) Reason() string
- type StringMatcher_Contains
- type StringMatcher_Exact
- type StringMatcher_Prefix
- type StringMatcher_Regex
- type StringMatcher_Suffix
Constants ¶
This section is empty.
Variables ¶
var File_gsloc_type_matcher_v1_regex_proto protoreflect.FileDescriptor
var File_gsloc_type_matcher_v1_string_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
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. Regex string `protobuf:"bytes,3,opt,name=regex,proto3" json:"regex,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) Descriptor
deprecated
func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int)
Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead.
func (*RegexMatchAndSubstitute) GetRegex ¶
func (x *RegexMatchAndSubstitute) GetRegex() string
func (*RegexMatchAndSubstitute) GetSubstitution ¶
func (x *RegexMatchAndSubstitute) GetSubstitution() string
func (*RegexMatchAndSubstitute) ProtoMessage ¶
func (*RegexMatchAndSubstitute) ProtoMessage()
func (*RegexMatchAndSubstitute) ProtoReflect ¶
func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message
func (*RegexMatchAndSubstitute) Reset ¶
func (x *RegexMatchAndSubstitute) Reset()
func (*RegexMatchAndSubstitute) String ¶
func (x *RegexMatchAndSubstitute) String() string
func (*RegexMatchAndSubstitute) Validate ¶
func (m *RegexMatchAndSubstitute) Validate() error
Validate checks the field values on RegexMatchAndSubstitute 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 (*RegexMatchAndSubstitute) ValidateAll ¶
func (m *RegexMatchAndSubstitute) ValidateAll() error
ValidateAll checks the field values on RegexMatchAndSubstitute 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 RegexMatchAndSubstituteMultiError, or nil if none found.
type RegexMatchAndSubstituteMultiError ¶
type RegexMatchAndSubstituteMultiError []error
RegexMatchAndSubstituteMultiError is an error wrapping multiple validation errors returned by RegexMatchAndSubstitute.ValidateAll() if the designated constraints aren't met.
func (RegexMatchAndSubstituteMultiError) AllErrors ¶
func (m RegexMatchAndSubstituteMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegexMatchAndSubstituteMultiError) Error ¶
func (m RegexMatchAndSubstituteMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegexMatchAndSubstituteValidationError ¶
type RegexMatchAndSubstituteValidationError struct {
// contains filtered or unexported fields
}
RegexMatchAndSubstituteValidationError is the validation error returned by RegexMatchAndSubstitute.Validate if the designated constraints aren't met.
func (RegexMatchAndSubstituteValidationError) Cause ¶
func (e RegexMatchAndSubstituteValidationError) Cause() error
Cause function returns cause value.
func (RegexMatchAndSubstituteValidationError) Error ¶
func (e RegexMatchAndSubstituteValidationError) Error() string
Error satisfies the builtin error interface
func (RegexMatchAndSubstituteValidationError) ErrorName ¶
func (e RegexMatchAndSubstituteValidationError) ErrorName() string
ErrorName returns error name.
func (RegexMatchAndSubstituteValidationError) Field ¶
func (e RegexMatchAndSubstituteValidationError) Field() string
Field function returns field value.
func (RegexMatchAndSubstituteValidationError) Key ¶
func (e RegexMatchAndSubstituteValidationError) Key() bool
Key function returns key value.
func (RegexMatchAndSubstituteValidationError) Reason ¶
func (e RegexMatchAndSubstituteValidationError) Reason() string
Reason function returns reason value.
type StringMatcher ¶
type StringMatcher struct { // Types that are assignable to MatchPattern: // // *StringMatcher_Exact // *StringMatcher_Prefix // *StringMatcher_Suffix // *StringMatcher_Regex // *StringMatcher_Contains 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.
func (*StringMatcher) Descriptor
deprecated
func (*StringMatcher) Descriptor() ([]byte, []int)
Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead.
func (*StringMatcher) GetContains ¶
func (x *StringMatcher) GetContains() string
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) GetRegex ¶
func (x *StringMatcher) GetRegex() string
func (*StringMatcher) GetSuffix ¶
func (x *StringMatcher) GetSuffix() string
func (*StringMatcher) ProtoMessage ¶
func (*StringMatcher) ProtoMessage()
func (*StringMatcher) ProtoReflect ¶
func (x *StringMatcher) ProtoReflect() protoreflect.Message
func (*StringMatcher) Reset ¶
func (x *StringMatcher) Reset()
func (*StringMatcher) String ¶
func (x *StringMatcher) String() string
func (*StringMatcher) Validate ¶
func (m *StringMatcher) Validate() error
Validate checks the field values on StringMatcher 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 (*StringMatcher) ValidateAll ¶
func (m *StringMatcher) ValidateAll() error
ValidateAll checks the field values on StringMatcher 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 StringMatcherMultiError, or nil if none found.
type StringMatcherMultiError ¶
type StringMatcherMultiError []error
StringMatcherMultiError is an error wrapping multiple validation errors returned by StringMatcher.ValidateAll() if the designated constraints aren't met.
func (StringMatcherMultiError) AllErrors ¶
func (m StringMatcherMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StringMatcherMultiError) Error ¶
func (m StringMatcherMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StringMatcherValidationError ¶
type StringMatcherValidationError struct {
// contains filtered or unexported fields
}
StringMatcherValidationError is the validation error returned by StringMatcher.Validate if the designated constraints aren't met.
func (StringMatcherValidationError) Cause ¶
func (e StringMatcherValidationError) Cause() error
Cause function returns cause value.
func (StringMatcherValidationError) Error ¶
func (e StringMatcherValidationError) Error() string
Error satisfies the builtin error interface
func (StringMatcherValidationError) ErrorName ¶
func (e StringMatcherValidationError) ErrorName() string
ErrorName returns error name.
func (StringMatcherValidationError) Field ¶
func (e StringMatcherValidationError) Field() string
Field function returns field value.
func (StringMatcherValidationError) Key ¶
func (e StringMatcherValidationError) Key() bool
Key function returns key value.
func (StringMatcherValidationError) Reason ¶
func (e StringMatcherValidationError) Reason() string
Reason function returns reason value.
type StringMatcher_Contains ¶
type StringMatcher_Contains struct { // The input string must have the substring specified here. // Note: empty contains match is not allowed, please use regex instead. // // Examples: // // * *abc* matches the value *xyz.abc.def* Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` }
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_Regex ¶
type StringMatcher_Regex struct { // The input string must match the regular expression specified here. Regex string `protobuf:"bytes,5,opt,name=regex,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"` }