Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidIP = errors.New("invalid ip")
)
Functions ¶
func GetFirstIP ¶
Types ¶
type Record ¶
type Record struct { City struct { Names map[string]string `maxminddb:"names"` } `maxminddb:"city"` Continent struct { Code string `maxminddb:"code"` Names map[string]string `maxminddb:"names"` } `maxminddb:"continent"` Country struct { ISOCode string `maxminddb:"iso_code"` Names map[string]string `maxminddb:"names"` IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` } `maxminddb:"country"` }
More fields available @ https://github.com/oschwald/geoip2-golang/blob/master/reader.go#L85 Only using what we need is faster
func GetLocation ¶
Click to show internal directories.
Click to hide internal directories.