Documentation
¶
Index ¶
Constants ¶
View Source
const DATA_GITHUB string = "https://raw.githubusercontent.com/sfomuseum/go-sfomuseum-aircraft/main/data/aircraft-icao.json"
View Source
const DATA_JSON = "aircraft-icao.json"
Variables ¶
This section is empty.
Functions ¶
func NewICAOLookup ¶
NewICAOLookup will return an `aircraft.AircraftLookup` instance derived from precompiled (embedded) data in `data/icao.json`
func NewICAOLookupWithLookupFunc ¶
func NewICAOLookupWithLookupFunc(ctx context.Context, lookup_func ICAOLookupFunc) (aircraft.AircraftLookup, error)
NewICAOLookupWithLookupFunc will return an `aircraft.AircraftLookup` instance derived by data compiled using `lookup_func`.
Types ¶
type Aircraft ¶
type ICAOLookup ¶
type ICAOLookup struct {
aircraft.AircraftLookup
}
type ICAOLookupFunc ¶
func NewICAOLookupFuncWithReader ¶
func NewICAOLookupFuncWithReader(ctx context.Context, r io.ReadCloser) ICAOLookupFunc
NewICAOLookup will return an `ICAOLookupFunc` function instance that, when invoked, will populate an `aircraft.AircraftLookup` instance with data stored in `r`. `r` will be closed when the `ICAOLookupFunc` function instance is invoked. It is assumed that the data in `r` will be formatted in the same way as the procompiled (embedded) data stored in `data/icao.json`.
Click to show internal directories.
Click to hide internal directories.