Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CIDR ¶
CIDR returns a validator that checks the value is a valid CIDR using net.ParseCIDR. It does not enforce any prefix length restriction.
func CIDRWithMaxPrefix ¶
CIDRWithMaxPrefix returns a validator that checks the value is a valid CIDR and that the prefix length is at most maxPrefix (e.g. 21 means /21 or larger network).
func PrivateCIDRWithMaxPrefix ¶
PrivateCIDRWithMaxPrefix returns a validator that checks the value is a valid CIDR, that the prefix length is at most maxPrefix, and that the IP is in a private RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.