Documentation ¶
Index ¶
- Variables
- func ClearCache()
- func GeoAutoUpdate() bool
- func GeoUpdateInterval() int
- func GeodataMode() bool
- func InitASN() error
- func InitGeoIP() error
- func InitGeoSite() error
- func LoadGeoIPMatcher(country string) (*router.GeoIPMatcher, int, error)
- func LoadGeoSiteMatcher(countryCode string) (router.DomainMatcher, int, error)
- func LoaderName() string
- func RegisterGeoDataLoaderImplementationCreator(name string, loader func() LoaderImplementation)
- func SetGeoAutoUpdate(newAutoUpdate bool)
- func SetGeoUpdateInterval(newGeoUpdateInterval int)
- func SetGeodataMode(newGeodataMode bool)
- func SetLoader(newLoader string)
- func SetSiteMatcher(newMatcher string)
- func SiteMatcherName() string
- func Verify(name string) error
- type AttributeList
- type AttributeMatcher
- type BooleanMatcher
- type Loader
- type LoaderImplementation
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AutoUpdate bool UpdateInterval int )
Functions ¶
func ClearCache ¶
func ClearCache()
func GeoAutoUpdate ¶
func GeoAutoUpdate() bool
func GeoUpdateInterval ¶
func GeoUpdateInterval() int
func GeodataMode ¶
func GeodataMode() bool
func InitGeoSite ¶
func InitGeoSite() error
func LoadGeoIPMatcher ¶
func LoadGeoIPMatcher(country string) (*router.GeoIPMatcher, int, error)
func LoadGeoSiteMatcher ¶
func LoadGeoSiteMatcher(countryCode string) (router.DomainMatcher, int, error)
func LoaderName ¶
func LoaderName() string
func RegisterGeoDataLoaderImplementationCreator ¶
func RegisterGeoDataLoaderImplementationCreator(name string, loader func() LoaderImplementation)
func SetGeoAutoUpdate ¶
func SetGeoAutoUpdate(newAutoUpdate bool)
func SetGeoUpdateInterval ¶
func SetGeoUpdateInterval(newGeoUpdateInterval int)
func SetGeodataMode ¶
func SetGeodataMode(newGeodataMode bool)
func SetSiteMatcher ¶
func SetSiteMatcher(newMatcher string)
func SiteMatcherName ¶
func SiteMatcherName() string
Types ¶
type AttributeList ¶
type AttributeList struct {
// contains filtered or unexported fields
}
func (*AttributeList) IsEmpty ¶
func (al *AttributeList) IsEmpty() bool
type AttributeMatcher ¶
type BooleanMatcher ¶
type BooleanMatcher string
type Loader ¶
type Loader interface { LoaderImplementation LoadGeoSite(list string) ([]*router.Domain, error) LoadGeoIP(country string) ([]*router.CIDR, error) }
func GetGeoDataLoader ¶
type LoaderImplementation ¶
type LoaderImplementation interface { LoadSiteByPath(filename, list string) ([]*router.Domain, error) LoadSiteByBytes(geositeBytes []byte, list string) ([]*router.Domain, error) LoadIPByPath(filename, country string) ([]*router.CIDR, error) LoadIPByBytes(geoipBytes []byte, country string) ([]*router.CIDR, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.