Categorygithub.com/HYCJX/Golang_RestfulAPI
repositorypackage
0.0.0-20201207034033-12178d899b0d
Repository: https://github.com/hycjx/golang_restfulapi.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

Golang_RestfulAPI

To run this golang restful api, use the following command:
go run main.go $string_of_url_to_crew_json_file
This api server runs on PORT 8080.

This api handles the following requests:
GET pilot with pilot ID.
GET all pilots.
GET available pilots with a query.
GET flight with pilot ID.
GET all flights.
POST flight handled according to pilot availability.

The codebase is divided into 3 packages besides the main package:
utils package which provides utilities
controller package which handles http requests
model package which connects controller package to database with logic