Simple Go application that overlays text onto an image.
This project has the following dependencies:
- Go version 1.8 and above
- dep - Dependency package manager
To the run the application execute the following commands:
dep ensure
- This will download all necessary dependenciesgo run main.go
- Run the application (runs on port 8080 by default)- You can change the port by having a
PORT
environment variable
- You can change the port by having a
This service has the following endpoints:
- /api/v1/createInspiration (POST)
- /api/v1/healthcheck (GET)
The following bash command below will make a valid request and save the response into a file called image.png.
curl -H "Content-Type: application/json" -d @sample-payload.json localhost:8080/api/v1/createInspiration > image.png
To run the test, execute the following command to run all tests including
the ones in the sub folders: go test ./...
The following limitations and technical debt remains due to time constraints:
- Supports only the following MIME types: image/png and image/jpeg due to time restrictions
- Integration tests hit external services rather and is not fully self contained.
- Goroutine used but purely for the point of demonstration. No performance gain expected as tasks for creating the inspiration is sequential