Documentation ¶
Index ¶
- func ASNEnable() bool
- func ASNUrl() string
- func ClearGeoIPCache()
- func ClearGeoSiteCache()
- func GeoIpEnable() bool
- func GeoIpUrl() string
- func GeoSiteEnable() bool
- func GeoSiteUrl() string
- func GeodataMode() bool
- func InitASN() error
- func InitGeoIP() error
- func InitGeoSite() error
- func LoadGeoIPMatcher(country string) (router.IPMatcher, error)
- func LoadGeoSiteMatcher(countryCode string) (router.DomainMatcher, error)
- func LoaderName() string
- func MmdbUrl() string
- func RegisterGeoDataLoaderImplementationCreator(name string, loader func() LoaderImplementation)
- func SetASNUrl(url string)
- func SetGeoIpUrl(url string)
- func SetGeoSiteUrl(url string)
- func SetGeodataMode(newGeodataMode bool)
- func SetLoader(newLoader string)
- func SetMmdbUrl(url 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 ¶
This section is empty.
Functions ¶
func ClearGeoIPCache ¶ added in v1.18.9
func ClearGeoIPCache()
func ClearGeoSiteCache ¶ added in v1.18.9
func ClearGeoSiteCache()
func GeoIpEnable ¶ added in v1.18.9
func GeoIpEnable() bool
func GeoSiteEnable ¶ added in v1.18.9
func GeoSiteEnable() bool
func GeoSiteUrl ¶ added in v1.18.9
func GeoSiteUrl() string
func GeodataMode ¶ added in v1.18.2
func GeodataMode() bool
func InitGeoSite ¶
func InitGeoSite() error
func LoadGeoSiteMatcher ¶
func LoadGeoSiteMatcher(countryCode string) (router.DomainMatcher, error)
func LoaderName ¶
func LoaderName() string
func RegisterGeoDataLoaderImplementationCreator ¶
func RegisterGeoDataLoaderImplementationCreator(name string, loader func() LoaderImplementation)
func SetGeoIpUrl ¶ added in v1.18.9
func SetGeoIpUrl(url string)
func SetGeoSiteUrl ¶ added in v1.18.9
func SetGeoSiteUrl(url string)
func SetGeodataMode ¶ added in v1.18.2
func SetGeodataMode(newGeodataMode bool)
func SetMmdbUrl ¶ added in v1.18.9
func SetMmdbUrl(url string)
func SetSiteMatcher ¶ added in v1.18.0
func SetSiteMatcher(newMatcher string)
func SiteMatcherName ¶ added in v1.18.0
func SiteMatcherName() string
Types ¶
type AttributeList ¶
type AttributeList struct {
// contains filtered or unexported fields
}
func (*AttributeList) IsEmpty ¶
func (al *AttributeList) IsEmpty() bool
func (*AttributeList) String ¶ added in v1.18.8
func (al *AttributeList) String() string
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.