Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BoltBucketv4 containing ipv4 data BoltBucketv4 = "ipv4" // BoltBucketv6 containing ipv6 data BoltBucketv6 = "ipv6" // IPv4 represents ipv4 address IPv4 = "ipv4" // IPv6 represents ipv6 address IPv6 = "ipv6" // IPv4ByteCount is the ipv4 byte count IPv4ByteCount = 32 // IPv6ByteCount is the ipv6 byte count IPv6ByteCount = 128 // URLs for each RIR containing geoip data. Arin = "https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest" RipeNcc = "https://ftp.ripe.net/ripe/stats/delegated-ripencc-extended-latest" Apnic = "https://ftp.apnic.net/stats/apnic/delegated-apnic-extended-latest" Afrinic = "https://ftp.apnic.net/stats/afrinic/delegated-afrinic-extended-latest" Lacnic = "https://ftp.apnic.net/stats/lacnic/delegated-lacnic-extended-latest" )
Constants used in goiplookup.
View Source
const ( // DefaultDBPath is the default location of bolt db file. DefaultDBPath = "/tmp/geoip.db" // DefaultTimeout is the default http client timeout. DefaultTimeout = 180 * time.Second )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler struct.
func (*Handler) InitializeBuckets ¶
InitializeBuckets handler initializes the buckets in DB.
func (*Handler) PopulateData ¶
PopulateData extracts the geoip data for each RIR and populates the database.
Click to show internal directories.
Click to hide internal directories.