flight-path

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 8 Imported by: 0

README

REST API server to determine the flight path of a person

Story: There are over 100,000 flights a day, with millions of people and cargo being transferred around the world. With so many people and different carrier/agency groups, it can be hard to track where a person might be. In order to determine the flight path of a person, we must sort through all of their flight records.

Goal: To create a simple microservice API that can help us understand and track how a particular person's flight path may be queried. The API should accept a request that includes a list of flights, which are defined by a source and destination airport code. These flights may not be listed in order and will need to be sorted to find the total flight paths starting and ending airports.

Requirements
  • gvm Go 1.19
    gvm install go1.19 --prefer-binary --with-build-tools --with-protobuf
    gvm use go1.19 --default
    

Help

Usage: make COMMAND
Commands :
help            - List available tasks
clean           - Cleanup
deps            - Download and install dependencies
api-docs        - Build source code for swagger api reference
test            - Run tests
build           - Build REST API server's binary
run             - Run REST API locally
release         - Create and push a new tag
update          - Update dependencies to latest versions
open-swagger    - Open browser with Swagger docs pointing to localhost
test-case-one   - Test case 1 [["SFO", "EWR"]]
test-case-two   - Test case 2 [["ATL", "EWR"], ["SFO", "ATL"]]
test-case-three - Test case 3 [["IND", "EWR"], ["SFO", "ATL"], ["GSO", "IND"], ["ATL", "GSO"]]

Start REST API server

make run

Run test cases

make test-case-one
make test-case-two
make test-case-three

SwaggerUI

Take a look at autogenerated REST API Documentation

Swagger API documentation - http://localhost:8080/swagger/index.html

Swagger API documentation

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Code generated by swaggo/swag.
Code generated by swaggo/swag.
internal
pkg
api

Jump to

Keyboard shortcuts

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