Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoMatcher ¶
type GeoMatcher struct {
// contains filtered or unexported fields
}
func NewGeoMatcher ¶
func NewGeoMatcher(geoSiteFilename, geoIpFilename string) *GeoMatcher
func (*GeoMatcher) LoadGeoIP ¶
func (g *GeoMatcher) LoadGeoIP() error
func (*GeoMatcher) LoadGeoSite ¶
func (g *GeoMatcher) LoadGeoSite() error
func (*GeoMatcher) MatchGeoIp ¶
func (g *GeoMatcher) MatchGeoIp(ip, condition string) bool
func (*GeoMatcher) MatchGeoSite ¶
func (g *GeoMatcher) MatchGeoSite(site, condition string) bool
type V2GeoLoader ¶
type V2GeoLoader struct { GeoIPFilename string GeoSiteFilename string UpdateInterval time.Duration DownloadFunc func(filename, url string) DownloadErrFunc func(err error) // contains filtered or unexported fields }
V2GeoLoader provides the on-demand GeoIP/MatchGeoSite database loading functionality required by the ACL engine. Empty filenames = automatic download from built-in URLs.
func NewDefaultGeoLoader ¶
func NewDefaultGeoLoader(geoSiteFilename, geoIpFilename string) *V2GeoLoader
func (*V2GeoLoader) LoadGeoSite ¶
func (l *V2GeoLoader) LoadGeoSite() (map[string]*v2geo.GeoSite, error)
Click to show internal directories.
Click to hide internal directories.