geoipembed

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2021 License: MIT Imports: 6 Imported by: 1

README

How to regen

With go-bindata installed and assuming tor-static is present:

go-bindata -pkg geoipembed -prefix ..\..\..\tor-static\tor\src\config ..\..\..\tor-static\tor\src\config\geoip ..\..\..\tor-static\tor\src\config\geoip6

Then delete the public API, delete the unused imports, remove the generated comments at the package level, and put the mod time in for LastUpdated in geoipembed. One day this might all be automated, e.g. download maxmind db ourselves, gen code, update last updated, etc.

Documentation

Overview

Package geoipembed contains embedded db files for GeoIP.

The GeoIPReader can be used as tor.StartConf.GeoIPFileReader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeoIPBytes

func GeoIPBytes(ipv6 bool) ([]byte, error)

GeoIPBytes returns the full byte slice of the geo IP file.

func GeoIPReader

func GeoIPReader(ipv6 bool) (io.ReadCloser, error)

GeoIPReader returns a ReadCloser for GeoIPBytes. Close does nothing.

func LastUpdated

func LastUpdated() time.Time

LastUpdated is the mod time of the embedded geoip files.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL