flight

package
v0.0.0-...-ff976ea Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flight

type Flight struct {
	Id                 int64     `json:"id"`
	Passengers         int64     `json:"passengers"`
	AirplaneId         int64     `json:"airplane_id"`
	DepartureAirportId int64     `json:"departure_airport_id"`
	ArrivalAirportId   int64     `json:"arrival_airport_id"`
	DepartureTime      time.Time `json:"departure_time"`
	ArrivalTime        time.Time `json:"arrival_time"`
}

func NewFlight

func NewFlight(
	id int64,
	passengers int64,
	airplaneId int64,
	departureAirportId int64,
	arrivalAirportId int64,
	departureTime time.Time,
	arrivalTime time.Time,
) *Flight

type Service

type Service struct {
	Flights []Flight
}

func NewService

func NewService() *Service

func (*Service) AddFlight

func (s *Service) AddFlight(flight Flight)

func (*Service) GetFlight

func (s *Service) GetFlight(flightId string) *Flight

func (*Service) GetFlights

func (s *Service) GetFlights() []Flight

Jump to

Keyboard shortcuts

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