Git Product home page Git Product logo

go-gingonic-jwt-authentication's Introduction

Packagist

Go Gin Gonic JWT Authentication API

[UNDER CONSTRUCTION]

This API provides an Identity Access Management with JWT built with GoLang powered by Gin Gonic.

Table of Contents

Table of contents generated with markdown-toc

Dependencies

  • go
  • docker
  • docker-compose
  • make

Installing make

Windows

Go to your PowerShell terminal with administrative privileges, then run choco install make. You should have it ready to use.

Linux

Make comes in default in most Linux Distributions, so you should verify if it is already installed before considering installing it. You can verify it by typing the below mentioned command in the terminal.

make -version

You can install the make package by typing.

sudo apt install make

MacOS

Air - Live reload for Go apps

Running

TL;DR: To run the application you just need to run the below mentioned command in the root folder of your project. But, to make everything workout in the expected way, make sure you have all the dependencies listed before and that the next steps of the running section are fulfilled.

air

To stop it, type ctrl + c in your terminal.

Environment Variables

The program looks for the following environment variables:

  • DB_USER: The postgres database username that gets used within the postgres connection string (Default: root).
  • DB_PASS: The postgres database password that gets used within the postgres connection string (Default: root).
  • DB_NAME: The postgres database name that gets used within the postgres connection string (Default: user).
  • DB_HOST: The postgres database host name that gets used within the postgres connection string (Default db).
  • DB_PORT: The postgres database port that gets used within the postgres connection string (Default: 5432).

If the environment variable has a supplied default and none are set within the context of the host machine, then the default will be used.

To set any given environment variable, simply execute the following pattern, replacing [ENV_NAME] with the name of the environment variable and [ENV_VALUE] with the desired value of the environment variable: export [ENV_NAME]=[ENV_VALUE]. To unset any set environment variable, simply execute the following pattern, replacing [ENV_NAME] with the name of the environment variable: unset [ENV_NAME].

Docker

This API uses Docker to provide the PostgreSQL database. With your Docker open and running, run the below mentioned command in the terminal and you're ready to go.

make run

Migrations

To run the migrations up or down use one of the below mentioned commands in the terminal.

make migration-up
make migration-down

Sonarqube

API Docs

Testing

Unit tests

E2E tests

Deploy Lambda Function to AWS

GitHub Actions

Terraform

go-gingonic-jwt-authentication's People

Stargazers

Andre Kardec avatar

Watchers

Andre Kardec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.