ipnet

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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

type IPNet net.IPNet

IPNet wraps net.IPNet to get CIDR serialization.

+kubebuilder:validation:Type=string

func MustParseCIDR

func MustParseCIDR(s string) *IPNet

MustParseCIDR parses a CIDR from its string representation. If the parse fails, the function will panic.

func ParseCIDR

func ParseCIDR(s string) (*IPNet, error)

ParseCIDR parses a CIDR from its string representation.

func (*IPNet) DeepCopy

func (in *IPNet) DeepCopy() *IPNet

func (*IPNet) DeepCopyInto

func (in *IPNet) DeepCopyInto(out *IPNet)

func (*IPNet) MarshalJSON

func (ipnet *IPNet) MarshalJSON() (data []byte, err error)

MarshalJSON interface for an IPNet

func (*IPNet) String

func (ipnet *IPNet) String() string

String returns a CIDR serialization of the subnet, or an empty string if the subnet is nil.

func (*IPNet) UnmarshalJSON

func (ipnet *IPNet) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON interface for an IPNet

type IPNets

type IPNets []IPNet

func (IPNets) CSVString

func (ipnets IPNets) CSVString() string

func (IPNets) StringSlice

func (ipnets IPNets) StringSlice() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL