Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCIDRIsCanonical ¶
ValidateCIDRIsCanonical validates that the provided CIDR is in canonical form.
func ValidateCIDROverlap ¶
ValidateCIDROverlap validates that the provided CIDRs do not overlap.
func ValidateCIDRParse ¶
ValidateCIDRParse validates that all the given CIDRs can be parsed successfully.
Types ¶
type CIDR ¶
type CIDR interface {
// GetCIDR returns the provided CIDR
GetCIDR() string
// GetFieldPath returns the fieldpath
GetFieldPath() *field.Path
// GetIPNet optionally returns the IPNet of the CIDR
GetIPNet() *net.IPNet
// Parse checks if CIDR parses
Parse() bool
// ValidateNotSubset returns errors if subsets is a subset.
ValidateNotSubset(subsets ...CIDR) field.ErrorList
// ValidateParse returns errors CIDR can't be parsed.
ValidateParse() field.ErrorList
// ValidateSubset returns errors if subsets is not a subset.
ValidateSubset(subsets ...CIDR) field.ErrorList
}
CIDR contains CIDR and Path information
Click to show internal directories.
Click to hide internal directories.