Skip to content

Instantly share code, notes, and snippets.

@priteshgudge
Created February 6, 2019 16:29
Show Gist options
  • Save priteshgudge/d45631969a7b57774338713d65e6d8e0 to your computer and use it in GitHub Desktop.
Save priteshgudge/d45631969a7b57774338713d65e6d8e0 to your computer and use it in GitHub Desktop.
Assignment Golang Mongo
Assignment:
Fork the repo to your github account:
https://github.com/priteshgudge/gohttpexamples/
Part 1)
Implement the PUT method of http handlers and connect related inmemory repository code.
https://github.com/priteshgudge/gohttpexamples/tree/master/sample4
Part 2)
Add Delete Method to the Repository of the userrepo
https://github.com/priteshgudge/gohttpexamples/blob/master/sample4/dbrepo/userrepo/interface.go
Implement Inmemory Repo code for Delete
Implement DELETE method of http handlers and connect related inmemory repository code.
Part 3) Implement HTTP delivery for Mongo restaurant code
Implement HTTP Delivery and handler GET All List, Get By ID, Get By Type of Food, Get By Name, Search
https://github.com/priteshgudge/mongorestaurantsample
The url path sould like this
For Get:
restaurantservice/restaurant/
restaurantservice/restaurant/{id}
restaurantservice/restaurant/?typeOfFood=Thai
restaurantservice/restaurant/?name=MyRest
restaurantservice/restaurant/?searchTerm=aaa
For Create/Update/Delete(PUT/POST/DELETE):
restaurantservice/restaurant/
restaurantservice/restaurant/{id}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment