Documentation ¶
Index ¶
- func FindDB() string
- type GeoIP2
- func (g *GeoIP2) GetASN(ip net.IP) (string, int, error)
- func (g *GeoIP2) GetCountry(ip net.IP) (country, continent string, netmask int)
- func (g *GeoIP2) GetLocation(ip net.IP) (l *geo.Location, err error)
- func (g *GeoIP2) HasASN() (bool, error)
- func (g *GeoIP2) HasCountry() (bool, error)
- func (g *GeoIP2) HasLocation() (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GeoIP2 ¶
type GeoIP2 struct {
// contains filtered or unexported fields
}
GeoIP2 contains the geoip implementation of the GeoDNS geo targeting interface
func (*GeoIP2) GetCountry ¶
GetCountry returns the country, continent and netmask for the given IP
func (*GeoIP2) GetLocation ¶
GetLocation returns a geo.Location object for the given IP
func (*GeoIP2) HasCountry ¶
HasCountry checks if the GeoIP country database is available
func (*GeoIP2) HasLocation ¶
HasLocation returns if the city database is available to return lat/lon information for an IP
Click to show internal directories.
Click to hide internal directories.