-
Gin
Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.
To simplify things, we will use gin framework and several additional packages:
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
pgx - postgreSQL driver and toolkit for Go.
-
Next, let's write sql queries for retrieving our users & their permissions. Here we will use sqlc for type-safe code generation from our sql queries, and pgx as its backend
-
go-redis - redis Go client.
-
scs - HTTP Session Management for Go.
-
scs_gin_adapter - a tiny adapter for using scs with gin.
-
-
authpher - user identification, authentication, and authorization for Go.
-
We will use awesome dbmate migration tool for our migrations.
-
That's all, you can find full code at the repo.