Documentation ¶
Index ¶
- type DAO
- func (d *DAO) GetFlight(id int) (Flight, error)
- func (d *DAO) GetFlightsActive() ([]Flight, error)
- func (d *DAO) GetFlightsForAirframe(icao string) ([]Flight, error)
- func (d *DAO) GetFlightsForDateRange(start, end time.Time) ([]Flight, error)
- func (d *DAO) GetRegistration(icao string) (Registration, error)
- func (d *DAO) GetTableSizes() ([]TableSize, error)
- func (d *DAO) GetTrackLog(flightID int) ([]TrackLog, error)
- func (d *DAO) SearchRegistration(query string) (string, error)
- type Flight
- type Registration
- type TableSize
- type TrackLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO struct {
// contains filtered or unexported fields
}
func (*DAO) GetFlightsActive ¶
func (*DAO) GetFlightsForAirframe ¶
func (*DAO) GetFlightsForDateRange ¶
func (*DAO) GetRegistration ¶
func (d *DAO) GetRegistration(icao string) (Registration, error)
func (*DAO) GetTableSizes ¶
func (*DAO) SearchRegistration ¶
SearchRegistration searches for the given registration (query) and, if found, returns the ICAO ID of the registration record. If not found, returns empty string. Error is non-nil only for database errors, NOT for no record found.
type Flight ¶
type Flight struct { ID int `db:"id"` Icao string `db:"icao"` Callsign sql.NullString `db:"callsign"` FirstSeen time.Time `db:"first_seen"` LastSeen pq.NullTime `db:"last_seen"` MsgCount sql.NullInt64 `db:"msg_count"` Registration sql.NullString Owner sql.NullString Airline sql.NullString `db:"airline"` TypeCode sql.NullString `db:"typecode"` MfgYear sql.NullInt64 `db:"year"` Mfg sql.NullString Model sql.NullString Icon string IconX int IconY int Category sql.NullInt64 `db:"category"` CategoryString string }
type Registration ¶
type Registration struct {
Icao, Source string
Registration sql.NullString
Typecode sql.NullString
Mfg sql.NullString
Model sql.NullString
Owner sql.NullString
City sql.NullString
State sql.NullString
Country sql.NullString
Year sql.NullInt64
}
Click to show internal directories.
Click to hide internal directories.