Documentation
¶
Index ¶
- func ExportConnectionsImage(ctx context.Context, w io.Writer, conns []Connection) error
- type Connection
- type ConnectionResponse
- type ConnectionSearchOption
- type ConnectionsHandler
- type ConnectionsResponse
- type FlightNumberResponse
- type FlightRepo
- type FlightResponse
- type MinimalS3Client
- type Options
- type WithCountMultiLeg
- type WithExcludeAircraft
- type WithExcludeAircraftGlob
- type WithExcludeAirport
- type WithExcludeAirportGlob
- type WithExcludeFlightNumber
- type WithExcludeFlightNumberGlob
- type WithIncludeAircraft
- type WithIncludeAircraftGlob
- type WithIncludeAirport
- type WithIncludeAirportGlob
- type WithIncludeFlightNumber
- type WithIncludeFlightNumberGlob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportConnectionsImage ¶
Types ¶
type Connection ¶
type Connection struct { Flight *common.Flight Outgoing []Connection }
type ConnectionResponse ¶
type ConnectionResponse struct { FlightId common.FlightId `json:"flightId"` Outgoing []ConnectionResponse `json:"outgoing"` }
type ConnectionSearchOption ¶
type ConnectionSearchOption interface {
Apply(f *Options)
}
type ConnectionsHandler ¶
type ConnectionsHandler struct {
// contains filtered or unexported fields
}
func NewConnectionsHandler ¶
func NewConnectionsHandler(fr *FlightRepo) *ConnectionsHandler
func (*ConnectionsHandler) FindConnections ¶
func (ch *ConnectionsHandler) FindConnections(ctx context.Context, origins, destinations []string, minDeparture, maxDeparture time.Time, maxFlights uint32, minLayover, maxLayover, maxDuration time.Duration, options ...ConnectionSearchOption) ([]Connection, error)
type ConnectionsResponse ¶
type ConnectionsResponse struct { Connections []ConnectionResponse `json:"connections"` Flights map[common.FlightId]FlightResponse `json:"flights"` }
func ExportConnectionsJson ¶
func ExportConnectionsJson(conns []Connection) ConnectionsResponse
type FlightNumberResponse ¶
type FlightRepo ¶
type FlightRepo struct {
// contains filtered or unexported fields
}
func NewFlightRepo ¶
func NewFlightRepo(s3c MinimalS3Client, bucket string) *FlightRepo
type FlightResponse ¶
type FlightResponse struct { FlightNumber FlightNumberResponse `json:"flightNumber"` DepartureTime time.Time `json:"departureTime"` DepartureAirport string `json:"departureAirport"` ArrivalTime time.Time `json:"arrivalTime"` ArrivalAirport string `json:"arrivalAirport"` AircraftOwner string `json:"aircraftOwner"` AircraftType string `json:"aircraftType"` Registration string `json:"registration,omitempty"` }
type MinimalS3Client ¶
type WithCountMultiLeg ¶
type WithCountMultiLeg bool
func (WithCountMultiLeg) Apply ¶
func (a WithCountMultiLeg) Apply(f *Options)
type WithExcludeAircraft ¶
type WithExcludeAircraft []string
func (WithExcludeAircraft) Apply ¶
func (a WithExcludeAircraft) Apply(f *Options)
type WithExcludeAircraftGlob ¶
type WithExcludeAircraftGlob []string
func (WithExcludeAircraftGlob) Apply ¶
func (a WithExcludeAircraftGlob) Apply(f *Options)
type WithExcludeAirport ¶
type WithExcludeAirport []string
func (WithExcludeAirport) Apply ¶
func (a WithExcludeAirport) Apply(f *Options)
type WithExcludeAirportGlob ¶
type WithExcludeAirportGlob []string
func (WithExcludeAirportGlob) Apply ¶
func (a WithExcludeAirportGlob) Apply(f *Options)
type WithExcludeFlightNumber ¶
type WithExcludeFlightNumber []string
func (WithExcludeFlightNumber) Apply ¶
func (a WithExcludeFlightNumber) Apply(f *Options)
type WithExcludeFlightNumberGlob ¶
type WithExcludeFlightNumberGlob []string
func (WithExcludeFlightNumberGlob) Apply ¶
func (a WithExcludeFlightNumberGlob) Apply(f *Options)
type WithIncludeAircraft ¶
type WithIncludeAircraft string
func (WithIncludeAircraft) Apply ¶
func (a WithIncludeAircraft) Apply(f *Options)
type WithIncludeAircraftGlob ¶
type WithIncludeAircraftGlob string
func (WithIncludeAircraftGlob) Apply ¶
func (a WithIncludeAircraftGlob) Apply(f *Options)
type WithIncludeAirport ¶
type WithIncludeAirport string
func (WithIncludeAirport) Apply ¶
func (a WithIncludeAirport) Apply(f *Options)
type WithIncludeAirportGlob ¶
type WithIncludeAirportGlob string
func (WithIncludeAirportGlob) Apply ¶
func (a WithIncludeAirportGlob) Apply(f *Options)
type WithIncludeFlightNumber ¶
type WithIncludeFlightNumber string
func (WithIncludeFlightNumber) Apply ¶
func (a WithIncludeFlightNumber) Apply(f *Options)
type WithIncludeFlightNumberGlob ¶
type WithIncludeFlightNumberGlob string
func (WithIncludeFlightNumberGlob) Apply ¶
func (a WithIncludeFlightNumberGlob) Apply(f *Options)
Click to show internal directories.
Click to hide internal directories.