Using Go as your language, create a CRUD API to manage a list of Books, fulfilling the following requirements:
- Books should have the following Attributes:
- Title
- Author
- Publisher
- Publish Date
- Rating (1-3)
- Status (CheckedIn, CheckedOut)
- Each endpoint should have test coverage of both successful and failed (due to user error) requests.
- Use a data store of your choice.
- Include unit tests that exercise the endpoints such that both 200-level and 400-level responses are induced.
- The app should be stood up in Docker, and client code (such as cURL requests, and your unit tests) should be executed on the host machine, against the containerized app.
- Send the project along as a git repository.
- Please do not use go-swagger to generate the server side code.
To run in Docker:
make run
To run as a binary:
docker-compose up -d postgres
make build
./bin/libreria
To run unit tests:
make test-unit
To run integration tests:
make test-integration