github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/type/matcher/regex.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.16.0 5 // source: envoy/type/matcher/regex.proto 6 7 package envoy_type_matcher 8 9 import ( 10 _ "github.com/cncf/xds/go/udpa/annotations" 11 _ "github.com/envoyproxy/protoc-gen-validate/validate" 12 proto "github.com/golang/protobuf/proto" 13 wrappers "github.com/golang/protobuf/ptypes/wrappers" 14 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 15 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 16 reflect "reflect" 17 sync "sync" 18 ) 19 20 const ( 21 // Verify that this generated code is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 23 // Verify that runtime/protoimpl is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 25 ) 26 27 // This is a compile-time assertion that a sufficiently up-to-date version 28 // of the legacy proto package is being used. 29 const _ = proto.ProtoPackageIsVersion4 30 31 // A regex matcher designed for safety when used with untrusted input. 32 type RegexMatcher struct { 33 state protoimpl.MessageState 34 sizeCache protoimpl.SizeCache 35 unknownFields protoimpl.UnknownFields 36 37 // Types that are assignable to EngineType: 38 // *RegexMatcher_GoogleRe2 39 EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` 40 // The regex match string. The string must be supported by the configured engine. 41 Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` 42 } 43 44 func (x *RegexMatcher) Reset() { 45 *x = RegexMatcher{} 46 if protoimpl.UnsafeEnabled { 47 mi := &file_envoy_type_matcher_regex_proto_msgTypes[0] 48 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 49 ms.StoreMessageInfo(mi) 50 } 51 } 52 53 func (x *RegexMatcher) String() string { 54 return protoimpl.X.MessageStringOf(x) 55 } 56 57 func (*RegexMatcher) ProtoMessage() {} 58 59 func (x *RegexMatcher) ProtoReflect() protoreflect.Message { 60 mi := &file_envoy_type_matcher_regex_proto_msgTypes[0] 61 if protoimpl.UnsafeEnabled && x != nil { 62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 63 if ms.LoadMessageInfo() == nil { 64 ms.StoreMessageInfo(mi) 65 } 66 return ms 67 } 68 return mi.MessageOf(x) 69 } 70 71 // Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead. 72 func (*RegexMatcher) Descriptor() ([]byte, []int) { 73 return file_envoy_type_matcher_regex_proto_rawDescGZIP(), []int{0} 74 } 75 76 func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { 77 if m != nil { 78 return m.EngineType 79 } 80 return nil 81 } 82 83 func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { 84 if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok { 85 return x.GoogleRe2 86 } 87 return nil 88 } 89 90 func (x *RegexMatcher) GetRegex() string { 91 if x != nil { 92 return x.Regex 93 } 94 return "" 95 } 96 97 type isRegexMatcher_EngineType interface { 98 isRegexMatcher_EngineType() 99 } 100 101 type RegexMatcher_GoogleRe2 struct { 102 // Google's RE2 regex engine. 103 GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` 104 } 105 106 func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} 107 108 // Describes how to match a string and then produce a new string using a regular 109 // expression and a substitution string. 110 type RegexMatchAndSubstitute struct { 111 state protoimpl.MessageState 112 sizeCache protoimpl.SizeCache 113 unknownFields protoimpl.UnknownFields 114 115 // The regular expression used to find portions of a string (hereafter called 116 // the "subject string") that should be replaced. When a new string is 117 // produced during the substitution operation, the new string is initially 118 // the same as the subject string, but then all matches in the subject string 119 // are replaced by the substitution string. If replacing all matches isn't 120 // desired, regular expression anchors can be used to ensure a single match, 121 // so as to replace just one occurrence of a pattern. Capture groups can be 122 // used in the pattern to extract portions of the subject string, and then 123 // referenced in the substitution string. 124 Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` 125 // The string that should be substituted into matching portions of the 126 // subject string during a substitution operation to produce a new string. 127 // Capture groups in the pattern can be referenced in the substitution 128 // string. Note, however, that the syntax for referring to capture groups is 129 // defined by the chosen regular expression engine. Google's `RE2 130 // <https://github.com/google/re2>`_ regular expression engine uses a 131 // backslash followed by the capture group number to denote a numbered 132 // capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers 133 // to capture group 2. 134 Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"` 135 } 136 137 func (x *RegexMatchAndSubstitute) Reset() { 138 *x = RegexMatchAndSubstitute{} 139 if protoimpl.UnsafeEnabled { 140 mi := &file_envoy_type_matcher_regex_proto_msgTypes[1] 141 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 142 ms.StoreMessageInfo(mi) 143 } 144 } 145 146 func (x *RegexMatchAndSubstitute) String() string { 147 return protoimpl.X.MessageStringOf(x) 148 } 149 150 func (*RegexMatchAndSubstitute) ProtoMessage() {} 151 152 func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message { 153 mi := &file_envoy_type_matcher_regex_proto_msgTypes[1] 154 if protoimpl.UnsafeEnabled && x != nil { 155 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 156 if ms.LoadMessageInfo() == nil { 157 ms.StoreMessageInfo(mi) 158 } 159 return ms 160 } 161 return mi.MessageOf(x) 162 } 163 164 // Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead. 165 func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int) { 166 return file_envoy_type_matcher_regex_proto_rawDescGZIP(), []int{1} 167 } 168 169 func (x *RegexMatchAndSubstitute) GetPattern() *RegexMatcher { 170 if x != nil { 171 return x.Pattern 172 } 173 return nil 174 } 175 176 func (x *RegexMatchAndSubstitute) GetSubstitution() string { 177 if x != nil { 178 return x.Substitution 179 } 180 return "" 181 } 182 183 // Google's `RE2 <https://github.com/google/re2>`_ regex engine. The regex string must adhere to 184 // the documented `syntax <https://github.com/google/re2/wiki/Syntax>`_. The engine is designed 185 // to complete execution in linear time as well as limit the amount of memory used. 186 // 187 // Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` 188 // and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or 189 // complexity that a compiled regex can have before an exception is thrown or a warning is 190 // logged, respectively. `re2.max_program_size.error_level` defaults to 100, and 191 // `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning). 192 // 193 // Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, 194 // which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented 195 // each time the program size exceeds the warn level threshold. 196 type RegexMatcher_GoogleRE2 struct { 197 state protoimpl.MessageState 198 sizeCache protoimpl.SizeCache 199 unknownFields protoimpl.UnknownFields 200 201 // This field controls the RE2 "program size" which is a rough estimate of how complex a 202 // compiled regex is to evaluate. A regex that has a program size greater than the configured 203 // value will fail to compile. In this case, the configured max program size can be increased 204 // or the regex can be simplified. If not specified, the default is 100. 205 // 206 // This field is deprecated; regexp validation should be performed on the management server 207 // instead of being done by each individual client. 208 // 209 // Deprecated: Do not use. 210 MaxProgramSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"` 211 } 212 213 func (x *RegexMatcher_GoogleRE2) Reset() { 214 *x = RegexMatcher_GoogleRE2{} 215 if protoimpl.UnsafeEnabled { 216 mi := &file_envoy_type_matcher_regex_proto_msgTypes[2] 217 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 218 ms.StoreMessageInfo(mi) 219 } 220 } 221 222 func (x *RegexMatcher_GoogleRE2) String() string { 223 return protoimpl.X.MessageStringOf(x) 224 } 225 226 func (*RegexMatcher_GoogleRE2) ProtoMessage() {} 227 228 func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message { 229 mi := &file_envoy_type_matcher_regex_proto_msgTypes[2] 230 if protoimpl.UnsafeEnabled && x != nil { 231 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 232 if ms.LoadMessageInfo() == nil { 233 ms.StoreMessageInfo(mi) 234 } 235 return ms 236 } 237 return mi.MessageOf(x) 238 } 239 240 // Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead. 241 func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { 242 return file_envoy_type_matcher_regex_proto_rawDescGZIP(), []int{0, 0} 243 } 244 245 // Deprecated: Do not use. 246 func (x *RegexMatcher_GoogleRE2) GetMaxProgramSize() *wrappers.UInt32Value { 247 if x != nil { 248 return x.MaxProgramSize 249 } 250 return nil 251 } 252 253 var File_envoy_type_matcher_regex_proto protoreflect.FileDescriptor 254 255 var file_envoy_type_matcher_regex_proto_rawDesc = []byte{ 256 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 257 0x63, 0x68, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 258 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 259 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 260 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 261 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 262 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 263 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 264 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x01, 0x0a, 265 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x55, 0x0a, 266 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 267 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 268 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 269 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x08, 0xfa, 270 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 271 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 272 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x65, 273 0x67, 0x65, 0x78, 0x1a, 0x57, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 274 0x12, 0x4a, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 275 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 276 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 277 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6d, 0x61, 278 0x78, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x12, 0x0a, 0x0b, 279 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 280 0x22, 0x79, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 281 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x70, 282 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 283 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 284 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 285 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 286 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 287 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x38, 0x0a, 0x20, 0x69, 288 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 289 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 290 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 291 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 292 } 293 294 var ( 295 file_envoy_type_matcher_regex_proto_rawDescOnce sync.Once 296 file_envoy_type_matcher_regex_proto_rawDescData = file_envoy_type_matcher_regex_proto_rawDesc 297 ) 298 299 func file_envoy_type_matcher_regex_proto_rawDescGZIP() []byte { 300 file_envoy_type_matcher_regex_proto_rawDescOnce.Do(func() { 301 file_envoy_type_matcher_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_regex_proto_rawDescData) 302 }) 303 return file_envoy_type_matcher_regex_proto_rawDescData 304 } 305 306 var file_envoy_type_matcher_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 307 var file_envoy_type_matcher_regex_proto_goTypes = []interface{}{ 308 (*RegexMatcher)(nil), // 0: envoy.type.matcher.RegexMatcher 309 (*RegexMatchAndSubstitute)(nil), // 1: envoy.type.matcher.RegexMatchAndSubstitute 310 (*RegexMatcher_GoogleRE2)(nil), // 2: envoy.type.matcher.RegexMatcher.GoogleRE2 311 (*wrappers.UInt32Value)(nil), // 3: google.protobuf.UInt32Value 312 } 313 var file_envoy_type_matcher_regex_proto_depIdxs = []int32{ 314 2, // 0: envoy.type.matcher.RegexMatcher.google_re2:type_name -> envoy.type.matcher.RegexMatcher.GoogleRE2 315 0, // 1: envoy.type.matcher.RegexMatchAndSubstitute.pattern:type_name -> envoy.type.matcher.RegexMatcher 316 3, // 2: envoy.type.matcher.RegexMatcher.GoogleRE2.max_program_size:type_name -> google.protobuf.UInt32Value 317 3, // [3:3] is the sub-list for method output_type 318 3, // [3:3] is the sub-list for method input_type 319 3, // [3:3] is the sub-list for extension type_name 320 3, // [3:3] is the sub-list for extension extendee 321 0, // [0:3] is the sub-list for field type_name 322 } 323 324 func init() { file_envoy_type_matcher_regex_proto_init() } 325 func file_envoy_type_matcher_regex_proto_init() { 326 if File_envoy_type_matcher_regex_proto != nil { 327 return 328 } 329 if !protoimpl.UnsafeEnabled { 330 file_envoy_type_matcher_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 331 switch v := v.(*RegexMatcher); i { 332 case 0: 333 return &v.state 334 case 1: 335 return &v.sizeCache 336 case 2: 337 return &v.unknownFields 338 default: 339 return nil 340 } 341 } 342 file_envoy_type_matcher_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 343 switch v := v.(*RegexMatchAndSubstitute); i { 344 case 0: 345 return &v.state 346 case 1: 347 return &v.sizeCache 348 case 2: 349 return &v.unknownFields 350 default: 351 return nil 352 } 353 } 354 file_envoy_type_matcher_regex_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 355 switch v := v.(*RegexMatcher_GoogleRE2); i { 356 case 0: 357 return &v.state 358 case 1: 359 return &v.sizeCache 360 case 2: 361 return &v.unknownFields 362 default: 363 return nil 364 } 365 } 366 } 367 file_envoy_type_matcher_regex_proto_msgTypes[0].OneofWrappers = []interface{}{ 368 (*RegexMatcher_GoogleRe2)(nil), 369 } 370 type x struct{} 371 out := protoimpl.TypeBuilder{ 372 File: protoimpl.DescBuilder{ 373 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 374 RawDescriptor: file_envoy_type_matcher_regex_proto_rawDesc, 375 NumEnums: 0, 376 NumMessages: 3, 377 NumExtensions: 0, 378 NumServices: 0, 379 }, 380 GoTypes: file_envoy_type_matcher_regex_proto_goTypes, 381 DependencyIndexes: file_envoy_type_matcher_regex_proto_depIdxs, 382 MessageInfos: file_envoy_type_matcher_regex_proto_msgTypes, 383 }.Build() 384 File_envoy_type_matcher_regex_proto = out.File 385 file_envoy_type_matcher_regex_proto_rawDesc = nil 386 file_envoy_type_matcher_regex_proto_goTypes = nil 387 file_envoy_type_matcher_regex_proto_depIdxs = nil 388 }