Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertEnumToInt ¶
Convert a enum DNS request to unsigned integer
func PrefixToE164 ¶
Make any number 15 digits long by padding zeros
Types ¶
type Backend ¶
type Backend interface { // RangesBetween returns a list of ranges that enclose the given range l(ower) to u(pper) or // nil if no range matches. // The c parameter is the maximum count of values to return. If a negative c value is used // it will return the ranges in reverse order. RangesBetween(l, u uint64, c int) ([]NumberRange, error) // Add a range to the backend. Any range overlapping with the one added will be deleted or // adjusted to make room for the new one and returned. PushRange(r NumberRange) ([]NumberRange, error) // Close the backend. Close() error }
type NumberRange ¶
type NumberRange struct { Upper uint64 `json:"upper"` Lower uint64 `json:"lower"` Records []Record `json:"records"` }
func (*NumberRange) Contains ¶
func (r *NumberRange) Contains(o NumberRange) bool
func (*NumberRange) Equals ¶
func (r *NumberRange) Equals(o NumberRange) bool
func (*NumberRange) Finishes ¶
func (r *NumberRange) Finishes(o NumberRange) bool
func (*NumberRange) OverlapWith ¶
func (r *NumberRange) OverlapWith(o NumberRange) bool
Check if the range overlaps with another.
func (*NumberRange) Starts ¶
func (r *NumberRange) Starts(o NumberRange) bool
type RangeOverlapError ¶
type RangeOverlapError struct { Range NumberRange Overlaps []NumberRange }
RangeOverlapError is returned when an operation fails because a range overlaps with on or more other ranges.
func (*RangeOverlapError) Error ¶
func (e *RangeOverlapError) Error() string
Click to show internal directories.
Click to hide internal directories.