parser

package
v0.0.0-...-ee9beca Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteGoFile

func WriteGoFile(fp string, data []byte) error

Types

type AsInfo

type AsInfo struct {
	Start  net.IP
	End    net.IP
	ASN    int
	Region string
	Name   string
}

func ParseIP2asn

func ParseIP2asn(fp string) ([]*AsInfo, error)

func (*AsInfo) TryMerge

func (i *AsInfo) TryMerge(other *AsInfo) error

type CidrInfo

type CidrInfo struct {
	Start uint32
	End   uint32
	ASN   int
	Name  string
}

func ParseCIDR

func ParseCIDR(fp string) ([]*CidrInfo, error)

type GoFile

type GoFile struct {
}

func (*GoFile) Write

func (g *GoFile) Write(fp string, data []byte) error

type IpCnt

type IpCnt struct {
	IP  net.IP
	Cnt int
}

func ParseIpCnt

func ParseIpCnt(r io.Reader) ([]*IpCnt, error)

type StringInterning

type StringInterning struct {
	// contains filtered or unexported fields
}

func NewStringInterning

func NewStringInterning(lib []string) *StringInterning

func (*StringInterning) GetIndex

func (si *StringInterning) GetIndex(s string) (int, bool)

func (*StringInterning) WriteFile

func (si *StringInterning) WriteFile(fp string) error

Jump to

Keyboard shortcuts

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