Documentation
¶
Index ¶
- Constants
- func ConfigPath(home string) string
- func DBDir(home string, name string) string
- func DownloadGeoIPDatabaseFiles(dir string) error
- func DownloadLegacyGeoIPDatabaseFiles(dir string) error
- func GeoIPDir(home string) string
- func GetOONIHome() (string, error)
- func IPLookup() (string, error)
- func MakeResultsDir(home string, name string, ts time.Time) (string, error)
- func RequiredDirs(home string) []string
- type LocationInfo
Constants ¶
View Source
const ResultTimestamp = "2006-01-02T150405.999999999Z0700"
ResultTimestamp is a windows friendly timestamp
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the default path to the config file
func DownloadGeoIPDatabaseFiles ¶
DownloadGeoIPDatabaseFiles into the target directory
func DownloadLegacyGeoIPDatabaseFiles ¶
DownloadLegacyGeoIPDatabaseFiles into the target directory
func MakeResultsDir ¶
MakeResultsDir creates and returns a directory for the result
func RequiredDirs ¶
RequiredDirs returns the required ooni home directories
Types ¶
type LocationInfo ¶
LocationInfo contains location information
func GeoIPLookup ¶
func GeoIPLookup(dbPath string) (*LocationInfo, error)
GeoIPLookup does a geoip lookup and returns location information
func LookupLocation ¶
func LookupLocation(dbPath string, ipStr string) (LocationInfo, error)
LookupLocation resolves an IP to a location according to the Maxmind DB
Click to show internal directories.
Click to hide internal directories.