Want to fetch location between two location or want to place order based on From - To. This will also helps you to place order calculate distance in meters and list them. So you can distribute them.
There a lot way to use it:
- Installation with docker:
Just Run the start.sh file in ubuntu terminal. Rest it will handle for you automatically.
- Download
start.shandcmdto download location and runbash start.sh
Note: It will first remove previous installed docker and docker images to overcome permission issues and socket lock issues. So it can run easily
- Want to use without docker:
-
Go to your
$GOPATHdirectory and rungo get github.com/amku91/lam-heroku
-
cmdto{$GOPATH}github.com/amku91/lam-herokuand run-
go build main.go -
./main
That's All.
-
To run test cases you must have installed go on your system.
-
Run
go get github.com/amku91/lam-herokuand rungo get ./... -
Now cmd to
lam-herokudirectory and rungo build main.go -
Finally run
./mainin same folder -
Now open another terminal and cmd to
lam-herokudirectory and rungo test -v ./testing
Note: Testing command not gonna run while using docker.
-
- Go lang
- Mongo DB
- Google Maps
- Docker
Built by using :
- Go 1.10.3 -->>
https://golang.org - Go-Chi Frameowork -->>
https://github.com/go-chi/chi - mgo for Mongo DB -->>
https://godoc.org/labix.org/v2/mgo - Ozzo Validation -->>
https://github.com/go-ozzo/ozzo-validation - Google Maps -->>
https://googlemaps.github.io/maps - Go Cors -->>
https://github.com/rs/cors - Go Baloo Testing -->.
https://gopkg.in/h2non/baloo.v3
and some more go system libraries.
- Fetch location between two lcation using latitude and longitude(Distance in meters)
- Place order based on distance
- Provide api to take orders by order id
- List all orders
- Provide pagination while listing orders
- Safety limit on order list MAX is 100 you can fetch at a time
and a lot. :)
This project gonna send three type of error responses.
- 500 Error:
- You gonna get this while sending incorrect data or breach of any api rules.
- 409 Error:
- You gonna get this while order is already taken. You can take order only once.
- 200 Success: Yoo !!! all good.
That's All. :)