{"repo":"jlucaspains/go-rest-template","free":true,"listed":false,"github":"https://github.com/jlucaspains/go-rest-template","clone":"git clone https://github.com/jlucaspains/go-rest-template.git","description":"Golang REST API Template","language":"Go","stars":92,"topics":["golang","jwt-auth","open-policy-agent","rest-api","template","docker","docker-compose","kubernetes"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"Features - [x] Golang - [x] VS Code extension recommendations - [x] REST API - [x] Handlers with dependency injection - [x] Default Health handler with DB ping check - [x] Swagger UI - [x] Swagger json generation with swag init - [x] Config from .env or environment variables - [x] Auth - [x] Authentication with OAuth2 and JWT tokens - [x] Use .well-known/openid-configuration for configuration agnostic of provider - [x] Authorization via Open Policy Agent (OPA) policies - [x] DB - [x] GORM - [x] SQLC - [x] Automatic Migrations - [x] Postgres DB provider - [x] SQLite DB provider - [x] CI/CD - [x] Dockerfile - [x] Docker compose - [x] Kubernetes - [x] Github actions workflow How to use this template This is a template repository so you can create a new repository based on this one. See instructions here. Getting started Locally You should use the latest version available of Go. The current version used by this repository is 1.20. Install Go dependencies ENV IMPORTANT : You should replace AUTH CONFIG URL and AUTH AUDIENCE value with actual values from an OpenID provider. Create a .env file in the root of the project with the following configs: By default, the template uses Postres and thus you need it installed locally or available elsewhere. Run The API should now be available at http://localhost:8000/swagger/index.html Test Without test coverage: With HTML coverage output: Build In Windows, the command above yields a executable file go-rest-template.exe . In Linux, it yields an","default_branch":null,"files":null,"tree":[],"storefront":"/r/jlucaspains","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jlucaspains/go-rest-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}