Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressComponent ¶
type Bounds ¶
type Bounds struct { SouthWest Coordinate `json:"southwest"` NorthEast Coordinate `json:"northeast"` }
type BusinessKey ¶
type Coordinate ¶
type Geocoder ¶
type Geocoder struct {
// contains filtered or unexported fields
}
func NewGeocoder ¶
func NewGeocoder(bkey *BusinessKey, baseURL, language string, client HttpRequester, requestPerSecond int, overQuerySleepDuration time.Duration, observer RequestObserver) (*Geocoder, error)
NewGeocoder creates new instance of Geocoder
func (*Geocoder) ReverseGeocode ¶
ReverseGeocode makes reverse geocoding against latitude, longitude and returns GoogleResponse. The number of requests per second is respected
type Geometry ¶
type Geometry struct { Location Coordinate `json:"location"` LocationType string `json:"location_type"` }
type GoogleResponse ¶
type GoogleResponse struct { Results []*ResultSet `json:"results"` Status GoogleResponseStatus `json:"status"` }
type GoogleResponseStatus ¶
type GoogleResponseStatus string
const ( GRS_ZERO_RESULTS GoogleResponseStatus = "ZERO_RESULTS" GRS_REQUEST_DENIED GoogleResponseStatus = "REQUEST_DENIED" GRS_INVALID_REQUEST GoogleResponseStatus = "INVALID_REQUEST" GRS_UNKNOWN_ERROR GoogleResponseStatus = "UNKNOWN_ERROR" GRS_OVER_QUERY_LIMIT GoogleResponseStatus = "OVER_QUERY_LIMIT" GRS_OK GoogleResponseStatus = "OK" )
type HttpRequester ¶ added in v0.0.4
type RequestObserver ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.