Package io.envoyproxy.pgv
Class TimestampValidation
java.lang.Object
io.envoyproxy.pgv.TimestampValidation
TimestampValidation implements PGV validation for protobuf Timestamp fields.-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.protobuf.Timestampstatic com.google.protobuf.DurationtoDuration(long seconds, long nanos) Convertssecondsandnanosto a protobufDuration.static com.google.protobuf.TimestamptoTimestamp(long seconds, int nanos) Convertssecondsandnanosto a protobufTimestamp.static voidwithin(String field, com.google.protobuf.Timestamp value, com.google.protobuf.Duration duration, com.google.protobuf.Timestamp when)
-
Method Details
-
within
public static void within(String field, com.google.protobuf.Timestamp value, com.google.protobuf.Duration duration, com.google.protobuf.Timestamp when) throws ValidationException - Throws:
ValidationException
-
toTimestamp
public static com.google.protobuf.Timestamp toTimestamp(long seconds, int nanos) Convertssecondsandnanosto a protobufTimestamp. -
toDuration
public static com.google.protobuf.Duration toDuration(long seconds, long nanos) Convertssecondsandnanosto a protobufDuration. -
currentTimestamp
public static com.google.protobuf.Timestamp currentTimestamp()
-