Documentation ¶
Overview ¶
Package netip provides a mockable wrapper for net/netip.
Index ¶
- type Impl
- func (*Impl) AddrFrom16(addr [16]byte) netip.Addr
- func (*Impl) AddrFrom4(addr [4]byte) netip.Addr
- func (*Impl) AddrFromSlice(slice []byte) (ip netip.Addr, ok bool)
- func (*Impl) AddrPortFrom(ip netip.Addr, port uint16) netip.AddrPort
- func (*Impl) IPv4Unspecified() netip.Addr
- func (*Impl) IPv6LinkLocalAllNodes() netip.Addr
- func (*Impl) IPv6Unspecified() netip.Addr
- func (*Impl) MustParseAddr(s string) netip.Addr
- func (*Impl) MustParseAddrPort(s string) netip.AddrPort
- func (*Impl) MustParsePrefix(s string) netip.Prefix
- func (*Impl) ParseAddr(s string) (netip.Addr, error)
- func (*Impl) ParseAddrPort(s string) (netip.AddrPort, error)
- func (*Impl) ParsePrefix(s string) (netip.Prefix, error)
- func (*Impl) PrefixFrom(ip netip.Addr, bits int) netip.Prefix
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) IPv4Unspecified ¶
func (*Impl) IPv6LinkLocalAllNodes ¶
func (*Impl) IPv6Unspecified ¶
type Interface ¶
type Interface interface { AddrFrom16(addr [16]byte) netip.Addr AddrFrom4(addr [4]byte) netip.Addr AddrFromSlice(slice []byte) (ip netip.Addr, ok bool) AddrPortFrom(ip netip.Addr, port uint16) netip.AddrPort IPv4Unspecified() netip.Addr IPv6LinkLocalAllNodes() netip.Addr IPv6Unspecified() netip.Addr MustParseAddr(s string) netip.Addr MustParseAddrPort(s string) netip.AddrPort MustParsePrefix(s string) netip.Prefix ParseAddr(s string) (netip.Addr, error) ParseAddrPort(s string) (netip.AddrPort, error) ParsePrefix(s string) (netip.Prefix, error) PrefixFrom(ip netip.Addr, bits int) netip.Prefix }
Click to show internal directories.
Click to hide internal directories.