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)
Click to show internal directories.
Click to hide internal directories.