Application to upload a csv file and persist with another service
This repository is nothing to be really used in production. Is something just to demonstrate my Golang Skills
This intended to accept large files. used with this repository to persist the data in a database.
Is possible to send a csv file, and wait the processing happen. The process is asynchronous.
This endpoint receive as body a csv file with key called myCsv. The columns of this csv should be as follow
| id | phone_number | parcel_weight |
|---|
As you can see in ./dev
The process is async, so unless you have some problem in the header. You will receive 202.
Whis microservice is pretty simple, he will work multithreaded to parse teh csv into objects, after that, will transform into a array, and this array into a json. This json is sent to poc-csv-persistence to persist the data at a database.
Similar to the persistence, the docker-compose in ./dev is enough to run this app isolated, running persistence to have funcional database.
In the root directory is exist a docker-compose, to run a MySQL instance, poc-csv-persistence and poc-csv-uploader
All images can be found at my docker hub
As usual, the code itself have comments explaining my reasoning at each step