{"id":21481536,"url":"https://github.com/afa7789/flight-min-api","last_synced_at":"2025-08-28T23:49:30.898Z","repository":{"id":57705970,"uuid":"478081952","full_name":"afa7789/flight-min-api","owner":"afa7789","description":"An API example, requested by volume. Made in Go.","archived":false,"fork":false,"pushed_at":"2022-05-13T14:10:34.000Z","size":421,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T09:14:11.326Z","etag":null,"topics":["api-rest","example","golang","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afa7789.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-05T10:38:48.000Z","updated_at":"2022-05-17T17:42:06.000Z","dependencies_parsed_at":"2022-08-24T14:57:16.541Z","dependency_job_id":null,"html_url":"https://github.com/afa7789/flight-min-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/afa7789/flight-min-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa7789%2Fflight-min-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa7789%2Fflight-min-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa7789%2Fflight-min-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa7789%2Fflight-min-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afa7789","download_url":"https://codeload.github.com/afa7789/flight-min-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afa7789%2Fflight-min-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272582559,"owners_count":24959431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-rest","example","golang","unit-testing"],"created_at":"2024-11-23T12:26:07.288Z","updated_at":"2025-08-28T23:49:30.876Z","avatar_url":"https://github.com/afa7789.png","language":"Go","readme":"# Flight Min Api\n![!Theme Image](resources/banner.png)\n\n## Take-Home Programming Assignment for GoLang\n\nA take home assignment in Golang.\nMinimal example of how to create an API in go ( it's not using clean architecture tough )\n\n### Story: \nThere 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.\n\n### Goal: \nTo 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.\n\n## Install \u0026 Run\n\n```sh\n    git clone https://github.com/afa7789/flight-min-api\n    cd flight-min-api\n    go run .\n```\n\n## Testing project\n\n``` sh\n    git clone https://github.com/afa7789/flight-min-api\n    cd flight-min-api\n    make test\n    # or lint\n    make lint\n```\n\n## Tree, Project Structure\n\n```\n.\n├── cmd\n│   └── server.go\n├── go.mod\n├── go.sum\n├── internal\n│   ├── domain\n│   │   └── flags.go\n│   ├── flight\n│   │   ├── flight.go\n│   │   └── flight_test.go\n│   └── server\n│       ├── flight_points.go\n│       ├── flight_points_test.go\n│       ├── server.go\n│       └── server_test.go\n├── main.go\n├── Makefile\n└── README.md\n\n5 directories, 13 files\n```\n\n## Tools used:\n\n- Markdown , for readme, rofl\n- Lint\n- Unit Test\n- MakeFile\n- CI , github actions\n\n## Examples \n\nCurl to test on insomnia\n``` curl\ncurl --request GET \\\n  --url http://127.0.0.1:8080/flight_points \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"paths\":[[\"IND\", \"EWR\"], [\"SFO\", \"ATL\"], [\"GSO\", \"IND\"], [\"ATL\", \"GSO\"]] }'\n```\n\nRequests being made to '/flight_points':\n```\n{\"paths\":[[\"SFO\", \"EWR\"]]}\noutput:\n[\"SFO\",\"EWR\"]\n\n{\"paths\":[[\"ATL\", \"EWR\"], [\"SFO\", \"ATL\"]] }\noutput:\n[\"SFO\",\"EWR\"]\n\n{\"paths\":[[\"IND\", \"EWR\"], [\"SFO\", \"ATL\"], [\"GSO\", \"IND\"], [\"ATL\", \"GSO\"]] }\noutput:\n[\"SFO\",\"EWR\"]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafa7789%2Fflight-min-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafa7789%2Fflight-min-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafa7789%2Fflight-min-api/lists"}