Skip to content

In this comprehensive guide, you will learn how to secure a Golang RESTful API with JSON Web Tokens and Email verification.

Notifications You must be signed in to change notification settings

wpcodevo/golang-gorm-postgres

Repository files navigation

Build a RESTful CRUD API with Golang

This article will teach you how to create a CRUD RESTful API in a Golang environment that runs on a Gin Gonic server and uses a PostgreSQL database. We’ll also discuss how you can build models, connect to the running SQL database server, and run database migrations with the GORM library.

Build a RESTful CRUD API with Golang

Topics Covered

  • What is a REST API
  • What is a REST API
  • What is GORM
  • What is Gin Gonic
  • Create the Database Models with GORM
  • Generating the SQL Table with GORM
  • Creating CRUD Functions in a RESTful API
    • Create a Constructor for the CRUD Operations
    • Create Operation Route Handler
    • Update Operation Route Handler
    • Retrieve a Single Record Route Handler
    • Retrieve All Records Route Handler
    • Delete Operation Route Handler
  • Creating Routes for the CRUD Operations
  • Update/Configure the Golang API Server
  • Testing the Golang CRUD API with Postman
    • Log into the API
    • Creating a New Record
    • Updating the Record
    • Request a Single Record
    • Retrieve all Records with Paginated Results
    • Delete a Record

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

Articles in this series:

1. How to Setup Golang GORM RESTful API Project with Postgres

How to Setup Golang GORM RESTful API Project with Postgres

2. API with Golang + GORM + PostgreSQL: Access & Refresh Tokens

API with Golang + GORM + PostgreSQL: Access & Refresh Tokens

3. Golang and GORM - User Registration and Email Verification

Golang and GORM - User Registration and Email Verification

4. Forgot/Reset Passwords in Golang with SMTP HTML Email

Forgot/Reset Passwords in Golang with SMTP HTML Email

5. Build a RESTful CRUD API with Golang

Build a RESTful CRUD API with Golang

About

In this comprehensive guide, you will learn how to secure a Golang RESTful API with JSON Web Tokens and Email verification.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages