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

Golang CRUD RESTful API with SQLC and PostgreSQL

This article will teach you how to build a CRUD RESTful API in Golang that runs on a Gonic Gonic framework and uses a PostgreSQL database. Also, you will learn how to generate the CRUD Functions and Structs with SQLC. We will run the database migration with the Golang migrate library.

Topics Covered

  • Setup and Run PostgreSQL with Docker and Docker-compose
  • Setup and Run Database Migration in Golang
  • Generate the CRUD Functions and Structs with SQLC
  • Load the Environment Variables with Viper
  • Create Custom Structs to Validate the Request Body
  • Create the Gin Gonic Route Controllers
  • Create the Gin Gonic Routes
  • Add the Routes to the Middleware Pipeline
  • Test the SQLC + Golang CRUD API with Postman

Read the entire article here:https://codevoweb.com/golang-crud-restful-api-with-sqlc-and-postgresql

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