geodata

package
v0.0.0-...-07af6e5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 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 *routercommon.Domain) bool

type AttributeMatcher

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

type BooleanMatcher

type BooleanMatcher string

func (BooleanMatcher) Match

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

type Loader

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

func GetGeoDataLoader

func GetGeoDataLoader(name string) (Loader, error)

type LoaderImplementation

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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