geo

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMphIndexMatcher

func ToMphIndexMatcher(domainMatchings []*commongeo.Domain,
	opts ...strmatcher.MphIndexMatcherOption) (strmatcher.IndexMatcher, error)

func ToStrMatcher

func ToStrMatcher(d *commongeo.Domain) (strmatcher.Matcher, error)

Types

type CIDR

type CIDR = commongeo.CIDR

type Domain

type Domain = commongeo.Domain

type GeoIP

type GeoIP = commongeo.GeoIP

type GeoSite

type GeoSite = commongeo.GeoSite

type IPMatcher

type IPMatcher struct {
	ReverseMatch bool //return the opposite result
	// contains filtered or unexported fields
}

a geoIPMathcer corr to one country's IP

func NewIPMatcherFromGeoCidrs

func NewIPMatcherFromGeoCidrs(cidrs []*vxgeo.CIDR, inverse bool) (*IPMatcher, error)

func (*IPMatcher) Match

func (m *IPMatcher) Match(ip net.IP) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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