geoip

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoIPClient

type GeoIPClient interface {
	Bootstrap()
	LookupCountryISO(ip string) (iso string, e error)
	IsReady() bool
}

func NewGeoIPFileClient

func NewGeoIPFileClient(c context.Context, path string) (_ GeoIPClient, e error)

func NewGeoIPHTTPClient

func NewGeoIPHTTPClient(c context.Context) (_ GeoIPClient, e error)

type GeoIPFileClient

type GeoIPFileClient struct {
	*maxminddb.Reader
	// contains filtered or unexported fields
}

func (*GeoIPFileClient) Bootstrap

func (m *GeoIPFileClient) Bootstrap()

func (*GeoIPFileClient) IsReady

func (m *GeoIPFileClient) IsReady() bool

func (*GeoIPFileClient) LookupCountryISO

func (m *GeoIPFileClient) LookupCountryISO(ip string) (string, error)

type GeoIPHTTPClient

type GeoIPHTTPClient struct {
	*maxminddb.Reader
	// contains filtered or unexported fields
}

func (*GeoIPHTTPClient) Bootstrap

func (m *GeoIPHTTPClient) Bootstrap()

func (*GeoIPHTTPClient) IsReady

func (m *GeoIPHTTPClient) IsReady() bool

func (*GeoIPHTTPClient) LookupCountryISO

func (m *GeoIPHTTPClient) LookupCountryISO(ip string) (string, error)

Jump to

Keyboard shortcuts

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