-
Notifications
You must be signed in to change notification settings - Fork 684
/
matcher.pb.go
1748 lines (1542 loc) · 76.6 KB
/
matcher.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: envoy/config/common/matcher/v3/matcher.proto
package envoy_config_common_matcher_v3
import (
_ "github.com/cncf/udpa/go/udpa/annotations"
v31 "github.com/datawire/ambassador/v2/pkg/api/envoy/config/core/v3"
v3 "github.com/datawire/ambassador/v2/pkg/api/envoy/config/route/v3"
v32 "github.com/datawire/ambassador/v2/pkg/api/envoy/type/matcher/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// A matcher, which may traverse a matching tree in order to result in a match action.
// During matching, the tree will be traversed until a match is found, or if no match
// is found the action specified by the most specific on_no_match will be evaluated.
// As an on_no_match might result in another matching tree being evaluated, this process
// might repeat several times until the final OnMatch (or no match) is decided.
//
// This API is a work in progress.
type Matcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to MatcherType:
// *Matcher_MatcherList_
// *Matcher_MatcherTree_
MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"`
// Optional OnMatch to use if the matcher failed.
// If specified, the OnMatch is used, and the matcher is considered
// to have matched.
// If not specified, the matcher is considered not to have matched.
OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"`
}
func (x *Matcher) Reset() {
*x = Matcher{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher) ProtoMessage() {}
func (x *Matcher) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher.ProtoReflect.Descriptor instead.
func (*Matcher) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0}
}
func (m *Matcher) GetMatcherType() isMatcher_MatcherType {
if m != nil {
return m.MatcherType
}
return nil
}
func (x *Matcher) GetMatcherList() *Matcher_MatcherList {
if x, ok := x.GetMatcherType().(*Matcher_MatcherList_); ok {
return x.MatcherList
}
return nil
}
func (x *Matcher) GetMatcherTree() *Matcher_MatcherTree {
if x, ok := x.GetMatcherType().(*Matcher_MatcherTree_); ok {
return x.MatcherTree
}
return nil
}
func (x *Matcher) GetOnNoMatch() *Matcher_OnMatch {
if x != nil {
return x.OnNoMatch
}
return nil
}
type isMatcher_MatcherType interface {
isMatcher_MatcherType()
}
type Matcher_MatcherList_ struct {
// A linear list of matchers to evaluate.
MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"`
}
type Matcher_MatcherTree_ struct {
// A match tree to evaluate.
MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"`
}
func (*Matcher_MatcherList_) isMatcher_MatcherType() {}
func (*Matcher_MatcherTree_) isMatcher_MatcherType() {}
// Match configuration. This is a recursive structure which allows complex nested match
// configurations to be built using various logical operators.
// [#next-free-field: 11]
type MatchPredicate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Rule:
// *MatchPredicate_OrMatch
// *MatchPredicate_AndMatch
// *MatchPredicate_NotMatch
// *MatchPredicate_AnyMatch
// *MatchPredicate_HttpRequestHeadersMatch
// *MatchPredicate_HttpRequestTrailersMatch
// *MatchPredicate_HttpResponseHeadersMatch
// *MatchPredicate_HttpResponseTrailersMatch
// *MatchPredicate_HttpRequestGenericBodyMatch
// *MatchPredicate_HttpResponseGenericBodyMatch
Rule isMatchPredicate_Rule `protobuf_oneof:"rule"`
}
func (x *MatchPredicate) Reset() {
*x = MatchPredicate{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MatchPredicate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MatchPredicate) ProtoMessage() {}
func (x *MatchPredicate) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MatchPredicate.ProtoReflect.Descriptor instead.
func (*MatchPredicate) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{1}
}
func (m *MatchPredicate) GetRule() isMatchPredicate_Rule {
if m != nil {
return m.Rule
}
return nil
}
func (x *MatchPredicate) GetOrMatch() *MatchPredicate_MatchSet {
if x, ok := x.GetRule().(*MatchPredicate_OrMatch); ok {
return x.OrMatch
}
return nil
}
func (x *MatchPredicate) GetAndMatch() *MatchPredicate_MatchSet {
if x, ok := x.GetRule().(*MatchPredicate_AndMatch); ok {
return x.AndMatch
}
return nil
}
func (x *MatchPredicate) GetNotMatch() *MatchPredicate {
if x, ok := x.GetRule().(*MatchPredicate_NotMatch); ok {
return x.NotMatch
}
return nil
}
func (x *MatchPredicate) GetAnyMatch() bool {
if x, ok := x.GetRule().(*MatchPredicate_AnyMatch); ok {
return x.AnyMatch
}
return false
}
func (x *MatchPredicate) GetHttpRequestHeadersMatch() *HttpHeadersMatch {
if x, ok := x.GetRule().(*MatchPredicate_HttpRequestHeadersMatch); ok {
return x.HttpRequestHeadersMatch
}
return nil
}
func (x *MatchPredicate) GetHttpRequestTrailersMatch() *HttpHeadersMatch {
if x, ok := x.GetRule().(*MatchPredicate_HttpRequestTrailersMatch); ok {
return x.HttpRequestTrailersMatch
}
return nil
}
func (x *MatchPredicate) GetHttpResponseHeadersMatch() *HttpHeadersMatch {
if x, ok := x.GetRule().(*MatchPredicate_HttpResponseHeadersMatch); ok {
return x.HttpResponseHeadersMatch
}
return nil
}
func (x *MatchPredicate) GetHttpResponseTrailersMatch() *HttpHeadersMatch {
if x, ok := x.GetRule().(*MatchPredicate_HttpResponseTrailersMatch); ok {
return x.HttpResponseTrailersMatch
}
return nil
}
func (x *MatchPredicate) GetHttpRequestGenericBodyMatch() *HttpGenericBodyMatch {
if x, ok := x.GetRule().(*MatchPredicate_HttpRequestGenericBodyMatch); ok {
return x.HttpRequestGenericBodyMatch
}
return nil
}
func (x *MatchPredicate) GetHttpResponseGenericBodyMatch() *HttpGenericBodyMatch {
if x, ok := x.GetRule().(*MatchPredicate_HttpResponseGenericBodyMatch); ok {
return x.HttpResponseGenericBodyMatch
}
return nil
}
type isMatchPredicate_Rule interface {
isMatchPredicate_Rule()
}
type MatchPredicate_OrMatch struct {
// A set that describes a logical OR. If any member of the set matches, the match configuration
// matches.
OrMatch *MatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"`
}
type MatchPredicate_AndMatch struct {
// A set that describes a logical AND. If all members of the set match, the match configuration
// matches.
AndMatch *MatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"`
}
type MatchPredicate_NotMatch struct {
// A negation match. The match configuration will match if the negated match condition matches.
NotMatch *MatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"`
}
type MatchPredicate_AnyMatch struct {
// The match configuration will always match.
AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"`
}
type MatchPredicate_HttpRequestHeadersMatch struct {
// HTTP request headers match configuration.
HttpRequestHeadersMatch *HttpHeadersMatch `protobuf:"bytes,5,opt,name=http_request_headers_match,json=httpRequestHeadersMatch,proto3,oneof"`
}
type MatchPredicate_HttpRequestTrailersMatch struct {
// HTTP request trailers match configuration.
HttpRequestTrailersMatch *HttpHeadersMatch `protobuf:"bytes,6,opt,name=http_request_trailers_match,json=httpRequestTrailersMatch,proto3,oneof"`
}
type MatchPredicate_HttpResponseHeadersMatch struct {
// HTTP response headers match configuration.
HttpResponseHeadersMatch *HttpHeadersMatch `protobuf:"bytes,7,opt,name=http_response_headers_match,json=httpResponseHeadersMatch,proto3,oneof"`
}
type MatchPredicate_HttpResponseTrailersMatch struct {
// HTTP response trailers match configuration.
HttpResponseTrailersMatch *HttpHeadersMatch `protobuf:"bytes,8,opt,name=http_response_trailers_match,json=httpResponseTrailersMatch,proto3,oneof"`
}
type MatchPredicate_HttpRequestGenericBodyMatch struct {
// HTTP request generic body match configuration.
HttpRequestGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,9,opt,name=http_request_generic_body_match,json=httpRequestGenericBodyMatch,proto3,oneof"`
}
type MatchPredicate_HttpResponseGenericBodyMatch struct {
// HTTP response generic body match configuration.
HttpResponseGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,10,opt,name=http_response_generic_body_match,json=httpResponseGenericBodyMatch,proto3,oneof"`
}
func (*MatchPredicate_OrMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_AndMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_NotMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_AnyMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_HttpRequestHeadersMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_HttpRequestTrailersMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_HttpResponseHeadersMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_HttpResponseTrailersMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_HttpRequestGenericBodyMatch) isMatchPredicate_Rule() {}
func (*MatchPredicate_HttpResponseGenericBodyMatch) isMatchPredicate_Rule() {}
// HTTP headers match configuration.
type HttpHeadersMatch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// HTTP headers to match.
Headers []*v3.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
}
func (x *HttpHeadersMatch) Reset() {
*x = HttpHeadersMatch{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpHeadersMatch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpHeadersMatch) ProtoMessage() {}
func (x *HttpHeadersMatch) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HttpHeadersMatch.ProtoReflect.Descriptor instead.
func (*HttpHeadersMatch) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{2}
}
func (x *HttpHeadersMatch) GetHeaders() []*v3.HeaderMatcher {
if x != nil {
return x.Headers
}
return nil
}
// HTTP generic body match configuration.
// List of text strings and hex strings to be located in HTTP body.
// All specified strings must be found in the HTTP body for positive match.
// The search may be limited to specified number of bytes from the body start.
//
// .. attention::
//
// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match.
// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified
// to scan only part of the http body.
type HttpGenericBodyMatch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Limits search to specified number of bytes - default zero (no limit - match entire captured buffer).
BytesLimit uint32 `protobuf:"varint,1,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"`
// List of patterns to match.
Patterns []*HttpGenericBodyMatch_GenericTextMatch `protobuf:"bytes,2,rep,name=patterns,proto3" json:"patterns,omitempty"`
}
func (x *HttpGenericBodyMatch) Reset() {
*x = HttpGenericBodyMatch{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpGenericBodyMatch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpGenericBodyMatch) ProtoMessage() {}
func (x *HttpGenericBodyMatch) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HttpGenericBodyMatch.ProtoReflect.Descriptor instead.
func (*HttpGenericBodyMatch) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{3}
}
func (x *HttpGenericBodyMatch) GetBytesLimit() uint32 {
if x != nil {
return x.BytesLimit
}
return 0
}
func (x *HttpGenericBodyMatch) GetPatterns() []*HttpGenericBodyMatch_GenericTextMatch {
if x != nil {
return x.Patterns
}
return nil
}
// What to do if a match is successful.
type Matcher_OnMatch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to OnMatch:
// *Matcher_OnMatch_Matcher
// *Matcher_OnMatch_Action
OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"`
}
func (x *Matcher_OnMatch) Reset() {
*x = Matcher_OnMatch{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_OnMatch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_OnMatch) ProtoMessage() {}
func (x *Matcher_OnMatch) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_OnMatch.ProtoReflect.Descriptor instead.
func (*Matcher_OnMatch) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 0}
}
func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch {
if m != nil {
return m.OnMatch
}
return nil
}
func (x *Matcher_OnMatch) GetMatcher() *Matcher {
if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Matcher); ok {
return x.Matcher
}
return nil
}
func (x *Matcher_OnMatch) GetAction() *v31.TypedExtensionConfig {
if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Action); ok {
return x.Action
}
return nil
}
type isMatcher_OnMatch_OnMatch interface {
isMatcher_OnMatch_OnMatch()
}
type Matcher_OnMatch_Matcher struct {
// Nested matcher to evaluate.
// If the nested matcher does not match and does not specify
// on_no_match, then this matcher is considered not to have
// matched, even if a predicate at this level or above returned
// true.
Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"`
}
type Matcher_OnMatch_Action struct {
// Protocol-specific action to take.
Action *v31.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"`
}
func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {}
func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {}
// A linear list of field matchers.
// The field matchers are evaluated in order, and the first match
// wins.
type Matcher_MatcherList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of matchers. First match wins.
Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"`
}
func (x *Matcher_MatcherList) Reset() {
*x = Matcher_MatcherList{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_MatcherList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_MatcherList) ProtoMessage() {}
func (x *Matcher_MatcherList) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_MatcherList.ProtoReflect.Descriptor instead.
func (*Matcher_MatcherList) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1}
}
func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher {
if x != nil {
return x.Matchers
}
return nil
}
type Matcher_MatcherTree struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Protocol-specific specification of input field to match on.
Input *v31.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
// Exact or prefix match maps in which to look up the input value.
// If the lookup succeeds, the match is considered successful, and
// the corresponding OnMatch is used.
//
// Types that are assignable to TreeType:
// *Matcher_MatcherTree_ExactMatchMap
// *Matcher_MatcherTree_PrefixMatchMap
// *Matcher_MatcherTree_CustomMatch
TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"`
}
func (x *Matcher_MatcherTree) Reset() {
*x = Matcher_MatcherTree{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_MatcherTree) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_MatcherTree) ProtoMessage() {}
func (x *Matcher_MatcherTree) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_MatcherTree.ProtoReflect.Descriptor instead.
func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2}
}
func (x *Matcher_MatcherTree) GetInput() *v31.TypedExtensionConfig {
if x != nil {
return x.Input
}
return nil
}
func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType {
if m != nil {
return m.TreeType
}
return nil
}
func (x *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap {
if x, ok := x.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok {
return x.ExactMatchMap
}
return nil
}
func (x *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap {
if x, ok := x.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok {
return x.PrefixMatchMap
}
return nil
}
func (x *Matcher_MatcherTree) GetCustomMatch() *v31.TypedExtensionConfig {
if x, ok := x.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok {
return x.CustomMatch
}
return nil
}
type isMatcher_MatcherTree_TreeType interface {
isMatcher_MatcherTree_TreeType()
}
type Matcher_MatcherTree_ExactMatchMap struct {
ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"`
}
type Matcher_MatcherTree_PrefixMatchMap struct {
// Longest matching prefix wins.
PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"`
}
type Matcher_MatcherTree_CustomMatch struct {
// Extension for custom matching logic.
CustomMatch *v31.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"`
}
func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {}
func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {}
func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {}
// Predicate to determine if a match is successful.
type Matcher_MatcherList_Predicate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to MatchType:
// *Matcher_MatcherList_Predicate_SinglePredicate_
// *Matcher_MatcherList_Predicate_OrMatcher
// *Matcher_MatcherList_Predicate_AndMatcher
MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"`
}
func (x *Matcher_MatcherList_Predicate) Reset() {
*x = Matcher_MatcherList_Predicate{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_MatcherList_Predicate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_MatcherList_Predicate) ProtoMessage() {}
func (x *Matcher_MatcherList_Predicate) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_MatcherList_Predicate.ProtoReflect.Descriptor instead.
func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0}
}
func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType {
if m != nil {
return m.MatchType
}
return nil
}
func (x *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate {
if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok {
return x.SinglePredicate
}
return nil
}
func (x *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList {
if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok {
return x.OrMatcher
}
return nil
}
func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList {
if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok {
return x.AndMatcher
}
return nil
}
type isMatcher_MatcherList_Predicate_MatchType interface {
isMatcher_MatcherList_Predicate_MatchType()
}
type Matcher_MatcherList_Predicate_SinglePredicate_ struct {
// A single predicate to evaluate.
SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"`
}
type Matcher_MatcherList_Predicate_OrMatcher struct {
// A list of predicates to be OR-ed together.
OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"`
}
type Matcher_MatcherList_Predicate_AndMatcher struct {
// A list of predicates to be AND-ed together.
AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"`
}
func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {}
func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {}
func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {}
// An individual matcher.
type Matcher_MatcherList_FieldMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Determines if the match succeeds.
Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"`
// What to do if the match succeeds.
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
}
func (x *Matcher_MatcherList_FieldMatcher) Reset() {
*x = Matcher_MatcherList_FieldMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_MatcherList_FieldMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {}
func (x *Matcher_MatcherList_FieldMatcher) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_MatcherList_FieldMatcher.ProtoReflect.Descriptor instead.
func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 1}
}
func (x *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate {
if x != nil {
return x.Predicate
}
return nil
}
func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch {
if x != nil {
return x.OnMatch
}
return nil
}
// Predicate for a single input field.
type Matcher_MatcherList_Predicate_SinglePredicate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Protocol-specific specification of input field to match on.
Input *v31.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
// Types that are assignable to Matcher:
// *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch
// *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch
Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"`
}
func (x *Matcher_MatcherList_Predicate_SinglePredicate) Reset() {
*x = Matcher_MatcherList_Predicate_SinglePredicate{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_MatcherList_Predicate_SinglePredicate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {}
func (x *Matcher_MatcherList_Predicate_SinglePredicate) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_MatcherList_Predicate_SinglePredicate.ProtoReflect.Descriptor instead.
func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 0}
}
func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v31.TypedExtensionConfig {
if x != nil {
return x.Input
}
return nil
}
func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher {
if m != nil {
return m.Matcher
}
return nil
}
func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *v32.StringMatcher {
if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok {
return x.ValueMatch
}
return nil
}
func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v31.TypedExtensionConfig {
if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok {
return x.CustomMatch
}
return nil
}
type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface {
isMatcher_MatcherList_Predicate_SinglePredicate_Matcher()
}
type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct {
// Built-in string matcher.
ValueMatch *v32.StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"`
}
type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct {
// Extension for custom matching logic.
CustomMatch *v31.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"`
}
func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() {
}
func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() {
}
// A list of two or more matchers. Used to allow using a list within a oneof.
type Matcher_MatcherList_Predicate_PredicateList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"`
}
func (x *Matcher_MatcherList_Predicate_PredicateList) Reset() {
*x = Matcher_MatcherList_Predicate_PredicateList{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Matcher_MatcherList_Predicate_PredicateList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {}
func (x *Matcher_MatcherList_Predicate_PredicateList) ProtoReflect() protoreflect.Message {
mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Matcher_MatcherList_Predicate_PredicateList.ProtoReflect.Descriptor instead.
func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) {
return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 1}
}
func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate {
if x != nil {
return x.Predicate
}
return nil
}