destinationfinder

package
v0.0.0-...-bebcb30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2018 License: MIT Imports: 8 Imported by: 1

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)

func (DestinationFinderCache) Open

func (dfc DestinationFinderCache) Open(db *sql.DB) error

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. *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL