Implementing cursor pagination in Golang: Go Fiber, MySQL, GORM from scratch | REST API WITH GO



Implementing cursor pagination in Golang: Go Fiber, MySQL, GORM from scratch | REST API WITH GO

Implementing cursor pagination in Golang: Go Fiber, MySQL, GORM from scratch  | REST API WITH GO

In this tutorial, we’ll be building a REST API with Go Fiber, MySQL, and GORM from scratch. We’ll be focusing on implementing cursor pagination, which is a powerful and efficient way to retrieve large amounts of data from a database. This is just the beginning, as in the upcoming videos we’ll continue to add more functionality to the app, dockerize it, and even learn how to use Kubernetes with Go. Whether you’re a beginner or an experienced Go developer, this video series will provide you with a solid foundation in web development with Go and show you how to build a scalable, production-ready REST API.

#Go #GoFiber #MySQL #GORM #REST API #CursorPagination
#WebDevelopment
#BackendDevelopment
#Docker
#programming

Link to GitHub repository: https://github.com/sadhakbj/Bookie-Go
Follow me on medium: sadhakbj.medium.com
Follow me on Twitter: https://twitter.com/@sadhakbj

Timestamp:
[00:00] Introduction
[00:45] Project initialization, dependencies installation
[03:00] Create a model Book.go
[05:20] Connect to the database with gorm
[08:40] Initialize a new fiber app, setup the routes
[09:45] Seed initial 20 data using a rest endpoint
[14:20] Create new bookscontroller
[18:00] Create a helper to get paginatedQuery
[20:30] Helpers to encode & decode the cursor data
[37:40] Calculate the pagination, cursor based upon the data returned by the query
[52:10] Test the API endpoints

Comments are closed.