A REST API implementation in golang.
- HTTP Router - gorilla/mux
- Mysql driver for golang
- JWT for authentication
I have implemented a basic REST API to understand and delve deep into the language. MySQL is used as a database backend.
Most of the public APIs implement Rate Limiter upon various factors like IP Address, Authentication, subscription plans and others. There are various implementations of Rate Limiter - Token Bucket, Leaky Bucket, Fixed Window counter and others.
I have used golang's rate package to implement a simple rate limiter, differential rate limiting basis user authentication. API will provide/limit basis user's authentication, an unsigned user will have different threshold (lower) compared to signed user (higher).