model

package
v0.0.0-...-630d023 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fare

type Fare struct {
	Cents          uint32
	SeatsAvailable uint32
}

func (*Fare) Compare

func (f *Fare) Compare(o *Fare) int

Compares this fare to another. 0 indicates same fare, negative result indicates this fare is lower than o, positive result indicates this fare is greater than o. If both are nil, they are equal and 0 is returned. If one of the fares is nil, it is considered the greater fare.

type Flight

type Flight struct {
	OriginAirport      string
	DestinationAirport string
	DepartureLocalTime time.Time
	ArrivalLocalTime   time.Time
	Stops              []string
	Fares              []*Fare
}

func (*Flight) CheapestAvailableFare

func (f *Flight) CheapestAvailableFare() *Fare

func (*Flight) Id

func (f *Flight) Id() *FlightId

type FlightId

type FlightId struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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