1// Copyright 2020 The gRPC Authors 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Local copy of Envoy xDS proto file, used for testing only. 16 17syntax = "proto3"; 18 19package envoy.type.matcher.v3; 20 21// [#protodoc-title: Regex matcher] 22 23// A regex matcher designed for safety when used with untrusted input. 24message RegexMatcher { 25 // Google's `RE2 <https://github.com/google/re2>`_ regex engine. The regex string must adhere to 26 // the documented `syntax <https://github.com/google/re2/wiki/Syntax>`_. The engine is designed 27 // to complete execution in linear time as well as limit the amount of memory used. 28 message GoogleRE2 { 29 } 30 31 oneof engine_type { 32 // Google's RE2 regex engine. 33 GoogleRE2 google_re2 = 1; 34 } 35 36 // The regex match string. The string must be supported by the configured engine. 37 string regex = 2; 38} 39 40message RegexMatchAndSubstitute { 41 RegexMatcher pattern = 1; 42 string substitution = 2; 43} 44