geoIp

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GeoIpDBCurVersion string

Functions

func GeoIpBinary added in v0.9.0

func GeoIpBinary(url string) (data []byte, err error)

func GeoIpVersion added in v0.9.0

func GeoIpVersion(url string) (version string, err error)

func InitGeoIpDB

func InitGeoIpDB() error

func ReInitGeoIpDB added in v0.9.0

func ReInitGeoIpDB()

func UpdateGeoIP added in v0.9.0

func UpdateGeoIP()

new geoip from db file

Types

type CountryEmoji

type CountryEmoji struct {
	Code  string `json:"code"`
	Emoji string `json:"emoji"`
}

type GeoIP

type GeoIP struct {
	// contains filtered or unexported fields
}

GeoIP2

var GeoIpDB GeoIP

func NewGeoIP

func NewGeoIP(geodb, flags string) (geoip GeoIP)

new geoip from db file

func (GeoIP) Find

func (g GeoIP) Find(ipORdomain string) (ip, country string, err error)

Find ip info

Jump to

Keyboard shortcuts

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