Documentation
¶
Index ¶
- type Address
- type AppConfig
- type GeoLocation
- type GeoLocationConfig
- type GeoLocationOption
- type Place
- type SearchResponse
- type SearchService
- func (e *SearchService) Body(body []byte) *SearchService
- func (e *SearchService) City(city string) *SearchService
- func (e *SearchService) Country(country string) *SearchService
- func (e *SearchService) CountryCodes(countryCodes ...string) *SearchService
- func (e *SearchService) Latitude(latitude float64) *SearchService
- func (e *SearchService) Limit(limit int) *SearchService
- func (e *SearchService) Longitude(longitude float64) *SearchService
- func (e *SearchService) PostalCode(postalCode string) *SearchService
- func (e *SearchService) Query(query string) *SearchService
- func (e *SearchService) Reverse() (SearchResponse, error)
- func (e *SearchService) Search() (SearchResponse, error)
- func (e *SearchService) State(state string) *SearchService
- func (e *SearchService) Street(street string) *SearchService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Road string `json:"road"` Neighbourhood string `json:"neighbourhood"` Suburb string `json:"suburb"` City string `json:"city"` StateDistrict string `json:"state_district"` State string `json:"state"` Postcode string `json:"postcode"` Country string `json:"country"` CountryCode2A string `json:"country_code_2a"` CountryCode3A string `json:"county_code_3a"` }
type AppConfig ¶
type AppConfig struct {
GeoLocation *GeoLocationConfig `json:"geo-location"`
}
AppConfig ...
type GeoLocation ¶
type GeoLocation struct {
// contains filtered or unexported fields
}
func NewGeoLocation ¶
func NewGeoLocation(options ...GeoLocationOption) (*GeoLocation, error)
NewGeoLocation ...
func (*GeoLocation) NewSearch ¶
func (e *GeoLocation) NewSearch() *SearchService
func (*GeoLocation) Reconfigure ¶
func (g *GeoLocation) Reconfigure(options ...GeoLocationOption)
Reconfigure ...
type GeoLocationConfig ¶
type GeoLocationConfig struct { Log struct { Level string `json:"level"` } `json:"log"` Api string `json:"api"` }
GeoLocationConfig ...
type GeoLocationOption ¶
type GeoLocationOption func(g *GeoLocation)
GeoLocationOption ...
func WithConfiguration ¶
func WithConfiguration(config *GeoLocationConfig) GeoLocationOption
WithConfiguration ...
type Place ¶
type Place struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Name string `json:"name"` Category string `json:"category"` Type string `json:"type"` Importance float64 `json:"importance"` PlaceRank int `json:"place_rank"` BoundingBox []string `json:"bounding_box"` AddressType string `json:"address_type,omitempty"` Address *Address `json:"address,omitempty"` }
type SearchResponse ¶
type SearchResponse []*Place
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
func (*SearchService) Body ¶
func (e *SearchService) Body(body []byte) *SearchService
func (*SearchService) City ¶
func (e *SearchService) City(city string) *SearchService
func (*SearchService) Country ¶
func (e *SearchService) Country(country string) *SearchService
func (*SearchService) CountryCodes ¶
func (e *SearchService) CountryCodes(countryCodes ...string) *SearchService
func (*SearchService) Latitude ¶
func (e *SearchService) Latitude(latitude float64) *SearchService
func (*SearchService) Limit ¶
func (e *SearchService) Limit(limit int) *SearchService
func (*SearchService) Longitude ¶
func (e *SearchService) Longitude(longitude float64) *SearchService
func (*SearchService) PostalCode ¶
func (e *SearchService) PostalCode(postalCode string) *SearchService
func (*SearchService) Query ¶
func (e *SearchService) Query(query string) *SearchService
func (*SearchService) Reverse ¶
func (e *SearchService) Reverse() (SearchResponse, error)
func (*SearchService) Search ¶
func (e *SearchService) Search() (SearchResponse, error)
func (*SearchService) State ¶
func (e *SearchService) State(state string) *SearchService
func (*SearchService) Street ¶
func (e *SearchService) Street(street string) *SearchService
Source Files
¶
Click to show internal directories.
Click to hide internal directories.