Documentation ¶
Index ¶
- type Client
- type GeoIPClient
- type GeoNameClient
- type MultiClient
- func (c *MultiClient) City(ctx context.Context, address string, includeISP bool) (*entity.City, error)
- func (c *MultiClient) CityLite(ctx context.Context, address, lang string) (*entity.CityLite, error)
- func (c *MultiClient) Country(ctx context.Context, address string) (*entity.Country, error)
- func (c *MultiClient) GeoNameCities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error)
- func (c *MultiClient) GeoNameContinents(ctx context.Context) []*entity.GeoNameContinent
- func (c *MultiClient) GeoNameCountries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error)
- func (c *MultiClient) GeoNameSubdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error)
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GeoIPClient GeoNameClient }
type GeoIPClient ¶
type GeoNameClient ¶
type GeoNameClient interface { GeoNameContinents(ctx context.Context) []*entity.GeoNameContinent GeoNameCountries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error) GeoNameSubdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error) GeoNameCities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error) }
type MultiClient ¶
type MultiClient struct {
Clients []Client
}
func (*MultiClient) GeoNameCities ¶
func (c *MultiClient) GeoNameCities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error)
func (*MultiClient) GeoNameContinents ¶
func (c *MultiClient) GeoNameContinents(ctx context.Context) []*entity.GeoNameContinent
func (*MultiClient) GeoNameCountries ¶
func (c *MultiClient) GeoNameCountries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error)
func (*MultiClient) GeoNameSubdivisions ¶
func (c *MultiClient) GeoNameSubdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error)
Click to show internal directories.
Click to hide internal directories.