Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SumedhaJagtap/f3fc7e422d6be6d7e2e8653c730d9257 to your computer and use it in GitHub Desktop.
Save SumedhaJagtap/f3fc7e422d6be6d7e2e8653c730d9257 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