Documentation
¶
Index ¶
- type IPTree
- func (i *IPTree) Add(cidr *net.IPNet, v interface{}) error
- func (i *IPTree) AddByNetIP(ipcidr net.IP, mask net.IPMask, v interface{}) error
- func (i *IPTree) AddByNetIPAddr(ipcidr netip.Addr, mask netip.Prefix, v interface{}, overwrite bool) error
- func (i *IPTree) AddByString(ipcidr string, v interface{}) error
- func (i *IPTree) DeleteByNetIP(ip net.IP, mask net.IPMask) error
- func (i *IPTree) DeleteByNetIPAddr(nip netip.Addr, mask netip.Prefix) error
- func (i *IPTree) DeleteByString(ipstr string) error
- func (i *IPTree) Get(ip net.IP) (interface{}, bool, error)
- func (i *IPTree) GetAll() map[string]interface{}
- func (i *IPTree) GetByString(ipstr string) (interface{}, bool, error)
- func (i *IPTree) GetIPNet(ip net.IPNet) (interface{}, bool, error)
- func (i *IPTree) GetNetIP(ip net.IP) (interface{}, bool, error)
- func (i *IPTree) GetNetIPAddr(nip netip.Addr) (interface{}, bool, error)
- func (i *IPTree) WalkV4Prefix(callback func(prefix netip.Prefix, value interface{}) error) error
- func (i *IPTree) WalkV4String(callback func(prefix string, value interface{}) error) error
- func (i *IPTree) WalkV6Prefix(callback func(prefix netip.Prefix, value interface{}) error) error
- func (i *IPTree) WalkV6String(callback func(prefix string, value interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPTree ¶
func (*IPTree) AddByNetIP ¶ added in v1.0.2
func (*IPTree) AddByNetIPAddr ¶ added in v1.0.2
func (*IPTree) AddByString ¶
func (*IPTree) DeleteByNetIP ¶ added in v1.0.2
func (*IPTree) DeleteByNetIPAddr ¶ added in v1.0.2
func (*IPTree) DeleteByString ¶
func (*IPTree) GetAll ¶ added in v1.0.3
GetAll returns all entries in the IPTree as a map of CIDR strings to their values
func (*IPTree) GetNetIPAddr ¶
func (*IPTree) WalkV4Prefix ¶ added in v1.0.5
WalkV4Prefix iterates through all entries in the IPTree, calling the provided function for each entry. If the callback returns false, iteration stops.
func (*IPTree) WalkV4String ¶ added in v1.0.5
WalkV4String iterates through all entries in the IPTree, calling the provided function for each entry. If the callback returns false, iteration stops.
func (*IPTree) WalkV6Prefix ¶ added in v1.0.5
WalkV6Prefix iterates through all entries in the IPTree, calling the provided function for each entry. If the callback returns false, iteration stops.
Click to show internal directories.
Click to hide internal directories.