Class TimestampValidation

java.lang.Object
io.envoyproxy.pgv.TimestampValidation

public final class TimestampValidation
extends Object
TimestampValidation implements PGV validation for protobuf Timestamp fields.
  • Method Summary

    Modifier and Type Method Description
    static com.google.protobuf.Timestamp currentTimestamp()  
    static com.google.protobuf.Duration toDuration​(long seconds, long nanos)
    Converts seconds and nanos to a protobuf Duration.
    static com.google.protobuf.Timestamp toTimestamp​(long seconds, int nanos)
    Converts seconds and nanos to a protobuf Timestamp.
    static void within​(String field, com.google.protobuf.Timestamp value, com.google.protobuf.Duration duration, com.google.protobuf.Timestamp when)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)
      Converts seconds and nanos to a protobuf Timestamp.
    • toDuration

      public static com.google.protobuf.Duration toDuration​(long seconds, long nanos)
      Converts seconds and nanos to a protobuf Duration.
    • currentTimestamp

      public static com.google.protobuf.Timestamp currentTimestamp()