Documentation
¶
Index ¶
- func CalculateLocationFromIP() (*model.Location, error)
- func CreateGetRequest(params url.Values, airportDbUrl string) (*http.Request, error)
- func GetAirPortDbSearchUri(airportDbUrl string) string
- func GetHttpClient() *http.Client
- func ListAirportsByDistance(client Client, location model.Location, rows int, airportSearchUrl string) ([]model.Airport, error)
- type AirportClient
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateLocationFromIP ¶
CalculateLocationFromIP get geo location data by using public ip
func CreateGetRequest ¶
CreateGetRequest creates an AirportDB GET request
func GetAirPortDbSearchUri ¶
GetAirPortDbSearchUri gat airport db search url, use a default one if does not exist
func GetHttpClient ¶
GetHttpClient create HTTP client instance for Airport DB
Types ¶
type AirportClient ¶ added in v0.3.0
type AirportClient struct {
}
AirportClient type that implements Client interface
func (*AirportClient) ProcessRequest ¶ added in v0.3.0
func (a *AirportClient) ProcessRequest(request *http.Request) ([]byte, error)
ProcessRequest get a simple response from a REST call
Click to show internal directories.
Click to hide internal directories.