Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abh/geoip
/ functions
Functions
25 in github.com/abh/geoip
⨍
Functions
25
◇
Types & classes
3
↓ 12 callers
Method
free
()
geoip.go:35
↓ 5 callers
Method
GetCountry
Takes an IPv4 address string and returns the country code for that IP and the netmask for that IP range.
geoip.go:301
↓ 5 callers
Function
Open
Default convenience wrapper around OpenDb
geoip.go:49
↓ 2 callers
Method
GetName
Works on the ASN, Netspeed, Organization and probably other databases, takes and IP string and returns a "name" and the netmask.
geoip.go:152
↓ 2 callers
Method
GetRecord
Returns the "City Record" for an IP address. Requires the GeoCity(Lite) database - http://www.maxmind.com/en/city
geoip.go:190
↓ 2 callers
Function
GetRegionName
Returns the region name given a country code and region code
geoip.go:258
↓ 2 callers
Function
test4
(g *geoip.GeoIP, ip string)
ex/geoip-demo.go:58
↓ 1 callers
Method
GetCountry_v6
GetCountry_v6 works the same as GetCountry except for IPv6 addresses, be sure to load a database with IPv6 data to get any results.
geoip.go:323
↓ 1 callers
Method
GetNameV6
Same as GetName() but for IPv6 addresses.
geoip.go:278
↓ 1 callers
Method
GetRegion
Returns the country code and region code for an IP address. Requires the GeoIP Region database.
geoip.go:234
↓ 1 callers
Function
OpenDb
Opens a GeoIP database by filename with specified GeoIPOptions flag. All formats supported by libgeoip are supported though there are only functions t
geoip.go:58
↓ 1 callers
Function
OpenType
OpenType opens a specified GeoIP database type in the default location and the 'memory cache' flag. Use OpenTypeFlag() to specify flag.
geoip.go:138
↓ 1 callers
Function
OpenTypeFlag
OpenType opens a specified GeoIP database type in the default location with the specified GeoIPOptions flag. Constants are defined for each database t
geoip.go:116
↓ 1 callers
Function
SetCustomDirectory
SetCustomDirectory sets the default location for the GeoIP .dat files used when calling OpenType()
geoip.go:106
↓ 1 callers
Function
test
(f func(string) (string, int), ip string)
ex/geoip-demo.go:62
Method
Benchmark_GetCountry
(c *C)
geoip_test.go:48
Method
Benchmark_GetRecord
(c *C)
geoip_test.go:91
Method
GetOrg
Takes an IPv4 address string and returns the organization name for that IP. Requires the GeoIP organization database.
geoip.go:144
Function
Test
Hook up gocheck into the gotest runner.
geoip_test.go:11
Method
TestOpenType
(c *C)
geoip_test.go:36
Method
TestRegionName
(c *C)
geoip_test.go:119
Method
Testv4
(c *C)
geoip_test.go:18
Method
Testv4Record
(c *C)
geoip_test.go:60
Method
Testv4Region
(c *C)
geoip_test.go:107
Function
main
()
ex/geoip-demo.go:9