Documentation
¶
Index ¶
- type Range
- type RangeIter
- type RangeSet
- func (rs *RangeSet) Canonicalize() error
- func (rs *RangeSet) Concat(s string, subnet *net.IPNet) (*RangeSet, error)
- func (rs *RangeSet) Contains(addr net.IP) bool
- func (rs RangeSet) Len() int
- func (rs RangeSet) Less(i, j int) bool
- func (rs *RangeSet) Overlaps(p1 *RangeSet) bool
- func (rs *RangeSet) RangeFor(addr net.IP) (*Range, error)
- func (rs *RangeSet) String() string
- func (rs RangeSet) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Range ¶
Range represents a IP range
func (*Range) Canonicalize ¶
Canonicalize takes a given range and ensures that all information is consistent, filling out Start, End, and Gateway with sane values if missing
type RangeIter ¶
type RangeIter struct {
// contains filtered or unexported fields
}
RangeIter is a iterator of a RangeSet
type RangeSet ¶
type RangeSet []Range
RangeSet is a array of Range
func (*RangeSet) Canonicalize ¶
Canonicalize ensures the RangeSet is in a standard form, and detects any invalid input. Call Range.Canonicalize() on every Range in the set
func (*RangeSet) Concat ¶
Concat concats RangeSet from string for given subnet. eg: "10.0.0.[2-4], 10.0.1.4, 10.0.1.5, 10.0.1.9", 10.0.1.0/24
Click to show internal directories.
Click to hide internal directories.