Service that will flatten an input arrat of arbitrarily nested arrays of values (of mixed types) into a flat array of values, and give the level of the deepest element in the array.
Add a list of the last 100 successfully processed requests. Each entry of the list provide the next information:
- the input array
- depth of the original input array
POST : http://localhost:8085/flatten
GET: http://localhost:8085/history
Storage (postgreSQL with bytea columns to save history request and response)
Only you will need execute:
make upYou can execute test with the next command:
make testUp the service:
make upDown the service:
make downSee status containers:
make psExecute tests:
make testWe have an unique docker file for development and production environments using multi-stage builds:
- Stage
builderwith golang image to can compile and execute tests (docker-compose use this stage). - Stage
productionwith alpine image with binaries generated inbuilderstage.
Note: we are using upx (see https://github.com/upx/upx) in the docker file to compress binary files generated.