A simple REST-Full service. A dockerize environment with PostGIS database is provided as well.
- webserver
- PostGIS Database
Use the provided Makefile for your convenience:
make allSend test request:
curl -d '{"username":"max"}' -H "Content-Type: application/json" -X POST http://localhost:5000/userscurl -d '{"timestamp":"2021-06-15T09:00:00Z", "position": { "type": "Point", "coordinates": [20,30]}}' -H "Content-Type: application/json" -X POST http://localhost:5000/vehicleStatesUnit and integration test (using a PostGIS Container) are provided. Running integration tests requires docker in your path.
To run unit tests:
go test -short ./...To run all tests:
go test ./...