geodata

package
v4.40.11 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGeoDataLoaderImplementationCreator

func RegisterGeoDataLoaderImplementationCreator(name string, loader func() LoaderImplementation)

Types

type AttributeList

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

func (*AttributeList) IsEmpty

func (al *AttributeList) IsEmpty() bool

func (*AttributeList) Match

func (al *AttributeList) Match(domain *router.Domain) bool

type AttributeMatcher

type AttributeMatcher interface {
	Match(*router.Domain) bool
}

type BooleanMatcher

type BooleanMatcher string

func (BooleanMatcher) Match

func (m BooleanMatcher) Match(domain *router.Domain) bool

type Loader

type Loader interface {
	LoaderImplementation
	LoadGeoSite(list string) ([]*router.Domain, error)
	LoadGeoSiteWithAttr(file string, siteWithAttr string) ([]*router.Domain, error)
	LoadGeoIP(country string) ([]*router.CIDR, error)
}

func GetGeoDataLoader

func GetGeoDataLoader(name string) (Loader, error)

type LoaderImplementation

type LoaderImplementation interface {
	LoadSite(filename, list string) ([]*router.Domain, error)
	LoadIP(filename, country string) ([]*router.CIDR, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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