Documentation
¶
Index ¶
- Variables
- func Compress(p []byte) ([]byte, error)
- func Decompress(p []byte) ([]byte, error)
- func Format(in, out interface{}) error
- func Int(v interface{}) int
- type City
- type Client
- type Continent
- type Country
- type EsIP
- type GeoIP
- type ID
- type Location
- type Names
- type Postal
- type RegisteredCountry
- type Subdivision
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GeoDB = "GeoLite2-City.mmdb"
)
Functions ¶
func Decompress ¶
Types ¶
type EsIP ¶
type EsIP struct { Timezone string `json:"timezone,omitempty"` Ip string `json:"ip,omitempty"` Latitude float64 `json:"latitude,omitempty"` ContinentCode string `json:"continent_code,omitempty"` CityName string `json:"city_name,omitempty"` CountryName string `json:"country_name,omitempty"` CountryCode2 string `json:"country_code2,omitempty"` DmaCode int `json:"dma_code,omitempty"` CountryCode3 string `json:"country_code3,omitempty"` RegionName string `json:"region_name,omitempty"` Location struct { Lon float64 `json:"lon,omitempty"` Lat float64 `json:"lat,omitempty"` } `json:"location,omitempty"` PostalCode string `json:"postal_code,omitempty"` RegionCode string `json:"region_code,omitempty"` Longitude float64 `json:"longitude,omitempty"` }
type GeoIP ¶
type GeoIP struct { IP string `json:"ip"` City City `json:"city"` Continent Continent `json:"continent"` Country Country `json:"country"` Location Location `json:"location"` Postal Postal `json:"postal"` RegisteredCountry RegisteredCountry `json:"registered_country"` Subdivisions []Subdivision `json:"subdivisions"` }
type RegisteredCountry ¶
type Subdivision ¶
Click to show internal directories.
Click to hide internal directories.