{"id":15024864,"url":"https://github.com/wpcodevo/golang-postgresql-api","last_synced_at":"2025-09-10T10:40:56.209Z","repository":{"id":41090949,"uuid":"507118625","full_name":"wpcodevo/golang-postgresql-api","owner":"wpcodevo","description":"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 server. We will use the Golang-migrate package to push the SQL schema to the database.","archived":false,"fork":false,"pushed_at":"2022-10-02T15:34:53.000Z","size":51737,"stargazers_count":38,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T04:42:44.053Z","etag":null,"topics":["gin","go","golang","jwt","postgresql"],"latest_commit_sha":null,"homepage":"https://codevoweb.com/api-golang-postgresql-sqlc-gin-gonic-project-setup","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpcodevo.png","metadata":{"files":{"readme":"readMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-24T19:11:18.000Z","updated_at":"2025-03-05T12:37:42.000Z","dependencies_parsed_at":"2023-01-19T02:15:26.151Z","dependency_job_id":null,"html_url":"https://github.com/wpcodevo/golang-postgresql-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wpcodevo/golang-postgresql-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fgolang-postgresql-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fgolang-postgresql-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fgolang-postgresql-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fgolang-postgresql-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpcodevo","download_url":"https://codeload.github.com/wpcodevo/golang-postgresql-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fgolang-postgresql-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274447921,"owners_count":25287116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gin","go","golang","jwt","postgresql"],"created_at":"2024-09-24T20:01:05.490Z","updated_at":"2025-09-10T10:40:56.177Z","avatar_url":"https://github.com/wpcodevo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang CRUD RESTful API with SQLC and PostgreSQL\r\n\r\n![Golang CRUD RESTful API with SQLC and PostgreSQL](https://codevoweb.com/wp-content/uploads/2022/09/Golang-CRUD-RESTful-API-with-SQLC-and-PostgreSQL.webp)\r\n\r\nThis 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.\r\n\r\n## Topics Covered\r\n\r\n- Setup and Run PostgreSQL with Docker and Docker-compose\r\n- Setup and Run Database Migration in Golang\r\n- Generate the CRUD Functions and Structs with SQLC\r\n- Load the Environment Variables with Viper\r\n- Create Custom Structs to Validate the Request Body\r\n- Create the Gin Gonic Route Controllers\r\n- Create the Gin Gonic Routes\r\n- Add the Routes to the Middleware Pipeline\r\n- Test the SQLC + Golang CRUD API with Postman\r\n\r\nRead the entire article here: [https://codevoweb.com/golang-crud-restful-api-with-sqlc-and-postgresql](https://codevoweb.com/golang-crud-restful-api-with-sqlc-and-postgresql)\r\n\r\nArticles in this series:\r\n\r\n### 1. How to Setup SQLC CRUD API with Golang and Gin Gonic\r\n[How to Setup SQLC CRUD API with Golang and Gin Gonic](https://codevoweb.com/api-golang-postgresql-sqlc-gin-gonic-project-setup)\r\n\r\n### 2. Golang, SQLC, and PostgreSQL: JWT Access \u0026 Refresh Tokens\r\n[Golang, SQLC, and PostgreSQL: JWT Access \u0026 Refresh Tokens](https://codevoweb.com/golang-postgresql-api-access-and-refresh-tokens)\r\n\r\n### 3. Golang CRUD RESTful API with SQLC and PostgreSQL\r\n[Golang CRUD RESTful API with SQLC and PostgreSQL](https://codevoweb.com/golang-crud-restful-api-with-sqlc-and-postgresql)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Fgolang-postgresql-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpcodevo%2Fgolang-postgresql-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Fgolang-postgresql-api/lists"}