Skip to content

rifqiakrm/golang-gin-starter

Repository files navigation

Golang Gin Starter

Gin Starter is a microservices boilerplate with RS256 JWT

It comes pre-configured with :

  1. Gin Gonic Router (https://github.com/gin-gonic/gin)
  2. JWT-GO (https://github.com/dgrijalva/jwt-go)
  3. Testify (https://github.com/stretchr/testify)
  4. Jaeger (https://github.com/uber/jaeger-lib)
  5. Jaeger Client for Go (https://github.com/uber/jaeger-client-go)
  6. Redigo (https://github.com/gomodule/redigo)
  7. GORM (https://gorm.io/gorm)
  8. Google Pub Sub (https://cloud.google.com/go/pubsub)
  9. Go SQL Mock (https://github.com/DATA-DOG/go-sqlmock)
  10. Go Humanize (https://github.com/dustin/go-humanize)
  11. Golang Mock (https://github.com/golang/mock)
  12. Google UUID(https://github.com/google/uuid)
  13. Env Decode(https://github.com/joeshaw/envdecode)
  14. godotenv (https://github.com/joho/godotenv)
  15. Mailgun (https://github.com/mailgun/mailgun-go/v4)

This starter also contains pre-developed API such as user and cms authentication, backend cms, forgot password feature, otp and more.

Setup

Use this command to install the blueprint

go get github.com/rifqiakrm/golang-gin-starter

or manually clone the repo and then run go run main.go.

How to Run

Development Guide

Test

Unit Test

$ make tidy
$ make cover

Integration Test / API Test

To run integration test, we need to start all dependencies needed. We provide all dependencies via Docker Compose. Make sure to install Docker Compose before running integration test.

Also, we need to build the docker image for golang-gin-starter first.

$ make compile-server
$ make docker-build-server

After that, run all images needed using docker-compose and run the integration test.

$ docker-compose up
$ make test.integration

Deployment

Read Deployment.

Staging

TBD

Production

TBD

Postman Collection

Run in Postman

FAQs

About

Gin Starter is a microservices boilerplate with RS256 JWT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages