1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: networking/v1alpha3/envoy_filter.proto 3 4// `EnvoyFilter` provides a mechanism to customize the Envoy 5// configuration generated by Istio Pilot. Use EnvoyFilter to modify 6// values for certain fields, add specific filters, or even add 7// entirely new listeners, clusters, etc. This feature must be used 8// with care, as incorrect configurations could potentially 9// destabilize the entire mesh. Unlike other Istio networking objects, 10// EnvoyFilters are additively applied. Any number of EnvoyFilters can 11// exist for a given workload in a specific namespace. The order of 12// application of these EnvoyFilters is as follows: all EnvoyFilters 13// in the config [root 14// namespace](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig), 15// followed by all matching EnvoyFilters in the workload's namespace. 16// 17// **NOTE 1**: Some aspects of this API is deeply tied to the internal 18// implementation in Istio networking subsystem as well as Envoy's XDS 19// API. While the EnvoyFilter API by itself will maintain backward 20// compatibility, any envoy configuration provided through this 21// mechanism should be carefully monitored across Istio proxy version 22// upgrades, to ensure that deprecated fields are removed and replaced 23// appropriately. 24// 25// **NOTE 2**: When multiple EnvoyFilters are bound to the same 26// workload in a given namespace, all patches will be processed 27// sequentially in order of creation time. The behavior is undefined 28// if multiple EnvoyFilter configurations conflict with each other. 29// 30// **NOTE 3**: *_To apply an EnvoyFilter resource to all workloads 31// (sidecars and gateways) in the system, define the resource in the 32// config [root 33// namespace](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig), 34// without a workloadSelector. 35// 36// The example below declares a global default EnvoyFilter resource in 37// the root namespace called `istio-config`, that adds a custom 38// protocol filter on all sidecars in the system, for outbound port 39// 9307. The filter should be added before the terminating tcp_proxy 40// filter to take effect. In addition, it sets a 30s idle timeout for 41// all HTTP connections in both gateays and sidecars. 42// 43// ```yaml 44// apiVersion: networking.istio.io/v1alpha3 45// kind: EnvoyFilter 46// metadata: 47// name: custom-protocol 48// namespace: istio-config # as defined in meshConfig resource. 49// spec: 50// configPatches: 51// - applyTo: NETWORK_FILTER 52// match: 53// context: SIDECAR_OUTBOUND # will match outbound listeners in all sidecars 54// listener: 55// portNumber: 9307 56// filterChain: 57// filter: 58// name: "envoy.tcp_proxy" 59// patch: 60// operation: INSERT_BEFORE 61// value: 62// # This is the full filter config including the name and config or typed_config section. 63// name: "envoy.config.filter.network.custom_protocol" 64// config: 65// ... 66// - applyTo: NETWORK_FILTER # http connection manager is a filter in Envoy 67// match: 68// # context omitted so that this applies to both sidecars and gateways 69// listener: 70// filterChain: 71// filter: 72// name: "envoy.http_connection_manager" 73// patch: 74// operation: MERGE 75// value: 76// name: "envoy.http_connection_manager" 77// typed_config: 78// "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager" 79// common_http_protocol_options: 80// idle_timeout: 30s 81//``` 82// 83// The following example enables Envoy's Lua filter for all inbound 84// HTTP calls arriving at service port 8080 of the reviews service pod 85// with labels "app: reviews", in the bookinfo namespace. The lua 86// filter calls out to an external service internal.org.net:8888 that 87// requires a special cluster definition in envoy. The cluster is also 88// added to the sidecar as part of this configuration. 89// 90// ```yaml 91// apiVersion: networking.istio.io/v1alpha3 92// kind: EnvoyFilter 93// metadata: 94// name: reviews-lua 95// namespace: bookinfo 96// spec: 97// workloadSelector: 98// labels: 99// app: reviews 100// configPatches: 101// # The first patch adds the lua filter to the listener/http connection manager 102// - applyTo: HTTP_FILTER 103// match: 104// context: SIDECAR_INBOUND 105// listener: 106// portNumber: 8080 107// filterChain: 108// filter: 109// name: "envoy.http_connection_manager" 110// subFilter: 111// name: "envoy.router" 112// patch: 113// operation: INSERT_BEFORE 114// value: # lua filter specification 115// name: envoy.lua 116// typed_config: 117// "@type": "type.googleapis.com/envoy.config.filter.http.lua.v2.Lua" 118// inlineCode: | 119// function envoy_on_request(request_handle) 120// -- Make an HTTP call to an upstream host with the following headers, body, and timeout. 121// local headers, body = request_handle:httpCall( 122// "lua_cluster", 123// { 124// [":method"] = "POST", 125// [":path"] = "/acl", 126// [":authority"] = "internal.org.net" 127// }, 128// "authorize call", 129// 5000) 130// end 131// # The second patch adds the cluster that is referenced by the lua code 132// # cds match is omitted as a new cluster is being added 133// - applyTo: CLUSTER 134// match: 135// context: SIDECAR_OUTBOUND 136// patch: 137// operation: ADD 138// value: # cluster specification 139// name: "lua_cluster" 140// type: STRICT_DNS 141// connect_timeout: 0.5s 142// lb_policy: ROUND_ROBIN 143// hosts: 144// - socket_address: 145// protocol: TCP 146// address: "internal.org.net" 147// port_value: 8888 148// 149// ``` 150// 151// The following example overwrites certain fields (HTTP idle timeout 152// and X-Forward-For trusted hops) in the HTTP connection manager in a 153// listener on the ingress gateway in istio-system namespace for the 154// SNI host app.example.com: 155// 156// ```yaml 157// apiVersion: networking.istio.io/v1alpha3 158// kind: EnvoyFilter 159// metadata: 160// name: hcm-tweaks 161// namespace: istio-system 162// spec: 163// workloadSelector: 164// labels: 165// istio: ingress-gateway 166// configPatches: 167// - applyTo: NETWORK_FILTER # http connection manager is a filter in Envoy 168// match: 169// context: GATEWAY 170// listener: 171// filterChain: 172// sni: app.example.com 173// filter: 174// name: "envoy.http_connection_manager" 175// patch: 176// operation: MERGE 177// value: 178// common_http_protocol_options: 179// idle_timeout: 30s 180// xff_num_trusted_hops: 5 181//``` 182// 183 184package v1alpha3 185 186import ( 187 fmt "fmt" 188 proto "github.com/gogo/protobuf/proto" 189 types "github.com/gogo/protobuf/types" 190 io "io" 191 _ "istio.io/gogo-genproto/googleapis/google/api" 192 math "math" 193 math_bits "math/bits" 194) 195 196// Reference imports to suppress errors if they are not otherwise used. 197var _ = proto.Marshal 198var _ = fmt.Errorf 199var _ = math.Inf 200 201// This is a compile-time assertion to ensure that this generated file 202// is compatible with the proto package it is being compiled against. 203// A compilation error at this line likely means your copy of the 204// proto package needs to be updated. 205const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 206 207// ApplyTo specifies where in the Envoy configuration, the given patch should be applied. 208type EnvoyFilter_ApplyTo int32 209 210const ( 211 EnvoyFilter_INVALID EnvoyFilter_ApplyTo = 0 212 // Applies the patch to the listener. 213 EnvoyFilter_LISTENER EnvoyFilter_ApplyTo = 1 214 // Applies the patch to the filter chain. 215 EnvoyFilter_FILTER_CHAIN EnvoyFilter_ApplyTo = 2 216 // Applies the patch to the network filter chain, to modify an 217 // existing filter or add a new filter. 218 EnvoyFilter_NETWORK_FILTER EnvoyFilter_ApplyTo = 3 219 // Applies the patch to the HTTP filter chain in the http 220 // connection manager, to modify an existing filter or add a new 221 // filter. 222 EnvoyFilter_HTTP_FILTER EnvoyFilter_ApplyTo = 4 223 // Applies the patch to the Route configuration (rds output) 224 // inside a HTTP connection manager. This does not apply to the 225 // virtual host. Currently, only MERGE operation is allowed on the 226 // route configuration objects. 227 EnvoyFilter_ROUTE_CONFIGURATION EnvoyFilter_ApplyTo = 5 228 // Applies the patch to a virtual host inside a route configuration. 229 EnvoyFilter_VIRTUAL_HOST EnvoyFilter_ApplyTo = 6 230 // Applies the patch to a route object inside the matched virtual 231 // host in a route configuration. Currently, only MERGE operation 232 // is allowed on the route objects. 233 EnvoyFilter_HTTP_ROUTE EnvoyFilter_ApplyTo = 7 234 // Applies the patch to a cluster in a CDS output. Also used to add new clusters. 235 EnvoyFilter_CLUSTER EnvoyFilter_ApplyTo = 8 236) 237 238var EnvoyFilter_ApplyTo_name = map[int32]string{ 239 0: "INVALID", 240 1: "LISTENER", 241 2: "FILTER_CHAIN", 242 3: "NETWORK_FILTER", 243 4: "HTTP_FILTER", 244 5: "ROUTE_CONFIGURATION", 245 6: "VIRTUAL_HOST", 246 7: "HTTP_ROUTE", 247 8: "CLUSTER", 248} 249 250var EnvoyFilter_ApplyTo_value = map[string]int32{ 251 "INVALID": 0, 252 "LISTENER": 1, 253 "FILTER_CHAIN": 2, 254 "NETWORK_FILTER": 3, 255 "HTTP_FILTER": 4, 256 "ROUTE_CONFIGURATION": 5, 257 "VIRTUAL_HOST": 6, 258 "HTTP_ROUTE": 7, 259 "CLUSTER": 8, 260} 261 262func (x EnvoyFilter_ApplyTo) String() string { 263 return proto.EnumName(EnvoyFilter_ApplyTo_name, int32(x)) 264} 265 266func (EnvoyFilter_ApplyTo) EnumDescriptor() ([]byte, []int) { 267 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 0} 268} 269 270// PatchContext selects a class of configurations based on the 271// traffic flow direction and workload type. 272type EnvoyFilter_PatchContext int32 273 274const ( 275 // All listeners/routes/clusters in both sidecars and gateways. 276 EnvoyFilter_ANY EnvoyFilter_PatchContext = 0 277 // Inbound listener/route/cluster in sidecar. 278 EnvoyFilter_SIDECAR_INBOUND EnvoyFilter_PatchContext = 1 279 // Outbound listener/route/cluster in sidecar. 280 EnvoyFilter_SIDECAR_OUTBOUND EnvoyFilter_PatchContext = 2 281 // Gateway listener/route/cluster. 282 EnvoyFilter_GATEWAY EnvoyFilter_PatchContext = 3 283) 284 285var EnvoyFilter_PatchContext_name = map[int32]string{ 286 0: "ANY", 287 1: "SIDECAR_INBOUND", 288 2: "SIDECAR_OUTBOUND", 289 3: "GATEWAY", 290} 291 292var EnvoyFilter_PatchContext_value = map[string]int32{ 293 "ANY": 0, 294 "SIDECAR_INBOUND": 1, 295 "SIDECAR_OUTBOUND": 2, 296 "GATEWAY": 3, 297} 298 299func (x EnvoyFilter_PatchContext) String() string { 300 return proto.EnumName(EnvoyFilter_PatchContext_name, int32(x)) 301} 302 303func (EnvoyFilter_PatchContext) EnumDescriptor() ([]byte, []int) { 304 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 1} 305} 306 307// Action refers to the route action taken by Envoy when a http route matches. 308type EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action int32 309 310const ( 311 // All three route actions 312 EnvoyFilter_RouteConfigurationMatch_RouteMatch_ANY EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action = 0 313 // Route traffic to a cluster / weighted clusters. 314 EnvoyFilter_RouteConfigurationMatch_RouteMatch_ROUTE EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action = 1 315 // Redirect request. 316 EnvoyFilter_RouteConfigurationMatch_RouteMatch_REDIRECT EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action = 2 317 // directly respond to a request with specific payload. 318 EnvoyFilter_RouteConfigurationMatch_RouteMatch_DIRECT_RESPONSE EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action = 3 319) 320 321var EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action_name = map[int32]string{ 322 0: "ANY", 323 1: "ROUTE", 324 2: "REDIRECT", 325 3: "DIRECT_RESPONSE", 326} 327 328var EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action_value = map[string]int32{ 329 "ANY": 0, 330 "ROUTE": 1, 331 "REDIRECT": 2, 332 "DIRECT_RESPONSE": 3, 333} 334 335func (x EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action) String() string { 336 return proto.EnumName(EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action_name, int32(x)) 337} 338 339func (EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action) EnumDescriptor() ([]byte, []int) { 340 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 2, 0, 0} 341} 342 343// Operation denotes how the patch should be applied to the selected 344// configuration. 345type EnvoyFilter_Patch_Operation int32 346 347const ( 348 EnvoyFilter_Patch_INVALID EnvoyFilter_Patch_Operation = 0 349 // Merge the provided config with the generated config using 350 // json merge semantics. 351 EnvoyFilter_Patch_MERGE EnvoyFilter_Patch_Operation = 1 352 // Add the provided config to an existing list (of listeners, 353 // clusters, virtual hosts, network filters, or http 354 // filters). This operation will be ignored when applyTo is set 355 // to ROUTE_CONFIGURATION, or HTTP_ROUTE. 356 EnvoyFilter_Patch_ADD EnvoyFilter_Patch_Operation = 2 357 // Remove the selected object from the list (of listeners, 358 // clusters, virtual hosts, network filters, or http 359 // filters). Does not require a value to be specified. This 360 // operation will be ignored when applyTo is set to 361 // ROUTE_CONFIGURATION, or HTTP_ROUTE. 362 EnvoyFilter_Patch_REMOVE EnvoyFilter_Patch_Operation = 3 363 // Insert operation on an array of named objects. This operation 364 // is typically useful only in the context of filters, where the 365 // order of filters matter. For clusters and virtual hosts, 366 // order of the element in the array does not matter. Insert 367 // before the selected filter or sub filter. If no filter is 368 // selected, the specified filter will be inserted at the front 369 // of the list. 370 EnvoyFilter_Patch_INSERT_BEFORE EnvoyFilter_Patch_Operation = 4 371 // Insert operation on an array of named objects. This operation 372 // is typically useful only in the context of filters, where the 373 // order of filters matter. For clusters and virtual hosts, 374 // order of the element in the array does not matter. Insert 375 // after the selected filter or sub filter. If no filter is 376 // selected, the specified filter will be inserted at the end 377 // of the list. 378 EnvoyFilter_Patch_INSERT_AFTER EnvoyFilter_Patch_Operation = 5 379 // Insert operation on an array of named objects. This operation 380 // is typically useful only in the context of filters, where the 381 // order of filters matter. For clusters and virtual hosts, 382 // order of the element in the array does not matter. Insert 383 // first in the list based on the presence of selected filter or not. 384 // This is specifically useful when you want your filter first in the 385 // list based on a match condition specified in Match clause. 386 EnvoyFilter_Patch_INSERT_FIRST EnvoyFilter_Patch_Operation = 6 387) 388 389var EnvoyFilter_Patch_Operation_name = map[int32]string{ 390 0: "INVALID", 391 1: "MERGE", 392 2: "ADD", 393 3: "REMOVE", 394 4: "INSERT_BEFORE", 395 5: "INSERT_AFTER", 396 6: "INSERT_FIRST", 397} 398 399var EnvoyFilter_Patch_Operation_value = map[string]int32{ 400 "INVALID": 0, 401 "MERGE": 1, 402 "ADD": 2, 403 "REMOVE": 3, 404 "INSERT_BEFORE": 4, 405 "INSERT_AFTER": 5, 406 "INSERT_FIRST": 6, 407} 408 409func (x EnvoyFilter_Patch_Operation) String() string { 410 return proto.EnumName(EnvoyFilter_Patch_Operation_name, int32(x)) 411} 412 413func (EnvoyFilter_Patch_Operation) EnumDescriptor() ([]byte, []int) { 414 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 4, 0} 415} 416 417// EnvoyFilter provides a mechanism to customize the Envoy configuration 418// generated by Istio Pilot. 419// 420// <!-- crd generation tags 421// +cue-gen:EnvoyFilter:groupName:networking.istio.io 422// +cue-gen:EnvoyFilter:version:v1alpha3 423// +cue-gen:EnvoyFilter:storageVersion 424// +cue-gen:EnvoyFilter:annotations:helm.sh/resource-policy=keep 425// +cue-gen:EnvoyFilter:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio 426// +cue-gen:EnvoyFilter:subresource:status 427// +cue-gen:EnvoyFilter:scope:Namespaced 428// +cue-gen:EnvoyFilter:resource:categories=istio-io,networking-istio-io 429// --> 430// 431// <!-- go code generation tags 432// +kubetype-gen 433// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3 434// +genclient 435// +k8s:deepcopy-gen=true 436// --> 437type EnvoyFilter struct { 438 // Criteria used to select the specific set of pods/VMs on which 439 // this patch configuration should be applied. If omitted, the set 440 // of patches in this configuration will be applied to all workload 441 // instances in the same namespace. If omitted, the EnvoyFilter 442 // patches will be applied to all workloads in the same 443 // namespace. If the EnvoyFilter is present in the config root 444 // namespace, it will be applied to all applicable workloads in any 445 // namespace. 446 WorkloadSelector *WorkloadSelector `protobuf:"bytes,3,opt,name=workload_selector,json=workloadSelector,proto3" json:"workload_selector,omitempty"` 447 // One or more patches with match conditions. 448 ConfigPatches []*EnvoyFilter_EnvoyConfigObjectPatch `protobuf:"bytes,4,rep,name=config_patches,json=configPatches,proto3" json:"config_patches,omitempty"` 449 XXX_NoUnkeyedLiteral struct{} `json:"-"` 450 XXX_unrecognized []byte `json:"-"` 451 XXX_sizecache int32 `json:"-"` 452} 453 454func (m *EnvoyFilter) Reset() { *m = EnvoyFilter{} } 455func (m *EnvoyFilter) String() string { return proto.CompactTextString(m) } 456func (*EnvoyFilter) ProtoMessage() {} 457func (*EnvoyFilter) Descriptor() ([]byte, []int) { 458 return fileDescriptor_16d9b2922bd3e4a9, []int{0} 459} 460func (m *EnvoyFilter) XXX_Unmarshal(b []byte) error { 461 return m.Unmarshal(b) 462} 463func (m *EnvoyFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 464 if deterministic { 465 return xxx_messageInfo_EnvoyFilter.Marshal(b, m, deterministic) 466 } else { 467 b = b[:cap(b)] 468 n, err := m.MarshalToSizedBuffer(b) 469 if err != nil { 470 return nil, err 471 } 472 return b[:n], nil 473 } 474} 475func (m *EnvoyFilter) XXX_Merge(src proto.Message) { 476 xxx_messageInfo_EnvoyFilter.Merge(m, src) 477} 478func (m *EnvoyFilter) XXX_Size() int { 479 return m.Size() 480} 481func (m *EnvoyFilter) XXX_DiscardUnknown() { 482 xxx_messageInfo_EnvoyFilter.DiscardUnknown(m) 483} 484 485var xxx_messageInfo_EnvoyFilter proto.InternalMessageInfo 486 487func (m *EnvoyFilter) GetWorkloadSelector() *WorkloadSelector { 488 if m != nil { 489 return m.WorkloadSelector 490 } 491 return nil 492} 493 494func (m *EnvoyFilter) GetConfigPatches() []*EnvoyFilter_EnvoyConfigObjectPatch { 495 if m != nil { 496 return m.ConfigPatches 497 } 498 return nil 499} 500 501// One or more properties of the proxy to match on. 502type EnvoyFilter_ProxyMatch struct { 503 // A regular expression in golang regex format (RE2) that can be 504 // used to select proxies using a specific version of istio 505 // proxy. The Istio version for a given proxy is obtained from the 506 // node metadata field ISTIO_VERSION supplied by the proxy when 507 // connecting to Pilot. This value is embedded as an environment 508 // variable (ISTIO_META_ISTIO_VERSION) in the Istio proxy docker 509 // image. Custom proxy implementations should provide this metadata 510 // variable to take advantage of the Istio version check option. 511 ProxyVersion string `protobuf:"bytes,1,opt,name=proxy_version,json=proxyVersion,proto3" json:"proxy_version,omitempty"` 512 // Match on the node metadata supplied by a proxy when connecting 513 // to Istio Pilot. Note that while Envoy's node metadata is of 514 // type Struct, only string key-value pairs are processed by 515 // Pilot. All keys specified in the metadata must match with exact 516 // values. The match will fail if any of the specified keys are 517 // absent or the values fail to match. 518 Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 519 XXX_NoUnkeyedLiteral struct{} `json:"-"` 520 XXX_unrecognized []byte `json:"-"` 521 XXX_sizecache int32 `json:"-"` 522} 523 524func (m *EnvoyFilter_ProxyMatch) Reset() { *m = EnvoyFilter_ProxyMatch{} } 525func (m *EnvoyFilter_ProxyMatch) String() string { return proto.CompactTextString(m) } 526func (*EnvoyFilter_ProxyMatch) ProtoMessage() {} 527func (*EnvoyFilter_ProxyMatch) Descriptor() ([]byte, []int) { 528 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 0} 529} 530func (m *EnvoyFilter_ProxyMatch) XXX_Unmarshal(b []byte) error { 531 return m.Unmarshal(b) 532} 533func (m *EnvoyFilter_ProxyMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 534 if deterministic { 535 return xxx_messageInfo_EnvoyFilter_ProxyMatch.Marshal(b, m, deterministic) 536 } else { 537 b = b[:cap(b)] 538 n, err := m.MarshalToSizedBuffer(b) 539 if err != nil { 540 return nil, err 541 } 542 return b[:n], nil 543 } 544} 545func (m *EnvoyFilter_ProxyMatch) XXX_Merge(src proto.Message) { 546 xxx_messageInfo_EnvoyFilter_ProxyMatch.Merge(m, src) 547} 548func (m *EnvoyFilter_ProxyMatch) XXX_Size() int { 549 return m.Size() 550} 551func (m *EnvoyFilter_ProxyMatch) XXX_DiscardUnknown() { 552 xxx_messageInfo_EnvoyFilter_ProxyMatch.DiscardUnknown(m) 553} 554 555var xxx_messageInfo_EnvoyFilter_ProxyMatch proto.InternalMessageInfo 556 557func (m *EnvoyFilter_ProxyMatch) GetProxyVersion() string { 558 if m != nil { 559 return m.ProxyVersion 560 } 561 return "" 562} 563 564func (m *EnvoyFilter_ProxyMatch) GetMetadata() map[string]string { 565 if m != nil { 566 return m.Metadata 567 } 568 return nil 569} 570 571// Conditions specified in ClusterMatch must be met for the patch 572// to be applied to a cluster. 573type EnvoyFilter_ClusterMatch struct { 574 // The service port for which this cluster was generated. If 575 // omitted, applies to clusters for any port. 576 PortNumber uint32 `protobuf:"varint,1,opt,name=port_number,json=portNumber,proto3" json:"port_number,omitempty"` 577 // The fully qualified service name for this cluster. If omitted, 578 // applies to clusters for any service. For services defined 579 // through service entries, the service name is same as the hosts 580 // defined in the service entry. 581 Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` 582 // The subset associated with the service. If omitted, applies to 583 // clusters for any subset of a service. 584 Subset string `protobuf:"bytes,3,opt,name=subset,proto3" json:"subset,omitempty"` 585 // The exact name of the cluster to match. To match a specific 586 // cluster by name, such as the internally generated "Passthrough" 587 // cluster, leave all fields in clusterMatch empty, except the 588 // name. 589 Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` 590 XXX_NoUnkeyedLiteral struct{} `json:"-"` 591 XXX_unrecognized []byte `json:"-"` 592 XXX_sizecache int32 `json:"-"` 593} 594 595func (m *EnvoyFilter_ClusterMatch) Reset() { *m = EnvoyFilter_ClusterMatch{} } 596func (m *EnvoyFilter_ClusterMatch) String() string { return proto.CompactTextString(m) } 597func (*EnvoyFilter_ClusterMatch) ProtoMessage() {} 598func (*EnvoyFilter_ClusterMatch) Descriptor() ([]byte, []int) { 599 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 1} 600} 601func (m *EnvoyFilter_ClusterMatch) XXX_Unmarshal(b []byte) error { 602 return m.Unmarshal(b) 603} 604func (m *EnvoyFilter_ClusterMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 605 if deterministic { 606 return xxx_messageInfo_EnvoyFilter_ClusterMatch.Marshal(b, m, deterministic) 607 } else { 608 b = b[:cap(b)] 609 n, err := m.MarshalToSizedBuffer(b) 610 if err != nil { 611 return nil, err 612 } 613 return b[:n], nil 614 } 615} 616func (m *EnvoyFilter_ClusterMatch) XXX_Merge(src proto.Message) { 617 xxx_messageInfo_EnvoyFilter_ClusterMatch.Merge(m, src) 618} 619func (m *EnvoyFilter_ClusterMatch) XXX_Size() int { 620 return m.Size() 621} 622func (m *EnvoyFilter_ClusterMatch) XXX_DiscardUnknown() { 623 xxx_messageInfo_EnvoyFilter_ClusterMatch.DiscardUnknown(m) 624} 625 626var xxx_messageInfo_EnvoyFilter_ClusterMatch proto.InternalMessageInfo 627 628func (m *EnvoyFilter_ClusterMatch) GetPortNumber() uint32 { 629 if m != nil { 630 return m.PortNumber 631 } 632 return 0 633} 634 635func (m *EnvoyFilter_ClusterMatch) GetService() string { 636 if m != nil { 637 return m.Service 638 } 639 return "" 640} 641 642func (m *EnvoyFilter_ClusterMatch) GetSubset() string { 643 if m != nil { 644 return m.Subset 645 } 646 return "" 647} 648 649func (m *EnvoyFilter_ClusterMatch) GetName() string { 650 if m != nil { 651 return m.Name 652 } 653 return "" 654} 655 656// Conditions specified in RouteConfigurationMatch must be met for 657// the patch to be applied to a route configuration object or a 658// specific virtual host within the route configuration. 659type EnvoyFilter_RouteConfigurationMatch struct { 660 // The service port number or gateway server port number for which 661 // this route configuration was generated. If omitted, applies to 662 // route configurations for all ports. 663 PortNumber uint32 `protobuf:"varint,1,opt,name=port_number,json=portNumber,proto3" json:"port_number,omitempty"` 664 // Applicable only for GATEWAY context. The gateway server port 665 // name for which this route configuration was generated. 666 PortName string `protobuf:"bytes,2,opt,name=port_name,json=portName,proto3" json:"port_name,omitempty"` 667 // The Istio gateway config's namespace/name for which this route 668 // configuration was generated. Applies only if the context is 669 // GATEWAY. Should be in the namespace/name format. Use this field 670 // in conjunction with the portNumber and portName to accurately 671 // select the Envoy route configuration for a specific HTTPS 672 // server within a gateway config object. 673 Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` 674 // Match a specific virtual host in a route configuration and 675 // apply the patch to the virtual host. 676 Vhost *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch `protobuf:"bytes,4,opt,name=vhost,proto3" json:"vhost,omitempty"` 677 // Route configuration name to match on. Can be used to match a 678 // specific route configuration by name, such as the internally 679 // generated "http_proxy" route configuration for all sidecars. 680 Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` 681 XXX_NoUnkeyedLiteral struct{} `json:"-"` 682 XXX_unrecognized []byte `json:"-"` 683 XXX_sizecache int32 `json:"-"` 684} 685 686func (m *EnvoyFilter_RouteConfigurationMatch) Reset() { *m = EnvoyFilter_RouteConfigurationMatch{} } 687func (m *EnvoyFilter_RouteConfigurationMatch) String() string { return proto.CompactTextString(m) } 688func (*EnvoyFilter_RouteConfigurationMatch) ProtoMessage() {} 689func (*EnvoyFilter_RouteConfigurationMatch) Descriptor() ([]byte, []int) { 690 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 2} 691} 692func (m *EnvoyFilter_RouteConfigurationMatch) XXX_Unmarshal(b []byte) error { 693 return m.Unmarshal(b) 694} 695func (m *EnvoyFilter_RouteConfigurationMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 696 if deterministic { 697 return xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch.Marshal(b, m, deterministic) 698 } else { 699 b = b[:cap(b)] 700 n, err := m.MarshalToSizedBuffer(b) 701 if err != nil { 702 return nil, err 703 } 704 return b[:n], nil 705 } 706} 707func (m *EnvoyFilter_RouteConfigurationMatch) XXX_Merge(src proto.Message) { 708 xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch.Merge(m, src) 709} 710func (m *EnvoyFilter_RouteConfigurationMatch) XXX_Size() int { 711 return m.Size() 712} 713func (m *EnvoyFilter_RouteConfigurationMatch) XXX_DiscardUnknown() { 714 xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch.DiscardUnknown(m) 715} 716 717var xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch proto.InternalMessageInfo 718 719func (m *EnvoyFilter_RouteConfigurationMatch) GetPortNumber() uint32 { 720 if m != nil { 721 return m.PortNumber 722 } 723 return 0 724} 725 726func (m *EnvoyFilter_RouteConfigurationMatch) GetPortName() string { 727 if m != nil { 728 return m.PortName 729 } 730 return "" 731} 732 733func (m *EnvoyFilter_RouteConfigurationMatch) GetGateway() string { 734 if m != nil { 735 return m.Gateway 736 } 737 return "" 738} 739 740func (m *EnvoyFilter_RouteConfigurationMatch) GetVhost() *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch { 741 if m != nil { 742 return m.Vhost 743 } 744 return nil 745} 746 747func (m *EnvoyFilter_RouteConfigurationMatch) GetName() string { 748 if m != nil { 749 return m.Name 750 } 751 return "" 752} 753 754// Match a specific route inside a virtual host in a route configuration. 755type EnvoyFilter_RouteConfigurationMatch_RouteMatch struct { 756 // The Route objects generated by default are named as 757 // "default". Route objects generated using a virtual service 758 // will carry the name used in the virtual service's HTTP 759 // routes. 760 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 761 // Match a route with specific action type. 762 Action EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action `protobuf:"varint,2,opt,name=action,proto3,enum=istio.networking.v1alpha3.EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action" json:"action,omitempty"` 763 XXX_NoUnkeyedLiteral struct{} `json:"-"` 764 XXX_unrecognized []byte `json:"-"` 765 XXX_sizecache int32 `json:"-"` 766} 767 768func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) Reset() { 769 *m = EnvoyFilter_RouteConfigurationMatch_RouteMatch{} 770} 771func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) String() string { 772 return proto.CompactTextString(m) 773} 774func (*EnvoyFilter_RouteConfigurationMatch_RouteMatch) ProtoMessage() {} 775func (*EnvoyFilter_RouteConfigurationMatch_RouteMatch) Descriptor() ([]byte, []int) { 776 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 2, 0} 777} 778func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) XXX_Unmarshal(b []byte) error { 779 return m.Unmarshal(b) 780} 781func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 782 if deterministic { 783 return xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_RouteMatch.Marshal(b, m, deterministic) 784 } else { 785 b = b[:cap(b)] 786 n, err := m.MarshalToSizedBuffer(b) 787 if err != nil { 788 return nil, err 789 } 790 return b[:n], nil 791 } 792} 793func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) XXX_Merge(src proto.Message) { 794 xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_RouteMatch.Merge(m, src) 795} 796func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) XXX_Size() int { 797 return m.Size() 798} 799func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) XXX_DiscardUnknown() { 800 xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_RouteMatch.DiscardUnknown(m) 801} 802 803var xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_RouteMatch proto.InternalMessageInfo 804 805func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) GetName() string { 806 if m != nil { 807 return m.Name 808 } 809 return "" 810} 811 812func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) GetAction() EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action { 813 if m != nil { 814 return m.Action 815 } 816 return EnvoyFilter_RouteConfigurationMatch_RouteMatch_ANY 817} 818 819// Match a specific virtual host inside a route configuration. 820type EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch struct { 821 // The VirtualHosts objects generated by Istio are named as 822 // host:port, where the host typically corresponds to the 823 // VirtualService's host field or the hostname of a service in the 824 // registry. 825 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 826 // Match a specific route within the virtual host. 827 Route *EnvoyFilter_RouteConfigurationMatch_RouteMatch `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` 828 XXX_NoUnkeyedLiteral struct{} `json:"-"` 829 XXX_unrecognized []byte `json:"-"` 830 XXX_sizecache int32 `json:"-"` 831} 832 833func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) Reset() { 834 *m = EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch{} 835} 836func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) String() string { 837 return proto.CompactTextString(m) 838} 839func (*EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) ProtoMessage() {} 840func (*EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) Descriptor() ([]byte, []int) { 841 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 2, 1} 842} 843func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) XXX_Unmarshal(b []byte) error { 844 return m.Unmarshal(b) 845} 846func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 847 if deterministic { 848 return xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch.Marshal(b, m, deterministic) 849 } else { 850 b = b[:cap(b)] 851 n, err := m.MarshalToSizedBuffer(b) 852 if err != nil { 853 return nil, err 854 } 855 return b[:n], nil 856 } 857} 858func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) XXX_Merge(src proto.Message) { 859 xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch.Merge(m, src) 860} 861func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) XXX_Size() int { 862 return m.Size() 863} 864func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) XXX_DiscardUnknown() { 865 xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch.DiscardUnknown(m) 866} 867 868var xxx_messageInfo_EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch proto.InternalMessageInfo 869 870func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) GetName() string { 871 if m != nil { 872 return m.Name 873 } 874 return "" 875} 876 877func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) GetRoute() *EnvoyFilter_RouteConfigurationMatch_RouteMatch { 878 if m != nil { 879 return m.Route 880 } 881 return nil 882} 883 884// Conditions specified in a listener match must be met for the 885// patch to be applied to a specific listener across all filter 886// chains, or a specific filter chain inside the listener. 887type EnvoyFilter_ListenerMatch struct { 888 // The service port/gateway port to which traffic is being 889 // sent/received. If not specified, matches all listeners. Even though 890 // inbound listeners are generated for the instance/pod ports, only 891 // service ports should be used to match listeners. 892 PortNumber uint32 `protobuf:"varint,1,opt,name=port_number,json=portNumber,proto3" json:"port_number,omitempty"` 893 // Instead of using specific port numbers, a set of ports matching 894 // a given service's port name can be selected. Matching is case 895 // insensitive. 896 // Not implemented. 897 // $hide_from_docs 898 PortName string `protobuf:"bytes,2,opt,name=port_name,json=portName,proto3" json:"port_name,omitempty"` 899 // Match a specific filter chain in a listener. If specified, the 900 // patch will be applied to the filter chain (and a specific 901 // filter if specified) and not to other filter chains in the 902 // listener. 903 FilterChain *EnvoyFilter_ListenerMatch_FilterChainMatch `protobuf:"bytes,3,opt,name=filter_chain,json=filterChain,proto3" json:"filter_chain,omitempty"` 904 // Match a specific listener by its name. The listeners generated 905 // by Pilot are typically named as IP:Port. 906 Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` 907 XXX_NoUnkeyedLiteral struct{} `json:"-"` 908 XXX_unrecognized []byte `json:"-"` 909 XXX_sizecache int32 `json:"-"` 910} 911 912func (m *EnvoyFilter_ListenerMatch) Reset() { *m = EnvoyFilter_ListenerMatch{} } 913func (m *EnvoyFilter_ListenerMatch) String() string { return proto.CompactTextString(m) } 914func (*EnvoyFilter_ListenerMatch) ProtoMessage() {} 915func (*EnvoyFilter_ListenerMatch) Descriptor() ([]byte, []int) { 916 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 3} 917} 918func (m *EnvoyFilter_ListenerMatch) XXX_Unmarshal(b []byte) error { 919 return m.Unmarshal(b) 920} 921func (m *EnvoyFilter_ListenerMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 922 if deterministic { 923 return xxx_messageInfo_EnvoyFilter_ListenerMatch.Marshal(b, m, deterministic) 924 } else { 925 b = b[:cap(b)] 926 n, err := m.MarshalToSizedBuffer(b) 927 if err != nil { 928 return nil, err 929 } 930 return b[:n], nil 931 } 932} 933func (m *EnvoyFilter_ListenerMatch) XXX_Merge(src proto.Message) { 934 xxx_messageInfo_EnvoyFilter_ListenerMatch.Merge(m, src) 935} 936func (m *EnvoyFilter_ListenerMatch) XXX_Size() int { 937 return m.Size() 938} 939func (m *EnvoyFilter_ListenerMatch) XXX_DiscardUnknown() { 940 xxx_messageInfo_EnvoyFilter_ListenerMatch.DiscardUnknown(m) 941} 942 943var xxx_messageInfo_EnvoyFilter_ListenerMatch proto.InternalMessageInfo 944 945func (m *EnvoyFilter_ListenerMatch) GetPortNumber() uint32 { 946 if m != nil { 947 return m.PortNumber 948 } 949 return 0 950} 951 952func (m *EnvoyFilter_ListenerMatch) GetPortName() string { 953 if m != nil { 954 return m.PortName 955 } 956 return "" 957} 958 959func (m *EnvoyFilter_ListenerMatch) GetFilterChain() *EnvoyFilter_ListenerMatch_FilterChainMatch { 960 if m != nil { 961 return m.FilterChain 962 } 963 return nil 964} 965 966func (m *EnvoyFilter_ListenerMatch) GetName() string { 967 if m != nil { 968 return m.Name 969 } 970 return "" 971} 972 973// For listeners with multiple filter chains (e.g., inbound 974// listeners on sidecars with permissive mTLS, gateway listeners 975// with multiple SNI matches), the filter chain match can be used 976// to select a specific filter chain to patch. 977type EnvoyFilter_ListenerMatch_FilterChainMatch struct { 978 // The name assigned to the filter chain. 979 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 980 // The SNI value used by a filter chain's match condition. This 981 // condition will evaluate to false if the filter chain has no 982 // sni match. 983 Sni string `protobuf:"bytes,2,opt,name=sni,proto3" json:"sni,omitempty"` 984 // Applies only to SIDECAR_INBOUND context. If non-empty, a 985 // transport protocol to consider when determining a filter 986 // chain match. This value will be compared against the 987 // transport protocol of a new connection, when it's detected by 988 // the tls_inspector listener filter. 989 // 990 // Accepted values include: 991 // 992 // * `raw_buffer` - default, used when no transport protocol is detected. 993 // * `tls` - set when TLS protocol is detected by the TLS inspector. 994 TransportProtocol string `protobuf:"bytes,3,opt,name=transport_protocol,json=transportProtocol,proto3" json:"transport_protocol,omitempty"` 995 // Applies only to sidecars. If non-empty, a comma separated set 996 // of application protocols to consider when determining a 997 // filter chain match. This value will be compared against the 998 // application protocols of a new connection, when it's detected 999 // by one of the listener filters such as the http_inspector. 1000 // 1001 // Accepted values include: h2,http/1.1,http/1.0 1002 ApplicationProtocols string `protobuf:"bytes,4,opt,name=application_protocols,json=applicationProtocols,proto3" json:"application_protocols,omitempty"` 1003 // The name of a specific filter to apply the patch to. Set this 1004 // to envoy.http_connection_manager to add a filter or apply a 1005 // patch to the HTTP connection manager. 1006 Filter *EnvoyFilter_ListenerMatch_FilterMatch `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` 1007 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1008 XXX_unrecognized []byte `json:"-"` 1009 XXX_sizecache int32 `json:"-"` 1010} 1011 1012func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) Reset() { 1013 *m = EnvoyFilter_ListenerMatch_FilterChainMatch{} 1014} 1015func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) String() string { 1016 return proto.CompactTextString(m) 1017} 1018func (*EnvoyFilter_ListenerMatch_FilterChainMatch) ProtoMessage() {} 1019func (*EnvoyFilter_ListenerMatch_FilterChainMatch) Descriptor() ([]byte, []int) { 1020 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 3, 0} 1021} 1022func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) XXX_Unmarshal(b []byte) error { 1023 return m.Unmarshal(b) 1024} 1025func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1026 if deterministic { 1027 return xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterChainMatch.Marshal(b, m, deterministic) 1028 } else { 1029 b = b[:cap(b)] 1030 n, err := m.MarshalToSizedBuffer(b) 1031 if err != nil { 1032 return nil, err 1033 } 1034 return b[:n], nil 1035 } 1036} 1037func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) XXX_Merge(src proto.Message) { 1038 xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterChainMatch.Merge(m, src) 1039} 1040func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) XXX_Size() int { 1041 return m.Size() 1042} 1043func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) XXX_DiscardUnknown() { 1044 xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterChainMatch.DiscardUnknown(m) 1045} 1046 1047var xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterChainMatch proto.InternalMessageInfo 1048 1049func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) GetName() string { 1050 if m != nil { 1051 return m.Name 1052 } 1053 return "" 1054} 1055 1056func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) GetSni() string { 1057 if m != nil { 1058 return m.Sni 1059 } 1060 return "" 1061} 1062 1063func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) GetTransportProtocol() string { 1064 if m != nil { 1065 return m.TransportProtocol 1066 } 1067 return "" 1068} 1069 1070func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) GetApplicationProtocols() string { 1071 if m != nil { 1072 return m.ApplicationProtocols 1073 } 1074 return "" 1075} 1076 1077func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) GetFilter() *EnvoyFilter_ListenerMatch_FilterMatch { 1078 if m != nil { 1079 return m.Filter 1080 } 1081 return nil 1082} 1083 1084// Conditions to match a specific filter within a filter chain. 1085type EnvoyFilter_ListenerMatch_FilterMatch struct { 1086 // The filter name to match on. 1087 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 1088 // The next level filter within this filter to match 1089 // upon. Typically used for HTTP Connection Manager filters and 1090 // Thrift filters. 1091 SubFilter *EnvoyFilter_ListenerMatch_SubFilterMatch `protobuf:"bytes,2,opt,name=sub_filter,json=subFilter,proto3" json:"sub_filter,omitempty"` 1092 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1093 XXX_unrecognized []byte `json:"-"` 1094 XXX_sizecache int32 `json:"-"` 1095} 1096 1097func (m *EnvoyFilter_ListenerMatch_FilterMatch) Reset() { *m = EnvoyFilter_ListenerMatch_FilterMatch{} } 1098func (m *EnvoyFilter_ListenerMatch_FilterMatch) String() string { return proto.CompactTextString(m) } 1099func (*EnvoyFilter_ListenerMatch_FilterMatch) ProtoMessage() {} 1100func (*EnvoyFilter_ListenerMatch_FilterMatch) Descriptor() ([]byte, []int) { 1101 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 3, 1} 1102} 1103func (m *EnvoyFilter_ListenerMatch_FilterMatch) XXX_Unmarshal(b []byte) error { 1104 return m.Unmarshal(b) 1105} 1106func (m *EnvoyFilter_ListenerMatch_FilterMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1107 if deterministic { 1108 return xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterMatch.Marshal(b, m, deterministic) 1109 } else { 1110 b = b[:cap(b)] 1111 n, err := m.MarshalToSizedBuffer(b) 1112 if err != nil { 1113 return nil, err 1114 } 1115 return b[:n], nil 1116 } 1117} 1118func (m *EnvoyFilter_ListenerMatch_FilterMatch) XXX_Merge(src proto.Message) { 1119 xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterMatch.Merge(m, src) 1120} 1121func (m *EnvoyFilter_ListenerMatch_FilterMatch) XXX_Size() int { 1122 return m.Size() 1123} 1124func (m *EnvoyFilter_ListenerMatch_FilterMatch) XXX_DiscardUnknown() { 1125 xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterMatch.DiscardUnknown(m) 1126} 1127 1128var xxx_messageInfo_EnvoyFilter_ListenerMatch_FilterMatch proto.InternalMessageInfo 1129 1130func (m *EnvoyFilter_ListenerMatch_FilterMatch) GetName() string { 1131 if m != nil { 1132 return m.Name 1133 } 1134 return "" 1135} 1136 1137func (m *EnvoyFilter_ListenerMatch_FilterMatch) GetSubFilter() *EnvoyFilter_ListenerMatch_SubFilterMatch { 1138 if m != nil { 1139 return m.SubFilter 1140 } 1141 return nil 1142} 1143 1144// Conditions to match a specific filter within another 1145// filter. This field is typically useful to match a HTTP filter 1146// inside the envoy.http_connection_manager network filter. This 1147// could also be applicable for thrift filters. 1148type EnvoyFilter_ListenerMatch_SubFilterMatch struct { 1149 // The filter name to match on. 1150 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 1151 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1152 XXX_unrecognized []byte `json:"-"` 1153 XXX_sizecache int32 `json:"-"` 1154} 1155 1156func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) Reset() { 1157 *m = EnvoyFilter_ListenerMatch_SubFilterMatch{} 1158} 1159func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) String() string { return proto.CompactTextString(m) } 1160func (*EnvoyFilter_ListenerMatch_SubFilterMatch) ProtoMessage() {} 1161func (*EnvoyFilter_ListenerMatch_SubFilterMatch) Descriptor() ([]byte, []int) { 1162 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 3, 2} 1163} 1164func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) XXX_Unmarshal(b []byte) error { 1165 return m.Unmarshal(b) 1166} 1167func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1168 if deterministic { 1169 return xxx_messageInfo_EnvoyFilter_ListenerMatch_SubFilterMatch.Marshal(b, m, deterministic) 1170 } else { 1171 b = b[:cap(b)] 1172 n, err := m.MarshalToSizedBuffer(b) 1173 if err != nil { 1174 return nil, err 1175 } 1176 return b[:n], nil 1177 } 1178} 1179func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) XXX_Merge(src proto.Message) { 1180 xxx_messageInfo_EnvoyFilter_ListenerMatch_SubFilterMatch.Merge(m, src) 1181} 1182func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) XXX_Size() int { 1183 return m.Size() 1184} 1185func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) XXX_DiscardUnknown() { 1186 xxx_messageInfo_EnvoyFilter_ListenerMatch_SubFilterMatch.DiscardUnknown(m) 1187} 1188 1189var xxx_messageInfo_EnvoyFilter_ListenerMatch_SubFilterMatch proto.InternalMessageInfo 1190 1191func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) GetName() string { 1192 if m != nil { 1193 return m.Name 1194 } 1195 return "" 1196} 1197 1198// Patch specifies how the selected object should be modified. 1199type EnvoyFilter_Patch struct { 1200 // Determines how the patch should be applied. 1201 Operation EnvoyFilter_Patch_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=istio.networking.v1alpha3.EnvoyFilter_Patch_Operation" json:"operation,omitempty"` 1202 // The JSON config of the object being patched. This will be merged using 1203 // json merge semantics with the existing proto in the path. 1204 Value *types.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 1205 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1206 XXX_unrecognized []byte `json:"-"` 1207 XXX_sizecache int32 `json:"-"` 1208} 1209 1210func (m *EnvoyFilter_Patch) Reset() { *m = EnvoyFilter_Patch{} } 1211func (m *EnvoyFilter_Patch) String() string { return proto.CompactTextString(m) } 1212func (*EnvoyFilter_Patch) ProtoMessage() {} 1213func (*EnvoyFilter_Patch) Descriptor() ([]byte, []int) { 1214 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 4} 1215} 1216func (m *EnvoyFilter_Patch) XXX_Unmarshal(b []byte) error { 1217 return m.Unmarshal(b) 1218} 1219func (m *EnvoyFilter_Patch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1220 if deterministic { 1221 return xxx_messageInfo_EnvoyFilter_Patch.Marshal(b, m, deterministic) 1222 } else { 1223 b = b[:cap(b)] 1224 n, err := m.MarshalToSizedBuffer(b) 1225 if err != nil { 1226 return nil, err 1227 } 1228 return b[:n], nil 1229 } 1230} 1231func (m *EnvoyFilter_Patch) XXX_Merge(src proto.Message) { 1232 xxx_messageInfo_EnvoyFilter_Patch.Merge(m, src) 1233} 1234func (m *EnvoyFilter_Patch) XXX_Size() int { 1235 return m.Size() 1236} 1237func (m *EnvoyFilter_Patch) XXX_DiscardUnknown() { 1238 xxx_messageInfo_EnvoyFilter_Patch.DiscardUnknown(m) 1239} 1240 1241var xxx_messageInfo_EnvoyFilter_Patch proto.InternalMessageInfo 1242 1243func (m *EnvoyFilter_Patch) GetOperation() EnvoyFilter_Patch_Operation { 1244 if m != nil { 1245 return m.Operation 1246 } 1247 return EnvoyFilter_Patch_INVALID 1248} 1249 1250func (m *EnvoyFilter_Patch) GetValue() *types.Struct { 1251 if m != nil { 1252 return m.Value 1253 } 1254 return nil 1255} 1256 1257// One or more match conditions to be met before a patch is applied 1258// to the generated configuration for a given proxy. 1259type EnvoyFilter_EnvoyConfigObjectMatch struct { 1260 // The specific config generation context to match on. Istio Pilot 1261 // generates envoy configuration in the context of a gateway, 1262 // inbound traffic to sidecar and outbound traffic from sidecar. 1263 Context EnvoyFilter_PatchContext `protobuf:"varint,1,opt,name=context,proto3,enum=istio.networking.v1alpha3.EnvoyFilter_PatchContext" json:"context,omitempty"` 1264 // Match on properties associated with a proxy. 1265 Proxy *EnvoyFilter_ProxyMatch `protobuf:"bytes,2,opt,name=proxy,proto3" json:"proxy,omitempty"` 1266 // Types that are valid to be assigned to ObjectTypes: 1267 // *EnvoyFilter_EnvoyConfigObjectMatch_Listener 1268 // *EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration 1269 // *EnvoyFilter_EnvoyConfigObjectMatch_Cluster 1270 ObjectTypes isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes `protobuf_oneof:"object_types"` 1271 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1272 XXX_unrecognized []byte `json:"-"` 1273 XXX_sizecache int32 `json:"-"` 1274} 1275 1276func (m *EnvoyFilter_EnvoyConfigObjectMatch) Reset() { *m = EnvoyFilter_EnvoyConfigObjectMatch{} } 1277func (m *EnvoyFilter_EnvoyConfigObjectMatch) String() string { return proto.CompactTextString(m) } 1278func (*EnvoyFilter_EnvoyConfigObjectMatch) ProtoMessage() {} 1279func (*EnvoyFilter_EnvoyConfigObjectMatch) Descriptor() ([]byte, []int) { 1280 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 5} 1281} 1282func (m *EnvoyFilter_EnvoyConfigObjectMatch) XXX_Unmarshal(b []byte) error { 1283 return m.Unmarshal(b) 1284} 1285func (m *EnvoyFilter_EnvoyConfigObjectMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1286 if deterministic { 1287 return xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectMatch.Marshal(b, m, deterministic) 1288 } else { 1289 b = b[:cap(b)] 1290 n, err := m.MarshalToSizedBuffer(b) 1291 if err != nil { 1292 return nil, err 1293 } 1294 return b[:n], nil 1295 } 1296} 1297func (m *EnvoyFilter_EnvoyConfigObjectMatch) XXX_Merge(src proto.Message) { 1298 xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectMatch.Merge(m, src) 1299} 1300func (m *EnvoyFilter_EnvoyConfigObjectMatch) XXX_Size() int { 1301 return m.Size() 1302} 1303func (m *EnvoyFilter_EnvoyConfigObjectMatch) XXX_DiscardUnknown() { 1304 xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectMatch.DiscardUnknown(m) 1305} 1306 1307var xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectMatch proto.InternalMessageInfo 1308 1309type isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes interface { 1310 isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() 1311 MarshalTo([]byte) (int, error) 1312 Size() int 1313} 1314 1315type EnvoyFilter_EnvoyConfigObjectMatch_Listener struct { 1316 Listener *EnvoyFilter_ListenerMatch `protobuf:"bytes,3,opt,name=listener,proto3,oneof"` 1317} 1318type EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration struct { 1319 RouteConfiguration *EnvoyFilter_RouteConfigurationMatch `protobuf:"bytes,4,opt,name=route_configuration,json=routeConfiguration,proto3,oneof"` 1320} 1321type EnvoyFilter_EnvoyConfigObjectMatch_Cluster struct { 1322 Cluster *EnvoyFilter_ClusterMatch `protobuf:"bytes,5,opt,name=cluster,proto3,oneof"` 1323} 1324 1325func (*EnvoyFilter_EnvoyConfigObjectMatch_Listener) isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() { 1326} 1327func (*EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration) isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() { 1328} 1329func (*EnvoyFilter_EnvoyConfigObjectMatch_Cluster) isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() { 1330} 1331 1332func (m *EnvoyFilter_EnvoyConfigObjectMatch) GetObjectTypes() isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes { 1333 if m != nil { 1334 return m.ObjectTypes 1335 } 1336 return nil 1337} 1338 1339func (m *EnvoyFilter_EnvoyConfigObjectMatch) GetContext() EnvoyFilter_PatchContext { 1340 if m != nil { 1341 return m.Context 1342 } 1343 return EnvoyFilter_ANY 1344} 1345 1346func (m *EnvoyFilter_EnvoyConfigObjectMatch) GetProxy() *EnvoyFilter_ProxyMatch { 1347 if m != nil { 1348 return m.Proxy 1349 } 1350 return nil 1351} 1352 1353func (m *EnvoyFilter_EnvoyConfigObjectMatch) GetListener() *EnvoyFilter_ListenerMatch { 1354 if x, ok := m.GetObjectTypes().(*EnvoyFilter_EnvoyConfigObjectMatch_Listener); ok { 1355 return x.Listener 1356 } 1357 return nil 1358} 1359 1360func (m *EnvoyFilter_EnvoyConfigObjectMatch) GetRouteConfiguration() *EnvoyFilter_RouteConfigurationMatch { 1361 if x, ok := m.GetObjectTypes().(*EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration); ok { 1362 return x.RouteConfiguration 1363 } 1364 return nil 1365} 1366 1367func (m *EnvoyFilter_EnvoyConfigObjectMatch) GetCluster() *EnvoyFilter_ClusterMatch { 1368 if x, ok := m.GetObjectTypes().(*EnvoyFilter_EnvoyConfigObjectMatch_Cluster); ok { 1369 return x.Cluster 1370 } 1371 return nil 1372} 1373 1374// XXX_OneofWrappers is for the internal use of the proto package. 1375func (*EnvoyFilter_EnvoyConfigObjectMatch) XXX_OneofWrappers() []interface{} { 1376 return []interface{}{ 1377 (*EnvoyFilter_EnvoyConfigObjectMatch_Listener)(nil), 1378 (*EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration)(nil), 1379 (*EnvoyFilter_EnvoyConfigObjectMatch_Cluster)(nil), 1380 } 1381} 1382 1383// Changes to be made to various envoy config objects. 1384type EnvoyFilter_EnvoyConfigObjectPatch struct { 1385 // Specifies where in the Envoy configuration, the patch should be 1386 // applied. The match is expected to select the appropriate 1387 // object based on applyTo. For example, an applyTo with 1388 // HTTP_FILTER is expected to have a match condition on the 1389 // listeners, with a network filter selection on 1390 // envoy.http_connection_manager and a sub filter selection on the 1391 // HTTP filter relative to which the insertion should be 1392 // performed. Similarly, an applyTo on CLUSTER should have a match 1393 // (if provided) on the cluster and not on a listener. 1394 ApplyTo EnvoyFilter_ApplyTo `protobuf:"varint,1,opt,name=apply_to,json=applyTo,proto3,enum=istio.networking.v1alpha3.EnvoyFilter_ApplyTo" json:"apply_to,omitempty"` 1395 // Match on listener/route configuration/cluster. 1396 Match *EnvoyFilter_EnvoyConfigObjectMatch `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"` 1397 // The patch to apply along with the operation. 1398 Patch *EnvoyFilter_Patch `protobuf:"bytes,3,opt,name=patch,proto3" json:"patch,omitempty"` 1399 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1400 XXX_unrecognized []byte `json:"-"` 1401 XXX_sizecache int32 `json:"-"` 1402} 1403 1404func (m *EnvoyFilter_EnvoyConfigObjectPatch) Reset() { *m = EnvoyFilter_EnvoyConfigObjectPatch{} } 1405func (m *EnvoyFilter_EnvoyConfigObjectPatch) String() string { return proto.CompactTextString(m) } 1406func (*EnvoyFilter_EnvoyConfigObjectPatch) ProtoMessage() {} 1407func (*EnvoyFilter_EnvoyConfigObjectPatch) Descriptor() ([]byte, []int) { 1408 return fileDescriptor_16d9b2922bd3e4a9, []int{0, 6} 1409} 1410func (m *EnvoyFilter_EnvoyConfigObjectPatch) XXX_Unmarshal(b []byte) error { 1411 return m.Unmarshal(b) 1412} 1413func (m *EnvoyFilter_EnvoyConfigObjectPatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1414 if deterministic { 1415 return xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectPatch.Marshal(b, m, deterministic) 1416 } else { 1417 b = b[:cap(b)] 1418 n, err := m.MarshalToSizedBuffer(b) 1419 if err != nil { 1420 return nil, err 1421 } 1422 return b[:n], nil 1423 } 1424} 1425func (m *EnvoyFilter_EnvoyConfigObjectPatch) XXX_Merge(src proto.Message) { 1426 xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectPatch.Merge(m, src) 1427} 1428func (m *EnvoyFilter_EnvoyConfigObjectPatch) XXX_Size() int { 1429 return m.Size() 1430} 1431func (m *EnvoyFilter_EnvoyConfigObjectPatch) XXX_DiscardUnknown() { 1432 xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectPatch.DiscardUnknown(m) 1433} 1434 1435var xxx_messageInfo_EnvoyFilter_EnvoyConfigObjectPatch proto.InternalMessageInfo 1436 1437func (m *EnvoyFilter_EnvoyConfigObjectPatch) GetApplyTo() EnvoyFilter_ApplyTo { 1438 if m != nil { 1439 return m.ApplyTo 1440 } 1441 return EnvoyFilter_INVALID 1442} 1443 1444func (m *EnvoyFilter_EnvoyConfigObjectPatch) GetMatch() *EnvoyFilter_EnvoyConfigObjectMatch { 1445 if m != nil { 1446 return m.Match 1447 } 1448 return nil 1449} 1450 1451func (m *EnvoyFilter_EnvoyConfigObjectPatch) GetPatch() *EnvoyFilter_Patch { 1452 if m != nil { 1453 return m.Patch 1454 } 1455 return nil 1456} 1457 1458func init() { 1459 proto.RegisterEnum("istio.networking.v1alpha3.EnvoyFilter_ApplyTo", EnvoyFilter_ApplyTo_name, EnvoyFilter_ApplyTo_value) 1460 proto.RegisterEnum("istio.networking.v1alpha3.EnvoyFilter_PatchContext", EnvoyFilter_PatchContext_name, EnvoyFilter_PatchContext_value) 1461 proto.RegisterEnum("istio.networking.v1alpha3.EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action", EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action_name, EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action_value) 1462 proto.RegisterEnum("istio.networking.v1alpha3.EnvoyFilter_Patch_Operation", EnvoyFilter_Patch_Operation_name, EnvoyFilter_Patch_Operation_value) 1463 proto.RegisterType((*EnvoyFilter)(nil), "istio.networking.v1alpha3.EnvoyFilter") 1464 proto.RegisterType((*EnvoyFilter_ProxyMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.ProxyMatch") 1465 proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.MetadataEntry") 1466 proto.RegisterType((*EnvoyFilter_ClusterMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.ClusterMatch") 1467 proto.RegisterType((*EnvoyFilter_RouteConfigurationMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch") 1468 proto.RegisterType((*EnvoyFilter_RouteConfigurationMatch_RouteMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch") 1469 proto.RegisterType((*EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch") 1470 proto.RegisterType((*EnvoyFilter_ListenerMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.ListenerMatch") 1471 proto.RegisterType((*EnvoyFilter_ListenerMatch_FilterChainMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch") 1472 proto.RegisterType((*EnvoyFilter_ListenerMatch_FilterMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch") 1473 proto.RegisterType((*EnvoyFilter_ListenerMatch_SubFilterMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.SubFilterMatch") 1474 proto.RegisterType((*EnvoyFilter_Patch)(nil), "istio.networking.v1alpha3.EnvoyFilter.Patch") 1475 proto.RegisterType((*EnvoyFilter_EnvoyConfigObjectMatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch") 1476 proto.RegisterType((*EnvoyFilter_EnvoyConfigObjectPatch)(nil), "istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch") 1477} 1478 1479func init() { 1480 proto.RegisterFile("networking/v1alpha3/envoy_filter.proto", fileDescriptor_16d9b2922bd3e4a9) 1481} 1482 1483var fileDescriptor_16d9b2922bd3e4a9 = []byte{ 1484 // 1258 bytes of a gzipped FileDescriptorProto 1485 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdd, 0x72, 0xdb, 0x44, 1486 0x14, 0x8e, 0xfc, 0xef, 0x63, 0xc7, 0x51, 0x37, 0xa5, 0x31, 0x82, 0x69, 0x43, 0x60, 0x98, 0xce, 1487 0x40, 0x95, 0xa9, 0xc3, 0x30, 0x0c, 0x0c, 0x14, 0xc7, 0x51, 0x62, 0x95, 0xc4, 0xf2, 0xac, 0x95, 1488 0xb4, 0x85, 0x0b, 0x8d, 0xac, 0x6c, 0x62, 0x51, 0x45, 0x6b, 0xa4, 0xb5, 0x5b, 0x3f, 0x00, 0xc3, 1489 0x83, 0xf0, 0x2a, 0x5c, 0x30, 0x70, 0xc3, 0x25, 0x97, 0x9d, 0x3e, 0x02, 0x17, 0x5c, 0xc1, 0x0c, 1490 0xa3, 0xdd, 0x95, 0xed, 0xb4, 0x6e, 0xc7, 0x6d, 0xb9, 0xdb, 0xfd, 0x76, 0xcf, 0xe7, 0xef, 0x9c, 1491 0x3d, 0x3f, 0x32, 0x7c, 0x18, 0x12, 0xf6, 0x88, 0x46, 0x0f, 0xfd, 0xf0, 0x7c, 0x7b, 0x7c, 0xdb, 1492 0x0d, 0x86, 0x03, 0x77, 0x67, 0x9b, 0x84, 0x63, 0x3a, 0x71, 0xce, 0xfc, 0x80, 0x91, 0x48, 0x1f, 1493 0x46, 0x94, 0x51, 0xf4, 0xb6, 0x1f, 0x33, 0x9f, 0xea, 0xb3, 0xdb, 0x7a, 0x7a, 0x5b, 0xbb, 0x71, 1494 0x4e, 0xe9, 0x79, 0x40, 0xb6, 0xdd, 0xa1, 0xbf, 0x7d, 0xe6, 0x93, 0xe0, 0xd4, 0xe9, 0x93, 0x81, 1495 0x3b, 0xf6, 0xa9, 0xb4, 0xd5, 0xde, 0x95, 0x17, 0xf8, 0xae, 0x3f, 0x3a, 0xdb, 0x8e, 0x59, 0x34, 1496 0xf2, 0x98, 0x3c, 0x7d, 0x6f, 0x91, 0x82, 0xd8, 0x3f, 0x25, 0x9e, 0x2b, 0x09, 0xb6, 0x7e, 0xdb, 1497 0x80, 0x8a, 0x91, 0x68, 0xda, 0xe7, 0x92, 0xd0, 0x7d, 0xb8, 0x92, 0x58, 0x04, 0xd4, 0x3d, 0x75, 1498 0x62, 0x12, 0x10, 0x8f, 0xd1, 0xa8, 0x9e, 0xdd, 0x54, 0x6e, 0x56, 0x1a, 0x1f, 0xe9, 0x2f, 0x14, 1499 0xaa, 0xdf, 0x93, 0x36, 0x3d, 0x69, 0x82, 0xd5, 0x47, 0xcf, 0x20, 0xc8, 0x87, 0x9a, 0x47, 0xc3, 1500 0x33, 0xff, 0xdc, 0x19, 0xba, 0xcc, 0x1b, 0x90, 0xb8, 0x9e, 0xdb, 0xcc, 0xde, 0xac, 0x34, 0xbe, 1501 0x7c, 0x09, 0xed, 0x9c, 0x32, 0xb1, 0x6e, 0x71, 0x06, 0xab, 0xff, 0x3d, 0xf1, 0x58, 0x37, 0xa1, 1502 0xd9, 0xcd, 0x3e, 0x69, 0x66, 0xf0, 0xaa, 0x60, 0xee, 0x0a, 0x62, 0xed, 0x77, 0x05, 0xa0, 0x1b, 1503 0xd1, 0xc7, 0x93, 0xa3, 0x04, 0x40, 0xef, 0xc3, 0xea, 0x30, 0xd9, 0x39, 0x63, 0x12, 0xc5, 0x3e, 1504 0x0d, 0xeb, 0xca, 0xa6, 0x72, 0xb3, 0x8c, 0xab, 0x1c, 0x3c, 0x11, 0x18, 0xfa, 0x0e, 0x4a, 0x17, 1505 0x84, 0xb9, 0xa7, 0x2e, 0x73, 0xeb, 0x19, 0x2e, 0xec, 0xce, 0x92, 0xc2, 0x66, 0xbf, 0xa4, 0x1f, 1506 0x49, 0x06, 0x23, 0x64, 0xd1, 0x04, 0x4f, 0x09, 0xb5, 0x2f, 0x60, 0xf5, 0xd2, 0x11, 0x52, 0x21, 1507 0xfb, 0x90, 0x4c, 0xa4, 0x90, 0x64, 0x89, 0xae, 0x42, 0x7e, 0xec, 0x06, 0x23, 0x52, 0xcf, 0x70, 1508 0x4c, 0x6c, 0x3e, 0xcf, 0x7c, 0xa6, 0x68, 0x23, 0xa8, 0xb6, 0x82, 0x51, 0xcc, 0x48, 0x24, 0xdc, 1509 0xb9, 0x01, 0x95, 0x21, 0x8d, 0x98, 0x13, 0x8e, 0x2e, 0xfa, 0x24, 0xe2, 0x1c, 0xab, 0x18, 0x12, 1510 0xa8, 0xc3, 0x11, 0x54, 0x87, 0x62, 0x4c, 0xa2, 0xb1, 0xef, 0xa5, 0x64, 0xe9, 0x16, 0x5d, 0x83, 1511 0x42, 0x3c, 0xea, 0xc7, 0x84, 0xf1, 0x27, 0x2d, 0x63, 0xb9, 0x43, 0x08, 0x72, 0xa1, 0x7b, 0x41, 1512 0xea, 0x39, 0x8e, 0xf2, 0xb5, 0xf6, 0x4b, 0x0e, 0x36, 0x30, 0x1d, 0x31, 0x22, 0x62, 0x3e, 0x8a, 1513 0x5c, 0xe6, 0xd3, 0x70, 0x49, 0x09, 0xef, 0x40, 0x59, 0x5c, 0x48, 0x58, 0x85, 0x88, 0x12, 0x3f, 1514 0x76, 0x2f, 0x48, 0xa2, 0xef, 0xdc, 0x65, 0xe4, 0x91, 0x3b, 0x91, 0x32, 0xd2, 0x2d, 0x22, 0x90, 1515 0x1f, 0x0f, 0x68, 0xcc, 0xb8, 0x90, 0x4a, 0xc3, 0x5a, 0xf2, 0x05, 0x5e, 0x20, 0x53, 0x3f, 0xf1, 1516 0x23, 0x36, 0x72, 0x83, 0x36, 0x8d, 0x19, 0x07, 0xb0, 0x60, 0x9f, 0xba, 0x9b, 0x9f, 0x73, 0x37, 1517 0xc9, 0x19, 0xce, 0x23, 0x3c, 0x4c, 0xaf, 0x28, 0xb3, 0x2b, 0x68, 0x00, 0x05, 0xd7, 0x4b, 0xd8, 1518 0xb9, 0x47, 0xb5, 0x46, 0xf7, 0x0d, 0xe5, 0xcd, 0x7e, 0x4e, 0x6f, 0x72, 0x5e, 0x2c, 0xf9, 0xb7, 1519 0xee, 0x40, 0x41, 0x20, 0xa8, 0x08, 0xd9, 0x66, 0xe7, 0x81, 0xba, 0x82, 0xca, 0x90, 0xc7, 0xd6, 1520 0xb1, 0x6d, 0xa8, 0x0a, 0xaa, 0x42, 0x09, 0x1b, 0x7b, 0x26, 0x36, 0x5a, 0xb6, 0x9a, 0x41, 0xeb, 1521 0xb0, 0x26, 0xd6, 0x0e, 0x36, 0x7a, 0x5d, 0xab, 0xd3, 0x33, 0xd4, 0xac, 0xf6, 0x93, 0x02, 0xea, 1522 0xb3, 0xde, 0x2f, 0xf4, 0xc9, 0x81, 0x7c, 0x94, 0xc8, 0xe0, 0x2e, 0x55, 0x1a, 0xe6, 0xff, 0xe6, 1523 0x12, 0x16, 0xbc, 0xda, 0x5f, 0x39, 0x58, 0x3d, 0xf4, 0x63, 0x46, 0xc2, 0xa5, 0xf3, 0xf7, 0xa5, 1524 0xc9, 0x33, 0x80, 0xaa, 0xe8, 0x9e, 0x8e, 0x37, 0x70, 0xfd, 0x50, 0xf6, 0x26, 0x63, 0x49, 0xdd, 1525 0x97, 0x94, 0xe8, 0x02, 0x6c, 0x25, 0x3c, 0x42, 0x73, 0xe5, 0x6c, 0x86, 0x2c, 0x2c, 0x8a, 0xbf, 1526 0x15, 0x50, 0x9f, 0xb5, 0x5a, 0x18, 0x57, 0x15, 0xb2, 0x71, 0xe8, 0x4b, 0xf5, 0xc9, 0x12, 0xdd, 1527 0x02, 0xc4, 0x22, 0x37, 0x8c, 0xb9, 0x6b, 0xbc, 0xf9, 0x7a, 0x34, 0x90, 0x05, 0x70, 0x65, 0x7a, 1528 0xd2, 0x95, 0x07, 0x68, 0x07, 0xde, 0x72, 0x87, 0xc3, 0xc0, 0xf7, 0x78, 0x74, 0xa7, 0x06, 0xb1, 1529 0x94, 0x73, 0x75, 0xee, 0x30, 0xb5, 0x89, 0xd1, 0x7d, 0x28, 0x08, 0x0f, 0x78, 0x6a, 0x57, 0x1a, 1530 0x5f, 0xbf, 0x41, 0x58, 0x44, 0x44, 0x24, 0x9f, 0xf6, 0xa3, 0x02, 0x95, 0x39, 0x7c, 0xa1, 0xcf, 1531 0x7d, 0x80, 0x78, 0xd4, 0x97, 0xc3, 0x4d, 0x26, 0x54, 0xeb, 0xb5, 0x14, 0xf4, 0x46, 0xfd, 0x79, 1532 0x11, 0xe5, 0x38, 0xdd, 0x6b, 0x1f, 0x40, 0xed, 0xf2, 0xe1, 0x22, 0x25, 0xda, 0xbf, 0x0a, 0xe4, 1533 0xf9, 0x30, 0x40, 0x36, 0x94, 0xe9, 0x90, 0x88, 0x14, 0xe5, 0x57, 0x6a, 0x8d, 0x4f, 0x97, 0xed, 1534 0xeb, 0x5c, 0x8a, 0x95, 0x5a, 0xe3, 0x19, 0x11, 0xba, 0x35, 0xdf, 0xac, 0x2b, 0x8d, 0x0d, 0x5d, 1535 0x8c, 0x61, 0x3d, 0x1d, 0xc3, 0x7a, 0x8f, 0x8f, 0x61, 0xd9, 0xc5, 0xb7, 0x28, 0x94, 0xa7, 0x34, 1536 0xa8, 0x02, 0x45, 0xb3, 0x73, 0xd2, 0x3c, 0x34, 0xf7, 0x44, 0x55, 0x1f, 0x19, 0xf8, 0x20, 0xa9, 1537 0xea, 0xa4, 0xd2, 0xf7, 0xf6, 0xd4, 0x0c, 0x02, 0x28, 0x60, 0xe3, 0xc8, 0x3a, 0x31, 0xd4, 0x2c, 1538 0xba, 0x02, 0xab, 0x66, 0xa7, 0x67, 0x60, 0xdb, 0xd9, 0x35, 0xf6, 0x2d, 0x6c, 0xa8, 0x39, 0xa4, 1539 0x42, 0x55, 0x42, 0xcd, 0x7d, 0xdb, 0xc0, 0x6a, 0x7e, 0x0e, 0xd9, 0x37, 0x71, 0xcf, 0x56, 0x0b, 1540 0xda, 0x9f, 0x59, 0xb8, 0xf6, 0xdc, 0xbc, 0x14, 0xe1, 0x3a, 0x82, 0xa2, 0x47, 0x43, 0x46, 0x1e, 1541 0x33, 0x19, 0x8e, 0x9d, 0x57, 0x09, 0x47, 0x4b, 0x98, 0xe2, 0x94, 0x03, 0x1d, 0x40, 0x9e, 0x8f, 1542 0x51, 0x19, 0x89, 0xdb, 0xaf, 0x3c, 0x33, 0xb1, 0xb0, 0x47, 0x18, 0x4a, 0x81, 0xcc, 0x01, 0x59, 1543 0xd3, 0x9f, 0xbc, 0x4e, 0xea, 0xb4, 0x57, 0xf0, 0x94, 0x07, 0xfd, 0x00, 0xeb, 0xbc, 0x09, 0x39, 1544 0xde, 0x7c, 0xa7, 0x92, 0xc3, 0xe5, 0xab, 0x37, 0x6b, 0x75, 0xed, 0x15, 0x8c, 0xa2, 0xe7, 0x8e, 1545 0x90, 0x05, 0x45, 0x4f, 0x0c, 0x6b, 0x59, 0x82, 0xcb, 0x86, 0x77, 0x7e, 0xc4, 0xb7, 0x57, 0x70, 1546 0xca, 0xb2, 0x5b, 0x83, 0x2a, 0xe5, 0xcf, 0xe7, 0xb0, 0xc9, 0x90, 0xc4, 0xda, 0x3f, 0xca, 0x82, 1547 0xa7, 0x15, 0xb9, 0x6e, 0x42, 0x29, 0xe9, 0x0a, 0x13, 0x87, 0x51, 0xf9, 0xb6, 0xfa, 0x92, 0x3f, 1548 0xde, 0x4c, 0xcc, 0x6c, 0x8a, 0x8b, 0xae, 0x58, 0xa0, 0x1e, 0xe4, 0x2f, 0x12, 0x4e, 0xf9, 0xac, 1549 0xaf, 0xfd, 0x8d, 0x26, 0x9f, 0x98, 0x73, 0xa1, 0x5d, 0xc8, 0xf3, 0x4f, 0x3f, 0xf9, 0xbe, 0x1f, 1550 0xbf, 0x4a, 0xe2, 0x61, 0x61, 0xba, 0xf5, 0xb3, 0x02, 0x45, 0xa9, 0xf6, 0x72, 0x25, 0x55, 0xa1, 1551 0x74, 0x68, 0xf6, 0x6c, 0xa3, 0x63, 0x60, 0x55, 0x49, 0x4a, 0x62, 0xdf, 0x3c, 0xb4, 0x0d, 0xec, 1552 0xb4, 0xda, 0x4d, 0xb3, 0xa3, 0x66, 0x10, 0x82, 0x5a, 0xc7, 0xb0, 0xef, 0x59, 0xf8, 0x1b, 0x47, 1553 0x9c, 0xa8, 0x59, 0xb4, 0x06, 0x95, 0xb6, 0x6d, 0x77, 0x53, 0x20, 0x87, 0x36, 0x60, 0x9d, 0x0f, 1554 0x59, 0xa7, 0x65, 0x75, 0xf6, 0xcd, 0x83, 0x63, 0xdc, 0xb4, 0x4d, 0xab, 0x23, 0x4a, 0xec, 0xc4, 1555 0xc4, 0xf6, 0x71, 0xf3, 0xd0, 0x69, 0x5b, 0x49, 0x89, 0xa1, 0x1a, 0x00, 0xb7, 0x15, 0x43, 0xb9, 1556 0x98, 0x88, 0x69, 0x1d, 0x1e, 0xf7, 0x12, 0x9e, 0xd2, 0x96, 0x05, 0xd5, 0xf9, 0x72, 0x99, 0x4d, 1557 0xf1, 0x75, 0x58, 0xeb, 0x99, 0x7b, 0x46, 0xab, 0x89, 0x1d, 0xb3, 0xb3, 0x6b, 0x1d, 0x77, 0xf6, 1558 0x54, 0x05, 0x5d, 0x05, 0x35, 0x05, 0xad, 0x63, 0x5b, 0xa0, 0x99, 0x84, 0xf0, 0xa0, 0x69, 0x1b, 1559 0xf7, 0x9a, 0x0f, 0xd4, 0xec, 0xdd, 0x5c, 0x49, 0x51, 0x33, 0x77, 0x73, 0xa5, 0x8c, 0x9a, 0xc5, 1560 0x45, 0xd1, 0x60, 0x63, 0xbc, 0x36, 0xfd, 0x52, 0x0f, 0xdc, 0x3e, 0x09, 0xe2, 0x5d, 0xfd, 0xd7, 1561 0xa7, 0xd7, 0x95, 0x3f, 0x9e, 0x5e, 0x57, 0x9e, 0x3c, 0xbd, 0xae, 0x7c, 0xbb, 0x29, 0xc2, 0xeb, 1562 0x53, 0xfe, 0xf7, 0x61, 0xc1, 0x5f, 0x81, 0x7e, 0x81, 0xf7, 0xab, 0x9d, 0xff, 0x02, 0x00, 0x00, 1563 0xff, 0xff, 0x5f, 0x96, 0x10, 0xbc, 0xaa, 0x0c, 0x00, 0x00, 1564} 1565 1566func (m *EnvoyFilter) Marshal() (dAtA []byte, err error) { 1567 size := m.Size() 1568 dAtA = make([]byte, size) 1569 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1570 if err != nil { 1571 return nil, err 1572 } 1573 return dAtA[:n], nil 1574} 1575 1576func (m *EnvoyFilter) MarshalTo(dAtA []byte) (int, error) { 1577 size := m.Size() 1578 return m.MarshalToSizedBuffer(dAtA[:size]) 1579} 1580 1581func (m *EnvoyFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1582 i := len(dAtA) 1583 _ = i 1584 var l int 1585 _ = l 1586 if m.XXX_unrecognized != nil { 1587 i -= len(m.XXX_unrecognized) 1588 copy(dAtA[i:], m.XXX_unrecognized) 1589 } 1590 if len(m.ConfigPatches) > 0 { 1591 for iNdEx := len(m.ConfigPatches) - 1; iNdEx >= 0; iNdEx-- { 1592 { 1593 size, err := m.ConfigPatches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1594 if err != nil { 1595 return 0, err 1596 } 1597 i -= size 1598 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 1599 } 1600 i-- 1601 dAtA[i] = 0x22 1602 } 1603 } 1604 if m.WorkloadSelector != nil { 1605 { 1606 size, err := m.WorkloadSelector.MarshalToSizedBuffer(dAtA[:i]) 1607 if err != nil { 1608 return 0, err 1609 } 1610 i -= size 1611 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 1612 } 1613 i-- 1614 dAtA[i] = 0x1a 1615 } 1616 return len(dAtA) - i, nil 1617} 1618 1619func (m *EnvoyFilter_ProxyMatch) Marshal() (dAtA []byte, err error) { 1620 size := m.Size() 1621 dAtA = make([]byte, size) 1622 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1623 if err != nil { 1624 return nil, err 1625 } 1626 return dAtA[:n], nil 1627} 1628 1629func (m *EnvoyFilter_ProxyMatch) MarshalTo(dAtA []byte) (int, error) { 1630 size := m.Size() 1631 return m.MarshalToSizedBuffer(dAtA[:size]) 1632} 1633 1634func (m *EnvoyFilter_ProxyMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1635 i := len(dAtA) 1636 _ = i 1637 var l int 1638 _ = l 1639 if m.XXX_unrecognized != nil { 1640 i -= len(m.XXX_unrecognized) 1641 copy(dAtA[i:], m.XXX_unrecognized) 1642 } 1643 if len(m.Metadata) > 0 { 1644 for k := range m.Metadata { 1645 v := m.Metadata[k] 1646 baseI := i 1647 i -= len(v) 1648 copy(dAtA[i:], v) 1649 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(v))) 1650 i-- 1651 dAtA[i] = 0x12 1652 i -= len(k) 1653 copy(dAtA[i:], k) 1654 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(k))) 1655 i-- 1656 dAtA[i] = 0xa 1657 i = encodeVarintEnvoyFilter(dAtA, i, uint64(baseI-i)) 1658 i-- 1659 dAtA[i] = 0x12 1660 } 1661 } 1662 if len(m.ProxyVersion) > 0 { 1663 i -= len(m.ProxyVersion) 1664 copy(dAtA[i:], m.ProxyVersion) 1665 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.ProxyVersion))) 1666 i-- 1667 dAtA[i] = 0xa 1668 } 1669 return len(dAtA) - i, nil 1670} 1671 1672func (m *EnvoyFilter_ClusterMatch) Marshal() (dAtA []byte, err error) { 1673 size := m.Size() 1674 dAtA = make([]byte, size) 1675 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1676 if err != nil { 1677 return nil, err 1678 } 1679 return dAtA[:n], nil 1680} 1681 1682func (m *EnvoyFilter_ClusterMatch) MarshalTo(dAtA []byte) (int, error) { 1683 size := m.Size() 1684 return m.MarshalToSizedBuffer(dAtA[:size]) 1685} 1686 1687func (m *EnvoyFilter_ClusterMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1688 i := len(dAtA) 1689 _ = i 1690 var l int 1691 _ = l 1692 if m.XXX_unrecognized != nil { 1693 i -= len(m.XXX_unrecognized) 1694 copy(dAtA[i:], m.XXX_unrecognized) 1695 } 1696 if len(m.Name) > 0 { 1697 i -= len(m.Name) 1698 copy(dAtA[i:], m.Name) 1699 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 1700 i-- 1701 dAtA[i] = 0x22 1702 } 1703 if len(m.Subset) > 0 { 1704 i -= len(m.Subset) 1705 copy(dAtA[i:], m.Subset) 1706 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Subset))) 1707 i-- 1708 dAtA[i] = 0x1a 1709 } 1710 if len(m.Service) > 0 { 1711 i -= len(m.Service) 1712 copy(dAtA[i:], m.Service) 1713 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Service))) 1714 i-- 1715 dAtA[i] = 0x12 1716 } 1717 if m.PortNumber != 0 { 1718 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.PortNumber)) 1719 i-- 1720 dAtA[i] = 0x8 1721 } 1722 return len(dAtA) - i, nil 1723} 1724 1725func (m *EnvoyFilter_RouteConfigurationMatch) Marshal() (dAtA []byte, err error) { 1726 size := m.Size() 1727 dAtA = make([]byte, size) 1728 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1729 if err != nil { 1730 return nil, err 1731 } 1732 return dAtA[:n], nil 1733} 1734 1735func (m *EnvoyFilter_RouteConfigurationMatch) MarshalTo(dAtA []byte) (int, error) { 1736 size := m.Size() 1737 return m.MarshalToSizedBuffer(dAtA[:size]) 1738} 1739 1740func (m *EnvoyFilter_RouteConfigurationMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1741 i := len(dAtA) 1742 _ = i 1743 var l int 1744 _ = l 1745 if m.XXX_unrecognized != nil { 1746 i -= len(m.XXX_unrecognized) 1747 copy(dAtA[i:], m.XXX_unrecognized) 1748 } 1749 if len(m.Name) > 0 { 1750 i -= len(m.Name) 1751 copy(dAtA[i:], m.Name) 1752 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 1753 i-- 1754 dAtA[i] = 0x2a 1755 } 1756 if m.Vhost != nil { 1757 { 1758 size, err := m.Vhost.MarshalToSizedBuffer(dAtA[:i]) 1759 if err != nil { 1760 return 0, err 1761 } 1762 i -= size 1763 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 1764 } 1765 i-- 1766 dAtA[i] = 0x22 1767 } 1768 if len(m.Gateway) > 0 { 1769 i -= len(m.Gateway) 1770 copy(dAtA[i:], m.Gateway) 1771 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Gateway))) 1772 i-- 1773 dAtA[i] = 0x1a 1774 } 1775 if len(m.PortName) > 0 { 1776 i -= len(m.PortName) 1777 copy(dAtA[i:], m.PortName) 1778 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.PortName))) 1779 i-- 1780 dAtA[i] = 0x12 1781 } 1782 if m.PortNumber != 0 { 1783 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.PortNumber)) 1784 i-- 1785 dAtA[i] = 0x8 1786 } 1787 return len(dAtA) - i, nil 1788} 1789 1790func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) Marshal() (dAtA []byte, err error) { 1791 size := m.Size() 1792 dAtA = make([]byte, size) 1793 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1794 if err != nil { 1795 return nil, err 1796 } 1797 return dAtA[:n], nil 1798} 1799 1800func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) MarshalTo(dAtA []byte) (int, error) { 1801 size := m.Size() 1802 return m.MarshalToSizedBuffer(dAtA[:size]) 1803} 1804 1805func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1806 i := len(dAtA) 1807 _ = i 1808 var l int 1809 _ = l 1810 if m.XXX_unrecognized != nil { 1811 i -= len(m.XXX_unrecognized) 1812 copy(dAtA[i:], m.XXX_unrecognized) 1813 } 1814 if m.Action != 0 { 1815 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.Action)) 1816 i-- 1817 dAtA[i] = 0x10 1818 } 1819 if len(m.Name) > 0 { 1820 i -= len(m.Name) 1821 copy(dAtA[i:], m.Name) 1822 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 1823 i-- 1824 dAtA[i] = 0xa 1825 } 1826 return len(dAtA) - i, nil 1827} 1828 1829func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) Marshal() (dAtA []byte, err error) { 1830 size := m.Size() 1831 dAtA = make([]byte, size) 1832 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1833 if err != nil { 1834 return nil, err 1835 } 1836 return dAtA[:n], nil 1837} 1838 1839func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) MarshalTo(dAtA []byte) (int, error) { 1840 size := m.Size() 1841 return m.MarshalToSizedBuffer(dAtA[:size]) 1842} 1843 1844func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1845 i := len(dAtA) 1846 _ = i 1847 var l int 1848 _ = l 1849 if m.XXX_unrecognized != nil { 1850 i -= len(m.XXX_unrecognized) 1851 copy(dAtA[i:], m.XXX_unrecognized) 1852 } 1853 if m.Route != nil { 1854 { 1855 size, err := m.Route.MarshalToSizedBuffer(dAtA[:i]) 1856 if err != nil { 1857 return 0, err 1858 } 1859 i -= size 1860 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 1861 } 1862 i-- 1863 dAtA[i] = 0x12 1864 } 1865 if len(m.Name) > 0 { 1866 i -= len(m.Name) 1867 copy(dAtA[i:], m.Name) 1868 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 1869 i-- 1870 dAtA[i] = 0xa 1871 } 1872 return len(dAtA) - i, nil 1873} 1874 1875func (m *EnvoyFilter_ListenerMatch) Marshal() (dAtA []byte, err error) { 1876 size := m.Size() 1877 dAtA = make([]byte, size) 1878 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1879 if err != nil { 1880 return nil, err 1881 } 1882 return dAtA[:n], nil 1883} 1884 1885func (m *EnvoyFilter_ListenerMatch) MarshalTo(dAtA []byte) (int, error) { 1886 size := m.Size() 1887 return m.MarshalToSizedBuffer(dAtA[:size]) 1888} 1889 1890func (m *EnvoyFilter_ListenerMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1891 i := len(dAtA) 1892 _ = i 1893 var l int 1894 _ = l 1895 if m.XXX_unrecognized != nil { 1896 i -= len(m.XXX_unrecognized) 1897 copy(dAtA[i:], m.XXX_unrecognized) 1898 } 1899 if len(m.Name) > 0 { 1900 i -= len(m.Name) 1901 copy(dAtA[i:], m.Name) 1902 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 1903 i-- 1904 dAtA[i] = 0x22 1905 } 1906 if m.FilterChain != nil { 1907 { 1908 size, err := m.FilterChain.MarshalToSizedBuffer(dAtA[:i]) 1909 if err != nil { 1910 return 0, err 1911 } 1912 i -= size 1913 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 1914 } 1915 i-- 1916 dAtA[i] = 0x1a 1917 } 1918 if len(m.PortName) > 0 { 1919 i -= len(m.PortName) 1920 copy(dAtA[i:], m.PortName) 1921 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.PortName))) 1922 i-- 1923 dAtA[i] = 0x12 1924 } 1925 if m.PortNumber != 0 { 1926 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.PortNumber)) 1927 i-- 1928 dAtA[i] = 0x8 1929 } 1930 return len(dAtA) - i, nil 1931} 1932 1933func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) Marshal() (dAtA []byte, err error) { 1934 size := m.Size() 1935 dAtA = make([]byte, size) 1936 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1937 if err != nil { 1938 return nil, err 1939 } 1940 return dAtA[:n], nil 1941} 1942 1943func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) MarshalTo(dAtA []byte) (int, error) { 1944 size := m.Size() 1945 return m.MarshalToSizedBuffer(dAtA[:size]) 1946} 1947 1948func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1949 i := len(dAtA) 1950 _ = i 1951 var l int 1952 _ = l 1953 if m.XXX_unrecognized != nil { 1954 i -= len(m.XXX_unrecognized) 1955 copy(dAtA[i:], m.XXX_unrecognized) 1956 } 1957 if m.Filter != nil { 1958 { 1959 size, err := m.Filter.MarshalToSizedBuffer(dAtA[:i]) 1960 if err != nil { 1961 return 0, err 1962 } 1963 i -= size 1964 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 1965 } 1966 i-- 1967 dAtA[i] = 0x2a 1968 } 1969 if len(m.ApplicationProtocols) > 0 { 1970 i -= len(m.ApplicationProtocols) 1971 copy(dAtA[i:], m.ApplicationProtocols) 1972 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.ApplicationProtocols))) 1973 i-- 1974 dAtA[i] = 0x22 1975 } 1976 if len(m.TransportProtocol) > 0 { 1977 i -= len(m.TransportProtocol) 1978 copy(dAtA[i:], m.TransportProtocol) 1979 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.TransportProtocol))) 1980 i-- 1981 dAtA[i] = 0x1a 1982 } 1983 if len(m.Sni) > 0 { 1984 i -= len(m.Sni) 1985 copy(dAtA[i:], m.Sni) 1986 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Sni))) 1987 i-- 1988 dAtA[i] = 0x12 1989 } 1990 if len(m.Name) > 0 { 1991 i -= len(m.Name) 1992 copy(dAtA[i:], m.Name) 1993 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 1994 i-- 1995 dAtA[i] = 0xa 1996 } 1997 return len(dAtA) - i, nil 1998} 1999 2000func (m *EnvoyFilter_ListenerMatch_FilterMatch) Marshal() (dAtA []byte, err error) { 2001 size := m.Size() 2002 dAtA = make([]byte, size) 2003 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2004 if err != nil { 2005 return nil, err 2006 } 2007 return dAtA[:n], nil 2008} 2009 2010func (m *EnvoyFilter_ListenerMatch_FilterMatch) MarshalTo(dAtA []byte) (int, error) { 2011 size := m.Size() 2012 return m.MarshalToSizedBuffer(dAtA[:size]) 2013} 2014 2015func (m *EnvoyFilter_ListenerMatch_FilterMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2016 i := len(dAtA) 2017 _ = i 2018 var l int 2019 _ = l 2020 if m.XXX_unrecognized != nil { 2021 i -= len(m.XXX_unrecognized) 2022 copy(dAtA[i:], m.XXX_unrecognized) 2023 } 2024 if m.SubFilter != nil { 2025 { 2026 size, err := m.SubFilter.MarshalToSizedBuffer(dAtA[:i]) 2027 if err != nil { 2028 return 0, err 2029 } 2030 i -= size 2031 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2032 } 2033 i-- 2034 dAtA[i] = 0x12 2035 } 2036 if len(m.Name) > 0 { 2037 i -= len(m.Name) 2038 copy(dAtA[i:], m.Name) 2039 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 2040 i-- 2041 dAtA[i] = 0xa 2042 } 2043 return len(dAtA) - i, nil 2044} 2045 2046func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) Marshal() (dAtA []byte, err error) { 2047 size := m.Size() 2048 dAtA = make([]byte, size) 2049 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2050 if err != nil { 2051 return nil, err 2052 } 2053 return dAtA[:n], nil 2054} 2055 2056func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) MarshalTo(dAtA []byte) (int, error) { 2057 size := m.Size() 2058 return m.MarshalToSizedBuffer(dAtA[:size]) 2059} 2060 2061func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2062 i := len(dAtA) 2063 _ = i 2064 var l int 2065 _ = l 2066 if m.XXX_unrecognized != nil { 2067 i -= len(m.XXX_unrecognized) 2068 copy(dAtA[i:], m.XXX_unrecognized) 2069 } 2070 if len(m.Name) > 0 { 2071 i -= len(m.Name) 2072 copy(dAtA[i:], m.Name) 2073 i = encodeVarintEnvoyFilter(dAtA, i, uint64(len(m.Name))) 2074 i-- 2075 dAtA[i] = 0xa 2076 } 2077 return len(dAtA) - i, nil 2078} 2079 2080func (m *EnvoyFilter_Patch) Marshal() (dAtA []byte, err error) { 2081 size := m.Size() 2082 dAtA = make([]byte, size) 2083 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2084 if err != nil { 2085 return nil, err 2086 } 2087 return dAtA[:n], nil 2088} 2089 2090func (m *EnvoyFilter_Patch) MarshalTo(dAtA []byte) (int, error) { 2091 size := m.Size() 2092 return m.MarshalToSizedBuffer(dAtA[:size]) 2093} 2094 2095func (m *EnvoyFilter_Patch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2096 i := len(dAtA) 2097 _ = i 2098 var l int 2099 _ = l 2100 if m.XXX_unrecognized != nil { 2101 i -= len(m.XXX_unrecognized) 2102 copy(dAtA[i:], m.XXX_unrecognized) 2103 } 2104 if m.Value != nil { 2105 { 2106 size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) 2107 if err != nil { 2108 return 0, err 2109 } 2110 i -= size 2111 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2112 } 2113 i-- 2114 dAtA[i] = 0x12 2115 } 2116 if m.Operation != 0 { 2117 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.Operation)) 2118 i-- 2119 dAtA[i] = 0x8 2120 } 2121 return len(dAtA) - i, nil 2122} 2123 2124func (m *EnvoyFilter_EnvoyConfigObjectMatch) Marshal() (dAtA []byte, err error) { 2125 size := m.Size() 2126 dAtA = make([]byte, size) 2127 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2128 if err != nil { 2129 return nil, err 2130 } 2131 return dAtA[:n], nil 2132} 2133 2134func (m *EnvoyFilter_EnvoyConfigObjectMatch) MarshalTo(dAtA []byte) (int, error) { 2135 size := m.Size() 2136 return m.MarshalToSizedBuffer(dAtA[:size]) 2137} 2138 2139func (m *EnvoyFilter_EnvoyConfigObjectMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2140 i := len(dAtA) 2141 _ = i 2142 var l int 2143 _ = l 2144 if m.XXX_unrecognized != nil { 2145 i -= len(m.XXX_unrecognized) 2146 copy(dAtA[i:], m.XXX_unrecognized) 2147 } 2148 if m.ObjectTypes != nil { 2149 { 2150 size := m.ObjectTypes.Size() 2151 i -= size 2152 if _, err := m.ObjectTypes.MarshalTo(dAtA[i:]); err != nil { 2153 return 0, err 2154 } 2155 } 2156 } 2157 if m.Proxy != nil { 2158 { 2159 size, err := m.Proxy.MarshalToSizedBuffer(dAtA[:i]) 2160 if err != nil { 2161 return 0, err 2162 } 2163 i -= size 2164 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2165 } 2166 i-- 2167 dAtA[i] = 0x12 2168 } 2169 if m.Context != 0 { 2170 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.Context)) 2171 i-- 2172 dAtA[i] = 0x8 2173 } 2174 return len(dAtA) - i, nil 2175} 2176 2177func (m *EnvoyFilter_EnvoyConfigObjectMatch_Listener) MarshalTo(dAtA []byte) (int, error) { 2178 return m.MarshalToSizedBuffer(dAtA[:m.Size()]) 2179} 2180 2181func (m *EnvoyFilter_EnvoyConfigObjectMatch_Listener) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2182 i := len(dAtA) 2183 if m.Listener != nil { 2184 { 2185 size, err := m.Listener.MarshalToSizedBuffer(dAtA[:i]) 2186 if err != nil { 2187 return 0, err 2188 } 2189 i -= size 2190 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2191 } 2192 i-- 2193 dAtA[i] = 0x1a 2194 } 2195 return len(dAtA) - i, nil 2196} 2197func (m *EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration) MarshalTo(dAtA []byte) (int, error) { 2198 return m.MarshalToSizedBuffer(dAtA[:m.Size()]) 2199} 2200 2201func (m *EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2202 i := len(dAtA) 2203 if m.RouteConfiguration != nil { 2204 { 2205 size, err := m.RouteConfiguration.MarshalToSizedBuffer(dAtA[:i]) 2206 if err != nil { 2207 return 0, err 2208 } 2209 i -= size 2210 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2211 } 2212 i-- 2213 dAtA[i] = 0x22 2214 } 2215 return len(dAtA) - i, nil 2216} 2217func (m *EnvoyFilter_EnvoyConfigObjectMatch_Cluster) MarshalTo(dAtA []byte) (int, error) { 2218 return m.MarshalToSizedBuffer(dAtA[:m.Size()]) 2219} 2220 2221func (m *EnvoyFilter_EnvoyConfigObjectMatch_Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2222 i := len(dAtA) 2223 if m.Cluster != nil { 2224 { 2225 size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i]) 2226 if err != nil { 2227 return 0, err 2228 } 2229 i -= size 2230 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2231 } 2232 i-- 2233 dAtA[i] = 0x2a 2234 } 2235 return len(dAtA) - i, nil 2236} 2237func (m *EnvoyFilter_EnvoyConfigObjectPatch) Marshal() (dAtA []byte, err error) { 2238 size := m.Size() 2239 dAtA = make([]byte, size) 2240 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2241 if err != nil { 2242 return nil, err 2243 } 2244 return dAtA[:n], nil 2245} 2246 2247func (m *EnvoyFilter_EnvoyConfigObjectPatch) MarshalTo(dAtA []byte) (int, error) { 2248 size := m.Size() 2249 return m.MarshalToSizedBuffer(dAtA[:size]) 2250} 2251 2252func (m *EnvoyFilter_EnvoyConfigObjectPatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2253 i := len(dAtA) 2254 _ = i 2255 var l int 2256 _ = l 2257 if m.XXX_unrecognized != nil { 2258 i -= len(m.XXX_unrecognized) 2259 copy(dAtA[i:], m.XXX_unrecognized) 2260 } 2261 if m.Patch != nil { 2262 { 2263 size, err := m.Patch.MarshalToSizedBuffer(dAtA[:i]) 2264 if err != nil { 2265 return 0, err 2266 } 2267 i -= size 2268 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2269 } 2270 i-- 2271 dAtA[i] = 0x1a 2272 } 2273 if m.Match != nil { 2274 { 2275 size, err := m.Match.MarshalToSizedBuffer(dAtA[:i]) 2276 if err != nil { 2277 return 0, err 2278 } 2279 i -= size 2280 i = encodeVarintEnvoyFilter(dAtA, i, uint64(size)) 2281 } 2282 i-- 2283 dAtA[i] = 0x12 2284 } 2285 if m.ApplyTo != 0 { 2286 i = encodeVarintEnvoyFilter(dAtA, i, uint64(m.ApplyTo)) 2287 i-- 2288 dAtA[i] = 0x8 2289 } 2290 return len(dAtA) - i, nil 2291} 2292 2293func encodeVarintEnvoyFilter(dAtA []byte, offset int, v uint64) int { 2294 offset -= sovEnvoyFilter(v) 2295 base := offset 2296 for v >= 1<<7 { 2297 dAtA[offset] = uint8(v&0x7f | 0x80) 2298 v >>= 7 2299 offset++ 2300 } 2301 dAtA[offset] = uint8(v) 2302 return base 2303} 2304func (m *EnvoyFilter) Size() (n int) { 2305 if m == nil { 2306 return 0 2307 } 2308 var l int 2309 _ = l 2310 if m.WorkloadSelector != nil { 2311 l = m.WorkloadSelector.Size() 2312 n += 1 + l + sovEnvoyFilter(uint64(l)) 2313 } 2314 if len(m.ConfigPatches) > 0 { 2315 for _, e := range m.ConfigPatches { 2316 l = e.Size() 2317 n += 1 + l + sovEnvoyFilter(uint64(l)) 2318 } 2319 } 2320 if m.XXX_unrecognized != nil { 2321 n += len(m.XXX_unrecognized) 2322 } 2323 return n 2324} 2325 2326func (m *EnvoyFilter_ProxyMatch) Size() (n int) { 2327 if m == nil { 2328 return 0 2329 } 2330 var l int 2331 _ = l 2332 l = len(m.ProxyVersion) 2333 if l > 0 { 2334 n += 1 + l + sovEnvoyFilter(uint64(l)) 2335 } 2336 if len(m.Metadata) > 0 { 2337 for k, v := range m.Metadata { 2338 _ = k 2339 _ = v 2340 mapEntrySize := 1 + len(k) + sovEnvoyFilter(uint64(len(k))) + 1 + len(v) + sovEnvoyFilter(uint64(len(v))) 2341 n += mapEntrySize + 1 + sovEnvoyFilter(uint64(mapEntrySize)) 2342 } 2343 } 2344 if m.XXX_unrecognized != nil { 2345 n += len(m.XXX_unrecognized) 2346 } 2347 return n 2348} 2349 2350func (m *EnvoyFilter_ClusterMatch) Size() (n int) { 2351 if m == nil { 2352 return 0 2353 } 2354 var l int 2355 _ = l 2356 if m.PortNumber != 0 { 2357 n += 1 + sovEnvoyFilter(uint64(m.PortNumber)) 2358 } 2359 l = len(m.Service) 2360 if l > 0 { 2361 n += 1 + l + sovEnvoyFilter(uint64(l)) 2362 } 2363 l = len(m.Subset) 2364 if l > 0 { 2365 n += 1 + l + sovEnvoyFilter(uint64(l)) 2366 } 2367 l = len(m.Name) 2368 if l > 0 { 2369 n += 1 + l + sovEnvoyFilter(uint64(l)) 2370 } 2371 if m.XXX_unrecognized != nil { 2372 n += len(m.XXX_unrecognized) 2373 } 2374 return n 2375} 2376 2377func (m *EnvoyFilter_RouteConfigurationMatch) Size() (n int) { 2378 if m == nil { 2379 return 0 2380 } 2381 var l int 2382 _ = l 2383 if m.PortNumber != 0 { 2384 n += 1 + sovEnvoyFilter(uint64(m.PortNumber)) 2385 } 2386 l = len(m.PortName) 2387 if l > 0 { 2388 n += 1 + l + sovEnvoyFilter(uint64(l)) 2389 } 2390 l = len(m.Gateway) 2391 if l > 0 { 2392 n += 1 + l + sovEnvoyFilter(uint64(l)) 2393 } 2394 if m.Vhost != nil { 2395 l = m.Vhost.Size() 2396 n += 1 + l + sovEnvoyFilter(uint64(l)) 2397 } 2398 l = len(m.Name) 2399 if l > 0 { 2400 n += 1 + l + sovEnvoyFilter(uint64(l)) 2401 } 2402 if m.XXX_unrecognized != nil { 2403 n += len(m.XXX_unrecognized) 2404 } 2405 return n 2406} 2407 2408func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) Size() (n int) { 2409 if m == nil { 2410 return 0 2411 } 2412 var l int 2413 _ = l 2414 l = len(m.Name) 2415 if l > 0 { 2416 n += 1 + l + sovEnvoyFilter(uint64(l)) 2417 } 2418 if m.Action != 0 { 2419 n += 1 + sovEnvoyFilter(uint64(m.Action)) 2420 } 2421 if m.XXX_unrecognized != nil { 2422 n += len(m.XXX_unrecognized) 2423 } 2424 return n 2425} 2426 2427func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) Size() (n int) { 2428 if m == nil { 2429 return 0 2430 } 2431 var l int 2432 _ = l 2433 l = len(m.Name) 2434 if l > 0 { 2435 n += 1 + l + sovEnvoyFilter(uint64(l)) 2436 } 2437 if m.Route != nil { 2438 l = m.Route.Size() 2439 n += 1 + l + sovEnvoyFilter(uint64(l)) 2440 } 2441 if m.XXX_unrecognized != nil { 2442 n += len(m.XXX_unrecognized) 2443 } 2444 return n 2445} 2446 2447func (m *EnvoyFilter_ListenerMatch) Size() (n int) { 2448 if m == nil { 2449 return 0 2450 } 2451 var l int 2452 _ = l 2453 if m.PortNumber != 0 { 2454 n += 1 + sovEnvoyFilter(uint64(m.PortNumber)) 2455 } 2456 l = len(m.PortName) 2457 if l > 0 { 2458 n += 1 + l + sovEnvoyFilter(uint64(l)) 2459 } 2460 if m.FilterChain != nil { 2461 l = m.FilterChain.Size() 2462 n += 1 + l + sovEnvoyFilter(uint64(l)) 2463 } 2464 l = len(m.Name) 2465 if l > 0 { 2466 n += 1 + l + sovEnvoyFilter(uint64(l)) 2467 } 2468 if m.XXX_unrecognized != nil { 2469 n += len(m.XXX_unrecognized) 2470 } 2471 return n 2472} 2473 2474func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) Size() (n int) { 2475 if m == nil { 2476 return 0 2477 } 2478 var l int 2479 _ = l 2480 l = len(m.Name) 2481 if l > 0 { 2482 n += 1 + l + sovEnvoyFilter(uint64(l)) 2483 } 2484 l = len(m.Sni) 2485 if l > 0 { 2486 n += 1 + l + sovEnvoyFilter(uint64(l)) 2487 } 2488 l = len(m.TransportProtocol) 2489 if l > 0 { 2490 n += 1 + l + sovEnvoyFilter(uint64(l)) 2491 } 2492 l = len(m.ApplicationProtocols) 2493 if l > 0 { 2494 n += 1 + l + sovEnvoyFilter(uint64(l)) 2495 } 2496 if m.Filter != nil { 2497 l = m.Filter.Size() 2498 n += 1 + l + sovEnvoyFilter(uint64(l)) 2499 } 2500 if m.XXX_unrecognized != nil { 2501 n += len(m.XXX_unrecognized) 2502 } 2503 return n 2504} 2505 2506func (m *EnvoyFilter_ListenerMatch_FilterMatch) Size() (n int) { 2507 if m == nil { 2508 return 0 2509 } 2510 var l int 2511 _ = l 2512 l = len(m.Name) 2513 if l > 0 { 2514 n += 1 + l + sovEnvoyFilter(uint64(l)) 2515 } 2516 if m.SubFilter != nil { 2517 l = m.SubFilter.Size() 2518 n += 1 + l + sovEnvoyFilter(uint64(l)) 2519 } 2520 if m.XXX_unrecognized != nil { 2521 n += len(m.XXX_unrecognized) 2522 } 2523 return n 2524} 2525 2526func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) Size() (n int) { 2527 if m == nil { 2528 return 0 2529 } 2530 var l int 2531 _ = l 2532 l = len(m.Name) 2533 if l > 0 { 2534 n += 1 + l + sovEnvoyFilter(uint64(l)) 2535 } 2536 if m.XXX_unrecognized != nil { 2537 n += len(m.XXX_unrecognized) 2538 } 2539 return n 2540} 2541 2542func (m *EnvoyFilter_Patch) Size() (n int) { 2543 if m == nil { 2544 return 0 2545 } 2546 var l int 2547 _ = l 2548 if m.Operation != 0 { 2549 n += 1 + sovEnvoyFilter(uint64(m.Operation)) 2550 } 2551 if m.Value != nil { 2552 l = m.Value.Size() 2553 n += 1 + l + sovEnvoyFilter(uint64(l)) 2554 } 2555 if m.XXX_unrecognized != nil { 2556 n += len(m.XXX_unrecognized) 2557 } 2558 return n 2559} 2560 2561func (m *EnvoyFilter_EnvoyConfigObjectMatch) Size() (n int) { 2562 if m == nil { 2563 return 0 2564 } 2565 var l int 2566 _ = l 2567 if m.Context != 0 { 2568 n += 1 + sovEnvoyFilter(uint64(m.Context)) 2569 } 2570 if m.Proxy != nil { 2571 l = m.Proxy.Size() 2572 n += 1 + l + sovEnvoyFilter(uint64(l)) 2573 } 2574 if m.ObjectTypes != nil { 2575 n += m.ObjectTypes.Size() 2576 } 2577 if m.XXX_unrecognized != nil { 2578 n += len(m.XXX_unrecognized) 2579 } 2580 return n 2581} 2582 2583func (m *EnvoyFilter_EnvoyConfigObjectMatch_Listener) Size() (n int) { 2584 if m == nil { 2585 return 0 2586 } 2587 var l int 2588 _ = l 2589 if m.Listener != nil { 2590 l = m.Listener.Size() 2591 n += 1 + l + sovEnvoyFilter(uint64(l)) 2592 } 2593 return n 2594} 2595func (m *EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration) Size() (n int) { 2596 if m == nil { 2597 return 0 2598 } 2599 var l int 2600 _ = l 2601 if m.RouteConfiguration != nil { 2602 l = m.RouteConfiguration.Size() 2603 n += 1 + l + sovEnvoyFilter(uint64(l)) 2604 } 2605 return n 2606} 2607func (m *EnvoyFilter_EnvoyConfigObjectMatch_Cluster) Size() (n int) { 2608 if m == nil { 2609 return 0 2610 } 2611 var l int 2612 _ = l 2613 if m.Cluster != nil { 2614 l = m.Cluster.Size() 2615 n += 1 + l + sovEnvoyFilter(uint64(l)) 2616 } 2617 return n 2618} 2619func (m *EnvoyFilter_EnvoyConfigObjectPatch) Size() (n int) { 2620 if m == nil { 2621 return 0 2622 } 2623 var l int 2624 _ = l 2625 if m.ApplyTo != 0 { 2626 n += 1 + sovEnvoyFilter(uint64(m.ApplyTo)) 2627 } 2628 if m.Match != nil { 2629 l = m.Match.Size() 2630 n += 1 + l + sovEnvoyFilter(uint64(l)) 2631 } 2632 if m.Patch != nil { 2633 l = m.Patch.Size() 2634 n += 1 + l + sovEnvoyFilter(uint64(l)) 2635 } 2636 if m.XXX_unrecognized != nil { 2637 n += len(m.XXX_unrecognized) 2638 } 2639 return n 2640} 2641 2642func sovEnvoyFilter(x uint64) (n int) { 2643 return (math_bits.Len64(x|1) + 6) / 7 2644} 2645func sozEnvoyFilter(x uint64) (n int) { 2646 return sovEnvoyFilter(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2647} 2648func (m *EnvoyFilter) Unmarshal(dAtA []byte) error { 2649 l := len(dAtA) 2650 iNdEx := 0 2651 for iNdEx < l { 2652 preIndex := iNdEx 2653 var wire uint64 2654 for shift := uint(0); ; shift += 7 { 2655 if shift >= 64 { 2656 return ErrIntOverflowEnvoyFilter 2657 } 2658 if iNdEx >= l { 2659 return io.ErrUnexpectedEOF 2660 } 2661 b := dAtA[iNdEx] 2662 iNdEx++ 2663 wire |= uint64(b&0x7F) << shift 2664 if b < 0x80 { 2665 break 2666 } 2667 } 2668 fieldNum := int32(wire >> 3) 2669 wireType := int(wire & 0x7) 2670 if wireType == 4 { 2671 return fmt.Errorf("proto: EnvoyFilter: wiretype end group for non-group") 2672 } 2673 if fieldNum <= 0 { 2674 return fmt.Errorf("proto: EnvoyFilter: illegal tag %d (wire type %d)", fieldNum, wire) 2675 } 2676 switch fieldNum { 2677 case 3: 2678 if wireType != 2 { 2679 return fmt.Errorf("proto: wrong wireType = %d for field WorkloadSelector", wireType) 2680 } 2681 var msglen int 2682 for shift := uint(0); ; shift += 7 { 2683 if shift >= 64 { 2684 return ErrIntOverflowEnvoyFilter 2685 } 2686 if iNdEx >= l { 2687 return io.ErrUnexpectedEOF 2688 } 2689 b := dAtA[iNdEx] 2690 iNdEx++ 2691 msglen |= int(b&0x7F) << shift 2692 if b < 0x80 { 2693 break 2694 } 2695 } 2696 if msglen < 0 { 2697 return ErrInvalidLengthEnvoyFilter 2698 } 2699 postIndex := iNdEx + msglen 2700 if postIndex < 0 { 2701 return ErrInvalidLengthEnvoyFilter 2702 } 2703 if postIndex > l { 2704 return io.ErrUnexpectedEOF 2705 } 2706 if m.WorkloadSelector == nil { 2707 m.WorkloadSelector = &WorkloadSelector{} 2708 } 2709 if err := m.WorkloadSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2710 return err 2711 } 2712 iNdEx = postIndex 2713 case 4: 2714 if wireType != 2 { 2715 return fmt.Errorf("proto: wrong wireType = %d for field ConfigPatches", wireType) 2716 } 2717 var msglen int 2718 for shift := uint(0); ; shift += 7 { 2719 if shift >= 64 { 2720 return ErrIntOverflowEnvoyFilter 2721 } 2722 if iNdEx >= l { 2723 return io.ErrUnexpectedEOF 2724 } 2725 b := dAtA[iNdEx] 2726 iNdEx++ 2727 msglen |= int(b&0x7F) << shift 2728 if b < 0x80 { 2729 break 2730 } 2731 } 2732 if msglen < 0 { 2733 return ErrInvalidLengthEnvoyFilter 2734 } 2735 postIndex := iNdEx + msglen 2736 if postIndex < 0 { 2737 return ErrInvalidLengthEnvoyFilter 2738 } 2739 if postIndex > l { 2740 return io.ErrUnexpectedEOF 2741 } 2742 m.ConfigPatches = append(m.ConfigPatches, &EnvoyFilter_EnvoyConfigObjectPatch{}) 2743 if err := m.ConfigPatches[len(m.ConfigPatches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2744 return err 2745 } 2746 iNdEx = postIndex 2747 default: 2748 iNdEx = preIndex 2749 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 2750 if err != nil { 2751 return err 2752 } 2753 if skippy < 0 { 2754 return ErrInvalidLengthEnvoyFilter 2755 } 2756 if (iNdEx + skippy) < 0 { 2757 return ErrInvalidLengthEnvoyFilter 2758 } 2759 if (iNdEx + skippy) > l { 2760 return io.ErrUnexpectedEOF 2761 } 2762 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2763 iNdEx += skippy 2764 } 2765 } 2766 2767 if iNdEx > l { 2768 return io.ErrUnexpectedEOF 2769 } 2770 return nil 2771} 2772func (m *EnvoyFilter_ProxyMatch) Unmarshal(dAtA []byte) error { 2773 l := len(dAtA) 2774 iNdEx := 0 2775 for iNdEx < l { 2776 preIndex := iNdEx 2777 var wire uint64 2778 for shift := uint(0); ; shift += 7 { 2779 if shift >= 64 { 2780 return ErrIntOverflowEnvoyFilter 2781 } 2782 if iNdEx >= l { 2783 return io.ErrUnexpectedEOF 2784 } 2785 b := dAtA[iNdEx] 2786 iNdEx++ 2787 wire |= uint64(b&0x7F) << shift 2788 if b < 0x80 { 2789 break 2790 } 2791 } 2792 fieldNum := int32(wire >> 3) 2793 wireType := int(wire & 0x7) 2794 if wireType == 4 { 2795 return fmt.Errorf("proto: ProxyMatch: wiretype end group for non-group") 2796 } 2797 if fieldNum <= 0 { 2798 return fmt.Errorf("proto: ProxyMatch: illegal tag %d (wire type %d)", fieldNum, wire) 2799 } 2800 switch fieldNum { 2801 case 1: 2802 if wireType != 2 { 2803 return fmt.Errorf("proto: wrong wireType = %d for field ProxyVersion", wireType) 2804 } 2805 var stringLen uint64 2806 for shift := uint(0); ; shift += 7 { 2807 if shift >= 64 { 2808 return ErrIntOverflowEnvoyFilter 2809 } 2810 if iNdEx >= l { 2811 return io.ErrUnexpectedEOF 2812 } 2813 b := dAtA[iNdEx] 2814 iNdEx++ 2815 stringLen |= uint64(b&0x7F) << shift 2816 if b < 0x80 { 2817 break 2818 } 2819 } 2820 intStringLen := int(stringLen) 2821 if intStringLen < 0 { 2822 return ErrInvalidLengthEnvoyFilter 2823 } 2824 postIndex := iNdEx + intStringLen 2825 if postIndex < 0 { 2826 return ErrInvalidLengthEnvoyFilter 2827 } 2828 if postIndex > l { 2829 return io.ErrUnexpectedEOF 2830 } 2831 m.ProxyVersion = string(dAtA[iNdEx:postIndex]) 2832 iNdEx = postIndex 2833 case 2: 2834 if wireType != 2 { 2835 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 2836 } 2837 var msglen int 2838 for shift := uint(0); ; shift += 7 { 2839 if shift >= 64 { 2840 return ErrIntOverflowEnvoyFilter 2841 } 2842 if iNdEx >= l { 2843 return io.ErrUnexpectedEOF 2844 } 2845 b := dAtA[iNdEx] 2846 iNdEx++ 2847 msglen |= int(b&0x7F) << shift 2848 if b < 0x80 { 2849 break 2850 } 2851 } 2852 if msglen < 0 { 2853 return ErrInvalidLengthEnvoyFilter 2854 } 2855 postIndex := iNdEx + msglen 2856 if postIndex < 0 { 2857 return ErrInvalidLengthEnvoyFilter 2858 } 2859 if postIndex > l { 2860 return io.ErrUnexpectedEOF 2861 } 2862 if m.Metadata == nil { 2863 m.Metadata = make(map[string]string) 2864 } 2865 var mapkey string 2866 var mapvalue string 2867 for iNdEx < postIndex { 2868 entryPreIndex := iNdEx 2869 var wire uint64 2870 for shift := uint(0); ; shift += 7 { 2871 if shift >= 64 { 2872 return ErrIntOverflowEnvoyFilter 2873 } 2874 if iNdEx >= l { 2875 return io.ErrUnexpectedEOF 2876 } 2877 b := dAtA[iNdEx] 2878 iNdEx++ 2879 wire |= uint64(b&0x7F) << shift 2880 if b < 0x80 { 2881 break 2882 } 2883 } 2884 fieldNum := int32(wire >> 3) 2885 if fieldNum == 1 { 2886 var stringLenmapkey uint64 2887 for shift := uint(0); ; shift += 7 { 2888 if shift >= 64 { 2889 return ErrIntOverflowEnvoyFilter 2890 } 2891 if iNdEx >= l { 2892 return io.ErrUnexpectedEOF 2893 } 2894 b := dAtA[iNdEx] 2895 iNdEx++ 2896 stringLenmapkey |= uint64(b&0x7F) << shift 2897 if b < 0x80 { 2898 break 2899 } 2900 } 2901 intStringLenmapkey := int(stringLenmapkey) 2902 if intStringLenmapkey < 0 { 2903 return ErrInvalidLengthEnvoyFilter 2904 } 2905 postStringIndexmapkey := iNdEx + intStringLenmapkey 2906 if postStringIndexmapkey < 0 { 2907 return ErrInvalidLengthEnvoyFilter 2908 } 2909 if postStringIndexmapkey > l { 2910 return io.ErrUnexpectedEOF 2911 } 2912 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 2913 iNdEx = postStringIndexmapkey 2914 } else if fieldNum == 2 { 2915 var stringLenmapvalue uint64 2916 for shift := uint(0); ; shift += 7 { 2917 if shift >= 64 { 2918 return ErrIntOverflowEnvoyFilter 2919 } 2920 if iNdEx >= l { 2921 return io.ErrUnexpectedEOF 2922 } 2923 b := dAtA[iNdEx] 2924 iNdEx++ 2925 stringLenmapvalue |= uint64(b&0x7F) << shift 2926 if b < 0x80 { 2927 break 2928 } 2929 } 2930 intStringLenmapvalue := int(stringLenmapvalue) 2931 if intStringLenmapvalue < 0 { 2932 return ErrInvalidLengthEnvoyFilter 2933 } 2934 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 2935 if postStringIndexmapvalue < 0 { 2936 return ErrInvalidLengthEnvoyFilter 2937 } 2938 if postStringIndexmapvalue > l { 2939 return io.ErrUnexpectedEOF 2940 } 2941 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 2942 iNdEx = postStringIndexmapvalue 2943 } else { 2944 iNdEx = entryPreIndex 2945 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 2946 if err != nil { 2947 return err 2948 } 2949 if skippy < 0 { 2950 return ErrInvalidLengthEnvoyFilter 2951 } 2952 if (iNdEx + skippy) > postIndex { 2953 return io.ErrUnexpectedEOF 2954 } 2955 iNdEx += skippy 2956 } 2957 } 2958 m.Metadata[mapkey] = mapvalue 2959 iNdEx = postIndex 2960 default: 2961 iNdEx = preIndex 2962 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 2963 if err != nil { 2964 return err 2965 } 2966 if skippy < 0 { 2967 return ErrInvalidLengthEnvoyFilter 2968 } 2969 if (iNdEx + skippy) < 0 { 2970 return ErrInvalidLengthEnvoyFilter 2971 } 2972 if (iNdEx + skippy) > l { 2973 return io.ErrUnexpectedEOF 2974 } 2975 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2976 iNdEx += skippy 2977 } 2978 } 2979 2980 if iNdEx > l { 2981 return io.ErrUnexpectedEOF 2982 } 2983 return nil 2984} 2985func (m *EnvoyFilter_ClusterMatch) Unmarshal(dAtA []byte) error { 2986 l := len(dAtA) 2987 iNdEx := 0 2988 for iNdEx < l { 2989 preIndex := iNdEx 2990 var wire uint64 2991 for shift := uint(0); ; shift += 7 { 2992 if shift >= 64 { 2993 return ErrIntOverflowEnvoyFilter 2994 } 2995 if iNdEx >= l { 2996 return io.ErrUnexpectedEOF 2997 } 2998 b := dAtA[iNdEx] 2999 iNdEx++ 3000 wire |= uint64(b&0x7F) << shift 3001 if b < 0x80 { 3002 break 3003 } 3004 } 3005 fieldNum := int32(wire >> 3) 3006 wireType := int(wire & 0x7) 3007 if wireType == 4 { 3008 return fmt.Errorf("proto: ClusterMatch: wiretype end group for non-group") 3009 } 3010 if fieldNum <= 0 { 3011 return fmt.Errorf("proto: ClusterMatch: illegal tag %d (wire type %d)", fieldNum, wire) 3012 } 3013 switch fieldNum { 3014 case 1: 3015 if wireType != 0 { 3016 return fmt.Errorf("proto: wrong wireType = %d for field PortNumber", wireType) 3017 } 3018 m.PortNumber = 0 3019 for shift := uint(0); ; shift += 7 { 3020 if shift >= 64 { 3021 return ErrIntOverflowEnvoyFilter 3022 } 3023 if iNdEx >= l { 3024 return io.ErrUnexpectedEOF 3025 } 3026 b := dAtA[iNdEx] 3027 iNdEx++ 3028 m.PortNumber |= uint32(b&0x7F) << shift 3029 if b < 0x80 { 3030 break 3031 } 3032 } 3033 case 2: 3034 if wireType != 2 { 3035 return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) 3036 } 3037 var stringLen uint64 3038 for shift := uint(0); ; shift += 7 { 3039 if shift >= 64 { 3040 return ErrIntOverflowEnvoyFilter 3041 } 3042 if iNdEx >= l { 3043 return io.ErrUnexpectedEOF 3044 } 3045 b := dAtA[iNdEx] 3046 iNdEx++ 3047 stringLen |= uint64(b&0x7F) << shift 3048 if b < 0x80 { 3049 break 3050 } 3051 } 3052 intStringLen := int(stringLen) 3053 if intStringLen < 0 { 3054 return ErrInvalidLengthEnvoyFilter 3055 } 3056 postIndex := iNdEx + intStringLen 3057 if postIndex < 0 { 3058 return ErrInvalidLengthEnvoyFilter 3059 } 3060 if postIndex > l { 3061 return io.ErrUnexpectedEOF 3062 } 3063 m.Service = string(dAtA[iNdEx:postIndex]) 3064 iNdEx = postIndex 3065 case 3: 3066 if wireType != 2 { 3067 return fmt.Errorf("proto: wrong wireType = %d for field Subset", wireType) 3068 } 3069 var stringLen uint64 3070 for shift := uint(0); ; shift += 7 { 3071 if shift >= 64 { 3072 return ErrIntOverflowEnvoyFilter 3073 } 3074 if iNdEx >= l { 3075 return io.ErrUnexpectedEOF 3076 } 3077 b := dAtA[iNdEx] 3078 iNdEx++ 3079 stringLen |= uint64(b&0x7F) << shift 3080 if b < 0x80 { 3081 break 3082 } 3083 } 3084 intStringLen := int(stringLen) 3085 if intStringLen < 0 { 3086 return ErrInvalidLengthEnvoyFilter 3087 } 3088 postIndex := iNdEx + intStringLen 3089 if postIndex < 0 { 3090 return ErrInvalidLengthEnvoyFilter 3091 } 3092 if postIndex > l { 3093 return io.ErrUnexpectedEOF 3094 } 3095 m.Subset = string(dAtA[iNdEx:postIndex]) 3096 iNdEx = postIndex 3097 case 4: 3098 if wireType != 2 { 3099 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3100 } 3101 var stringLen uint64 3102 for shift := uint(0); ; shift += 7 { 3103 if shift >= 64 { 3104 return ErrIntOverflowEnvoyFilter 3105 } 3106 if iNdEx >= l { 3107 return io.ErrUnexpectedEOF 3108 } 3109 b := dAtA[iNdEx] 3110 iNdEx++ 3111 stringLen |= uint64(b&0x7F) << shift 3112 if b < 0x80 { 3113 break 3114 } 3115 } 3116 intStringLen := int(stringLen) 3117 if intStringLen < 0 { 3118 return ErrInvalidLengthEnvoyFilter 3119 } 3120 postIndex := iNdEx + intStringLen 3121 if postIndex < 0 { 3122 return ErrInvalidLengthEnvoyFilter 3123 } 3124 if postIndex > l { 3125 return io.ErrUnexpectedEOF 3126 } 3127 m.Name = string(dAtA[iNdEx:postIndex]) 3128 iNdEx = postIndex 3129 default: 3130 iNdEx = preIndex 3131 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 3132 if err != nil { 3133 return err 3134 } 3135 if skippy < 0 { 3136 return ErrInvalidLengthEnvoyFilter 3137 } 3138 if (iNdEx + skippy) < 0 { 3139 return ErrInvalidLengthEnvoyFilter 3140 } 3141 if (iNdEx + skippy) > l { 3142 return io.ErrUnexpectedEOF 3143 } 3144 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3145 iNdEx += skippy 3146 } 3147 } 3148 3149 if iNdEx > l { 3150 return io.ErrUnexpectedEOF 3151 } 3152 return nil 3153} 3154func (m *EnvoyFilter_RouteConfigurationMatch) Unmarshal(dAtA []byte) error { 3155 l := len(dAtA) 3156 iNdEx := 0 3157 for iNdEx < l { 3158 preIndex := iNdEx 3159 var wire uint64 3160 for shift := uint(0); ; shift += 7 { 3161 if shift >= 64 { 3162 return ErrIntOverflowEnvoyFilter 3163 } 3164 if iNdEx >= l { 3165 return io.ErrUnexpectedEOF 3166 } 3167 b := dAtA[iNdEx] 3168 iNdEx++ 3169 wire |= uint64(b&0x7F) << shift 3170 if b < 0x80 { 3171 break 3172 } 3173 } 3174 fieldNum := int32(wire >> 3) 3175 wireType := int(wire & 0x7) 3176 if wireType == 4 { 3177 return fmt.Errorf("proto: RouteConfigurationMatch: wiretype end group for non-group") 3178 } 3179 if fieldNum <= 0 { 3180 return fmt.Errorf("proto: RouteConfigurationMatch: illegal tag %d (wire type %d)", fieldNum, wire) 3181 } 3182 switch fieldNum { 3183 case 1: 3184 if wireType != 0 { 3185 return fmt.Errorf("proto: wrong wireType = %d for field PortNumber", wireType) 3186 } 3187 m.PortNumber = 0 3188 for shift := uint(0); ; shift += 7 { 3189 if shift >= 64 { 3190 return ErrIntOverflowEnvoyFilter 3191 } 3192 if iNdEx >= l { 3193 return io.ErrUnexpectedEOF 3194 } 3195 b := dAtA[iNdEx] 3196 iNdEx++ 3197 m.PortNumber |= uint32(b&0x7F) << shift 3198 if b < 0x80 { 3199 break 3200 } 3201 } 3202 case 2: 3203 if wireType != 2 { 3204 return fmt.Errorf("proto: wrong wireType = %d for field PortName", wireType) 3205 } 3206 var stringLen uint64 3207 for shift := uint(0); ; shift += 7 { 3208 if shift >= 64 { 3209 return ErrIntOverflowEnvoyFilter 3210 } 3211 if iNdEx >= l { 3212 return io.ErrUnexpectedEOF 3213 } 3214 b := dAtA[iNdEx] 3215 iNdEx++ 3216 stringLen |= uint64(b&0x7F) << shift 3217 if b < 0x80 { 3218 break 3219 } 3220 } 3221 intStringLen := int(stringLen) 3222 if intStringLen < 0 { 3223 return ErrInvalidLengthEnvoyFilter 3224 } 3225 postIndex := iNdEx + intStringLen 3226 if postIndex < 0 { 3227 return ErrInvalidLengthEnvoyFilter 3228 } 3229 if postIndex > l { 3230 return io.ErrUnexpectedEOF 3231 } 3232 m.PortName = string(dAtA[iNdEx:postIndex]) 3233 iNdEx = postIndex 3234 case 3: 3235 if wireType != 2 { 3236 return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) 3237 } 3238 var stringLen uint64 3239 for shift := uint(0); ; shift += 7 { 3240 if shift >= 64 { 3241 return ErrIntOverflowEnvoyFilter 3242 } 3243 if iNdEx >= l { 3244 return io.ErrUnexpectedEOF 3245 } 3246 b := dAtA[iNdEx] 3247 iNdEx++ 3248 stringLen |= uint64(b&0x7F) << shift 3249 if b < 0x80 { 3250 break 3251 } 3252 } 3253 intStringLen := int(stringLen) 3254 if intStringLen < 0 { 3255 return ErrInvalidLengthEnvoyFilter 3256 } 3257 postIndex := iNdEx + intStringLen 3258 if postIndex < 0 { 3259 return ErrInvalidLengthEnvoyFilter 3260 } 3261 if postIndex > l { 3262 return io.ErrUnexpectedEOF 3263 } 3264 m.Gateway = string(dAtA[iNdEx:postIndex]) 3265 iNdEx = postIndex 3266 case 4: 3267 if wireType != 2 { 3268 return fmt.Errorf("proto: wrong wireType = %d for field Vhost", wireType) 3269 } 3270 var msglen int 3271 for shift := uint(0); ; shift += 7 { 3272 if shift >= 64 { 3273 return ErrIntOverflowEnvoyFilter 3274 } 3275 if iNdEx >= l { 3276 return io.ErrUnexpectedEOF 3277 } 3278 b := dAtA[iNdEx] 3279 iNdEx++ 3280 msglen |= int(b&0x7F) << shift 3281 if b < 0x80 { 3282 break 3283 } 3284 } 3285 if msglen < 0 { 3286 return ErrInvalidLengthEnvoyFilter 3287 } 3288 postIndex := iNdEx + msglen 3289 if postIndex < 0 { 3290 return ErrInvalidLengthEnvoyFilter 3291 } 3292 if postIndex > l { 3293 return io.ErrUnexpectedEOF 3294 } 3295 if m.Vhost == nil { 3296 m.Vhost = &EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch{} 3297 } 3298 if err := m.Vhost.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3299 return err 3300 } 3301 iNdEx = postIndex 3302 case 5: 3303 if wireType != 2 { 3304 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3305 } 3306 var stringLen uint64 3307 for shift := uint(0); ; shift += 7 { 3308 if shift >= 64 { 3309 return ErrIntOverflowEnvoyFilter 3310 } 3311 if iNdEx >= l { 3312 return io.ErrUnexpectedEOF 3313 } 3314 b := dAtA[iNdEx] 3315 iNdEx++ 3316 stringLen |= uint64(b&0x7F) << shift 3317 if b < 0x80 { 3318 break 3319 } 3320 } 3321 intStringLen := int(stringLen) 3322 if intStringLen < 0 { 3323 return ErrInvalidLengthEnvoyFilter 3324 } 3325 postIndex := iNdEx + intStringLen 3326 if postIndex < 0 { 3327 return ErrInvalidLengthEnvoyFilter 3328 } 3329 if postIndex > l { 3330 return io.ErrUnexpectedEOF 3331 } 3332 m.Name = string(dAtA[iNdEx:postIndex]) 3333 iNdEx = postIndex 3334 default: 3335 iNdEx = preIndex 3336 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 3337 if err != nil { 3338 return err 3339 } 3340 if skippy < 0 { 3341 return ErrInvalidLengthEnvoyFilter 3342 } 3343 if (iNdEx + skippy) < 0 { 3344 return ErrInvalidLengthEnvoyFilter 3345 } 3346 if (iNdEx + skippy) > l { 3347 return io.ErrUnexpectedEOF 3348 } 3349 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3350 iNdEx += skippy 3351 } 3352 } 3353 3354 if iNdEx > l { 3355 return io.ErrUnexpectedEOF 3356 } 3357 return nil 3358} 3359func (m *EnvoyFilter_RouteConfigurationMatch_RouteMatch) Unmarshal(dAtA []byte) error { 3360 l := len(dAtA) 3361 iNdEx := 0 3362 for iNdEx < l { 3363 preIndex := iNdEx 3364 var wire uint64 3365 for shift := uint(0); ; shift += 7 { 3366 if shift >= 64 { 3367 return ErrIntOverflowEnvoyFilter 3368 } 3369 if iNdEx >= l { 3370 return io.ErrUnexpectedEOF 3371 } 3372 b := dAtA[iNdEx] 3373 iNdEx++ 3374 wire |= uint64(b&0x7F) << shift 3375 if b < 0x80 { 3376 break 3377 } 3378 } 3379 fieldNum := int32(wire >> 3) 3380 wireType := int(wire & 0x7) 3381 if wireType == 4 { 3382 return fmt.Errorf("proto: RouteMatch: wiretype end group for non-group") 3383 } 3384 if fieldNum <= 0 { 3385 return fmt.Errorf("proto: RouteMatch: illegal tag %d (wire type %d)", fieldNum, wire) 3386 } 3387 switch fieldNum { 3388 case 1: 3389 if wireType != 2 { 3390 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3391 } 3392 var stringLen uint64 3393 for shift := uint(0); ; shift += 7 { 3394 if shift >= 64 { 3395 return ErrIntOverflowEnvoyFilter 3396 } 3397 if iNdEx >= l { 3398 return io.ErrUnexpectedEOF 3399 } 3400 b := dAtA[iNdEx] 3401 iNdEx++ 3402 stringLen |= uint64(b&0x7F) << shift 3403 if b < 0x80 { 3404 break 3405 } 3406 } 3407 intStringLen := int(stringLen) 3408 if intStringLen < 0 { 3409 return ErrInvalidLengthEnvoyFilter 3410 } 3411 postIndex := iNdEx + intStringLen 3412 if postIndex < 0 { 3413 return ErrInvalidLengthEnvoyFilter 3414 } 3415 if postIndex > l { 3416 return io.ErrUnexpectedEOF 3417 } 3418 m.Name = string(dAtA[iNdEx:postIndex]) 3419 iNdEx = postIndex 3420 case 2: 3421 if wireType != 0 { 3422 return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) 3423 } 3424 m.Action = 0 3425 for shift := uint(0); ; shift += 7 { 3426 if shift >= 64 { 3427 return ErrIntOverflowEnvoyFilter 3428 } 3429 if iNdEx >= l { 3430 return io.ErrUnexpectedEOF 3431 } 3432 b := dAtA[iNdEx] 3433 iNdEx++ 3434 m.Action |= EnvoyFilter_RouteConfigurationMatch_RouteMatch_Action(b&0x7F) << shift 3435 if b < 0x80 { 3436 break 3437 } 3438 } 3439 default: 3440 iNdEx = preIndex 3441 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 3442 if err != nil { 3443 return err 3444 } 3445 if skippy < 0 { 3446 return ErrInvalidLengthEnvoyFilter 3447 } 3448 if (iNdEx + skippy) < 0 { 3449 return ErrInvalidLengthEnvoyFilter 3450 } 3451 if (iNdEx + skippy) > l { 3452 return io.ErrUnexpectedEOF 3453 } 3454 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3455 iNdEx += skippy 3456 } 3457 } 3458 3459 if iNdEx > l { 3460 return io.ErrUnexpectedEOF 3461 } 3462 return nil 3463} 3464func (m *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) Unmarshal(dAtA []byte) error { 3465 l := len(dAtA) 3466 iNdEx := 0 3467 for iNdEx < l { 3468 preIndex := iNdEx 3469 var wire uint64 3470 for shift := uint(0); ; shift += 7 { 3471 if shift >= 64 { 3472 return ErrIntOverflowEnvoyFilter 3473 } 3474 if iNdEx >= l { 3475 return io.ErrUnexpectedEOF 3476 } 3477 b := dAtA[iNdEx] 3478 iNdEx++ 3479 wire |= uint64(b&0x7F) << shift 3480 if b < 0x80 { 3481 break 3482 } 3483 } 3484 fieldNum := int32(wire >> 3) 3485 wireType := int(wire & 0x7) 3486 if wireType == 4 { 3487 return fmt.Errorf("proto: VirtualHostMatch: wiretype end group for non-group") 3488 } 3489 if fieldNum <= 0 { 3490 return fmt.Errorf("proto: VirtualHostMatch: illegal tag %d (wire type %d)", fieldNum, wire) 3491 } 3492 switch fieldNum { 3493 case 1: 3494 if wireType != 2 { 3495 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3496 } 3497 var stringLen uint64 3498 for shift := uint(0); ; shift += 7 { 3499 if shift >= 64 { 3500 return ErrIntOverflowEnvoyFilter 3501 } 3502 if iNdEx >= l { 3503 return io.ErrUnexpectedEOF 3504 } 3505 b := dAtA[iNdEx] 3506 iNdEx++ 3507 stringLen |= uint64(b&0x7F) << shift 3508 if b < 0x80 { 3509 break 3510 } 3511 } 3512 intStringLen := int(stringLen) 3513 if intStringLen < 0 { 3514 return ErrInvalidLengthEnvoyFilter 3515 } 3516 postIndex := iNdEx + intStringLen 3517 if postIndex < 0 { 3518 return ErrInvalidLengthEnvoyFilter 3519 } 3520 if postIndex > l { 3521 return io.ErrUnexpectedEOF 3522 } 3523 m.Name = string(dAtA[iNdEx:postIndex]) 3524 iNdEx = postIndex 3525 case 2: 3526 if wireType != 2 { 3527 return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) 3528 } 3529 var msglen int 3530 for shift := uint(0); ; shift += 7 { 3531 if shift >= 64 { 3532 return ErrIntOverflowEnvoyFilter 3533 } 3534 if iNdEx >= l { 3535 return io.ErrUnexpectedEOF 3536 } 3537 b := dAtA[iNdEx] 3538 iNdEx++ 3539 msglen |= int(b&0x7F) << shift 3540 if b < 0x80 { 3541 break 3542 } 3543 } 3544 if msglen < 0 { 3545 return ErrInvalidLengthEnvoyFilter 3546 } 3547 postIndex := iNdEx + msglen 3548 if postIndex < 0 { 3549 return ErrInvalidLengthEnvoyFilter 3550 } 3551 if postIndex > l { 3552 return io.ErrUnexpectedEOF 3553 } 3554 if m.Route == nil { 3555 m.Route = &EnvoyFilter_RouteConfigurationMatch_RouteMatch{} 3556 } 3557 if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3558 return err 3559 } 3560 iNdEx = postIndex 3561 default: 3562 iNdEx = preIndex 3563 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 3564 if err != nil { 3565 return err 3566 } 3567 if skippy < 0 { 3568 return ErrInvalidLengthEnvoyFilter 3569 } 3570 if (iNdEx + skippy) < 0 { 3571 return ErrInvalidLengthEnvoyFilter 3572 } 3573 if (iNdEx + skippy) > l { 3574 return io.ErrUnexpectedEOF 3575 } 3576 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3577 iNdEx += skippy 3578 } 3579 } 3580 3581 if iNdEx > l { 3582 return io.ErrUnexpectedEOF 3583 } 3584 return nil 3585} 3586func (m *EnvoyFilter_ListenerMatch) Unmarshal(dAtA []byte) error { 3587 l := len(dAtA) 3588 iNdEx := 0 3589 for iNdEx < l { 3590 preIndex := iNdEx 3591 var wire uint64 3592 for shift := uint(0); ; shift += 7 { 3593 if shift >= 64 { 3594 return ErrIntOverflowEnvoyFilter 3595 } 3596 if iNdEx >= l { 3597 return io.ErrUnexpectedEOF 3598 } 3599 b := dAtA[iNdEx] 3600 iNdEx++ 3601 wire |= uint64(b&0x7F) << shift 3602 if b < 0x80 { 3603 break 3604 } 3605 } 3606 fieldNum := int32(wire >> 3) 3607 wireType := int(wire & 0x7) 3608 if wireType == 4 { 3609 return fmt.Errorf("proto: ListenerMatch: wiretype end group for non-group") 3610 } 3611 if fieldNum <= 0 { 3612 return fmt.Errorf("proto: ListenerMatch: illegal tag %d (wire type %d)", fieldNum, wire) 3613 } 3614 switch fieldNum { 3615 case 1: 3616 if wireType != 0 { 3617 return fmt.Errorf("proto: wrong wireType = %d for field PortNumber", wireType) 3618 } 3619 m.PortNumber = 0 3620 for shift := uint(0); ; shift += 7 { 3621 if shift >= 64 { 3622 return ErrIntOverflowEnvoyFilter 3623 } 3624 if iNdEx >= l { 3625 return io.ErrUnexpectedEOF 3626 } 3627 b := dAtA[iNdEx] 3628 iNdEx++ 3629 m.PortNumber |= uint32(b&0x7F) << shift 3630 if b < 0x80 { 3631 break 3632 } 3633 } 3634 case 2: 3635 if wireType != 2 { 3636 return fmt.Errorf("proto: wrong wireType = %d for field PortName", wireType) 3637 } 3638 var stringLen uint64 3639 for shift := uint(0); ; shift += 7 { 3640 if shift >= 64 { 3641 return ErrIntOverflowEnvoyFilter 3642 } 3643 if iNdEx >= l { 3644 return io.ErrUnexpectedEOF 3645 } 3646 b := dAtA[iNdEx] 3647 iNdEx++ 3648 stringLen |= uint64(b&0x7F) << shift 3649 if b < 0x80 { 3650 break 3651 } 3652 } 3653 intStringLen := int(stringLen) 3654 if intStringLen < 0 { 3655 return ErrInvalidLengthEnvoyFilter 3656 } 3657 postIndex := iNdEx + intStringLen 3658 if postIndex < 0 { 3659 return ErrInvalidLengthEnvoyFilter 3660 } 3661 if postIndex > l { 3662 return io.ErrUnexpectedEOF 3663 } 3664 m.PortName = string(dAtA[iNdEx:postIndex]) 3665 iNdEx = postIndex 3666 case 3: 3667 if wireType != 2 { 3668 return fmt.Errorf("proto: wrong wireType = %d for field FilterChain", wireType) 3669 } 3670 var msglen int 3671 for shift := uint(0); ; shift += 7 { 3672 if shift >= 64 { 3673 return ErrIntOverflowEnvoyFilter 3674 } 3675 if iNdEx >= l { 3676 return io.ErrUnexpectedEOF 3677 } 3678 b := dAtA[iNdEx] 3679 iNdEx++ 3680 msglen |= int(b&0x7F) << shift 3681 if b < 0x80 { 3682 break 3683 } 3684 } 3685 if msglen < 0 { 3686 return ErrInvalidLengthEnvoyFilter 3687 } 3688 postIndex := iNdEx + msglen 3689 if postIndex < 0 { 3690 return ErrInvalidLengthEnvoyFilter 3691 } 3692 if postIndex > l { 3693 return io.ErrUnexpectedEOF 3694 } 3695 if m.FilterChain == nil { 3696 m.FilterChain = &EnvoyFilter_ListenerMatch_FilterChainMatch{} 3697 } 3698 if err := m.FilterChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3699 return err 3700 } 3701 iNdEx = postIndex 3702 case 4: 3703 if wireType != 2 { 3704 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3705 } 3706 var stringLen uint64 3707 for shift := uint(0); ; shift += 7 { 3708 if shift >= 64 { 3709 return ErrIntOverflowEnvoyFilter 3710 } 3711 if iNdEx >= l { 3712 return io.ErrUnexpectedEOF 3713 } 3714 b := dAtA[iNdEx] 3715 iNdEx++ 3716 stringLen |= uint64(b&0x7F) << shift 3717 if b < 0x80 { 3718 break 3719 } 3720 } 3721 intStringLen := int(stringLen) 3722 if intStringLen < 0 { 3723 return ErrInvalidLengthEnvoyFilter 3724 } 3725 postIndex := iNdEx + intStringLen 3726 if postIndex < 0 { 3727 return ErrInvalidLengthEnvoyFilter 3728 } 3729 if postIndex > l { 3730 return io.ErrUnexpectedEOF 3731 } 3732 m.Name = string(dAtA[iNdEx:postIndex]) 3733 iNdEx = postIndex 3734 default: 3735 iNdEx = preIndex 3736 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 3737 if err != nil { 3738 return err 3739 } 3740 if skippy < 0 { 3741 return ErrInvalidLengthEnvoyFilter 3742 } 3743 if (iNdEx + skippy) < 0 { 3744 return ErrInvalidLengthEnvoyFilter 3745 } 3746 if (iNdEx + skippy) > l { 3747 return io.ErrUnexpectedEOF 3748 } 3749 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3750 iNdEx += skippy 3751 } 3752 } 3753 3754 if iNdEx > l { 3755 return io.ErrUnexpectedEOF 3756 } 3757 return nil 3758} 3759func (m *EnvoyFilter_ListenerMatch_FilterChainMatch) Unmarshal(dAtA []byte) error { 3760 l := len(dAtA) 3761 iNdEx := 0 3762 for iNdEx < l { 3763 preIndex := iNdEx 3764 var wire uint64 3765 for shift := uint(0); ; shift += 7 { 3766 if shift >= 64 { 3767 return ErrIntOverflowEnvoyFilter 3768 } 3769 if iNdEx >= l { 3770 return io.ErrUnexpectedEOF 3771 } 3772 b := dAtA[iNdEx] 3773 iNdEx++ 3774 wire |= uint64(b&0x7F) << shift 3775 if b < 0x80 { 3776 break 3777 } 3778 } 3779 fieldNum := int32(wire >> 3) 3780 wireType := int(wire & 0x7) 3781 if wireType == 4 { 3782 return fmt.Errorf("proto: FilterChainMatch: wiretype end group for non-group") 3783 } 3784 if fieldNum <= 0 { 3785 return fmt.Errorf("proto: FilterChainMatch: illegal tag %d (wire type %d)", fieldNum, wire) 3786 } 3787 switch fieldNum { 3788 case 1: 3789 if wireType != 2 { 3790 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3791 } 3792 var stringLen uint64 3793 for shift := uint(0); ; shift += 7 { 3794 if shift >= 64 { 3795 return ErrIntOverflowEnvoyFilter 3796 } 3797 if iNdEx >= l { 3798 return io.ErrUnexpectedEOF 3799 } 3800 b := dAtA[iNdEx] 3801 iNdEx++ 3802 stringLen |= uint64(b&0x7F) << shift 3803 if b < 0x80 { 3804 break 3805 } 3806 } 3807 intStringLen := int(stringLen) 3808 if intStringLen < 0 { 3809 return ErrInvalidLengthEnvoyFilter 3810 } 3811 postIndex := iNdEx + intStringLen 3812 if postIndex < 0 { 3813 return ErrInvalidLengthEnvoyFilter 3814 } 3815 if postIndex > l { 3816 return io.ErrUnexpectedEOF 3817 } 3818 m.Name = string(dAtA[iNdEx:postIndex]) 3819 iNdEx = postIndex 3820 case 2: 3821 if wireType != 2 { 3822 return fmt.Errorf("proto: wrong wireType = %d for field Sni", wireType) 3823 } 3824 var stringLen uint64 3825 for shift := uint(0); ; shift += 7 { 3826 if shift >= 64 { 3827 return ErrIntOverflowEnvoyFilter 3828 } 3829 if iNdEx >= l { 3830 return io.ErrUnexpectedEOF 3831 } 3832 b := dAtA[iNdEx] 3833 iNdEx++ 3834 stringLen |= uint64(b&0x7F) << shift 3835 if b < 0x80 { 3836 break 3837 } 3838 } 3839 intStringLen := int(stringLen) 3840 if intStringLen < 0 { 3841 return ErrInvalidLengthEnvoyFilter 3842 } 3843 postIndex := iNdEx + intStringLen 3844 if postIndex < 0 { 3845 return ErrInvalidLengthEnvoyFilter 3846 } 3847 if postIndex > l { 3848 return io.ErrUnexpectedEOF 3849 } 3850 m.Sni = string(dAtA[iNdEx:postIndex]) 3851 iNdEx = postIndex 3852 case 3: 3853 if wireType != 2 { 3854 return fmt.Errorf("proto: wrong wireType = %d for field TransportProtocol", wireType) 3855 } 3856 var stringLen uint64 3857 for shift := uint(0); ; shift += 7 { 3858 if shift >= 64 { 3859 return ErrIntOverflowEnvoyFilter 3860 } 3861 if iNdEx >= l { 3862 return io.ErrUnexpectedEOF 3863 } 3864 b := dAtA[iNdEx] 3865 iNdEx++ 3866 stringLen |= uint64(b&0x7F) << shift 3867 if b < 0x80 { 3868 break 3869 } 3870 } 3871 intStringLen := int(stringLen) 3872 if intStringLen < 0 { 3873 return ErrInvalidLengthEnvoyFilter 3874 } 3875 postIndex := iNdEx + intStringLen 3876 if postIndex < 0 { 3877 return ErrInvalidLengthEnvoyFilter 3878 } 3879 if postIndex > l { 3880 return io.ErrUnexpectedEOF 3881 } 3882 m.TransportProtocol = string(dAtA[iNdEx:postIndex]) 3883 iNdEx = postIndex 3884 case 4: 3885 if wireType != 2 { 3886 return fmt.Errorf("proto: wrong wireType = %d for field ApplicationProtocols", wireType) 3887 } 3888 var stringLen uint64 3889 for shift := uint(0); ; shift += 7 { 3890 if shift >= 64 { 3891 return ErrIntOverflowEnvoyFilter 3892 } 3893 if iNdEx >= l { 3894 return io.ErrUnexpectedEOF 3895 } 3896 b := dAtA[iNdEx] 3897 iNdEx++ 3898 stringLen |= uint64(b&0x7F) << shift 3899 if b < 0x80 { 3900 break 3901 } 3902 } 3903 intStringLen := int(stringLen) 3904 if intStringLen < 0 { 3905 return ErrInvalidLengthEnvoyFilter 3906 } 3907 postIndex := iNdEx + intStringLen 3908 if postIndex < 0 { 3909 return ErrInvalidLengthEnvoyFilter 3910 } 3911 if postIndex > l { 3912 return io.ErrUnexpectedEOF 3913 } 3914 m.ApplicationProtocols = string(dAtA[iNdEx:postIndex]) 3915 iNdEx = postIndex 3916 case 5: 3917 if wireType != 2 { 3918 return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) 3919 } 3920 var msglen int 3921 for shift := uint(0); ; shift += 7 { 3922 if shift >= 64 { 3923 return ErrIntOverflowEnvoyFilter 3924 } 3925 if iNdEx >= l { 3926 return io.ErrUnexpectedEOF 3927 } 3928 b := dAtA[iNdEx] 3929 iNdEx++ 3930 msglen |= int(b&0x7F) << shift 3931 if b < 0x80 { 3932 break 3933 } 3934 } 3935 if msglen < 0 { 3936 return ErrInvalidLengthEnvoyFilter 3937 } 3938 postIndex := iNdEx + msglen 3939 if postIndex < 0 { 3940 return ErrInvalidLengthEnvoyFilter 3941 } 3942 if postIndex > l { 3943 return io.ErrUnexpectedEOF 3944 } 3945 if m.Filter == nil { 3946 m.Filter = &EnvoyFilter_ListenerMatch_FilterMatch{} 3947 } 3948 if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3949 return err 3950 } 3951 iNdEx = postIndex 3952 default: 3953 iNdEx = preIndex 3954 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 3955 if err != nil { 3956 return err 3957 } 3958 if skippy < 0 { 3959 return ErrInvalidLengthEnvoyFilter 3960 } 3961 if (iNdEx + skippy) < 0 { 3962 return ErrInvalidLengthEnvoyFilter 3963 } 3964 if (iNdEx + skippy) > l { 3965 return io.ErrUnexpectedEOF 3966 } 3967 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3968 iNdEx += skippy 3969 } 3970 } 3971 3972 if iNdEx > l { 3973 return io.ErrUnexpectedEOF 3974 } 3975 return nil 3976} 3977func (m *EnvoyFilter_ListenerMatch_FilterMatch) Unmarshal(dAtA []byte) error { 3978 l := len(dAtA) 3979 iNdEx := 0 3980 for iNdEx < l { 3981 preIndex := iNdEx 3982 var wire uint64 3983 for shift := uint(0); ; shift += 7 { 3984 if shift >= 64 { 3985 return ErrIntOverflowEnvoyFilter 3986 } 3987 if iNdEx >= l { 3988 return io.ErrUnexpectedEOF 3989 } 3990 b := dAtA[iNdEx] 3991 iNdEx++ 3992 wire |= uint64(b&0x7F) << shift 3993 if b < 0x80 { 3994 break 3995 } 3996 } 3997 fieldNum := int32(wire >> 3) 3998 wireType := int(wire & 0x7) 3999 if wireType == 4 { 4000 return fmt.Errorf("proto: FilterMatch: wiretype end group for non-group") 4001 } 4002 if fieldNum <= 0 { 4003 return fmt.Errorf("proto: FilterMatch: illegal tag %d (wire type %d)", fieldNum, wire) 4004 } 4005 switch fieldNum { 4006 case 1: 4007 if wireType != 2 { 4008 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 4009 } 4010 var stringLen uint64 4011 for shift := uint(0); ; shift += 7 { 4012 if shift >= 64 { 4013 return ErrIntOverflowEnvoyFilter 4014 } 4015 if iNdEx >= l { 4016 return io.ErrUnexpectedEOF 4017 } 4018 b := dAtA[iNdEx] 4019 iNdEx++ 4020 stringLen |= uint64(b&0x7F) << shift 4021 if b < 0x80 { 4022 break 4023 } 4024 } 4025 intStringLen := int(stringLen) 4026 if intStringLen < 0 { 4027 return ErrInvalidLengthEnvoyFilter 4028 } 4029 postIndex := iNdEx + intStringLen 4030 if postIndex < 0 { 4031 return ErrInvalidLengthEnvoyFilter 4032 } 4033 if postIndex > l { 4034 return io.ErrUnexpectedEOF 4035 } 4036 m.Name = string(dAtA[iNdEx:postIndex]) 4037 iNdEx = postIndex 4038 case 2: 4039 if wireType != 2 { 4040 return fmt.Errorf("proto: wrong wireType = %d for field SubFilter", wireType) 4041 } 4042 var msglen int 4043 for shift := uint(0); ; shift += 7 { 4044 if shift >= 64 { 4045 return ErrIntOverflowEnvoyFilter 4046 } 4047 if iNdEx >= l { 4048 return io.ErrUnexpectedEOF 4049 } 4050 b := dAtA[iNdEx] 4051 iNdEx++ 4052 msglen |= int(b&0x7F) << shift 4053 if b < 0x80 { 4054 break 4055 } 4056 } 4057 if msglen < 0 { 4058 return ErrInvalidLengthEnvoyFilter 4059 } 4060 postIndex := iNdEx + msglen 4061 if postIndex < 0 { 4062 return ErrInvalidLengthEnvoyFilter 4063 } 4064 if postIndex > l { 4065 return io.ErrUnexpectedEOF 4066 } 4067 if m.SubFilter == nil { 4068 m.SubFilter = &EnvoyFilter_ListenerMatch_SubFilterMatch{} 4069 } 4070 if err := m.SubFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4071 return err 4072 } 4073 iNdEx = postIndex 4074 default: 4075 iNdEx = preIndex 4076 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 4077 if err != nil { 4078 return err 4079 } 4080 if skippy < 0 { 4081 return ErrInvalidLengthEnvoyFilter 4082 } 4083 if (iNdEx + skippy) < 0 { 4084 return ErrInvalidLengthEnvoyFilter 4085 } 4086 if (iNdEx + skippy) > l { 4087 return io.ErrUnexpectedEOF 4088 } 4089 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4090 iNdEx += skippy 4091 } 4092 } 4093 4094 if iNdEx > l { 4095 return io.ErrUnexpectedEOF 4096 } 4097 return nil 4098} 4099func (m *EnvoyFilter_ListenerMatch_SubFilterMatch) Unmarshal(dAtA []byte) error { 4100 l := len(dAtA) 4101 iNdEx := 0 4102 for iNdEx < l { 4103 preIndex := iNdEx 4104 var wire uint64 4105 for shift := uint(0); ; shift += 7 { 4106 if shift >= 64 { 4107 return ErrIntOverflowEnvoyFilter 4108 } 4109 if iNdEx >= l { 4110 return io.ErrUnexpectedEOF 4111 } 4112 b := dAtA[iNdEx] 4113 iNdEx++ 4114 wire |= uint64(b&0x7F) << shift 4115 if b < 0x80 { 4116 break 4117 } 4118 } 4119 fieldNum := int32(wire >> 3) 4120 wireType := int(wire & 0x7) 4121 if wireType == 4 { 4122 return fmt.Errorf("proto: SubFilterMatch: wiretype end group for non-group") 4123 } 4124 if fieldNum <= 0 { 4125 return fmt.Errorf("proto: SubFilterMatch: illegal tag %d (wire type %d)", fieldNum, wire) 4126 } 4127 switch fieldNum { 4128 case 1: 4129 if wireType != 2 { 4130 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 4131 } 4132 var stringLen uint64 4133 for shift := uint(0); ; shift += 7 { 4134 if shift >= 64 { 4135 return ErrIntOverflowEnvoyFilter 4136 } 4137 if iNdEx >= l { 4138 return io.ErrUnexpectedEOF 4139 } 4140 b := dAtA[iNdEx] 4141 iNdEx++ 4142 stringLen |= uint64(b&0x7F) << shift 4143 if b < 0x80 { 4144 break 4145 } 4146 } 4147 intStringLen := int(stringLen) 4148 if intStringLen < 0 { 4149 return ErrInvalidLengthEnvoyFilter 4150 } 4151 postIndex := iNdEx + intStringLen 4152 if postIndex < 0 { 4153 return ErrInvalidLengthEnvoyFilter 4154 } 4155 if postIndex > l { 4156 return io.ErrUnexpectedEOF 4157 } 4158 m.Name = string(dAtA[iNdEx:postIndex]) 4159 iNdEx = postIndex 4160 default: 4161 iNdEx = preIndex 4162 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 4163 if err != nil { 4164 return err 4165 } 4166 if skippy < 0 { 4167 return ErrInvalidLengthEnvoyFilter 4168 } 4169 if (iNdEx + skippy) < 0 { 4170 return ErrInvalidLengthEnvoyFilter 4171 } 4172 if (iNdEx + skippy) > l { 4173 return io.ErrUnexpectedEOF 4174 } 4175 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4176 iNdEx += skippy 4177 } 4178 } 4179 4180 if iNdEx > l { 4181 return io.ErrUnexpectedEOF 4182 } 4183 return nil 4184} 4185func (m *EnvoyFilter_Patch) Unmarshal(dAtA []byte) error { 4186 l := len(dAtA) 4187 iNdEx := 0 4188 for iNdEx < l { 4189 preIndex := iNdEx 4190 var wire uint64 4191 for shift := uint(0); ; shift += 7 { 4192 if shift >= 64 { 4193 return ErrIntOverflowEnvoyFilter 4194 } 4195 if iNdEx >= l { 4196 return io.ErrUnexpectedEOF 4197 } 4198 b := dAtA[iNdEx] 4199 iNdEx++ 4200 wire |= uint64(b&0x7F) << shift 4201 if b < 0x80 { 4202 break 4203 } 4204 } 4205 fieldNum := int32(wire >> 3) 4206 wireType := int(wire & 0x7) 4207 if wireType == 4 { 4208 return fmt.Errorf("proto: Patch: wiretype end group for non-group") 4209 } 4210 if fieldNum <= 0 { 4211 return fmt.Errorf("proto: Patch: illegal tag %d (wire type %d)", fieldNum, wire) 4212 } 4213 switch fieldNum { 4214 case 1: 4215 if wireType != 0 { 4216 return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) 4217 } 4218 m.Operation = 0 4219 for shift := uint(0); ; shift += 7 { 4220 if shift >= 64 { 4221 return ErrIntOverflowEnvoyFilter 4222 } 4223 if iNdEx >= l { 4224 return io.ErrUnexpectedEOF 4225 } 4226 b := dAtA[iNdEx] 4227 iNdEx++ 4228 m.Operation |= EnvoyFilter_Patch_Operation(b&0x7F) << shift 4229 if b < 0x80 { 4230 break 4231 } 4232 } 4233 case 2: 4234 if wireType != 2 { 4235 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 4236 } 4237 var msglen int 4238 for shift := uint(0); ; shift += 7 { 4239 if shift >= 64 { 4240 return ErrIntOverflowEnvoyFilter 4241 } 4242 if iNdEx >= l { 4243 return io.ErrUnexpectedEOF 4244 } 4245 b := dAtA[iNdEx] 4246 iNdEx++ 4247 msglen |= int(b&0x7F) << shift 4248 if b < 0x80 { 4249 break 4250 } 4251 } 4252 if msglen < 0 { 4253 return ErrInvalidLengthEnvoyFilter 4254 } 4255 postIndex := iNdEx + msglen 4256 if postIndex < 0 { 4257 return ErrInvalidLengthEnvoyFilter 4258 } 4259 if postIndex > l { 4260 return io.ErrUnexpectedEOF 4261 } 4262 if m.Value == nil { 4263 m.Value = &types.Struct{} 4264 } 4265 if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4266 return err 4267 } 4268 iNdEx = postIndex 4269 default: 4270 iNdEx = preIndex 4271 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 4272 if err != nil { 4273 return err 4274 } 4275 if skippy < 0 { 4276 return ErrInvalidLengthEnvoyFilter 4277 } 4278 if (iNdEx + skippy) < 0 { 4279 return ErrInvalidLengthEnvoyFilter 4280 } 4281 if (iNdEx + skippy) > l { 4282 return io.ErrUnexpectedEOF 4283 } 4284 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4285 iNdEx += skippy 4286 } 4287 } 4288 4289 if iNdEx > l { 4290 return io.ErrUnexpectedEOF 4291 } 4292 return nil 4293} 4294func (m *EnvoyFilter_EnvoyConfigObjectMatch) Unmarshal(dAtA []byte) error { 4295 l := len(dAtA) 4296 iNdEx := 0 4297 for iNdEx < l { 4298 preIndex := iNdEx 4299 var wire uint64 4300 for shift := uint(0); ; shift += 7 { 4301 if shift >= 64 { 4302 return ErrIntOverflowEnvoyFilter 4303 } 4304 if iNdEx >= l { 4305 return io.ErrUnexpectedEOF 4306 } 4307 b := dAtA[iNdEx] 4308 iNdEx++ 4309 wire |= uint64(b&0x7F) << shift 4310 if b < 0x80 { 4311 break 4312 } 4313 } 4314 fieldNum := int32(wire >> 3) 4315 wireType := int(wire & 0x7) 4316 if wireType == 4 { 4317 return fmt.Errorf("proto: EnvoyConfigObjectMatch: wiretype end group for non-group") 4318 } 4319 if fieldNum <= 0 { 4320 return fmt.Errorf("proto: EnvoyConfigObjectMatch: illegal tag %d (wire type %d)", fieldNum, wire) 4321 } 4322 switch fieldNum { 4323 case 1: 4324 if wireType != 0 { 4325 return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) 4326 } 4327 m.Context = 0 4328 for shift := uint(0); ; shift += 7 { 4329 if shift >= 64 { 4330 return ErrIntOverflowEnvoyFilter 4331 } 4332 if iNdEx >= l { 4333 return io.ErrUnexpectedEOF 4334 } 4335 b := dAtA[iNdEx] 4336 iNdEx++ 4337 m.Context |= EnvoyFilter_PatchContext(b&0x7F) << shift 4338 if b < 0x80 { 4339 break 4340 } 4341 } 4342 case 2: 4343 if wireType != 2 { 4344 return fmt.Errorf("proto: wrong wireType = %d for field Proxy", wireType) 4345 } 4346 var msglen int 4347 for shift := uint(0); ; shift += 7 { 4348 if shift >= 64 { 4349 return ErrIntOverflowEnvoyFilter 4350 } 4351 if iNdEx >= l { 4352 return io.ErrUnexpectedEOF 4353 } 4354 b := dAtA[iNdEx] 4355 iNdEx++ 4356 msglen |= int(b&0x7F) << shift 4357 if b < 0x80 { 4358 break 4359 } 4360 } 4361 if msglen < 0 { 4362 return ErrInvalidLengthEnvoyFilter 4363 } 4364 postIndex := iNdEx + msglen 4365 if postIndex < 0 { 4366 return ErrInvalidLengthEnvoyFilter 4367 } 4368 if postIndex > l { 4369 return io.ErrUnexpectedEOF 4370 } 4371 if m.Proxy == nil { 4372 m.Proxy = &EnvoyFilter_ProxyMatch{} 4373 } 4374 if err := m.Proxy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4375 return err 4376 } 4377 iNdEx = postIndex 4378 case 3: 4379 if wireType != 2 { 4380 return fmt.Errorf("proto: wrong wireType = %d for field Listener", wireType) 4381 } 4382 var msglen int 4383 for shift := uint(0); ; shift += 7 { 4384 if shift >= 64 { 4385 return ErrIntOverflowEnvoyFilter 4386 } 4387 if iNdEx >= l { 4388 return io.ErrUnexpectedEOF 4389 } 4390 b := dAtA[iNdEx] 4391 iNdEx++ 4392 msglen |= int(b&0x7F) << shift 4393 if b < 0x80 { 4394 break 4395 } 4396 } 4397 if msglen < 0 { 4398 return ErrInvalidLengthEnvoyFilter 4399 } 4400 postIndex := iNdEx + msglen 4401 if postIndex < 0 { 4402 return ErrInvalidLengthEnvoyFilter 4403 } 4404 if postIndex > l { 4405 return io.ErrUnexpectedEOF 4406 } 4407 v := &EnvoyFilter_ListenerMatch{} 4408 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4409 return err 4410 } 4411 m.ObjectTypes = &EnvoyFilter_EnvoyConfigObjectMatch_Listener{v} 4412 iNdEx = postIndex 4413 case 4: 4414 if wireType != 2 { 4415 return fmt.Errorf("proto: wrong wireType = %d for field RouteConfiguration", wireType) 4416 } 4417 var msglen int 4418 for shift := uint(0); ; shift += 7 { 4419 if shift >= 64 { 4420 return ErrIntOverflowEnvoyFilter 4421 } 4422 if iNdEx >= l { 4423 return io.ErrUnexpectedEOF 4424 } 4425 b := dAtA[iNdEx] 4426 iNdEx++ 4427 msglen |= int(b&0x7F) << shift 4428 if b < 0x80 { 4429 break 4430 } 4431 } 4432 if msglen < 0 { 4433 return ErrInvalidLengthEnvoyFilter 4434 } 4435 postIndex := iNdEx + msglen 4436 if postIndex < 0 { 4437 return ErrInvalidLengthEnvoyFilter 4438 } 4439 if postIndex > l { 4440 return io.ErrUnexpectedEOF 4441 } 4442 v := &EnvoyFilter_RouteConfigurationMatch{} 4443 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4444 return err 4445 } 4446 m.ObjectTypes = &EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration{v} 4447 iNdEx = postIndex 4448 case 5: 4449 if wireType != 2 { 4450 return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) 4451 } 4452 var msglen int 4453 for shift := uint(0); ; shift += 7 { 4454 if shift >= 64 { 4455 return ErrIntOverflowEnvoyFilter 4456 } 4457 if iNdEx >= l { 4458 return io.ErrUnexpectedEOF 4459 } 4460 b := dAtA[iNdEx] 4461 iNdEx++ 4462 msglen |= int(b&0x7F) << shift 4463 if b < 0x80 { 4464 break 4465 } 4466 } 4467 if msglen < 0 { 4468 return ErrInvalidLengthEnvoyFilter 4469 } 4470 postIndex := iNdEx + msglen 4471 if postIndex < 0 { 4472 return ErrInvalidLengthEnvoyFilter 4473 } 4474 if postIndex > l { 4475 return io.ErrUnexpectedEOF 4476 } 4477 v := &EnvoyFilter_ClusterMatch{} 4478 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4479 return err 4480 } 4481 m.ObjectTypes = &EnvoyFilter_EnvoyConfigObjectMatch_Cluster{v} 4482 iNdEx = postIndex 4483 default: 4484 iNdEx = preIndex 4485 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 4486 if err != nil { 4487 return err 4488 } 4489 if skippy < 0 { 4490 return ErrInvalidLengthEnvoyFilter 4491 } 4492 if (iNdEx + skippy) < 0 { 4493 return ErrInvalidLengthEnvoyFilter 4494 } 4495 if (iNdEx + skippy) > l { 4496 return io.ErrUnexpectedEOF 4497 } 4498 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4499 iNdEx += skippy 4500 } 4501 } 4502 4503 if iNdEx > l { 4504 return io.ErrUnexpectedEOF 4505 } 4506 return nil 4507} 4508func (m *EnvoyFilter_EnvoyConfigObjectPatch) Unmarshal(dAtA []byte) error { 4509 l := len(dAtA) 4510 iNdEx := 0 4511 for iNdEx < l { 4512 preIndex := iNdEx 4513 var wire uint64 4514 for shift := uint(0); ; shift += 7 { 4515 if shift >= 64 { 4516 return ErrIntOverflowEnvoyFilter 4517 } 4518 if iNdEx >= l { 4519 return io.ErrUnexpectedEOF 4520 } 4521 b := dAtA[iNdEx] 4522 iNdEx++ 4523 wire |= uint64(b&0x7F) << shift 4524 if b < 0x80 { 4525 break 4526 } 4527 } 4528 fieldNum := int32(wire >> 3) 4529 wireType := int(wire & 0x7) 4530 if wireType == 4 { 4531 return fmt.Errorf("proto: EnvoyConfigObjectPatch: wiretype end group for non-group") 4532 } 4533 if fieldNum <= 0 { 4534 return fmt.Errorf("proto: EnvoyConfigObjectPatch: illegal tag %d (wire type %d)", fieldNum, wire) 4535 } 4536 switch fieldNum { 4537 case 1: 4538 if wireType != 0 { 4539 return fmt.Errorf("proto: wrong wireType = %d for field ApplyTo", wireType) 4540 } 4541 m.ApplyTo = 0 4542 for shift := uint(0); ; shift += 7 { 4543 if shift >= 64 { 4544 return ErrIntOverflowEnvoyFilter 4545 } 4546 if iNdEx >= l { 4547 return io.ErrUnexpectedEOF 4548 } 4549 b := dAtA[iNdEx] 4550 iNdEx++ 4551 m.ApplyTo |= EnvoyFilter_ApplyTo(b&0x7F) << shift 4552 if b < 0x80 { 4553 break 4554 } 4555 } 4556 case 2: 4557 if wireType != 2 { 4558 return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) 4559 } 4560 var msglen int 4561 for shift := uint(0); ; shift += 7 { 4562 if shift >= 64 { 4563 return ErrIntOverflowEnvoyFilter 4564 } 4565 if iNdEx >= l { 4566 return io.ErrUnexpectedEOF 4567 } 4568 b := dAtA[iNdEx] 4569 iNdEx++ 4570 msglen |= int(b&0x7F) << shift 4571 if b < 0x80 { 4572 break 4573 } 4574 } 4575 if msglen < 0 { 4576 return ErrInvalidLengthEnvoyFilter 4577 } 4578 postIndex := iNdEx + msglen 4579 if postIndex < 0 { 4580 return ErrInvalidLengthEnvoyFilter 4581 } 4582 if postIndex > l { 4583 return io.ErrUnexpectedEOF 4584 } 4585 if m.Match == nil { 4586 m.Match = &EnvoyFilter_EnvoyConfigObjectMatch{} 4587 } 4588 if err := m.Match.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4589 return err 4590 } 4591 iNdEx = postIndex 4592 case 3: 4593 if wireType != 2 { 4594 return fmt.Errorf("proto: wrong wireType = %d for field Patch", wireType) 4595 } 4596 var msglen int 4597 for shift := uint(0); ; shift += 7 { 4598 if shift >= 64 { 4599 return ErrIntOverflowEnvoyFilter 4600 } 4601 if iNdEx >= l { 4602 return io.ErrUnexpectedEOF 4603 } 4604 b := dAtA[iNdEx] 4605 iNdEx++ 4606 msglen |= int(b&0x7F) << shift 4607 if b < 0x80 { 4608 break 4609 } 4610 } 4611 if msglen < 0 { 4612 return ErrInvalidLengthEnvoyFilter 4613 } 4614 postIndex := iNdEx + msglen 4615 if postIndex < 0 { 4616 return ErrInvalidLengthEnvoyFilter 4617 } 4618 if postIndex > l { 4619 return io.ErrUnexpectedEOF 4620 } 4621 if m.Patch == nil { 4622 m.Patch = &EnvoyFilter_Patch{} 4623 } 4624 if err := m.Patch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4625 return err 4626 } 4627 iNdEx = postIndex 4628 default: 4629 iNdEx = preIndex 4630 skippy, err := skipEnvoyFilter(dAtA[iNdEx:]) 4631 if err != nil { 4632 return err 4633 } 4634 if skippy < 0 { 4635 return ErrInvalidLengthEnvoyFilter 4636 } 4637 if (iNdEx + skippy) < 0 { 4638 return ErrInvalidLengthEnvoyFilter 4639 } 4640 if (iNdEx + skippy) > l { 4641 return io.ErrUnexpectedEOF 4642 } 4643 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4644 iNdEx += skippy 4645 } 4646 } 4647 4648 if iNdEx > l { 4649 return io.ErrUnexpectedEOF 4650 } 4651 return nil 4652} 4653func skipEnvoyFilter(dAtA []byte) (n int, err error) { 4654 l := len(dAtA) 4655 iNdEx := 0 4656 for iNdEx < l { 4657 var wire uint64 4658 for shift := uint(0); ; shift += 7 { 4659 if shift >= 64 { 4660 return 0, ErrIntOverflowEnvoyFilter 4661 } 4662 if iNdEx >= l { 4663 return 0, io.ErrUnexpectedEOF 4664 } 4665 b := dAtA[iNdEx] 4666 iNdEx++ 4667 wire |= (uint64(b) & 0x7F) << shift 4668 if b < 0x80 { 4669 break 4670 } 4671 } 4672 wireType := int(wire & 0x7) 4673 switch wireType { 4674 case 0: 4675 for shift := uint(0); ; shift += 7 { 4676 if shift >= 64 { 4677 return 0, ErrIntOverflowEnvoyFilter 4678 } 4679 if iNdEx >= l { 4680 return 0, io.ErrUnexpectedEOF 4681 } 4682 iNdEx++ 4683 if dAtA[iNdEx-1] < 0x80 { 4684 break 4685 } 4686 } 4687 return iNdEx, nil 4688 case 1: 4689 iNdEx += 8 4690 return iNdEx, nil 4691 case 2: 4692 var length int 4693 for shift := uint(0); ; shift += 7 { 4694 if shift >= 64 { 4695 return 0, ErrIntOverflowEnvoyFilter 4696 } 4697 if iNdEx >= l { 4698 return 0, io.ErrUnexpectedEOF 4699 } 4700 b := dAtA[iNdEx] 4701 iNdEx++ 4702 length |= (int(b) & 0x7F) << shift 4703 if b < 0x80 { 4704 break 4705 } 4706 } 4707 if length < 0 { 4708 return 0, ErrInvalidLengthEnvoyFilter 4709 } 4710 iNdEx += length 4711 if iNdEx < 0 { 4712 return 0, ErrInvalidLengthEnvoyFilter 4713 } 4714 return iNdEx, nil 4715 case 3: 4716 for { 4717 var innerWire uint64 4718 var start int = iNdEx 4719 for shift := uint(0); ; shift += 7 { 4720 if shift >= 64 { 4721 return 0, ErrIntOverflowEnvoyFilter 4722 } 4723 if iNdEx >= l { 4724 return 0, io.ErrUnexpectedEOF 4725 } 4726 b := dAtA[iNdEx] 4727 iNdEx++ 4728 innerWire |= (uint64(b) & 0x7F) << shift 4729 if b < 0x80 { 4730 break 4731 } 4732 } 4733 innerWireType := int(innerWire & 0x7) 4734 if innerWireType == 4 { 4735 break 4736 } 4737 next, err := skipEnvoyFilter(dAtA[start:]) 4738 if err != nil { 4739 return 0, err 4740 } 4741 iNdEx = start + next 4742 if iNdEx < 0 { 4743 return 0, ErrInvalidLengthEnvoyFilter 4744 } 4745 } 4746 return iNdEx, nil 4747 case 4: 4748 return iNdEx, nil 4749 case 5: 4750 iNdEx += 4 4751 return iNdEx, nil 4752 default: 4753 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4754 } 4755 } 4756 panic("unreachable") 4757} 4758 4759var ( 4760 ErrInvalidLengthEnvoyFilter = fmt.Errorf("proto: negative length found during unmarshaling") 4761 ErrIntOverflowEnvoyFilter = fmt.Errorf("proto: integer overflow") 4762) 4763