Documentation
¶
Index ¶
- func AddReferencedAircraft(referencedAircraft iter.Seq[uuid.UUID], aircraft map[uuid.UUID]db.Aircraft, ...)
- type Aircraft
- type AircraftFamily
- type AircraftReport
- type AircraftType
- type Airline
- type Airport
- type ConnectionFlightResponse
- type ConnectionGameChallenge
- type ConnectionResponse
- type ConnectionsResponse
- type ConnectionsSearchRequest
- type ConnectionsSearchResponse
- type DestinationReport
- type FlightNumber
- type FlightScheduleItem
- type FlightScheduleNumberAndItems
- type FlightScheduleUpdate
- type FlightScheduleUpdates
- type FlightScheduleVariant
- type FlightScheduleVersion
- type FlightScheduleVersions
- type FlightSchedules
- type FlightSchedulesMany
- type GeoLocation
- type SearchResponse
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aircraft ¶
type Aircraft struct {
Id UUID
*AircraftType
*AircraftFamily
Configurations map[UUID][]string
}
func AircraftFromDb ¶
func (Aircraft) MarshalJSON ¶
type AircraftFamily ¶
type AircraftReport ¶
type AircraftType ¶
type Airline ¶
type Airline struct {
Id UUID `json:"id"`
IataCode string `json:"iataCode"`
IcaoCode string `json:"icaoCode,omitempty"`
Name string `json:"name"`
}
func AirlineFromDb ¶
type Airport ¶
type Airport struct {
Id UUID `json:"id"`
IataCode string `json:"iataCode"`
IcaoCode string `json:"icaoCode,omitempty"`
IataAreaCode string `json:"iataAreaCode,omitempty"`
CountryCode string `json:"countryCode,omitempty"`
CityCode string `json:"cityCode,omitempty"`
Type string `json:"type,omitempty"`
Location *GeoLocation `json:"location,omitempty"`
Timezone string `json:"timezone,omitempty"`
Name string `json:"name,omitempty"`
}
func AirportFromDb ¶
type ConnectionFlightResponse ¶
type ConnectionFlightResponse struct {
FlightNumber FlightNumber `json:"flightNumber"`
DepartureTime time.Time `json:"departureTime"`
DepartureAirportId UUID `json:"departureAirportId"`
ArrivalTime time.Time `json:"arrivalTime"`
ArrivalAirportId UUID `json:"arrivalAirportId"`
AircraftOwner string `json:"aircraftOwner"`
AircraftId UUID `json:"aircraftId"`
AircraftConfiguration string `json:"aircraftConfiguration"`
}
type ConnectionGameChallenge ¶
type ConnectionResponse ¶
type ConnectionResponse struct {
FlightId UUID `json:"flightId"`
Outgoing []ConnectionResponse `json:"outgoing"`
}
type ConnectionsResponse ¶
type ConnectionsResponse struct {
Connections []ConnectionResponse `json:"connections"`
Flights map[UUID]ConnectionFlightResponse `json:"flights"`
Airlines map[UUID]Airline `json:"airlines"`
Airports map[UUID]Airport `json:"airports"`
Aircraft map[UUID]Aircraft `json:"aircraft"`
}
type ConnectionsSearchRequest ¶
type ConnectionsSearchRequest struct {
Origins []UUID `json:"origins"`
Destinations []UUID `json:"destinations"`
MinDeparture time.Time `json:"minDeparture"`
MaxDeparture time.Time `json:"maxDeparture"`
MaxFlights uint32 `json:"maxFlights"`
MinLayoverMS uint64 `json:"minLayoverMS"`
MaxLayoverMS uint64 `json:"maxLayoverMS"`
MaxDurationMS uint64 `json:"maxDurationMS"`
CountMultiLeg bool `json:"countMultiLeg"`
IncludeAirport []string `json:"includeAirport,omitempty"`
ExcludeAirport []string `json:"excludeAirport,omitempty"`
IncludeFlightNumber []string `json:"includeFlightNumber,omitempty"`
ExcludeFlightNumber []string `json:"excludeFlightNumber,omitempty"`
IncludeAircraft []string `json:"includeAircraft,omitempty"`
ExcludeAircraft []string `json:"excludeAircraft,omitempty"`
}
func (ConnectionsSearchRequest) ToPb ¶
func (req ConnectionsSearchRequest) ToPb() proto.Message
type ConnectionsSearchResponse ¶
type ConnectionsSearchResponse struct {
Data ConnectionsResponse `json:"data"`
Search *ConnectionsSearchRequest `json:"search,omitempty"`
}
type DestinationReport ¶
type FlightNumber ¶
type FlightNumber struct {
AirlineId UUID `json:"airlineId"`
Number int `json:"number"`
Suffix string `json:"suffix,omitempty"`
}
func FlightNumberFromDb ¶
func FlightNumberFromDb(fn db.FlightNumber) FlightNumber
type FlightScheduleItem ¶
type FlightScheduleItem struct {
DepartureDateLocal xtime.LocalDate `json:"departureDateLocal"`
DepartureAirportId UUID `json:"departureAirportId"`
FlightVariantId *UUID `json:"flightVariantId,omitempty"`
Version time.Time `json:"version"`
VersionCount int `json:"versionCount"`
}
func FlightScheduleItemFromDb ¶
func FlightScheduleItemFromDb(item db.FlightScheduleItem) FlightScheduleItem
type FlightScheduleNumberAndItems ¶
type FlightScheduleNumberAndItems struct {
FlightNumber FlightNumber `json:"flightNumber"`
Items []FlightScheduleItem `json:"items"`
}
type FlightScheduleUpdate ¶
type FlightScheduleUpdate struct {
FlightNumber FlightNumber `json:"flightNumber"`
DepartureDateLocal xtime.LocalDate `json:"departureDateLocal"`
DepartureAirportId UUID `json:"departureAirportId"`
IsRemoved bool `json:"isRemoved"`
}
func FlightScheduleUpdateFromDb ¶
func FlightScheduleUpdateFromDb(item db.FlightScheduleUpdate) FlightScheduleUpdate
type FlightScheduleUpdates ¶
type FlightScheduleUpdates struct {
Updates []FlightScheduleUpdate `json:"updates"`
Airlines map[UUID]Airline `json:"airlines"`
Airports map[UUID]Airport `json:"airports"`
}
type FlightScheduleVariant ¶
type FlightScheduleVariant struct {
Id UUID `json:"id"`
OperatedAs FlightNumber `json:"operatedAs"`
DepartureTimeLocal xtime.LocalTime `json:"departureTimeLocal"`
DepartureUtcOffsetSeconds int64 `json:"departureUtcOffsetSeconds"`
DurationSeconds int64 `json:"durationSeconds"`
ArrivalAirportId UUID `json:"arrivalAirportId"`
ArrivalUtcOffsetSeconds int64 `json:"arrivalUtcOffsetSeconds"`
ServiceType string `json:"serviceType"`
AircraftOwner string `json:"aircraftOwner"`
AircraftId UUID `json:"aircraftId"`
AircraftConfigurationVersion string `json:"aircraftConfigurationVersion"`
}
func FlightScheduleVariantFromDb ¶
func FlightScheduleVariantFromDb(variant db.FlightScheduleVariant) FlightScheduleVariant
type FlightScheduleVersion ¶
type FlightScheduleVersions ¶
type FlightScheduleVersions struct {
FlightNumber FlightNumber `json:"flightNumber"`
DepartureDateLocal xtime.LocalDate `json:"departureDateLocal"`
DepartureAirportId UUID `json:"departureAirportId"`
Versions []FlightScheduleVersion `json:"versions"`
Variants map[UUID]FlightScheduleVariant `json:"variants"`
Airlines map[UUID]Airline `json:"airlines"`
Airports map[UUID]Airport `json:"airports"`
Aircraft map[UUID]Aircraft `json:"aircraft"`
}
type FlightSchedules ¶
type FlightSchedules struct {
FlightNumber FlightNumber `json:"flightNumber"`
RelatedFlightNumbers []FlightNumber `json:"relatedFlightNumbers"`
Items []FlightScheduleItem `json:"items"`
Variants map[UUID]FlightScheduleVariant `json:"variants"`
Airlines map[UUID]Airline `json:"airlines"`
Airports map[UUID]Airport `json:"airports"`
Aircraft map[UUID]Aircraft `json:"aircraft"`
}
type FlightSchedulesMany ¶
type FlightSchedulesMany struct {
Schedules []FlightScheduleNumberAndItems `json:"schedules"`
Variants map[UUID]FlightScheduleVariant `json:"variants"`
Airlines map[UUID]Airline `json:"airlines"`
Airports map[UUID]Airport `json:"airports"`
Aircraft map[UUID]Aircraft `json:"aircraft"`
}
type GeoLocation ¶
type SearchResponse ¶
type SearchResponse struct {
Airlines []Airline `json:"airlines"`
FlightNumbers []FlightNumber `json:"flightNumbers"`
}
type UUID ¶
func (*UUID) FromString ¶
func (UUID) MarshalJSON ¶
func (UUID) MarshalText ¶
func (*UUID) UnmarshalJSON ¶
func (*UUID) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.