Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Go implementation of the TodosApi "stage 2" app #1868

Open
DamianEdwards opened this issue Jun 15, 2023 · 5 comments
Open

Add a Go implementation of the TodosApi "stage 2" app #1868

DamianEdwards opened this issue Jun 15, 2023 · 5 comments

Comments

@DamianEdwards
Copy link
Member

DamianEdwards commented Jun 15, 2023

It should be a Go port of https://github.com/aspnet/Benchmarks/tree/main/src/BenchmarksApps/TodosApi and thus include:

  • HTTP API for reading/adding/updating/deleting Todos from a database, including validation
  • Health checks for the database and JWT configuration
  • JWT authentication for the delete API
  • Error response formatting as JSON Problem Details

Which framework should it use? Gin?
https://dev.to/xngwng/top-5-go-rest-api-frameworks-k0e
https://nordicapis.com/7-frameworks-to-build-a-rest-api-in-go/
https://www.slant.co/topics/1412/~best-web-frameworks-for-go

@kokizzu
Copy link

kokizzu commented Jun 16, 2023

Gin (most popular), Echo, Fiber (most performant)
image

@dandago
Copy link

dandago commented Jun 17, 2023

I work with Go and Gin (also a former .NET dev), and I can recommend Gin as an easy and performant way to build an API in Go. Look into the following:

For error responses there are a few different options - you can probably use Gin's AbortWithStatusJSON() to return a JSON object along with a 500 or similar status code.

Not sure what you need with DB health checks exactly. Tell me more and I can advise.

@tg123
Copy link

tg123 commented Jun 19, 2023

may i know where to send PR?

WIP https://github.com/tg123/TodosApi

@WahidinAji
Copy link

may i know where to send PR?

WIP https://github.com/tg123/TodosApi

you need to add the benchmark test, I guess. and if you wanna contribute to this project. you need Fork this repo, write your code there, and do PR

@davidfowl
Copy link
Member

We can do the benchmarkification! Thank you for the starting point @tg123 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants