- App Description
- Learning Goals
- System Requirements
- Technologies Used
- Setup
- Respository
- Endpoints
- Acknowledgements
- Contact
- Distilleries of Scotland allows users to search for the Scottish regions, and the distilleries within each of those regions.
- Build Rest API in Go from scratch exposing endpoints for regions, region, and regional distilleries
- Host database in PostgreSQL
- Build Environment Configurations
- Containerize
- Test DB calls using single transactional databases
- Build interfaces for mocking
- Build and deploy locally with kubernetes config files using MiniKube
- Allow CORS for a potential Frontend integration
- CI/CD with CircleCI
- go 1.21
- Docker Desktop
- Minikube
- Postgres will be installed using
startup.sh
-
run:
go mod tidy
-
run:
chmod +x startup.sh
-
From the root of the directory, run:
./startup.sh
-
To use MiniKube, first run
miniKube start --profile=distilleries-of-scotland
, then run:chmod +x deploy.sh
, followed by./deploy.sh
-
To see the API on localhost, run:
kubectl port-forward service/distilleries-of-scotland-service 8000:8000
-
To run locally without MiniKube, run:
go run distilleries_of_scotland.go
https://github.com/efuchsman/Distilleries-of-Scotland
GET '/regions'
{
"regions": [
{
"region_name": "Speyside",
"description": "The most densely populated Whisky region in the world, famous for fertile glens and, of course, the River Spey. Speyside whiskies are known for being frugal with peat and full of fruit. Apple, pear, honey, vanilla and spice all have a part a role in expressions from this region, which are commonly matured in Sherry casks."
},
{
"region_name": "Lowland",
"description": "Soft and smooth malts are characteristic of this region, offering a gentle, elegant palate reminiscent of grass, honeysuckle, cream, ginger, toffee, toast and cinnamon. The whiskies are often lighter in character and perfect for pre-dinner drinks."
},
{
"region_name": "Highland",
"description": "This region, which also takes in the islands, has a huge diversity of flavours and characters. From lighter whiskies all the way through salty coastal malts, the Highlands offers a Scotch for all palates."
},
{
"region_name": "Campbeltown",
"description": "Campbeltown whiskies are varied and full of flavour. Hints of salt, smoke, fruit, vanilla and toffee mingle in whiskies of robust and rich character."
},
{
"region_name": "Islay",
"description": "Islay (pronounced ‘eye-luh’) is a magical island where the majority of its population are involved in whisky production. Famous for fiery, heavily peated whiskies."
}
]
}
GET 'regions/:region_name'
{
"region_name": "Speyside",
"description": "The most densely populated Whisky region in the world, famous for fertile glens and, of course, the River Spey. Speyside whiskies are known for being frugal with peat and full of fruit. Apple, pear, honey, vanilla and spice all have a part a role in expressions from this region, which are commonly matured in Sherry casks."
}
GET 'regions/:region_name/distilleries
{
"distilleries": [
{
"distillery_name": "Glen Scotia",
"region_name": "Campbeltown",
"geo": "55.429514, -5.604236",
"town": "Campbeltown",
"parent_company": "Loch Lomond Group"
},
{
"distillery_name": "Glengyle",
"region_name": "Campbeltown",
"geo": "55.427208, -5.61095",
"town": "Campbeltown",
"parent_company": "J. & A. Mitchell and Co."
},
{
"distillery_name": "Springbank",
"region_name": "Campbeltown",
"geo": "55.425417, -5.608861",
"town": "Campbeltown",
"parent_company": "J. & A. Mitchell and Co."
}
]
}
Eli Fuchsman |
GitHub |