The goal of this project is to create a web api which perform math calculation with differents versions in Go to learn the basics of Go. If you have any suggestion to add more math endpoints create an issue or a pull request if you want to.
- Install all dependencies.
- Create a cli
- Flag which give the ability to choose the log format (
JSONortext) - Flag which give the ability to choose the port
- Flag which give the ability to choose the graceful timeout
- Port environment variable
- Flag which give the ability to choose the log format (
- Create a middleware stacker
- Create middlewares
- Rate limiting
- Logging
- Enforce the
Content-Typeheader to beapplication/json
- Create the
/v1endpoints- Create a
/addendpoint (1+1) - Create a
/divideendpoint (1/1) - Create a
/multiplyendpoint (1*1) - Create a
/substractendpoint (1-1)
- Create a
- Create a new middleware which check if the format is a JSON or not
- Create the
/v2endpoints- Update the
/add,/divide,/multiply, and/substractendpoints to have the new middleware
- Update the
- Add
/healthendpoint - Add
/pingendpoint - Add prometheus
- Create tests
- Github actions