Documentation ¶
Index ¶
- Variables
- type Aircraft
- type Airport
- type AirportsResponse
- type Handler
- func (h *Handler) Aircraft(ctx context.Context) ([]Aircraft, error)
- func (h *Handler) Airlines(ctx context.Context, prefix string) ([]common.AirlineIdentifier, error)
- func (h *Handler) Airports(ctx context.Context) (AirportsResponse, error)
- func (h *Handler) Flight(ctx context.Context, fn common.FlightNumber, departureDateUTC xtime.LocalDate, ...) (*common.Flight, time.Time, error)
- func (h *Handler) FlightNumbers(ctx context.Context, prefix string, limit int) ([]common.FlightNumber, error)
- func (h *Handler) FlightNumbersRaw(ctx context.Context) (map[common.FlightNumber]time.Time, error)
- func (h *Handler) FlightSchedule(ctx context.Context, fn common.FlightNumber) (*common.FlightSchedule, error)
- func (h *Handler) QuerySchedules(ctx context.Context, opts ...QueryScheduleOption) (map[common.FlightNumber]*common.FlightSchedule, error)
- func (h *Handler) SeatMap(ctx context.Context, fn common.FlightNumber, ...) (*lufthansa.SeatAvailability, error)
- type MetropolitanArea
- type MinimalS3Client
- type QueryScheduleOption
- func WithAircraftConfigurationVersion(aircraftConfigurationVersion string) QueryScheduleOption
- func WithAircraftType(aircraftType string) QueryScheduleOption
- func WithAirlines(airlines ...common.AirlineIdentifier) QueryScheduleOption
- func WithAll(opts ...QueryScheduleOption) QueryScheduleOption
- func WithAny(opts ...QueryScheduleOption) QueryScheduleOption
- func WithArrivalAirport(airport string) QueryScheduleOption
- func WithDepartureAirport(airport string) QueryScheduleOption
- func WithFlightNumber(fn common.FlightNumber) QueryScheduleOption
- func WithIgnoreCodeShares() QueryScheduleOption
- func WithMaxDepartureTime(maxDepartureTime time.Time) QueryScheduleOption
- func WithMinDepartureTime(minDepartureTime time.Time) QueryScheduleOption
- func WithServiceType(serviceType string) QueryScheduleOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSeatMapFreshFetchRequired = errors.New("fresh fetch required but not allowed")
Functions ¶
This section is empty.
Types ¶
type AirportsResponse ¶
type AirportsResponse struct { Airports []Airport `json:"airports"` MetropolitanAreas []MetropolitanArea `json:"metropolitanAreas"` }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(s3c MinimalS3Client, lhc *lufthansa.Client, bucket string) *Handler
func (*Handler) Airports ¶
func (h *Handler) Airports(ctx context.Context) (AirportsResponse, error)
func (*Handler) FlightNumbers ¶
func (*Handler) FlightNumbersRaw ¶
func (*Handler) FlightSchedule ¶
func (h *Handler) FlightSchedule(ctx context.Context, fn common.FlightNumber) (*common.FlightSchedule, error)
func (*Handler) QuerySchedules ¶
func (h *Handler) QuerySchedules(ctx context.Context, opts ...QueryScheduleOption) (map[common.FlightNumber]*common.FlightSchedule, error)
func (*Handler) SeatMap ¶
func (h *Handler) SeatMap(ctx context.Context, fn common.FlightNumber, departureAirport, arrivalAirport string, departureDate xtime.LocalDate, cabinClass lufthansa.RequestCabinClass, aircraftType, aircraftConfigurationVersion string, allowFetchFresh bool) (*lufthansa.SeatAvailability, error)
type MetropolitanArea ¶
type MinimalS3Client ¶
type QueryScheduleOption ¶
type QueryScheduleOption func(*querySchedulesOptions) error
func WithAircraftConfigurationVersion ¶
func WithAircraftConfigurationVersion(aircraftConfigurationVersion string) QueryScheduleOption
func WithAircraftType ¶
func WithAircraftType(aircraftType string) QueryScheduleOption
func WithAirlines ¶
func WithAirlines(airlines ...common.AirlineIdentifier) QueryScheduleOption
func WithAll ¶
func WithAll(opts ...QueryScheduleOption) QueryScheduleOption
func WithAny ¶
func WithAny(opts ...QueryScheduleOption) QueryScheduleOption
func WithArrivalAirport ¶
func WithArrivalAirport(airport string) QueryScheduleOption
func WithDepartureAirport ¶
func WithDepartureAirport(airport string) QueryScheduleOption
func WithFlightNumber ¶
func WithFlightNumber(fn common.FlightNumber) QueryScheduleOption
func WithIgnoreCodeShares ¶
func WithIgnoreCodeShares() QueryScheduleOption
func WithMaxDepartureTime ¶
func WithMaxDepartureTime(maxDepartureTime time.Time) QueryScheduleOption
func WithMinDepartureTime ¶
func WithMinDepartureTime(minDepartureTime time.Time) QueryScheduleOption
func WithServiceType ¶
func WithServiceType(serviceType string) QueryScheduleOption
Click to show internal directories.
Click to hide internal directories.