Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errs.Class("objectmap error")
Error is the default error class for objectmap.
Functions ¶
This section is empty.
Types ¶
type IPDB ¶
type IPDB struct {
// contains filtered or unexported fields
}
IPDB holds the database file path and its reader.
architecture: Database
type IPInfo ¶
type IPInfo struct { Location struct { Latitude float64 `maxminddb:"latitude"` Longitude float64 `maxminddb:"longitude"` } `maxminddb:"location"` Postal struct { Code string `maxminddb:"code"` } `maxminddb:"postal"` Country struct { IsoCode string `maxminddb:"iso_code"` } `maxminddb:"country"` }
IPInfo represents the geolocation data from maxmind db.
type MockReader ¶ added in v1.3.0
type MockReader struct{}
MockReader is a mock implementation of maxmind database reader interface.
func (*MockReader) Close ¶ added in v1.3.0
func (mr *MockReader) Close() error
Close closes underlying connection.
Click to show internal directories.
Click to hide internal directories.