client

package
v0.0.0-...-c9c0493 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(addr string) (*Client, error)

func NewWithClient

func NewWithClient(addr string, client *http.Client) (*Client, error)

func (*Client) APIKey

func (c *Client) APIKey() string

func (*Client) City

func (c *Client) City(ctx context.Context, address string, includeISP bool) (*entity.City, error)

func (*Client) CityLite

func (c *Client) CityLite(ctx context.Context, address, lang string) (*entity.CityLite, error)

func (*Client) Country

func (c *Client) Country(ctx context.Context, address string) (*entity.Country, error)

func (*Client) GeoIPDump

func (c *Client) GeoIPDump(ctx context.Context) (*resty.Response, error)

func (*Client) GeoNameCities

func (c *Client) GeoNameCities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error)

func (*Client) GeoNameContinents

func (c *Client) GeoNameContinents(ctx context.Context) []*entity.GeoNameContinent

func (*Client) GeoNameCountries

func (c *Client) GeoNameCountries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error)

func (*Client) GeoNameDump

func (c *Client) GeoNameDump(ctx context.Context, filter entity.GeoNameFilter) (*resty.Response, error)

func (*Client) GeoNameSubdivisions

func (c *Client) GeoNameSubdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error)

func (*Client) Origin

func (c *Client) Origin() string

func (*Client) SetApiKey

func (c *Client) SetApiKey(apiKey string) *Client

only for dump endpoints

type RespError

type RespError struct {
	StatusCode int
	Response   string
}

func (*RespError) Error

func (e *RespError) Error() string

Jump to

Keyboard shortcuts

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