Package io.envoyproxy.pgv
Interface Validator<T>
- Type Parameters:
T- The type to validate
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Validator asserts the validity of a protobuf object.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidassertValid(T proto) Asserts validation rules on a protobuf object.default booleanChecks validation rules on a protobuf object.
-
Field Details
-
ALWAYS_VALID
-
ALWAYS_INVALID
-
-
Method Details
-
assertValid
Asserts validation rules on a protobuf object.- Parameters:
proto- the protobuf object to validate.- Throws:
ValidationException- with the first validation error encountered.
-
isValid
Checks validation rules on a protobuf object.- Parameters:
proto- the protobuf object to validate.- Returns:
trueif all rules are valid,falseif not.
-