Limerio/calculator-api

Calculator API write in go

★ 0Forks 0GoGitHub ↗Compare

README

Todos CLI App

Description

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.

Tech Stack

Tasks

  • Install all dependencies.
  • Create a cli
    • Flag which give the ability to choose the log format (JSON or text)
    • Flag which give the ability to choose the port
    • Flag which give the ability to choose the graceful timeout
    • Port environment variable
  • Create a middleware stacker
  • Create middlewares
    • Rate limiting
    • Logging
    • Enforce the Content-Type header to be application/json
  • Create the /v1 endpoints
    • Create a /add endpoint (1+1)
    • Create a /divide endpoint (1/1)
    • Create a /multiply endpoint (1*1)
    • Create a /substract endpoint (1-1)
  • Create a new middleware which check if the format is a JSON or not
  • Create the /v2 endpoints
    • Update the /add, /divide, /multiply, and /substract endpoints to have the new middleware
  • Add /health endpoint
  • Add /ping endpoint
  • Add prometheus
  • Create tests
  • Github actions

Contributors

vincent-josepavel

Issues