Package io.envoyproxy.pgv
Class BytesValidation
java.lang.Object
io.envoyproxy.pgv.BytesValidation
public final class BytesValidation extends Object
BytesValidation implements PGV validators for protobuf Byte fields.-
Method Summary
Modifier and Type Method Description static voidcontains(String field, com.google.protobuf.ByteString value, byte[] contains)static voidip(String field, com.google.protobuf.ByteString value)static voidipv4(String field, com.google.protobuf.ByteString value)static voidipv6(String field, com.google.protobuf.ByteString value)static voidlength(String field, com.google.protobuf.ByteString value, int expected)static voidmaxLength(String field, com.google.protobuf.ByteString value, int expected)static voidminLength(String field, com.google.protobuf.ByteString value, int expected)static voidpattern(String field, com.google.protobuf.ByteString value, com.google.re2j.Pattern p)static voidprefix(String field, com.google.protobuf.ByteString value, byte[] prefix)static voidsuffix(String field, com.google.protobuf.ByteString value, byte[] suffix)
-
Method Details
-
length
public static void length(String field, com.google.protobuf.ByteString value, int expected) throws ValidationException- Throws:
ValidationException
-
minLength
public static void minLength(String field, com.google.protobuf.ByteString value, int expected) throws ValidationException- Throws:
ValidationException
-
maxLength
public static void maxLength(String field, com.google.protobuf.ByteString value, int expected) throws ValidationException- Throws:
ValidationException
-
prefix
public static void prefix(String field, com.google.protobuf.ByteString value, byte[] prefix) throws ValidationException- Throws:
ValidationException
-
contains
public static void contains(String field, com.google.protobuf.ByteString value, byte[] contains) throws ValidationException- Throws:
ValidationException
-
suffix
public static void suffix(String field, com.google.protobuf.ByteString value, byte[] suffix) throws ValidationException- Throws:
ValidationException
-
pattern
public static void pattern(String field, com.google.protobuf.ByteString value, com.google.re2j.Pattern p) throws ValidationException- Throws:
ValidationException
-
ip
public static void ip(String field, com.google.protobuf.ByteString value) throws ValidationException- Throws:
ValidationException
-
ipv4
public static void ipv4(String field, com.google.protobuf.ByteString value) throws ValidationException- Throws:
ValidationException
-
ipv6
public static void ipv6(String field, com.google.protobuf.ByteString value) throws ValidationException- Throws:
ValidationException
-