Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoEntry ¶
type GeoEntry struct { IPAddress string `json:"ipAddress"` UserAgent string `json:"userAgent"` Country string `json:"country"` Region string `json:"region"` City string `json:"city"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Timestamp time.Time `json:"timestamp"` }
GeoEntry defines data derived from browser info and ip address.
type MaxMindGeoLiteConfig ¶
type MaxMindGeoLiteConfig struct {
DBLocation string
}
MaxMindGeoLiteConfig ...
type Resolver ¶
type Resolver interface { Init(options interface{}) error Close() Resolve(string) (*GeoEntry, error) }
Resolver defines an IP-Geographic region resolver.
func NewGeoResolver ¶
NewGeoResolver creates a new GeoResolver. Note: this currently invokes the MaxMind Geo Resolver with the open-source GeoIP database
Click to show internal directories.
Click to hide internal directories.