Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This article will teach you how to set up a SQLC API project with Golang, standard Database/SQL package, Gin Gonic, PostgreSQL, Golang-migrate, and Docker-compose. You will also learn how to generate Golang database CRUD functions and Structs with the SQLC compiler. The SQLC Golang API will use a PostgreSQL database and run on the Gin Gonic HTTP…

NotificationsYou must be signed in to change notification settings

wpcodevo/golang-postgresql-api

 
 

Repository files navigation

This article will teach you how to use the RS256 algorithm to implement JSON Web Token (JWT) Authentication and Authorization with Golang, Gin Gonic, SQLC, PostgreSQL, and Docker-compose. Also, you will learn how to use asymmetric encryption (private and public keys) to generate access and refresh JWTs in Golang.

Golang, SQLC, and PostgreSQL: JWT Access & Refresh Tokens

Topics Covered

  • Golang & SQLC JWT Authentication Overview
  • Setup Environment Variables with Viper
  • Define the Database User models with Structs
  • Define Helper Functions to hash and verify Passwords
  • Define Utility functions to Sign and Verify JWT Tokens
  • Create the Authentication Route Handlers
  • Create an Authentication middleware
  • Setup routing with Gin
  • Configure the Main Server File

Read the entire article here:https://codevoweb.com/golang-postgresql-api-access-and-refresh-tokens

Articles in this series:

1. How to Setup SQLC CRUD API with Golang and Gin Gonic

How to Setup SQLC CRUD API with Golang and Gin Gonic

2. Golang, SQLC, and PostgreSQL: JWT Access & Refresh Tokens

Golang, SQLC, and PostgreSQL: JWT Access & Refresh Tokens

3. Golang CRUD RESTful API with SQLC and PostgreSQL

Golang CRUD RESTful API with SQLC and PostgreSQL

About

This article will teach you how to set up a SQLC API project with Golang, standard Database/SQL package, Gin Gonic, PostgreSQL, Golang-migrate, and Docker-compose. You will also learn how to generate Golang database CRUD functions and Structs with the SQLC compiler. The SQLC Golang API will use a PostgreSQL database and run on the Gin Gonic HTTP…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp