Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
database configs
type GeoIPData ¶
type GeoIPData struct { IP net.IP `json:"ip"` City string `json:"city_name"` Continent string `json:"continent_code"` Country string `json:"country_code"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` MetroCode uint `json:"metro_code"` TimeZone string `json:"time_zone"` PostalCode string `json:"postal_code"` Subdivision string `json:"subdivision_code"` }
GeoIPData represents the data returned.
type Record ¶
type Record struct { City struct { Names map[string]string `maxminddb:"names"` } `maxminddb:"city"` Continent struct { Code string `maxminddb:"code"` } `maxminddb:"continent"` Country struct { IsoCode string `maxminddb:"iso_code"` } `maxminddb:"country"` Location struct { AccuracyRadius uint16 `maxminddb:"accuracy_radius"` Latitude float64 `maxminddb:"latitude"` Longitude float64 `maxminddb:"longitude"` MetroCode uint `maxminddb:"metro_code"` TimeZone string `maxminddb:"time_zone"` } `maxminddb:"location"` Postal struct { Code string `maxminddb:"code"` } `maxminddb:"postal"` Subdivisions []struct { IsoCode string `maxminddb:"iso_code"` } `maxminddb:"subdivisions"` }
Record defines the fields to fetch from the GeoIP database.
Click to show internal directories.
Click to hide internal directories.