Documentation
¶
Overview ¶
Package ipnet wraps net.IPNet to get CIDR serialization. derived from: https://github.com/openshift/installer/blob/e6ac416efbf6d8dcc5a36e1187a4e05bbe7c9319/pkg/ipnet/ipnet.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPNet ¶
IPNet wraps net.IPNet to get CIDR serialization.
+kubebuilder:validation:Type=string +kubebuilder:validation:MaxLength=43 +kubebuilder:validation:XValidation:rule=`self.matches('^((\\d{1,3}\\.){3}\\d{1,3}/\\d{1,2})$') || self.matches('^([0-9a-fA-F]{0,4}:){2,7}([0-9a-fA-F]{0,4})?/[0-9]{1,3}$')`,message="cidr must be a valid IPv4 or IPv6 CIDR notation (e.g., 192.168.1.0/24 or 2001:db8::/64)"
func MustParseCIDR ¶
MustParseCIDR parses a CIDR from its string representation. If the parse fails, the function will panic.
func (*IPNet) DeepCopyInto ¶
func (*IPNet) MarshalJSON ¶
MarshalJSON interface for an IPNet
func (*IPNet) String ¶
String returns a CIDR serialization of the subnet, or an empty string if the subnet is nil.
func (*IPNet) UnmarshalJSON ¶
UnmarshalJSON interface for an IPNet