Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (51 sloc) 2.22 KB

CircleCI Go Report Card GoDoc MIT License

Note the custom import path!

import (

Flightaware is a package that exposes the data from

The WSDL definition is translated into proto/flightaware.proto and go/flightaware.gen.go. The protobuf file produces go/flightaware.pb.go and go/ Therefore, the whole package is basically generated.

You need to get a Flightaware API key to use this package.

The APIClient interface is the main entry point for callers of this library. Authorization is attached the the context.

The APIServer could be run in the future if libraries were generated off the proto definition for other languages, as a relayer to the Flightaware API.

This is extremely new, I just wrote this on December 4th, 2015. Please try it out and report issues, cleanup is needed.

Note that the Firehose API and push notifications are not implemented yet.


import (


func do(username string, apiKey string) error {
	basicAuth := protohttp.BasicAuth{
		Username: username,
		Password: apiKey,
	response, err := flightaware.DefaultLocalAPIClient.FlightInfo(
			Ident: "AUA87",
	if err != nil {
		return err
	if response != nil && response.FlightInfoResult != nil {
		for _, flightStruct := range response.FlightInfoResult.Flights {
			fmt.Println(flightStruct.Aircrafttype) // usually a 767
	return nil

Future Work

Please contact me if you want to help out!