mirror of https://github.com/cncf/xds.git
copy matcher proto and dependencies from Envoy (#8)
Moves the Matcher proto into the udpa repo along with a few dependencies: TypedExtensionConfig, StringMatcher and RegexMatcher. Signed-off-by: Snow Pettersen <snowp@lyft.com>pull/6/head
parent
b88cc788a6
commit
a8536b9b67
13 changed files with 3062 additions and 0 deletions
@ -0,0 +1,94 @@ |
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: xds/core/v3/extension.proto
|
||||
|
||||
package xds_core_v3 |
||||
|
||||
import ( |
||||
fmt "fmt" |
||||
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
||||
proto "github.com/golang/protobuf/proto" |
||||
any "github.com/golang/protobuf/ptypes/any" |
||||
math "math" |
||||
) |
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal |
||||
var _ = fmt.Errorf |
||||
var _ = math.Inf |
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type TypedExtensionConfig struct { |
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
||||
TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *TypedExtensionConfig) Reset() { *m = TypedExtensionConfig{} } |
||||
func (m *TypedExtensionConfig) String() string { return proto.CompactTextString(m) } |
||||
func (*TypedExtensionConfig) ProtoMessage() {} |
||||
func (*TypedExtensionConfig) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_ce7d8620783f5d54, []int{0} |
||||
} |
||||
|
||||
func (m *TypedExtensionConfig) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_TypedExtensionConfig.Unmarshal(m, b) |
||||
} |
||||
func (m *TypedExtensionConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_TypedExtensionConfig.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *TypedExtensionConfig) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_TypedExtensionConfig.Merge(m, src) |
||||
} |
||||
func (m *TypedExtensionConfig) XXX_Size() int { |
||||
return xxx_messageInfo_TypedExtensionConfig.Size(m) |
||||
} |
||||
func (m *TypedExtensionConfig) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_TypedExtensionConfig.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_TypedExtensionConfig proto.InternalMessageInfo |
||||
|
||||
func (m *TypedExtensionConfig) GetName() string { |
||||
if m != nil { |
||||
return m.Name |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
func (m *TypedExtensionConfig) GetTypedConfig() *any.Any { |
||||
if m != nil { |
||||
return m.TypedConfig |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func init() { |
||||
proto.RegisterType((*TypedExtensionConfig)(nil), "xds.core.v3.TypedExtensionConfig") |
||||
} |
||||
|
||||
func init() { proto.RegisterFile("xds/core/v3/extension.proto", fileDescriptor_ce7d8620783f5d54) } |
||||
|
||||
var fileDescriptor_ce7d8620783f5d54 = []byte{ |
||||
// 220 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xae, 0x48, 0x29, 0xd6, |
||||
0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x33, 0xd6, 0x4f, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, |
||||
0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xae, 0x48, 0x29, 0xd6, 0x03, 0x49, 0xea, |
||||
0x95, 0x19, 0x4b, 0x89, 0x97, 0x25, 0xe6, 0x64, 0xa6, 0x24, 0x96, 0xa4, 0xea, 0xc3, 0x18, 0x10, |
||||
0x55, 0x52, 0x92, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0x5e, 0x52, 0x69, 0x9a, 0x7e, |
||||
0x62, 0x5e, 0x25, 0x44, 0x4a, 0xa9, 0x8c, 0x4b, 0x24, 0xa4, 0xb2, 0x20, 0x35, 0xc5, 0x15, 0x66, |
||||
0xb0, 0x73, 0x7e, 0x5e, 0x5a, 0x66, 0xba, 0x90, 0x34, 0x17, 0x4b, 0x5e, 0x62, 0x6e, 0xaa, 0x04, |
||||
0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x13, 0xfb, 0x2f, 0x27, 0x96, 0x22, 0x26, 0x01, 0xc6, 0x20, 0xb0, |
||||
0xa0, 0x90, 0x23, 0x17, 0x4f, 0x09, 0x48, 0x53, 0x7c, 0x32, 0x58, 0xb1, 0x04, 0x93, 0x02, 0xa3, |
||||
0x06, 0xb7, 0x91, 0x88, 0x1e, 0xc4, 0x1a, 0x3d, 0x98, 0x35, 0x7a, 0x8e, 0x79, 0x95, 0x4e, 0x1c, |
||||
0xbf, 0x9c, 0x58, 0x17, 0x31, 0x32, 0x71, 0x30, 0x06, 0x71, 0x83, 0xf5, 0x40, 0xcc, 0x77, 0xd2, |
||||
0xe2, 0x12, 0x4b, 0xce, 0xcf, 0xd5, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x43, 0xf2, 0x85, |
||||
0x13, 0x1f, 0xdc, 0x29, 0x01, 0x20, 0x73, 0x02, 0x18, 0x93, 0xd8, 0xc0, 0x06, 0x1a, 0x03, 0x02, |
||||
0x00, 0x00, 0xff, 0xff, 0x34, 0x00, 0xe3, 0x99, 0x0a, 0x01, 0x00, 0x00, |
||||
} |
@ -0,0 +1,122 @@ |
||||
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
||||
// source: xds/core/v3/extension.proto
|
||||
|
||||
package xds_core_v3 |
||||
|
||||
import ( |
||||
"bytes" |
||||
"errors" |
||||
"fmt" |
||||
"net" |
||||
"net/mail" |
||||
"net/url" |
||||
"regexp" |
||||
"strings" |
||||
"time" |
||||
"unicode/utf8" |
||||
|
||||
"github.com/golang/protobuf/ptypes" |
||||
) |
||||
|
||||
// ensure the imports are used
|
||||
var ( |
||||
_ = bytes.MinRead |
||||
_ = errors.New("") |
||||
_ = fmt.Print |
||||
_ = utf8.UTFMax |
||||
_ = (*regexp.Regexp)(nil) |
||||
_ = (*strings.Reader)(nil) |
||||
_ = net.IPv4len |
||||
_ = time.Duration(0) |
||||
_ = (*url.URL)(nil) |
||||
_ = (*mail.Address)(nil) |
||||
_ = ptypes.DynamicAny{} |
||||
) |
||||
|
||||
// define the regex for a UUID once up-front
|
||||
var _extension_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") |
||||
|
||||
// Validate checks the field values on TypedExtensionConfig with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *TypedExtensionConfig) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if utf8.RuneCountInString(m.GetName()) < 1 { |
||||
return TypedExtensionConfigValidationError{ |
||||
field: "Name", |
||||
reason: "value length must be at least 1 runes", |
||||
} |
||||
} |
||||
|
||||
if m.GetTypedConfig() == nil { |
||||
return TypedExtensionConfigValidationError{ |
||||
field: "TypedConfig", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if a := m.GetTypedConfig(); a != nil { |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// TypedExtensionConfigValidationError is the validation error returned by
|
||||
// TypedExtensionConfig.Validate if the designated constraints aren't met.
|
||||
type TypedExtensionConfigValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e TypedExtensionConfigValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e TypedExtensionConfigValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e TypedExtensionConfigValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e TypedExtensionConfigValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e TypedExtensionConfigValidationError) ErrorName() string { |
||||
return "TypedExtensionConfigValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e TypedExtensionConfigValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sTypedExtensionConfig.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = TypedExtensionConfigValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = TypedExtensionConfigValidationError{} |
@ -0,0 +1,731 @@ |
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: xds/type/matcher/v3/matcher.proto
|
||||
|
||||
package xds_type_matcher_v3 |
||||
|
||||
import ( |
||||
fmt "fmt" |
||||
v3 "github.com/cncf/xds/go/xds/core/v3" |
||||
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
||||
proto "github.com/golang/protobuf/proto" |
||||
math "math" |
||||
) |
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal |
||||
var _ = fmt.Errorf |
||||
var _ = math.Inf |
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Matcher struct { |
||||
// Types that are valid to be assigned to MatcherType:
|
||||
// *Matcher_MatcherList_
|
||||
// *Matcher_MatcherTree_
|
||||
MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` |
||||
OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher) Reset() { *m = Matcher{} } |
||||
func (m *Matcher) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher) ProtoMessage() {} |
||||
func (*Matcher) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0} |
||||
} |
||||
|
||||
func (m *Matcher) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher.Merge(m, src) |
||||
} |
||||
func (m *Matcher) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher.Size(m) |
||||
} |
||||
func (m *Matcher) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher proto.InternalMessageInfo |
||||
|
||||
type isMatcher_MatcherType interface { |
||||
isMatcher_MatcherType() |
||||
} |
||||
|
||||
type Matcher_MatcherList_ struct { |
||||
MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherTree_ struct { |
||||
MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"` |
||||
} |
||||
|
||||
func (*Matcher_MatcherList_) isMatcher_MatcherType() {} |
||||
|
||||
func (*Matcher_MatcherTree_) isMatcher_MatcherType() {} |
||||
|
||||
func (m *Matcher) GetMatcherType() isMatcher_MatcherType { |
||||
if m != nil { |
||||
return m.MatcherType |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher) GetMatcherList() *Matcher_MatcherList { |
||||
if x, ok := m.GetMatcherType().(*Matcher_MatcherList_); ok { |
||||
return x.MatcherList |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher) GetMatcherTree() *Matcher_MatcherTree { |
||||
if x, ok := m.GetMatcherType().(*Matcher_MatcherTree_); ok { |
||||
return x.MatcherTree |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher) GetOnNoMatch() *Matcher_OnMatch { |
||||
if m != nil { |
||||
return m.OnNoMatch |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Matcher) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*Matcher_MatcherList_)(nil), |
||||
(*Matcher_MatcherTree_)(nil), |
||||
} |
||||
} |
||||
|
||||
type Matcher_OnMatch struct { |
||||
// Types that are valid to be assigned to OnMatch:
|
||||
// *Matcher_OnMatch_Matcher
|
||||
// *Matcher_OnMatch_Action
|
||||
OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_OnMatch) Reset() { *m = Matcher_OnMatch{} } |
||||
func (m *Matcher_OnMatch) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher_OnMatch) ProtoMessage() {} |
||||
func (*Matcher_OnMatch) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 0} |
||||
} |
||||
|
||||
func (m *Matcher_OnMatch) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_OnMatch.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_OnMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_OnMatch.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_OnMatch) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_OnMatch.Merge(m, src) |
||||
} |
||||
func (m *Matcher_OnMatch) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_OnMatch.Size(m) |
||||
} |
||||
func (m *Matcher_OnMatch) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_OnMatch.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_OnMatch proto.InternalMessageInfo |
||||
|
||||
type isMatcher_OnMatch_OnMatch interface { |
||||
isMatcher_OnMatch_OnMatch() |
||||
} |
||||
|
||||
type Matcher_OnMatch_Matcher struct { |
||||
Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_OnMatch_Action struct { |
||||
Action *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"` |
||||
} |
||||
|
||||
func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {} |
||||
|
||||
func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {} |
||||
|
||||
func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch { |
||||
if m != nil { |
||||
return m.OnMatch |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_OnMatch) GetMatcher() *Matcher { |
||||
if x, ok := m.GetOnMatch().(*Matcher_OnMatch_Matcher); ok { |
||||
return x.Matcher |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_OnMatch) GetAction() *v3.TypedExtensionConfig { |
||||
if x, ok := m.GetOnMatch().(*Matcher_OnMatch_Action); ok { |
||||
return x.Action |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Matcher_OnMatch) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*Matcher_OnMatch_Matcher)(nil), |
||||
(*Matcher_OnMatch_Action)(nil), |
||||
} |
||||
} |
||||
|
||||
type Matcher_MatcherList struct { |
||||
Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList) Reset() { *m = Matcher_MatcherList{} } |
||||
func (m *Matcher_MatcherList) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher_MatcherList) ProtoMessage() {} |
||||
func (*Matcher_MatcherList) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 1} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherList.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherList.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherList) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherList.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherList) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherList.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherList) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherList.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherList proto.InternalMessageInfo |
||||
|
||||
func (m *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher { |
||||
if m != nil { |
||||
return m.Matchers |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate struct { |
||||
// Types that are valid to be assigned to MatchType:
|
||||
// *Matcher_MatcherList_Predicate_SinglePredicate_
|
||||
// *Matcher_MatcherList_Predicate_OrMatcher
|
||||
// *Matcher_MatcherList_Predicate_AndMatcher
|
||||
// *Matcher_MatcherList_Predicate_NotMatcher
|
||||
MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) Reset() { *m = Matcher_MatcherList_Predicate{} } |
||||
func (m *Matcher_MatcherList_Predicate) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher_MatcherList_Predicate) ProtoMessage() {} |
||||
func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 1, 0} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherList_Predicate.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherList_Predicate.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherList_Predicate proto.InternalMessageInfo |
||||
|
||||
type isMatcher_MatcherList_Predicate_MatchType interface { |
||||
isMatcher_MatcherList_Predicate_MatchType() |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_SinglePredicate_ struct { |
||||
SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_OrMatcher struct { |
||||
OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_AndMatcher struct { |
||||
AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_NotMatcher struct { |
||||
NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"` |
||||
} |
||||
|
||||
func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {} |
||||
|
||||
func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {} |
||||
|
||||
func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {} |
||||
|
||||
func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType { |
||||
if m != nil { |
||||
return m.MatchType |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate { |
||||
if x, ok := m.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok { |
||||
return x.SinglePredicate |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList { |
||||
if x, ok := m.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok { |
||||
return x.OrMatcher |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList { |
||||
if x, ok := m.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok { |
||||
return x.AndMatcher |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate) GetNotMatcher() *Matcher_MatcherList_Predicate { |
||||
if x, ok := m.GetMatchType().(*Matcher_MatcherList_Predicate_NotMatcher); ok { |
||||
return x.NotMatcher |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Matcher_MatcherList_Predicate) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*Matcher_MatcherList_Predicate_SinglePredicate_)(nil), |
||||
(*Matcher_MatcherList_Predicate_OrMatcher)(nil), |
||||
(*Matcher_MatcherList_Predicate_AndMatcher)(nil), |
||||
(*Matcher_MatcherList_Predicate_NotMatcher)(nil), |
||||
} |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_SinglePredicate struct { |
||||
Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` |
||||
// Types that are valid to be assigned to Matcher:
|
||||
// *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch
|
||||
// *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch
|
||||
Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) Reset() { |
||||
*m = Matcher_MatcherList_Predicate_SinglePredicate{} |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) String() string { |
||||
return proto.CompactTextString(m) |
||||
} |
||||
func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {} |
||||
func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 1, 0, 0} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate_SinglePredicate.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate_SinglePredicate.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherList_Predicate_SinglePredicate.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate_SinglePredicate.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherList_Predicate_SinglePredicate.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherList_Predicate_SinglePredicate proto.InternalMessageInfo |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v3.TypedExtensionConfig { |
||||
if m != nil { |
||||
return m.Input |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface { |
||||
isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { |
||||
ValueMatch *StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { |
||||
CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` |
||||
} |
||||
|
||||
func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { |
||||
} |
||||
|
||||
func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher { |
||||
if m != nil { |
||||
return m.Matcher |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *StringMatcher { |
||||
if x, ok := m.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok { |
||||
return x.ValueMatch |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v3.TypedExtensionConfig { |
||||
if x, ok := m.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok { |
||||
return x.CustomMatch |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Matcher_MatcherList_Predicate_SinglePredicate) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil), |
||||
(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch)(nil), |
||||
} |
||||
} |
||||
|
||||
type Matcher_MatcherList_Predicate_PredicateList struct { |
||||
Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) Reset() { |
||||
*m = Matcher_MatcherList_Predicate_PredicateList{} |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) String() string { |
||||
return proto.CompactTextString(m) |
||||
} |
||||
func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {} |
||||
func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 1, 0, 1} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate_PredicateList.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate_PredicateList.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherList_Predicate_PredicateList.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherList_Predicate_PredicateList.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherList_Predicate_PredicateList.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherList_Predicate_PredicateList proto.InternalMessageInfo |
||||
|
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate { |
||||
if m != nil { |
||||
return m.Predicate |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type Matcher_MatcherList_FieldMatcher struct { |
||||
Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` |
||||
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_FieldMatcher) Reset() { *m = Matcher_MatcherList_FieldMatcher{} } |
||||
func (m *Matcher_MatcherList_FieldMatcher) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {} |
||||
func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 1, 1} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_FieldMatcher) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherList_FieldMatcher.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherList_FieldMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherList_FieldMatcher.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherList_FieldMatcher) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherList_FieldMatcher.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherList_FieldMatcher) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherList_FieldMatcher.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherList_FieldMatcher) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherList_FieldMatcher.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherList_FieldMatcher proto.InternalMessageInfo |
||||
|
||||
func (m *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate { |
||||
if m != nil { |
||||
return m.Predicate |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch { |
||||
if m != nil { |
||||
return m.OnMatch |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type Matcher_MatcherTree struct { |
||||
Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` |
||||
// Types that are valid to be assigned to TreeType:
|
||||
// *Matcher_MatcherTree_ExactMatchMap
|
||||
// *Matcher_MatcherTree_PrefixMatchMap
|
||||
// *Matcher_MatcherTree_CustomMatch
|
||||
TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree) Reset() { *m = Matcher_MatcherTree{} } |
||||
func (m *Matcher_MatcherTree) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher_MatcherTree) ProtoMessage() {} |
||||
func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 2} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherTree.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherTree.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherTree) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherTree.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherTree) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherTree.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherTree) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherTree.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherTree proto.InternalMessageInfo |
||||
|
||||
func (m *Matcher_MatcherTree) GetInput() *v3.TypedExtensionConfig { |
||||
if m != nil { |
||||
return m.Input |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type isMatcher_MatcherTree_TreeType interface { |
||||
isMatcher_MatcherTree_TreeType() |
||||
} |
||||
|
||||
type Matcher_MatcherTree_ExactMatchMap struct { |
||||
ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherTree_PrefixMatchMap struct { |
||||
PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"` |
||||
} |
||||
|
||||
type Matcher_MatcherTree_CustomMatch struct { |
||||
CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"` |
||||
} |
||||
|
||||
func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {} |
||||
|
||||
func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {} |
||||
|
||||
func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {} |
||||
|
||||
func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType { |
||||
if m != nil { |
||||
return m.TreeType |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap { |
||||
if x, ok := m.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok { |
||||
return x.ExactMatchMap |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap { |
||||
if x, ok := m.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok { |
||||
return x.PrefixMatchMap |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree) GetCustomMatch() *v3.TypedExtensionConfig { |
||||
if x, ok := m.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok { |
||||
return x.CustomMatch |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Matcher_MatcherTree) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*Matcher_MatcherTree_ExactMatchMap)(nil), |
||||
(*Matcher_MatcherTree_PrefixMatchMap)(nil), |
||||
(*Matcher_MatcherTree_CustomMatch)(nil), |
||||
} |
||||
} |
||||
|
||||
type Matcher_MatcherTree_MatchMap struct { |
||||
Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree_MatchMap) Reset() { *m = Matcher_MatcherTree_MatchMap{} } |
||||
func (m *Matcher_MatcherTree_MatchMap) String() string { return proto.CompactTextString(m) } |
||||
func (*Matcher_MatcherTree_MatchMap) ProtoMessage() {} |
||||
func (*Matcher_MatcherTree_MatchMap) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_5da8e5cb90406c53, []int{0, 2, 0} |
||||
} |
||||
|
||||
func (m *Matcher_MatcherTree_MatchMap) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_Matcher_MatcherTree_MatchMap.Unmarshal(m, b) |
||||
} |
||||
func (m *Matcher_MatcherTree_MatchMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_Matcher_MatcherTree_MatchMap.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *Matcher_MatcherTree_MatchMap) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_Matcher_MatcherTree_MatchMap.Merge(m, src) |
||||
} |
||||
func (m *Matcher_MatcherTree_MatchMap) XXX_Size() int { |
||||
return xxx_messageInfo_Matcher_MatcherTree_MatchMap.Size(m) |
||||
} |
||||
func (m *Matcher_MatcherTree_MatchMap) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_Matcher_MatcherTree_MatchMap.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_Matcher_MatcherTree_MatchMap proto.InternalMessageInfo |
||||
|
||||
func (m *Matcher_MatcherTree_MatchMap) GetMap() map[string]*Matcher_OnMatch { |
||||
if m != nil { |
||||
return m.Map |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func init() { |
||||
proto.RegisterType((*Matcher)(nil), "xds.type.matcher.v3.Matcher") |
||||
proto.RegisterType((*Matcher_OnMatch)(nil), "xds.type.matcher.v3.Matcher.OnMatch") |
||||
proto.RegisterType((*Matcher_MatcherList)(nil), "xds.type.matcher.v3.Matcher.MatcherList") |
||||
proto.RegisterType((*Matcher_MatcherList_Predicate)(nil), "xds.type.matcher.v3.Matcher.MatcherList.Predicate") |
||||
proto.RegisterType((*Matcher_MatcherList_Predicate_SinglePredicate)(nil), "xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate") |
||||
proto.RegisterType((*Matcher_MatcherList_Predicate_PredicateList)(nil), "xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList") |
||||
proto.RegisterType((*Matcher_MatcherList_FieldMatcher)(nil), "xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher") |
||||
proto.RegisterType((*Matcher_MatcherTree)(nil), "xds.type.matcher.v3.Matcher.MatcherTree") |
||||
proto.RegisterType((*Matcher_MatcherTree_MatchMap)(nil), "xds.type.matcher.v3.Matcher.MatcherTree.MatchMap") |
||||
proto.RegisterMapType((map[string]*Matcher_OnMatch)(nil), "xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry") |
||||
} |
||||
|
||||
func init() { proto.RegisterFile("xds/type/matcher/v3/matcher.proto", fileDescriptor_5da8e5cb90406c53) } |
||||
|
||||
var fileDescriptor_5da8e5cb90406c53 = []byte{ |
||||
// 734 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xd3, 0x4c, |
||||
0x14, 0xcd, 0xc4, 0x6d, 0x93, 0x5c, 0xa7, 0x4d, 0xbe, 0xe9, 0xe2, 0x8b, 0x0c, 0x42, 0x6d, 0xc5, |
||||
0xa2, 0x2b, 0x07, 0x5a, 0x21, 0x55, 0x65, 0x03, 0x86, 0x56, 0x41, 0x22, 0x50, 0xb9, 0x85, 0x05, |
||||
0x05, 0x45, 0xae, 0x3d, 0x4d, 0xad, 0x26, 0x33, 0x96, 0x3d, 0x89, 0x92, 0x57, 0x60, 0x57, 0x96, |
||||
0xbc, 0x01, 0x0f, 0x00, 0x6b, 0xde, 0x89, 0x0d, 0x82, 0x0d, 0x9a, 0x1f, 0x3b, 0x6e, 0x15, 0x95, |
||||
0x34, 0x74, 0x95, 0xeb, 0xeb, 0x39, 0xe7, 0xcc, 0xdc, 0x7b, 0xee, 0xc4, 0xb0, 0x3e, 0x0a, 0x92, |
||||
0x26, 0x1f, 0x47, 0xa4, 0xd9, 0xf7, 0xb8, 0x7f, 0x46, 0xe2, 0xe6, 0x70, 0x3b, 0x0d, 0xed, 0x28, |
||||
0x66, 0x9c, 0xe1, 0xd5, 0x51, 0x90, 0xd8, 0x62, 0x89, 0x9d, 0xe6, 0x87, 0xdb, 0xd6, 0x1d, 0x81, |
||||
0xf3, 0x59, 0x4c, 0xc4, 0x7a, 0x32, 0xe2, 0x84, 0x26, 0x21, 0xa3, 0x0a, 0x61, 0xad, 0x4d, 0x23, |
||||
0x4d, 0x78, 0x1c, 0xd2, 0xae, 0x5e, 0xf1, 0xff, 0xd0, 0xeb, 0x85, 0x81, 0xc7, 0x49, 0x33, 0x0d, |
||||
0xd4, 0x8b, 0x8d, 0xdf, 0x35, 0x28, 0xb5, 0x15, 0x08, 0xb7, 0xa1, 0xaa, 0xf1, 0x9d, 0x5e, 0x98, |
||||
0xf0, 0x06, 0x5a, 0x43, 0x9b, 0xe6, 0xd6, 0xa6, 0x3d, 0x65, 0x3f, 0xb6, 0xc6, 0xa4, 0xbf, 0x2f, |
||||
0xc3, 0x84, 0xb7, 0x0a, 0xae, 0xd9, 0x9f, 0x3c, 0xe6, 0xe9, 0x78, 0x4c, 0x48, 0xa3, 0x38, 0x3b, |
||||
0xdd, 0x51, 0x4c, 0x48, 0x8e, 0x4e, 0x3c, 0xe2, 0xe7, 0x60, 0x32, 0xda, 0xa1, 0xac, 0x23, 0x93, |
||||
0x0d, 0x43, 0xb2, 0xdd, 0xbf, 0x96, 0xed, 0x35, 0x95, 0x91, 0x5b, 0x61, 0xf4, 0x15, 0x93, 0xa1, |
||||
0x75, 0x81, 0xa0, 0xa4, 0xd3, 0x78, 0x07, 0x4a, 0x1a, 0xa4, 0x8f, 0x7a, 0xf7, 0x3a, 0xb6, 0x56, |
||||
0xc1, 0x4d, 0x97, 0xe3, 0xc7, 0xb0, 0xe4, 0xf9, 0x3c, 0x64, 0x54, 0x1f, 0x6a, 0x5d, 0x02, 0x45, |
||||
0x7b, 0x04, 0xe0, 0x68, 0x1c, 0x91, 0x60, 0x2f, 0xed, 0xd1, 0x33, 0x46, 0x4f, 0xc3, 0x6e, 0xab, |
||||
0xe0, 0x6a, 0x88, 0x53, 0x83, 0x32, 0xa3, 0xea, 0x14, 0xd8, 0xf8, 0xe9, 0x20, 0xeb, 0x5b, 0x19, |
||||
0xcc, 0x5c, 0x1d, 0xf1, 0x31, 0x94, 0xb5, 0x50, 0xd2, 0x40, 0x6b, 0xc6, 0xa6, 0xb9, 0xf5, 0x68, |
||||
0xd6, 0x1e, 0xd8, 0xfb, 0x21, 0xe9, 0x05, 0x3a, 0xe1, 0x94, 0x7f, 0x39, 0x8b, 0x9f, 0x50, 0xb1, |
||||
0x8c, 0xdc, 0x8c, 0xd0, 0xba, 0x58, 0x82, 0xca, 0x41, 0x4c, 0x82, 0xd0, 0xf7, 0x38, 0xc1, 0x0c, |
||||
0xea, 0x49, 0x48, 0xbb, 0x3d, 0xd2, 0x89, 0xd2, 0x9c, 0xae, 0x85, 0x33, 0xb3, 0x64, 0xc6, 0x66, |
||||
0x1f, 0x4a, 0xaa, 0xec, 0xb9, 0x55, 0x70, 0x6b, 0xc9, 0xe5, 0x14, 0xf6, 0x00, 0x58, 0xdc, 0x49, |
||||
0xcb, 0xae, 0xaa, 0xf7, 0x64, 0x0e, 0xa9, 0x2c, 0xd2, 0xce, 0xab, 0xb0, 0x38, 0xb5, 0xb1, 0x0f, |
||||
0xa6, 0x47, 0x83, 0x4c, 0xc3, 0xb8, 0x35, 0x0d, 0xf0, 0x68, 0x5a, 0x5a, 0xfc, 0x06, 0x4c, 0xca, |
||||
0x78, 0x26, 0xb2, 0x20, 0x45, 0xb6, 0x6e, 0x2e, 0x22, 0x68, 0x29, 0xe3, 0xfa, 0x9d, 0xf5, 0x03, |
||||
0x41, 0xed, 0x4a, 0x15, 0xf1, 0x53, 0x58, 0x0c, 0x69, 0x34, 0x48, 0xe7, 0xf1, 0xef, 0x5e, 0x93, |
||||
0x7d, 0xff, 0x88, 0x8a, 0x75, 0xe4, 0x2a, 0x24, 0xde, 0x03, 0x73, 0xe8, 0xf5, 0x06, 0x44, 0xcf, |
||||
0x8e, 0x2a, 0xfb, 0xc6, 0xd4, 0xdd, 0x1e, 0xca, 0x6b, 0x63, 0xe2, 0x79, 0x90, 0x40, 0x35, 0x30, |
||||
0xfb, 0x50, 0xf5, 0x07, 0x09, 0x67, 0xfd, 0x4b, 0x33, 0x38, 0x93, 0xf9, 0x4d, 0x05, 0x94, 0x3c, |
||||
0xce, 0x4a, 0x36, 0x78, 0x6a, 0x00, 0xce, 0x61, 0xf9, 0x52, 0xad, 0xf1, 0x3b, 0xa8, 0xe4, 0xfd, |
||||
0x68, 0xcc, 0x57, 0xdb, 0xcc, 0xff, 0x45, 0x77, 0x42, 0xe7, 0xfc, 0x07, 0x20, 0x09, 0x3a, 0x82, |
||||
0x4b, 0xe9, 0x7f, 0x45, 0x50, 0xcd, 0x0f, 0xce, 0x55, 0x7d, 0xf4, 0x0f, 0xfa, 0xaa, 0x0f, 0x13, |
||||
0x3a, 0xfc, 0x62, 0x32, 0xfe, 0xba, 0x11, 0x33, 0x5d, 0x62, 0x39, 0xb2, 0x12, 0x53, 0x29, 0xeb, |
||||
0xcb, 0x42, 0x76, 0x71, 0xc8, 0x2b, 0xf2, 0x16, 0x9c, 0x72, 0x0c, 0x35, 0x32, 0xf2, 0x7c, 0xed, |
||||
0xec, 0x4e, 0xdf, 0x8b, 0xf4, 0x26, 0x1f, 0xce, 0x7a, 0x6f, 0xab, 0xb8, 0xed, 0x45, 0xad, 0x82, |
||||
0xbb, 0x2c, 0xb9, 0xd2, 0x04, 0xfe, 0x00, 0xf5, 0x28, 0x26, 0xa7, 0xe1, 0x28, 0xc7, 0x6e, 0xcc, |
||||
0xcf, 0xbe, 0xa2, 0xc8, 0x32, 0xfa, 0xab, 0xf6, 0x5c, 0x98, 0xcf, 0x9e, 0xd6, 0x77, 0x04, 0xe5, |
||||
0x8c, 0xf4, 0x2d, 0x18, 0x62, 0x9b, 0xca, 0x84, 0xbb, 0x37, 0xde, 0xa6, 0xdd, 0xf6, 0xa2, 0x3d, |
||||
0xca, 0xe3, 0xb1, 0x2c, 0xf5, 0x67, 0x79, 0x19, 0x0b, 0x42, 0xeb, 0xbd, 0xd0, 0x50, 0xaf, 0x70, |
||||
0x1d, 0x8c, 0x73, 0x32, 0x96, 0x5d, 0xab, 0xb8, 0x22, 0xc4, 0xbb, 0xb0, 0x28, 0xe7, 0xee, 0x26, |
||||
0x0e, 0x71, 0x15, 0x64, 0xb7, 0xb8, 0x83, 0x9c, 0x3a, 0x54, 0xc4, 0x7f, 0xee, 0xc4, 0xe3, 0xce, |
||||
0x6a, 0xee, 0xdf, 0x38, 0x4b, 0x3e, 0x80, 0x7b, 0x3e, 0xeb, 0xdb, 0xdd, 0x90, 0x9f, 0x0d, 0x4e, |
||||
0xa6, 0x69, 0x38, 0x55, 0x2d, 0x72, 0x20, 0xbe, 0x16, 0x0e, 0xd0, 0xc9, 0x92, 0xfc, 0x6c, 0xd8, |
||||
0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x4c, 0x3e, 0xf8, 0xc8, 0x08, 0x00, 0x00, |
||||
} |
@ -0,0 +1,993 @@ |
||||
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
||||
// source: xds/type/matcher/v3/matcher.proto
|
||||
|
||||
package xds_type_matcher_v3 |
||||
|
||||
import ( |
||||
"bytes" |
||||
"errors" |
||||
"fmt" |
||||
"net" |
||||
"net/mail" |
||||
"net/url" |
||||
"regexp" |
||||
"strings" |
||||
"time" |
||||
"unicode/utf8" |
||||
|
||||
"github.com/golang/protobuf/ptypes" |
||||
) |
||||
|
||||
// ensure the imports are used
|
||||
var ( |
||||
_ = bytes.MinRead |
||||
_ = errors.New("") |
||||
_ = fmt.Print |
||||
_ = utf8.UTFMax |
||||
_ = (*regexp.Regexp)(nil) |
||||
_ = (*strings.Reader)(nil) |
||||
_ = net.IPv4len |
||||
_ = time.Duration(0) |
||||
_ = (*url.URL)(nil) |
||||
_ = (*mail.Address)(nil) |
||||
_ = ptypes.DynamicAny{} |
||||
) |
||||
|
||||
// define the regex for a UUID once up-front
|
||||
var _matcher_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") |
||||
|
||||
// Validate checks the field values on Matcher with the rules defined in the
|
||||
// proto definition for this message. If any rules are violated, an error is returned.
|
||||
func (m *Matcher) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return MatcherValidationError{ |
||||
field: "OnNoMatch", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
switch m.MatcherType.(type) { |
||||
|
||||
case *Matcher_MatcherList_: |
||||
|
||||
if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return MatcherValidationError{ |
||||
field: "MatcherList", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherTree_: |
||||
|
||||
if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return MatcherValidationError{ |
||||
field: "MatcherTree", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return MatcherValidationError{ |
||||
field: "MatcherType", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// MatcherValidationError is the validation error returned by Matcher.Validate
|
||||
// if the designated constraints aren't met.
|
||||
type MatcherValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e MatcherValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e MatcherValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e MatcherValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e MatcherValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e MatcherValidationError) ErrorName() string { return "MatcherValidationError" } |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e MatcherValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = MatcherValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = MatcherValidationError{} |
||||
|
||||
// Validate checks the field values on Matcher_OnMatch with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, an
|
||||
// error is returned.
|
||||
func (m *Matcher_OnMatch) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
switch m.OnMatch.(type) { |
||||
|
||||
case *Matcher_OnMatch_Matcher: |
||||
|
||||
if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_OnMatchValidationError{ |
||||
field: "Matcher", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_OnMatch_Action: |
||||
|
||||
if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_OnMatchValidationError{ |
||||
field: "Action", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return Matcher_OnMatchValidationError{ |
||||
field: "OnMatch", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_OnMatchValidationError is the validation error returned by
|
||||
// Matcher_OnMatch.Validate if the designated constraints aren't met.
|
||||
type Matcher_OnMatchValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_OnMatchValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_OnMatchValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_OnMatchValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_OnMatchValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_OnMatchValidationError) ErrorName() string { return "Matcher_OnMatchValidationError" } |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_OnMatchValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_OnMatch.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_OnMatchValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_OnMatchValidationError{} |
||||
|
||||
// Validate checks the field values on Matcher_MatcherList with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *Matcher_MatcherList) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if len(m.GetMatchers()) < 1 { |
||||
return Matcher_MatcherListValidationError{ |
||||
field: "Matchers", |
||||
reason: "value must contain at least 1 item(s)", |
||||
} |
||||
} |
||||
|
||||
for idx, item := range m.GetMatchers() { |
||||
_, _ = idx, item |
||||
|
||||
if v, ok := interface{}(item).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherListValidationError{ |
||||
field: fmt.Sprintf("Matchers[%v]", idx), |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherListValidationError is the validation error returned by
|
||||
// Matcher_MatcherList.Validate if the designated constraints aren't met.
|
||||
type Matcher_MatcherListValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherListValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherListValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherListValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherListValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherListValidationError) ErrorName() string { |
||||
return "Matcher_MatcherListValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherListValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherList.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherListValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherListValidationError{} |
||||
|
||||
// Validate checks the field values on Matcher_MatcherTree with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *Matcher_MatcherTree) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if m.GetInput() == nil { |
||||
return Matcher_MatcherTreeValidationError{ |
||||
field: "Input", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherTreeValidationError{ |
||||
field: "Input", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
switch m.TreeType.(type) { |
||||
|
||||
case *Matcher_MatcherTree_ExactMatchMap: |
||||
|
||||
if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherTreeValidationError{ |
||||
field: "ExactMatchMap", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherTree_PrefixMatchMap: |
||||
|
||||
if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherTreeValidationError{ |
||||
field: "PrefixMatchMap", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherTree_CustomMatch: |
||||
|
||||
if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherTreeValidationError{ |
||||
field: "CustomMatch", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return Matcher_MatcherTreeValidationError{ |
||||
field: "TreeType", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherTreeValidationError is the validation error returned by
|
||||
// Matcher_MatcherTree.Validate if the designated constraints aren't met.
|
||||
type Matcher_MatcherTreeValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherTreeValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherTreeValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherTreeValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherTreeValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherTreeValidationError) ErrorName() string { |
||||
return "Matcher_MatcherTreeValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherTreeValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherTree.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherTreeValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherTreeValidationError{} |
||||
|
||||
// Validate checks the field values on Matcher_MatcherList_Predicate with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *Matcher_MatcherList_Predicate) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
switch m.MatchType.(type) { |
||||
|
||||
case *Matcher_MatcherList_Predicate_SinglePredicate_: |
||||
|
||||
if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_PredicateValidationError{ |
||||
field: "SinglePredicate", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherList_Predicate_OrMatcher: |
||||
|
||||
if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_PredicateValidationError{ |
||||
field: "OrMatcher", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherList_Predicate_AndMatcher: |
||||
|
||||
if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_PredicateValidationError{ |
||||
field: "AndMatcher", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherList_Predicate_NotMatcher: |
||||
|
||||
if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_PredicateValidationError{ |
||||
field: "NotMatcher", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return Matcher_MatcherList_PredicateValidationError{ |
||||
field: "MatchType", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherList_PredicateValidationError is the validation error
|
||||
// returned by Matcher_MatcherList_Predicate.Validate if the designated
|
||||
// constraints aren't met.
|
||||
type Matcher_MatcherList_PredicateValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherList_PredicateValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherList_PredicateValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherList_PredicateValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherList_PredicateValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherList_PredicateValidationError) ErrorName() string { |
||||
return "Matcher_MatcherList_PredicateValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherList_PredicateValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherList_Predicate.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherList_PredicateValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherList_PredicateValidationError{} |
||||
|
||||
// Validate checks the field values on Matcher_MatcherList_FieldMatcher with
|
||||
// the rules defined in the proto definition for this message. If any rules
|
||||
// are violated, an error is returned.
|
||||
func (m *Matcher_MatcherList_FieldMatcher) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if m.GetPredicate() == nil { |
||||
return Matcher_MatcherList_FieldMatcherValidationError{ |
||||
field: "Predicate", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_FieldMatcherValidationError{ |
||||
field: "Predicate", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
if m.GetOnMatch() == nil { |
||||
return Matcher_MatcherList_FieldMatcherValidationError{ |
||||
field: "OnMatch", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_FieldMatcherValidationError{ |
||||
field: "OnMatch", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherList_FieldMatcherValidationError is the validation error
|
||||
// returned by Matcher_MatcherList_FieldMatcher.Validate if the designated
|
||||
// constraints aren't met.
|
||||
type Matcher_MatcherList_FieldMatcherValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherList_FieldMatcherValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherList_FieldMatcherValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherList_FieldMatcherValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherList_FieldMatcherValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherList_FieldMatcherValidationError) ErrorName() string { |
||||
return "Matcher_MatcherList_FieldMatcherValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherList_FieldMatcherValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherList_FieldMatcher.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherList_FieldMatcherValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherList_FieldMatcherValidationError{} |
||||
|
||||
// Validate checks the field values on
|
||||
// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the
|
||||
// proto definition for this message. If any rules are violated, an error is returned.
|
||||
func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if m.GetInput() == nil { |
||||
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ |
||||
field: "Input", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ |
||||
field: "Input", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
switch m.Matcher.(type) { |
||||
|
||||
case *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch: |
||||
|
||||
if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ |
||||
field: "ValueMatch", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch: |
||||
|
||||
if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ |
||||
field: "CustomMatch", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ |
||||
field: "Matcher", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherList_Predicate_SinglePredicateValidationError is the
|
||||
// validation error returned by
|
||||
// Matcher_MatcherList_Predicate_SinglePredicate.Validate if the designated
|
||||
// constraints aren't met.
|
||||
type Matcher_MatcherList_Predicate_SinglePredicateValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) ErrorName() string { |
||||
return "Matcher_MatcherList_Predicate_SinglePredicateValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherList_Predicate_SinglePredicate.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherList_Predicate_SinglePredicateValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherList_Predicate_SinglePredicateValidationError{} |
||||
|
||||
// Validate checks the field values on
|
||||
// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the
|
||||
// proto definition for this message. If any rules are violated, an error is returned.
|
||||
func (m *Matcher_MatcherList_Predicate_PredicateList) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if len(m.GetPredicate()) < 2 { |
||||
return Matcher_MatcherList_Predicate_PredicateListValidationError{ |
||||
field: "Predicate", |
||||
reason: "value must contain at least 2 item(s)", |
||||
} |
||||
} |
||||
|
||||
for idx, item := range m.GetPredicate() { |
||||
_, _ = idx, item |
||||
|
||||
if v, ok := interface{}(item).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherList_Predicate_PredicateListValidationError{ |
||||
field: fmt.Sprintf("Predicate[%v]", idx), |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherList_Predicate_PredicateListValidationError is the validation
|
||||
// error returned by Matcher_MatcherList_Predicate_PredicateList.Validate if
|
||||
// the designated constraints aren't met.
|
||||
type Matcher_MatcherList_Predicate_PredicateListValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) ErrorName() string { |
||||
return "Matcher_MatcherList_Predicate_PredicateListValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherList_Predicate_PredicateList.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherList_Predicate_PredicateListValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherList_Predicate_PredicateListValidationError{} |
||||
|
||||
// Validate checks the field values on Matcher_MatcherTree_MatchMap with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *Matcher_MatcherTree_MatchMap) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if len(m.GetMap()) < 1 { |
||||
return Matcher_MatcherTree_MatchMapValidationError{ |
||||
field: "Map", |
||||
reason: "value must contain at least 1 pair(s)", |
||||
} |
||||
} |
||||
|
||||
for key, val := range m.GetMap() { |
||||
_ = val |
||||
|
||||
// no validation rules for Map[key]
|
||||
|
||||
if v, ok := interface{}(val).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return Matcher_MatcherTree_MatchMapValidationError{ |
||||
field: fmt.Sprintf("Map[%v]", key), |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Matcher_MatcherTree_MatchMapValidationError is the validation error returned
|
||||
// by Matcher_MatcherTree_MatchMap.Validate if the designated constraints
|
||||
// aren't met.
|
||||
type Matcher_MatcherTree_MatchMapValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e Matcher_MatcherTree_MatchMapValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e Matcher_MatcherTree_MatchMapValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e Matcher_MatcherTree_MatchMapValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e Matcher_MatcherTree_MatchMapValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e Matcher_MatcherTree_MatchMapValidationError) ErrorName() string { |
||||
return "Matcher_MatcherTree_MatchMapValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e Matcher_MatcherTree_MatchMapValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sMatcher_MatcherTree_MatchMap.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = Matcher_MatcherTree_MatchMapValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = Matcher_MatcherTree_MatchMapValidationError{} |
@ -0,0 +1,154 @@ |
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: xds/type/matcher/v3/regex.proto
|
||||
|
||||
package xds_type_matcher_v3 |
||||
|
||||
import ( |
||||
fmt "fmt" |
||||
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
||||
proto "github.com/golang/protobuf/proto" |
||||
_ "github.com/golang/protobuf/ptypes/wrappers" |
||||
math "math" |
||||
) |
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal |
||||
var _ = fmt.Errorf |
||||
var _ = math.Inf |
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type RegexMatcher struct { |
||||
// Types that are valid to be assigned to EngineType:
|
||||
// *RegexMatcher_GoogleRe2
|
||||
EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` |
||||
Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *RegexMatcher) Reset() { *m = RegexMatcher{} } |
||||
func (m *RegexMatcher) String() string { return proto.CompactTextString(m) } |
||||
func (*RegexMatcher) ProtoMessage() {} |
||||
func (*RegexMatcher) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_e049cb761740e124, []int{0} |
||||
} |
||||
|
||||
func (m *RegexMatcher) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_RegexMatcher.Unmarshal(m, b) |
||||
} |
||||
func (m *RegexMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_RegexMatcher.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *RegexMatcher) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_RegexMatcher.Merge(m, src) |
||||
} |
||||
func (m *RegexMatcher) XXX_Size() int { |
||||
return xxx_messageInfo_RegexMatcher.Size(m) |
||||
} |
||||
func (m *RegexMatcher) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_RegexMatcher.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_RegexMatcher proto.InternalMessageInfo |
||||
|
||||
type isRegexMatcher_EngineType interface { |
||||
isRegexMatcher_EngineType() |
||||
} |
||||
|
||||
type RegexMatcher_GoogleRe2 struct { |
||||
GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` |
||||
} |
||||
|
||||
func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} |
||||
|
||||
func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { |
||||
if m != nil { |
||||
return m.EngineType |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { |
||||
if x, ok := m.GetEngineType().(*RegexMatcher_GoogleRe2); ok { |
||||
return x.GoogleRe2 |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *RegexMatcher) GetRegex() string { |
||||
if m != nil { |
||||
return m.Regex |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*RegexMatcher) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*RegexMatcher_GoogleRe2)(nil), |
||||
} |
||||
} |
||||
|
||||
type RegexMatcher_GoogleRE2 struct { |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *RegexMatcher_GoogleRE2) Reset() { *m = RegexMatcher_GoogleRE2{} } |
||||
func (m *RegexMatcher_GoogleRE2) String() string { return proto.CompactTextString(m) } |
||||
func (*RegexMatcher_GoogleRE2) ProtoMessage() {} |
||||
func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_e049cb761740e124, []int{0, 0} |
||||
} |
||||
|
||||
func (m *RegexMatcher_GoogleRE2) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_RegexMatcher_GoogleRE2.Unmarshal(m, b) |
||||
} |
||||
func (m *RegexMatcher_GoogleRE2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_RegexMatcher_GoogleRE2.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *RegexMatcher_GoogleRE2) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_RegexMatcher_GoogleRE2.Merge(m, src) |
||||
} |
||||
func (m *RegexMatcher_GoogleRE2) XXX_Size() int { |
||||
return xxx_messageInfo_RegexMatcher_GoogleRE2.Size(m) |
||||
} |
||||
func (m *RegexMatcher_GoogleRE2) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_RegexMatcher_GoogleRE2.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_RegexMatcher_GoogleRE2 proto.InternalMessageInfo |
||||
|
||||
func init() { |
||||
proto.RegisterType((*RegexMatcher)(nil), "xds.type.matcher.v3.RegexMatcher") |
||||
proto.RegisterType((*RegexMatcher_GoogleRE2)(nil), "xds.type.matcher.v3.RegexMatcher.GoogleRE2") |
||||
} |
||||
|
||||
func init() { proto.RegisterFile("xds/type/matcher/v3/regex.proto", fileDescriptor_e049cb761740e124) } |
||||
|
||||
var fileDescriptor_e049cb761740e124 = []byte{ |
||||
// 252 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xaf, 0x48, 0x29, 0xd6, |
||||
0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x4d, 0x2c, 0x49, 0xce, 0x48, 0x2d, 0xd2, 0x2f, 0x33, 0xd6, |
||||
0x2f, 0x4a, 0x4d, 0x4f, 0xad, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xae, 0x48, 0x29, |
||||
0xd6, 0x03, 0x29, 0xd0, 0x83, 0x2a, 0xd0, 0x2b, 0x33, 0x96, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, 0xcf, |
||||
0x49, 0xd5, 0x07, 0x2b, 0x49, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c, 0x28, 0x48, 0x2d, 0x2a, |
||||
0x86, 0x68, 0x92, 0x12, 0x2f, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0x49, 0xd5, 0x87, 0x31, 0x20, |
||||
0x12, 0x4a, 0xcb, 0x18, 0xb9, 0x78, 0x82, 0x40, 0xa6, 0xfb, 0x42, 0x0c, 0x13, 0x0a, 0xe3, 0xe2, |
||||
0x82, 0x98, 0x15, 0x5f, 0x94, 0x6a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, 0xad, 0x87, |
||||
0xc5, 0x4e, 0x3d, 0x64, 0x6d, 0x7a, 0xee, 0x60, 0x3d, 0x41, 0xae, 0x46, 0x4e, 0x1c, 0xbf, 0x9c, |
||||
0x58, 0xbb, 0x18, 0x99, 0x04, 0x18, 0x3d, 0x18, 0x82, 0x38, 0x21, 0x46, 0x05, 0xa5, 0x1a, 0x09, |
||||
0xc9, 0x72, 0xb1, 0x82, 0x7d, 0x21, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0xc4, 0xfe, 0xcb, 0x89, |
||||
0xa5, 0x88, 0x49, 0x80, 0x31, 0x08, 0x22, 0x2a, 0xc5, 0xcd, 0xc5, 0x89, 0x30, 0x42, 0x88, 0x8b, |
||||
0x3b, 0x35, 0x2f, 0x3d, 0x33, 0x2f, 0x35, 0x1e, 0x64, 0xa7, 0x10, 0xf3, 0x0f, 0x27, 0x46, 0x27, |
||||
0x3d, 0x2e, 0xb9, 0xe4, 0xfc, 0x5c, 0xbd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0x6c, 0xee, 0x71, |
||||
0xe2, 0x02, 0x3b, 0x28, 0x00, 0xe4, 0xad, 0x00, 0xc6, 0x24, 0x36, 0xb0, 0xff, 0x8c, 0x01, 0x01, |
||||
0x00, 0x00, 0xff, 0xff, 0x7b, 0xc9, 0x4e, 0x69, 0x50, 0x01, 0x00, 0x00, |
||||
} |
@ -0,0 +1,205 @@ |
||||
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
||||
// source: xds/type/matcher/v3/regex.proto
|
||||
|
||||
package xds_type_matcher_v3 |
||||
|
||||
import ( |
||||
"bytes" |
||||
"errors" |
||||
"fmt" |
||||
"net" |
||||
"net/mail" |
||||
"net/url" |
||||
"regexp" |
||||
"strings" |
||||
"time" |
||||
"unicode/utf8" |
||||
|
||||
"github.com/golang/protobuf/ptypes" |
||||
) |
||||
|
||||
// ensure the imports are used
|
||||
var ( |
||||
_ = bytes.MinRead |
||||
_ = errors.New("") |
||||
_ = fmt.Print |
||||
_ = utf8.UTFMax |
||||
_ = (*regexp.Regexp)(nil) |
||||
_ = (*strings.Reader)(nil) |
||||
_ = net.IPv4len |
||||
_ = time.Duration(0) |
||||
_ = (*url.URL)(nil) |
||||
_ = (*mail.Address)(nil) |
||||
_ = ptypes.DynamicAny{} |
||||
) |
||||
|
||||
// define the regex for a UUID once up-front
|
||||
var _regex_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") |
||||
|
||||
// Validate checks the field values on RegexMatcher with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, an error
|
||||
// is returned.
|
||||
func (m *RegexMatcher) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if utf8.RuneCountInString(m.GetRegex()) < 1 { |
||||
return RegexMatcherValidationError{ |
||||
field: "Regex", |
||||
reason: "value length must be at least 1 runes", |
||||
} |
||||
} |
||||
|
||||
switch m.EngineType.(type) { |
||||
|
||||
case *RegexMatcher_GoogleRe2: |
||||
|
||||
if m.GetGoogleRe2() == nil { |
||||
return RegexMatcherValidationError{ |
||||
field: "GoogleRe2", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return RegexMatcherValidationError{ |
||||
field: "GoogleRe2", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return RegexMatcherValidationError{ |
||||
field: "EngineType", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// RegexMatcherValidationError is the validation error returned by
|
||||
// RegexMatcher.Validate if the designated constraints aren't met.
|
||||
type RegexMatcherValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e RegexMatcherValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e RegexMatcherValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e RegexMatcherValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e RegexMatcherValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" } |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e RegexMatcherValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sRegexMatcher.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = RegexMatcherValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = RegexMatcherValidationError{} |
||||
|
||||
// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *RegexMatcher_GoogleRE2) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// RegexMatcher_GoogleRE2ValidationError is the validation error returned by
|
||||
// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met.
|
||||
type RegexMatcher_GoogleRE2ValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string { |
||||
return "RegexMatcher_GoogleRE2ValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e RegexMatcher_GoogleRE2ValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sRegexMatcher_GoogleRE2.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = RegexMatcher_GoogleRE2ValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = RegexMatcher_GoogleRE2ValidationError{} |
@ -0,0 +1,226 @@ |
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: xds/type/matcher/v3/string.proto
|
||||
|
||||
package xds_type_matcher_v3 |
||||
|
||||
import ( |
||||
fmt "fmt" |
||||
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
||||
proto "github.com/golang/protobuf/proto" |
||||
math "math" |
||||
) |
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal |
||||
var _ = fmt.Errorf |
||||
var _ = math.Inf |
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type StringMatcher struct { |
||||
// Types that are valid to be assigned to MatchPattern:
|
||||
// *StringMatcher_Exact
|
||||
// *StringMatcher_Prefix
|
||||
// *StringMatcher_Suffix
|
||||
// *StringMatcher_SafeRegex
|
||||
// *StringMatcher_Contains
|
||||
MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` |
||||
IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *StringMatcher) Reset() { *m = StringMatcher{} } |
||||
func (m *StringMatcher) String() string { return proto.CompactTextString(m) } |
||||
func (*StringMatcher) ProtoMessage() {} |
||||
func (*StringMatcher) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_8a166c8eff2d056d, []int{0} |
||||
} |
||||
|
||||
func (m *StringMatcher) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_StringMatcher.Unmarshal(m, b) |
||||
} |
||||
func (m *StringMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_StringMatcher.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *StringMatcher) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_StringMatcher.Merge(m, src) |
||||
} |
||||
func (m *StringMatcher) XXX_Size() int { |
||||
return xxx_messageInfo_StringMatcher.Size(m) |
||||
} |
||||
func (m *StringMatcher) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_StringMatcher.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_StringMatcher proto.InternalMessageInfo |
||||
|
||||
type isStringMatcher_MatchPattern interface { |
||||
isStringMatcher_MatchPattern() |
||||
} |
||||
|
||||
type StringMatcher_Exact struct { |
||||
Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` |
||||
} |
||||
|
||||
type StringMatcher_Prefix struct { |
||||
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` |
||||
} |
||||
|
||||
type StringMatcher_Suffix struct { |
||||
Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` |
||||
} |
||||
|
||||
type StringMatcher_SafeRegex struct { |
||||
SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` |
||||
} |
||||
|
||||
type StringMatcher_Contains struct { |
||||
Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` |
||||
} |
||||
|
||||
func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} |
||||
|
||||
func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} |
||||
|
||||
func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} |
||||
|
||||
func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} |
||||
|
||||
func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} |
||||
|
||||
func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { |
||||
if m != nil { |
||||
return m.MatchPattern |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *StringMatcher) GetExact() string { |
||||
if x, ok := m.GetMatchPattern().(*StringMatcher_Exact); ok { |
||||
return x.Exact |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
func (m *StringMatcher) GetPrefix() string { |
||||
if x, ok := m.GetMatchPattern().(*StringMatcher_Prefix); ok { |
||||
return x.Prefix |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
func (m *StringMatcher) GetSuffix() string { |
||||
if x, ok := m.GetMatchPattern().(*StringMatcher_Suffix); ok { |
||||
return x.Suffix |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
func (m *StringMatcher) GetSafeRegex() *RegexMatcher { |
||||
if x, ok := m.GetMatchPattern().(*StringMatcher_SafeRegex); ok { |
||||
return x.SafeRegex |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func (m *StringMatcher) GetContains() string { |
||||
if x, ok := m.GetMatchPattern().(*StringMatcher_Contains); ok { |
||||
return x.Contains |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
func (m *StringMatcher) GetIgnoreCase() bool { |
||||
if m != nil { |
||||
return m.IgnoreCase |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*StringMatcher) XXX_OneofWrappers() []interface{} { |
||||
return []interface{}{ |
||||
(*StringMatcher_Exact)(nil), |
||||
(*StringMatcher_Prefix)(nil), |
||||
(*StringMatcher_Suffix)(nil), |
||||
(*StringMatcher_SafeRegex)(nil), |
||||
(*StringMatcher_Contains)(nil), |
||||
} |
||||
} |
||||
|
||||
type ListStringMatcher struct { |
||||
Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` |
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
||||
XXX_unrecognized []byte `json:"-"` |
||||
XXX_sizecache int32 `json:"-"` |
||||
} |
||||
|
||||
func (m *ListStringMatcher) Reset() { *m = ListStringMatcher{} } |
||||
func (m *ListStringMatcher) String() string { return proto.CompactTextString(m) } |
||||
func (*ListStringMatcher) ProtoMessage() {} |
||||
func (*ListStringMatcher) Descriptor() ([]byte, []int) { |
||||
return fileDescriptor_8a166c8eff2d056d, []int{1} |
||||
} |
||||
|
||||
func (m *ListStringMatcher) XXX_Unmarshal(b []byte) error { |
||||
return xxx_messageInfo_ListStringMatcher.Unmarshal(m, b) |
||||
} |
||||
func (m *ListStringMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
||||
return xxx_messageInfo_ListStringMatcher.Marshal(b, m, deterministic) |
||||
} |
||||
func (m *ListStringMatcher) XXX_Merge(src proto.Message) { |
||||
xxx_messageInfo_ListStringMatcher.Merge(m, src) |
||||
} |
||||
func (m *ListStringMatcher) XXX_Size() int { |
||||
return xxx_messageInfo_ListStringMatcher.Size(m) |
||||
} |
||||
func (m *ListStringMatcher) XXX_DiscardUnknown() { |
||||
xxx_messageInfo_ListStringMatcher.DiscardUnknown(m) |
||||
} |
||||
|
||||
var xxx_messageInfo_ListStringMatcher proto.InternalMessageInfo |
||||
|
||||
func (m *ListStringMatcher) GetPatterns() []*StringMatcher { |
||||
if m != nil { |
||||
return m.Patterns |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func init() { |
||||
proto.RegisterType((*StringMatcher)(nil), "xds.type.matcher.v3.StringMatcher") |
||||
proto.RegisterType((*ListStringMatcher)(nil), "xds.type.matcher.v3.ListStringMatcher") |
||||
} |
||||
|
||||
func init() { proto.RegisterFile("xds/type/matcher/v3/string.proto", fileDescriptor_8a166c8eff2d056d) } |
||||
|
||||
var fileDescriptor_8a166c8eff2d056d = []byte{ |
||||
// 333 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x6b, 0xfa, 0x30, |
||||
0x18, 0xc6, 0x4d, 0xfd, 0xab, 0xf5, 0x2d, 0xc2, 0x7f, 0xd9, 0xd8, 0x8a, 0x87, 0x59, 0x85, 0x41, |
||||
0x4f, 0x29, 0xe8, 0x37, 0xc8, 0x2e, 0x1e, 0x1c, 0x48, 0x77, 0x1e, 0x12, 0x6b, 0xac, 0x81, 0xd9, |
||||
0x96, 0x24, 0x4a, 0xf7, 0x15, 0x76, 0xdc, 0x6d, 0xdf, 0x74, 0x78, 0x1a, 0x69, 0x3a, 0xc1, 0xad, |
||||
0xb7, 0x36, 0xcf, 0xef, 0x79, 0xde, 0x27, 0x79, 0x21, 0x28, 0x37, 0x2a, 0xd2, 0x6f, 0x05, 0x8f, |
||||
0xf6, 0x4c, 0x27, 0x3b, 0x2e, 0xa3, 0xe3, 0x2c, 0x52, 0x5a, 0x8a, 0x2c, 0x25, 0x85, 0xcc, 0x75, |
||||
0x8e, 0xaf, 0xcb, 0x8d, 0x22, 0x86, 0x20, 0x35, 0x41, 0x8e, 0xb3, 0xe1, 0xa8, 0xc9, 0x26, 0x79, |
||||
0xca, 0x4b, 0xeb, 0x1a, 0xde, 0x1d, 0xd9, 0xab, 0xd8, 0x30, 0xcd, 0xa3, 0x9f, 0x0f, 0x2b, 0x4c, |
||||
0x3e, 0x1d, 0x18, 0x3c, 0x57, 0xf9, 0x4f, 0xd6, 0x89, 0x6f, 0xa1, 0xc3, 0x4b, 0x96, 0x68, 0x1f, |
||||
0x05, 0x28, 0xec, 0xcf, 0x5b, 0xb1, 0xfd, 0xc5, 0x63, 0xe8, 0x16, 0x92, 0x6f, 0x45, 0xe9, 0x3b, |
||||
0x46, 0xa0, 0xbd, 0x13, 0xfd, 0x27, 0x9d, 0xff, 0x68, 0xde, 0x8a, 0x6b, 0xc1, 0x20, 0xea, 0xb0, |
||||
0x35, 0x48, 0xfb, 0x0f, 0x62, 0x05, 0xbc, 0x00, 0x50, 0x6c, 0xcb, 0x57, 0x55, 0x39, 0xbf, 0x13, |
||||
0xa0, 0xd0, 0x9b, 0x8e, 0x49, 0xc3, 0x9d, 0x48, 0x6c, 0x88, 0xba, 0x14, 0x75, 0x4f, 0xb4, 0xf3, |
||||
0x8e, 0x6c, 0x54, 0xdf, 0x04, 0x54, 0x2a, 0x7e, 0x00, 0x37, 0xc9, 0x33, 0xcd, 0x44, 0xa6, 0xfc, |
||||
0xde, 0xef, 0x91, 0x67, 0x09, 0x8f, 0xc0, 0x13, 0x69, 0x96, 0x4b, 0xbe, 0x4a, 0x98, 0xe2, 0x7e, |
||||
0x37, 0x40, 0xa1, 0x1b, 0x83, 0x3d, 0x7a, 0x64, 0x8a, 0xd3, 0x1b, 0x18, 0x54, 0x93, 0x57, 0x05, |
||||
0xd3, 0x9a, 0xcb, 0x0c, 0xb7, 0xbf, 0x28, 0x9a, 0xbc, 0xc0, 0xd5, 0x42, 0x28, 0x7d, 0xf9, 0x3c, |
||||
0x73, 0x70, 0x6b, 0x48, 0xf9, 0x28, 0x68, 0x87, 0xde, 0x74, 0xd2, 0x58, 0xff, 0xc2, 0x55, 0xf5, |
||||
0xff, 0x40, 0x8e, 0x8b, 0xe2, 0xb3, 0x9b, 0x46, 0x70, 0x9f, 0xe4, 0x7b, 0x92, 0x0a, 0xbd, 0x3b, |
||||
0xac, 0x9b, 0x32, 0xa8, 0x67, 0x43, 0x96, 0x66, 0x53, 0x4b, 0xb4, 0xee, 0x56, 0x2b, 0x9b, 0x7d, |
||||
0x07, 0x00, 0x00, 0xff, 0xff, 0x47, 0x5e, 0xbb, 0x21, 0x25, 0x02, 0x00, 0x00, |
||||
} |
@ -0,0 +1,252 @@ |
||||
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
||||
// source: xds/type/matcher/v3/string.proto
|
||||
|
||||
package xds_type_matcher_v3 |
||||
|
||||
import ( |
||||
"bytes" |
||||
"errors" |
||||
"fmt" |
||||
"net" |
||||
"net/mail" |
||||
"net/url" |
||||
"regexp" |
||||
"strings" |
||||
"time" |
||||
"unicode/utf8" |
||||
|
||||
"github.com/golang/protobuf/ptypes" |
||||
) |
||||
|
||||
// ensure the imports are used
|
||||
var ( |
||||
_ = bytes.MinRead |
||||
_ = errors.New("") |
||||
_ = fmt.Print |
||||
_ = utf8.UTFMax |
||||
_ = (*regexp.Regexp)(nil) |
||||
_ = (*strings.Reader)(nil) |
||||
_ = net.IPv4len |
||||
_ = time.Duration(0) |
||||
_ = (*url.URL)(nil) |
||||
_ = (*mail.Address)(nil) |
||||
_ = ptypes.DynamicAny{} |
||||
) |
||||
|
||||
// define the regex for a UUID once up-front
|
||||
var _string_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") |
||||
|
||||
// Validate checks the field values on StringMatcher with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, an error
|
||||
// is returned.
|
||||
func (m *StringMatcher) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
// no validation rules for IgnoreCase
|
||||
|
||||
switch m.MatchPattern.(type) { |
||||
|
||||
case *StringMatcher_Exact: |
||||
// no validation rules for Exact
|
||||
|
||||
case *StringMatcher_Prefix: |
||||
|
||||
if utf8.RuneCountInString(m.GetPrefix()) < 1 { |
||||
return StringMatcherValidationError{ |
||||
field: "Prefix", |
||||
reason: "value length must be at least 1 runes", |
||||
} |
||||
} |
||||
|
||||
case *StringMatcher_Suffix: |
||||
|
||||
if utf8.RuneCountInString(m.GetSuffix()) < 1 { |
||||
return StringMatcherValidationError{ |
||||
field: "Suffix", |
||||
reason: "value length must be at least 1 runes", |
||||
} |
||||
} |
||||
|
||||
case *StringMatcher_SafeRegex: |
||||
|
||||
if m.GetSafeRegex() == nil { |
||||
return StringMatcherValidationError{ |
||||
field: "SafeRegex", |
||||
reason: "value is required", |
||||
} |
||||
} |
||||
|
||||
if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return StringMatcherValidationError{ |
||||
field: "SafeRegex", |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
case *StringMatcher_Contains: |
||||
|
||||
if utf8.RuneCountInString(m.GetContains()) < 1 { |
||||
return StringMatcherValidationError{ |
||||
field: "Contains", |
||||
reason: "value length must be at least 1 runes", |
||||
} |
||||
} |
||||
|
||||
default: |
||||
return StringMatcherValidationError{ |
||||
field: "MatchPattern", |
||||
reason: "value is required", |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// StringMatcherValidationError is the validation error returned by
|
||||
// StringMatcher.Validate if the designated constraints aren't met.
|
||||
type StringMatcherValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e StringMatcherValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e StringMatcherValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e StringMatcherValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e StringMatcherValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" } |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e StringMatcherValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sStringMatcher.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = StringMatcherValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = StringMatcherValidationError{} |
||||
|
||||
// Validate checks the field values on ListStringMatcher with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, an
|
||||
// error is returned.
|
||||
func (m *ListStringMatcher) Validate() error { |
||||
if m == nil { |
||||
return nil |
||||
} |
||||
|
||||
if len(m.GetPatterns()) < 1 { |
||||
return ListStringMatcherValidationError{ |
||||
field: "Patterns", |
||||
reason: "value must contain at least 1 item(s)", |
||||
} |
||||
} |
||||
|
||||
for idx, item := range m.GetPatterns() { |
||||
_, _ = idx, item |
||||
|
||||
if v, ok := interface{}(item).(interface{ Validate() error }); ok { |
||||
if err := v.Validate(); err != nil { |
||||
return ListStringMatcherValidationError{ |
||||
field: fmt.Sprintf("Patterns[%v]", idx), |
||||
reason: "embedded message failed validation", |
||||
cause: err, |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// ListStringMatcherValidationError is the validation error returned by
|
||||
// ListStringMatcher.Validate if the designated constraints aren't met.
|
||||
type ListStringMatcherValidationError struct { |
||||
field string |
||||
reason string |
||||
cause error |
||||
key bool |
||||
} |
||||
|
||||
// Field function returns field value.
|
||||
func (e ListStringMatcherValidationError) Field() string { return e.field } |
||||
|
||||
// Reason function returns reason value.
|
||||
func (e ListStringMatcherValidationError) Reason() string { return e.reason } |
||||
|
||||
// Cause function returns cause value.
|
||||
func (e ListStringMatcherValidationError) Cause() error { return e.cause } |
||||
|
||||
// Key function returns key value.
|
||||
func (e ListStringMatcherValidationError) Key() bool { return e.key } |
||||
|
||||
// ErrorName returns error name.
|
||||
func (e ListStringMatcherValidationError) ErrorName() string { |
||||
return "ListStringMatcherValidationError" |
||||
} |
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e ListStringMatcherValidationError) Error() string { |
||||
cause := "" |
||||
if e.cause != nil { |
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause) |
||||
} |
||||
|
||||
key := "" |
||||
if e.key { |
||||
key = "key for " |
||||
} |
||||
|
||||
return fmt.Sprintf( |
||||
"invalid %sListStringMatcher.%s: %s%s", |
||||
key, |
||||
e.field, |
||||
e.reason, |
||||
cause) |
||||
} |
||||
|
||||
var _ error = ListStringMatcherValidationError{} |
||||
|
||||
var _ interface { |
||||
Field() string |
||||
Reason() string |
||||
Key() bool |
||||
Cause() error |
||||
ErrorName() string |
||||
} = ListStringMatcherValidationError{} |
@ -0,0 +1,24 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package xds.core.v3; |
||||
|
||||
option java_outer_classname = "ExtensionProto"; |
||||
option java_multiple_files = true; |
||||
option java_package = "com.github.xds.core.v3"; |
||||
|
||||
import "validate/validate.proto"; |
||||
import "google/protobuf/any.proto"; |
||||
|
||||
// Message type for extension configuration. |
||||
message TypedExtensionConfig { |
||||
// The name of an extension. This is not used to select the extension, instead |
||||
// it serves the role of an opaque identifier. |
||||
string name = 1 [(validate.rules).string = {min_len: 1}]; |
||||
|
||||
// The typed config for the extension. The type URL will be used to identify |
||||
// the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, |
||||
// the inner type URL of *TypedStruct* will be utilized. See the |
||||
// :ref:`extension configuration overview |
||||
// <config_overview_extension_configuration>` for further details. |
||||
google.protobuf.Any typed_config = 2 [(validate.rules).any = {required: true}]; |
||||
} |
@ -0,0 +1,9 @@ |
||||
load("//bazel:api_build_system.bzl", "udpa_proto_package") |
||||
|
||||
licenses(["notice"]) #Apache 2 |
||||
|
||||
udpa_proto_package( |
||||
deps = [ |
||||
"//xds/core/v3:pkg", |
||||
] |
||||
) |
@ -0,0 +1,140 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package xds.type.matcher.v3; |
||||
|
||||
import "xds/core/v3/extension.proto"; |
||||
import "xds/type/matcher/v3/string.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "com.github.xds.type.matcher.v3"; |
||||
option java_outer_classname = "MatcherProto"; |
||||
option java_multiple_files = true; |
||||
|
||||
// [#protodoc-title: Unified Matcher API] |
||||
|
||||
// A matcher, which may traverse a matching tree in order to result in a match action. |
||||
// During matching, the tree will be traversed until a match is found, or if no match |
||||
// is found the action specified by the most specific on_no_match will be evaluated. |
||||
// As an on_no_match might result in another matching tree being evaluated, this process |
||||
// might repeat several times until the final OnMatch (or no match) is decided. |
||||
// |
||||
// [#alpha:] |
||||
message Matcher { |
||||
// What to do if a match is successful. |
||||
message OnMatch { |
||||
oneof on_match { |
||||
option (validate.required) = true; |
||||
|
||||
// Nested matcher to evaluate. |
||||
// If the nested matcher does not match and does not specify |
||||
// on_no_match, then this matcher is considered not to have |
||||
// matched, even if a predicate at this level or above returned |
||||
// true. |
||||
Matcher matcher = 1; |
||||
|
||||
// Protocol-specific action to take. |
||||
core.v3.TypedExtensionConfig action = 2; |
||||
} |
||||
} |
||||
|
||||
// A linear list of field matchers. |
||||
// The field matchers are evaluated in order, and the first match |
||||
// wins. |
||||
message MatcherList { |
||||
// Predicate to determine if a match is successful. |
||||
message Predicate { |
||||
// Predicate for a single input field. |
||||
message SinglePredicate { |
||||
// Protocol-specific specification of input field to match on. |
||||
// [#extension-category: envoy.matching.common_inputs] |
||||
core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; |
||||
|
||||
oneof matcher { |
||||
option (validate.required) = true; |
||||
|
||||
// Built-in string matcher. |
||||
type.matcher.v3.StringMatcher value_match = 2; |
||||
|
||||
// Extension for custom matching logic. |
||||
// [#extension-category: envoy.matching.input_matchers] |
||||
core.v3.TypedExtensionConfig custom_match = 3; |
||||
} |
||||
} |
||||
|
||||
// A list of two or more matchers. Used to allow using a list within a oneof. |
||||
message PredicateList { |
||||
repeated Predicate predicate = 1 [(validate.rules).repeated = {min_items: 2}]; |
||||
} |
||||
|
||||
oneof match_type { |
||||
option (validate.required) = true; |
||||
|
||||
// A single predicate to evaluate. |
||||
SinglePredicate single_predicate = 1; |
||||
|
||||
// A list of predicates to be OR-ed together. |
||||
PredicateList or_matcher = 2; |
||||
|
||||
// A list of predicates to be AND-ed together. |
||||
PredicateList and_matcher = 3; |
||||
|
||||
// The invert of a predicate |
||||
Predicate not_matcher = 4; |
||||
} |
||||
} |
||||
|
||||
// An individual matcher. |
||||
message FieldMatcher { |
||||
// Determines if the match succeeds. |
||||
Predicate predicate = 1 [(validate.rules).message = {required: true}]; |
||||
|
||||
// What to do if the match succeeds. |
||||
OnMatch on_match = 2 [(validate.rules).message = {required: true}]; |
||||
} |
||||
|
||||
// A list of matchers. First match wins. |
||||
repeated FieldMatcher matchers = 1 [(validate.rules).repeated = {min_items: 1}]; |
||||
} |
||||
|
||||
message MatcherTree { |
||||
// A map of configured matchers. Used to allow using a map within a oneof. |
||||
message MatchMap { |
||||
map<string, OnMatch> map = 1 [(validate.rules).map = {min_pairs: 1}]; |
||||
} |
||||
|
||||
// Protocol-specific specification of input field to match on. |
||||
core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; |
||||
|
||||
// Exact or prefix match maps in which to look up the input value. |
||||
// If the lookup succeeds, the match is considered successful, and |
||||
// the corresponding OnMatch is used. |
||||
oneof tree_type { |
||||
option (validate.required) = true; |
||||
|
||||
MatchMap exact_match_map = 2; |
||||
|
||||
// Longest matching prefix wins. |
||||
MatchMap prefix_match_map = 3; |
||||
|
||||
// Extension for custom matching logic. |
||||
core.v3.TypedExtensionConfig custom_match = 4; |
||||
} |
||||
} |
||||
|
||||
oneof matcher_type { |
||||
option (validate.required) = true; |
||||
|
||||
// A linear list of matchers to evaluate. |
||||
MatcherList matcher_list = 1; |
||||
|
||||
// A match tree to evaluate. |
||||
MatcherTree matcher_tree = 2; |
||||
} |
||||
|
||||
// Optional OnMatch to use if the matcher failed. |
||||
// If specified, the OnMatch is used, and the matcher is considered |
||||
// to have matched. |
||||
// If not specified, the matcher is considered not to have matched. |
||||
OnMatch on_no_match = 3; |
||||
} |
@ -0,0 +1,47 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package xds.type.matcher.v3; |
||||
|
||||
import "google/protobuf/wrappers.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "com.github.xds.type.matcher.v3"; |
||||
option java_outer_classname = "RegexProto"; |
||||
option java_multiple_files = true; |
||||
|
||||
// [#protodoc-title: Regex matcher] |
||||
|
||||
// A regex matcher designed for safety when used with untrusted input. |
||||
message RegexMatcher { |
||||
// 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. |
||||
message GoogleRE2 {} |
||||
|
||||
oneof engine_type { |
||||
option (validate.required) = true; |
||||
|
||||
// Google's RE2 regex engine. |
||||
GoogleRE2 google_re2 = 1 [ (validate.rules).message = {required : true} ]; |
||||
} |
||||
|
||||
// The regex match string. The string must be supported by the configured |
||||
// engine. |
||||
string regex = 2 [ (validate.rules).string = {min_len : 1} ]; |
||||
} |
@ -0,0 +1,65 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package xds.type.matcher.v3; |
||||
|
||||
import "xds/type/matcher/v3/regex.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "com.github.xds.type.matcher.v3"; |
||||
option java_outer_classname = "StringProto"; |
||||
option java_multiple_files = true; |
||||
|
||||
// [#protodoc-title: String matcher] |
||||
|
||||
// Specifies the way to match a string. |
||||
// [#next-free-field: 8] |
||||
message StringMatcher { |
||||
oneof match_pattern { |
||||
option (validate.required) = true; |
||||
|
||||
// The input string must match exactly the string specified here. |
||||
// |
||||
// Examples: |
||||
// |
||||
// * *abc* only matches the value *abc*. |
||||
string exact = 1; |
||||
|
||||
// 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* |
||||
string prefix = 2 [(validate.rules).string = {min_len: 1}]; |
||||
|
||||
// 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* |
||||
string suffix = 3 [(validate.rules).string = {min_len: 1}]; |
||||
|
||||
// The input string must match the regular expression specified here. |
||||
RegexMatcher safe_regex = 5 [(validate.rules).message = {required: true}]; |
||||
|
||||
// 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* |
||||
string contains = 7 [(validate.rules).string = {min_len: 1}]; |
||||
} |
||||
|
||||
// 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. |
||||
bool ignore_case = 6; |
||||
} |
||||
|
||||
// Specifies a list of ways to match a string. |
||||
message ListStringMatcher { |
||||
repeated StringMatcher patterns = 1 [(validate.rules).repeated = {min_items: 1}]; |
||||
} |
Loading…
Reference in new issue