Documentation ¶
Overview ¶
Package destinationfinder provides functionality for determining where a flight with a given callsign is destined.
Package destinationfinder provides functionality for determining where a flight with a given callsign is destined.
Package destinationfinder provides functionality for
determining where a flight with a given callsign is destined.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DestinationFinder ¶
type DestinationFinder interface {
GetDestinationFromCallsign(callsign string) (airport_code string, err error)
}
*
- Retrieves the airport code of the destination
- (as a simple string, we're not interested in doing *
func GetDestinationFinder ¶
func GetDestinationFinder() DestinationFinder
type DestinationFinderCache ¶
type DestinationFinderCache struct {
// contains filtered or unexported fields
}
*
- Retrieves the lat long of the destination (as a simple string, we're not interested in doing
- any real processing with this, just using it as an index. *
func (DestinationFinderCache) Cache_get ¶
func (dfc DestinationFinderCache) Cache_get(callsign string) string
func (DestinationFinderCache) Cache_set ¶
func (dfc DestinationFinderCache) Cache_set(callsign string, latlong string)
type FlightAwareDestinationFinder ¶
type FlightAwareDestinationFinder struct { }
func (*FlightAwareDestinationFinder) ExtractDestinationFromJson ¶
func (destination_finder *FlightAwareDestinationFinder) ExtractDestinationFromJson(json_string []byte) (airport_code string, err error)
func (FlightAwareDestinationFinder) GetDestinationFromCallsign ¶
func (destination_finder FlightAwareDestinationFinder) GetDestinationFromCallsign(callsign string) (airport_code string, err error)
*
- Retrieves the lat long of the destination (as a simple string, we're not interested in doing
- any real processing with this, just using it as an index. Uses the flightaware website as
- a datasource, and parses some js embedded in the page. As such this is potentially
- brittle, but the function defintion should stand, even if we were to plugin a different
- data source. *
Click to show internal directories.
Click to hide internal directories.