Skip to content

Commit

Permalink
add or matcher
Browse files Browse the repository at this point in the history
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov committed Oct 19, 2023
1 parent 10948b1 commit ab4c59f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/envoy/type/matcher/v3/value.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;

// Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported.
// StructValue is not supported and is always not matched.
// [#next-free-field: 7]
// [#next-free-field: 8]
message ValueMatcher {
option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.ValueMatcher";

Expand Down Expand Up @@ -56,6 +56,9 @@ message ValueMatcher {
// If specified, a match occurs if and only if the target value is a list value and
// is matched to this field.
ListMatcher list_match = 6;

// If specified, a match occurs if and only if any of the alternatives in the match accept the value.
OrMatcher or_match = 7;
}
}

Expand All @@ -70,3 +73,8 @@ message ListMatcher {
ValueMatcher one_of = 1;
}
}

// Specifies a list of alternatives for the match.
message OrMatcher {
repeated ValueMatcher value_matchers = 1 [(validate.rules).repeated = {min_items: 2}];
}

0 comments on commit ab4c59f

Please sign in to comment.