Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anonymous ¶
type Anonymous struct { // from geoip2-golang.AnonymousIP IsAnonymous bool `json:"is_anonymous"` IsAnonymousVPN bool `json:"is_anonymous_vpn"` IsHostingProvider bool `json:"is_hosting_provider"` IsPublicProxy bool `json:"is_public_proxy"` IsTorExitNode bool `json:"is_tor_exit_node"` }
Anonymous contains information about whether an IP address is anonymous
type City ¶
type City struct { Name string `json:"name"` Continent string `json:"continent"` ContinentCode string `json:"continent_code"` Country string `json:"country"` CountryCode string `json:"country_code"` AccuracyRadius uint16 `json:"accuracy_radius"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` MetroCode uint `json:"metro_code"` Timezone string `json:"timezone"` Postcode string `json:"postcode"` RegisteredCountry string `json:"registered_country"` RegisteredCountryCode string `json:"registered_country_code"` RepresentedCountry string `json:"represented_country"` RepresentedCountryCode string `json:"represented_country_code"` RepresentedCountryType string `json:"represented_country_type"` Subdivisions []string `json:"subdivisions"` IsAnonymousProxy bool `json:"is_anonymous_proxy"` IsSatelliteProvider bool `json:"is_satellite_provider"` }
City contains geographic data on a city level for a given IP address
type ConnectionType ¶
type ConnectionType struct {
Type string `json:"connection_type"`
}
ConnectionType denotes the connection type for a given IP address
type Country ¶
type Country struct { ContinentCode string `json:"continent_code"` Continent string `json:"continent"` CountryCode string `json:"country_code"` Country string `json:"country"` RegisteredCountryCode string `json:"registered_country_code"` RegisteredCountry string `json:"registered_country"` RepresentedCountryCode string `json:"represented_country_code"` RepresentedCountryType string `json:"represented_country_type"` RepresentedCountry string `json:"represented_country"` IsAnonymousProxy bool `json:"is_anonymous_proxy"` IsSatelliteProvider bool `json:"is_satellite_provider"` }
Country contains geographic data on a country level for a given IP address
type Domain ¶
type Domain struct {
Domain string `json:"domain"`
}
Domain denotes the domain for a given IP address
type GeoIP ¶
type GeoIP struct { IP net.IP `json:"ip" bson:"ip"` Anonymous Anonymous `json:"anonymous" bson:"anon"` City City `json:"city" bson:"city"` Country Country `json:"country" bson:"country"` Domain Domain `json:"domain" bson:"domain"` ISP ISP `json:"isp" bson:"isp"` // contains filtered or unexported fields }
GeoIP contains metadata for an IP address from the Maxmind GeoIP databases
func NewGeoIPNoLoad ¶
NewGeoIPNoLoad creates a new geoip type without loading the data
type ISP ¶
type ISP struct { AutonomousSystemNumber uint `json:"autonomous_system_number"` AutonomousSystemOrganization string `json:"autonomous_system_organization"` ISP string `json:"isp"` Organization string `json:"organization"` }
ISP contains information about the autonomous system for the given IP address
Click to show internal directories.
Click to hide internal directories.