Serves cards from Blizzards card game Hearthstone.
The program gets its data from Blizzards Hearthstone API and stores it in a mongoDB database.
The API is defined in ./api/swagger.yml which is used to generate the server located in ./codegen.
The API can be seen here on SwaggerHub
When changes made to the swagger file the REST API can be regenerated by running the following script:
./scripts/generate_swagger.sh
Tests are located in ./internal/tests and mocks are created with mockery
.
To run tests:
go test ./internal/tests/...
To recreate mocks:
./scripts/generate_mocks.sh