flightdb

package
v0.0.0-...-6307f30 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineFlightsFromConfig

func DetermineFlightsFromConfig(origin model.OriginInfo) []model.DestinationInfo

func UpdateDatabaseWithIncoming

func UpdateDatabaseWithIncoming()

updateDatabaseWithIncoming checks for an incoming flights.db at a specified location, and if found, moves it to replace the existing flights.db. If not found, it quietly does nothing.

Types

type Flight

type Flight struct {
	Id               int
	FlightNumber     string
	DepartureAirport string
	ArrivalAirport   string
	DepartureTime    string
	ArrivalTime      string
	Direction        string
}

Flight represents a row from the flights table.

type FlightCriteria

type FlightCriteria struct {
	Direction string `yaml:"direction"`
	Airport   string `yaml:"airport"`
	StartDate string `yaml:"startDate"`
	EndDate   string `yaml:"endDate"`
}

FlightCriteria represents each flight's criteria within the YAML input.

type FlightRequest

type FlightRequest struct {
	Flights []FlightCriteria `yaml:"flights"`
}

FlightRequest represents the structure of the YAML input.

Jump to

Keyboard shortcuts

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