{"id":22283058,"url":"https://github.com/bitcodr/paak-and-go","last_synced_at":"2025-03-25T19:47:08.334Z","repository":{"id":189466354,"uuid":"394196087","full_name":"bitcodr/paak-and-go","owner":"bitcodr","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-26T18:44:15.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-30T17:38:52.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bitcodr.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,"governance":null}},"created_at":"2021-08-09T07:37:11.000Z","updated_at":"2023-08-20T07:06:56.000Z","dependencies_parsed_at":"2023-08-20T09:35:53.813Z","dependency_job_id":null,"html_url":"https://github.com/bitcodr/paak-and-go","commit_stats":null,"previous_names":["bitcodr/paak-and-go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fpaak-and-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fpaak-and-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fpaak-and-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fpaak-and-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcodr","download_url":"https://codeload.github.com/bitcodr/paak-and-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245534984,"owners_count":20631289,"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","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":[],"created_at":"2024-12-03T16:38:26.232Z","updated_at":"2025-03-25T19:47:08.299Z","avatar_url":"https://github.com/bitcodr.png","language":"Go","readme":"# Golang Test\n\nWe are PackAndGo, a small bus company. We want to create a REST API that helps us manage the trips that we offer.\n\n## Goal\n\nYour goal is to **build a REST API** with the following characteristics:\n\n| Method | Endpoint  | Description          |\n|--------|-----------|----------------------|\n| GET    | /trip     | List all trips       |\n| POST   | /trip     | Add a new trip       |\n| GET    | /trip/:id | Get trip with ID :id |\n\n### REST API Description\n\nWe would like the trips to be obtained in the following format:\n\n```json\n{\n    origin: \"Barcelona\",\n    destination: \"Seville\",\n    dates: \"Mon Tue Wed Fri\",\n    price: 40.55\n}\n```\n\nWhereas to add a trip, we would send the following:\n\n```json\n{\n    originId: 2,\n    destinationId: 1,\n    dates: \"Sat Sun\",\n    price: 40.55\n}\n```\n\nThe **trip ID** should be added automatically. Each trip should have a unique trip ID.\n\nThe **list of cities** is in a text file, *cities.txt*, but perhaps we will change that in the future as our company grows. Right now, every line in the text file is a city. The first line corresponds to cityId=1, the second to cityId=2, etc.\n\n### General guidelines\n\nWe want you to build a REST API that works with our current needs, but that can be ready to **change easily in the future**, without having to rewrite the whole system or fearing that something will break. So please, try to make it as future-proof as possible.\n\nUse the packages that you think are suitable for the job, as well as the **architecture and code structure** that makes most sense from your point of view. Feel free to move, split, etc. the provided files into the files and folders of your choice.\n\nYou can also challenge and *change the proposed API structure if you feel it is necessary*, as long as you give a reason why you have decided to do things in a different way.\n\n--- \n---\n\n## Run\n\n### Using Makefile\n    - check the help:  make help\n\n    - Run\n        - make create-env  ## update the config.d directory\n        - make mod\n        - make build\n        - ./bin/pack-and-go\n\n### Build and run it manually\n    - update the config.d dir\n    - go build -o ./bin/paak-and-go ./cmd/...\n    - ./bin/paak-and-go\n\n\n### Todos\n    - need to write more tests\n    - implement benchmarks","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcodr%2Fpaak-and-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcodr%2Fpaak-and-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcodr%2Fpaak-and-go/lists"}