Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPValidator ¶
type IPValidator interface { // IsValid returns true when an IP address is determined to be valid. IsValid(net.IP, IPVersion) bool }
IPValidator is the interface for validating an ip address and version.
type IPVersion ¶
type IPVersion int
IPVersion is the numerical version of the IP address spec (4 or 6).
type PublicNetworkIPValidator ¶
type PublicNetworkIPValidator struct { IPv4PrivateNetworks []net.IPNet IPv6PrivateNetworks []net.IPNet }
PublicNetworkIPValidator validates an ip address which is not contained in the list of known private networks.
type VersionIPValidator ¶
type VersionIPValidator struct {
Version IPVersion
}
VersionIPValidator validates an ip address based on the desired ip version.
Click to show internal directories.
Click to hide internal directories.