ip

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPContainer

type IPContainer struct {
	IPRanges []*IPRange
}

func NewIPContainer

func NewIPContainer(ipStr string) (*IPContainer, error)

func (*IPContainer) AllToLong

func (b *IPContainer) AllToLong() []uint32

func (*IPContainer) AllToStr

func (b *IPContainer) AllToStr() []string

func (*IPContainer) Count

func (b *IPContainer) Count() int

func (*IPContainer) Do

func (b *IPContainer) Do(fn func(ipRange *IPRange) bool)

func (*IPContainer) Include

func (b *IPContainer) Include(ipStr string) (bool, error)

type IPRange

type IPRange struct {
	Start uint32
	End   uint32
	// contains filtered or unexported fields
}

func (*IPRange) Count

func (b *IPRange) Count() int

func (*IPRange) Do

func (b *IPRange) Do(fn func(uint32) bool)

func (*IPRange) End2IP

func (b *IPRange) End2IP() string

func (*IPRange) GetAllIPToInt

func (b *IPRange) GetAllIPToInt() []uint32

func (*IPRange) GetAllIPToStr

func (b *IPRange) GetAllIPToStr() []string

func (*IPRange) Include

func (b *IPRange) Include(ip uint32) bool

func (*IPRange) IncludeRange

func (b *IPRange) IncludeRange(sIP, eIP uint32) bool

func (*IPRange) Start2IP

func (b *IPRange) Start2IP() string

Jump to

Keyboard shortcuts

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