Skip to content

Restful API service with Gin, JWT, GORM, PostgresSQL and wire

Notifications You must be signed in to change notification settings

thnkrn/go-gin-postgres

Repository files navigation

Restful API service with Gin, JWT, GORM, PostgresSQL and wire

Template Structure

  • Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love Gin.
  • JWT A go (or 'golang' for search engine friendliness) implementation of JSON Web Tokens.
  • GORM with PostgresSQLThe fantastic ORM library for Golang aims to be developer friendly.
  • Wire is a code generation tool that automates connecting components using dependency injection.
  • fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file.
  • Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats.

Available Scripts

In the project directory, you can run:

make watch

Run and debug application with live reloading

make build

Generate an execute file

make run

Run an execute file

make serve

Generate and run application

Available Endpoint

In the project directory, you can call:

GET /

For getting status page

POST /login

For generating a JWT

GET /api/campaigns

For getting all of campaigns

GET /api/campaigns/:id

For getting campaign by ID

POST /api/campaigns

For creating new campaign

DELETE /api/campaigns/:id

For removing existing campaign

PUT /api/campaigns/:id

For updating existing campaign

About

Restful API service with Gin, JWT, GORM, PostgresSQL and wire

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published