| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
package v3 |
| 8 |
|
| 9 |
import ( |
| 10 |
_ "github.com/cncf/xds/go/xds/annotations/v3" |
| 11 |
v3 "github.com/cncf/xds/go/xds/core/v3" |
| 12 |
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
| 13 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 14 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 15 |
reflect "reflect" |
| 16 |
sync "sync" |
| 17 |
unsafe "unsafe" |
| 18 |
) |
| 19 |
|
| 20 |
const ( |
| 21 |
|
| 22 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 23 |
|
| 24 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 25 |
) |
| 26 |
|
| 27 |
type IPMatcher struct { |
| 28 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 29 |
RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` |
| 30 |
unknownFields protoimpl.UnknownFields |
| 31 |
sizeCache protoimpl.SizeCache |
| 32 |
} |
| 33 |
|
| 34 |
func (x *IPMatcher) Reset() { |
| 35 |
*x = IPMatcher{} |
| 36 |
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] |
| 37 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 38 |
ms.StoreMessageInfo(mi) |
| 39 |
} |
| 40 |
|
| 41 |
func (x *IPMatcher) String() string { |
| 42 |
return protoimpl.X.MessageStringOf(x) |
| 43 |
} |
| 44 |
|
| 45 |
func (*IPMatcher) ProtoMessage() {} |
| 46 |
|
| 47 |
func (x *IPMatcher) ProtoReflect() protoreflect.Message { |
| 48 |
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] |
| 49 |
if x != nil { |
| 50 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 51 |
if ms.LoadMessageInfo() == nil { |
| 52 |
ms.StoreMessageInfo(mi) |
| 53 |
} |
| 54 |
return ms |
| 55 |
} |
| 56 |
return mi.MessageOf(x) |
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
func (*IPMatcher) Descriptor() ([]byte, []int) { |
| 61 |
return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0} |
| 62 |
} |
| 63 |
|
| 64 |
func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher { |
| 65 |
if x != nil { |
| 66 |
return x.RangeMatchers |
| 67 |
} |
| 68 |
return nil |
| 69 |
} |
| 70 |
|
| 71 |
type IPMatcher_IPRangeMatcher struct { |
| 72 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 73 |
Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` |
| 74 |
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` |
| 75 |
Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"` |
| 76 |
unknownFields protoimpl.UnknownFields |
| 77 |
sizeCache protoimpl.SizeCache |
| 78 |
} |
| 79 |
|
| 80 |
func (x *IPMatcher_IPRangeMatcher) Reset() { |
| 81 |
*x = IPMatcher_IPRangeMatcher{} |
| 82 |
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] |
| 83 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 84 |
ms.StoreMessageInfo(mi) |
| 85 |
} |
| 86 |
|
| 87 |
func (x *IPMatcher_IPRangeMatcher) String() string { |
| 88 |
return protoimpl.X.MessageStringOf(x) |
| 89 |
} |
| 90 |
|
| 91 |
func (*IPMatcher_IPRangeMatcher) ProtoMessage() {} |
| 92 |
|
| 93 |
func (x *IPMatcher_IPRangeMatcher) ProtoReflect() protoreflect.Message { |
| 94 |
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] |
| 95 |
if x != nil { |
| 96 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 97 |
if ms.LoadMessageInfo() == nil { |
| 98 |
ms.StoreMessageInfo(mi) |
| 99 |
} |
| 100 |
return ms |
| 101 |
} |
| 102 |
return mi.MessageOf(x) |
| 103 |
} |
| 104 |
|
| 105 |
|
| 106 |
func (*IPMatcher_IPRangeMatcher) Descriptor() ([]byte, []int) { |
| 107 |
return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0, 0} |
| 108 |
} |
| 109 |
|
| 110 |
func (x *IPMatcher_IPRangeMatcher) GetRanges() []*v3.CidrRange { |
| 111 |
if x != nil { |
| 112 |
return x.Ranges |
| 113 |
} |
| 114 |
return nil |
| 115 |
} |
| 116 |
|
| 117 |
func (x *IPMatcher_IPRangeMatcher) GetOnMatch() *Matcher_OnMatch { |
| 118 |
if x != nil { |
| 119 |
return x.OnMatch |
| 120 |
} |
| 121 |
return nil |
| 122 |
} |
| 123 |
|
| 124 |
func (x *IPMatcher_IPRangeMatcher) GetExclusive() bool { |
| 125 |
if x != nil { |
| 126 |
return x.Exclusive |
| 127 |
} |
| 128 |
return false |
| 129 |
} |
| 130 |
|
| 131 |
var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor |
| 132 |
|
| 133 |
const file_xds_type_matcher_v3_ip_proto_rawDesc = "" + |
| 134 |
"\n" + |
| 135 |
"\x1cxds/type/matcher/v3/ip.proto\x12\x13xds.type.matcher.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x16xds/core/v3/cidr.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x17validate/validate.proto\"\x8d\x02\n" + |
| 136 |
"\tIPMatcher\x12T\n" + |
| 137 |
"\x0erange_matchers\x18\x01 \x03(\v2-.xds.type.matcher.v3.IPMatcher.IPRangeMatcherR\rrangeMatchers\x1a\xa9\x01\n" + |
| 138 |
"\x0eIPRangeMatcher\x128\n" + |
| 139 |
"\x06ranges\x18\x01 \x03(\v2\x16.xds.core.v3.CidrRangeB\b\xfaB\x05\x92\x01\x02\b\x01R\x06ranges\x12?\n" + |
| 140 |
"\bon_match\x18\x02 \x01(\v2$.xds.type.matcher.v3.Matcher.OnMatchR\aonMatch\x12\x1c\n" + |
| 141 |
"\texclusive\x18\x03 \x01(\bR\texclusiveBf\xd2Ƥ\xe1\x06\x02\b\x01\n" + |
| 142 |
"\x1ecom.github.xds.type.matcher.v3B\x0eIPMatcherProtoP\x01Z*github.com/cncf/xds/go/xds/type/matcher/v3b\x06proto3" |
| 143 |
|
| 144 |
var ( |
| 145 |
file_xds_type_matcher_v3_ip_proto_rawDescOnce sync.Once |
| 146 |
file_xds_type_matcher_v3_ip_proto_rawDescData []byte |
| 147 |
) |
| 148 |
|
| 149 |
func file_xds_type_matcher_v3_ip_proto_rawDescGZIP() []byte { |
| 150 |
file_xds_type_matcher_v3_ip_proto_rawDescOnce.Do(func() { |
| 151 |
file_xds_type_matcher_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_xds_type_matcher_v3_ip_proto_rawDesc), len(file_xds_type_matcher_v3_ip_proto_rawDesc))) |
| 152 |
}) |
| 153 |
return file_xds_type_matcher_v3_ip_proto_rawDescData |
| 154 |
} |
| 155 |
|
| 156 |
var file_xds_type_matcher_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| 157 |
var file_xds_type_matcher_v3_ip_proto_goTypes = []any{ |
| 158 |
(*IPMatcher)(nil), |
| 159 |
(*IPMatcher_IPRangeMatcher)(nil), |
| 160 |
(*v3.CidrRange)(nil), |
| 161 |
(*Matcher_OnMatch)(nil), |
| 162 |
} |
| 163 |
var file_xds_type_matcher_v3_ip_proto_depIdxs = []int32{ |
| 164 |
1, |
| 165 |
2, |
| 166 |
3, |
| 167 |
3, |
| 168 |
3, |
| 169 |
3, |
| 170 |
3, |
| 171 |
0, |
| 172 |
} |
| 173 |
|
| 174 |
func init() { file_xds_type_matcher_v3_ip_proto_init() } |
| 175 |
func file_xds_type_matcher_v3_ip_proto_init() { |
| 176 |
if File_xds_type_matcher_v3_ip_proto != nil { |
| 177 |
return |
| 178 |
} |
| 179 |
file_xds_type_matcher_v3_matcher_proto_init() |
| 180 |
type x struct{} |
| 181 |
out := protoimpl.TypeBuilder{ |
| 182 |
File: protoimpl.DescBuilder{ |
| 183 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 184 |
RawDescriptor: unsafe.Slice(unsafe.StringData(file_xds_type_matcher_v3_ip_proto_rawDesc), len(file_xds_type_matcher_v3_ip_proto_rawDesc)), |
| 185 |
NumEnums: 0, |
| 186 |
NumMessages: 2, |
| 187 |
NumExtensions: 0, |
| 188 |
NumServices: 0, |
| 189 |
}, |
| 190 |
GoTypes: file_xds_type_matcher_v3_ip_proto_goTypes, |
| 191 |
DependencyIndexes: file_xds_type_matcher_v3_ip_proto_depIdxs, |
| 192 |
MessageInfos: file_xds_type_matcher_v3_ip_proto_msgTypes, |
| 193 |
}.Build() |
| 194 |
File_xds_type_matcher_v3_ip_proto = out.File |
| 195 |
file_xds_type_matcher_v3_ip_proto_goTypes = nil |
| 196 |
file_xds_type_matcher_v3_ip_proto_depIdxs = nil |
| 197 |
} |