Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MissingFileError = errors.New("Invalid database file.") NotSupportedError = errors.New("This parameter is unavailable for selected data file. Please upgrade the data file.") InvalidAddressError = errors.New("Invalid IP address.") UnsupportedAddressTypeError = errors.New("Unsupported IP address type.") NoMatchError = errors.New("No matching IP range found.") )
View Source
var NotRunningError = errors.New("DB service not running")
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
type DBMeta ¶
type DBMeta struct {
// contains filtered or unexported fields
}
type IP2LocationDB ¶
type MultiDB ¶
type MultiDB []IP2LocationDB
type PoolDB ¶
type PoolDB struct { Factory func() (IP2LocationDB, error) // contains filtered or unexported fields }
PoolDB allows for db pooling
type QueryMode ¶
type QueryMode uint32
const ( QueryCountryCode QueryMode = 0x00001 QueryCountryName QueryMode = 0x00002 QueryRegion QueryMode = 0x00004 QueryCity QueryMode = 0x00008 QueryISP QueryMode = 0x00010 QueryLatitude QueryMode = 0x00020 QueryLongitude QueryMode = 0x00040 QueryDomain QueryMode = 0x00080 QueryZipCode QueryMode = 0x00100 QueryTimeZone QueryMode = 0x00200 QueryNetSpeed QueryMode = 0x00400 QueryIDDCode QueryMode = 0x00800 QueryAreaCode QueryMode = 0x01000 QueryWeatherStationCode QueryMode = 0x02000 QueryWeatherStationName QueryMode = 0x04000 QueryMCC QueryMode = 0x08000 QueryMNC QueryMode = 0x10000 QueryMobileBrand QueryMode = 0x20000 QueryElevation QueryMode = 0x40000 QueryUsageType QueryMode = 0x80000 QueryAll QueryMode = QueryCountryCode | QueryCountryName | QueryRegion | QueryCity | QueryISP | QueryLatitude | QueryLongitude | QueryDomain | QueryZipCode | QueryTimeZone | QueryNetSpeed | QueryIDDCode | QueryAreaCode | QueryWeatherStationCode | QueryWeatherStationName | QueryMCC | QueryMNC | QueryMobileBrand | QueryElevation | QueryUsageType )
type Record ¶
type Record struct { CountryCode string CountryName string Region string City string ISP string Latitude float32 Longitude float32 Domain string ZipCode string Timezone string NetSpeed string IDDCode string Areacode string WeatherStationCode string WeatherStationName string MCC string MNC string MobileBrand string Elevation float64 UsageType string }
Click to show internal directories.
Click to hide internal directories.