Build A Restful Api With Golang Go Programming Language
Golang: Intro to REST APIs with Golang (Go programming language) & 1.5hr of React-Redux bonus content (frontend)
Last updated 2022-01-10 | 4.2
- Create a model from Golang's struct type and a slice to add records to- Create a router and register to it api endpoints and handler functions
- Build handler functions to do CRUD operations
What you'll learn
* Requirements
* Beginner level Golang (Go programming language) knowledge (variable declaration* structs and slices)
* The Go distribution
* Any text editor (I use atom)
Description
Welcome to Build RESTful APIs with Golang (Go programming language) course. This create RESTful APIs with Golang (Go programming language) is a short no nonsense course packed with useful information that you can complete within a weekend or a few of evenings after work.
Whether you are a backend or front end developer, if you are looking for a quick, straight forward and step by step introduction to how to build RESTful APIs with Golang (Go programming language) this is the course for you.
Build RESTful APIs with Golang (Go programming language) is a collection of successive, quick and to the point hands on lectures that put emphasis on doing (code along) rather than just talking and showing slides. It is only 2 hours so it won't be another one of those 10 hours courses that you buy and end up not completing.
What will you build?
You will create RESTful APIs with Golang (Go) that will perform CRUD operations or CREATE, READ, UPDATE AND DELETE on data you save on a PostgreSQL database.
You will work with structs and slices to create your model and store and pass data around. You will create a router to register your api endpoints and handler functions. You will also learn how to refactor your code and create a modular file structure.
You will make use of technologies such as the PostgreSQL database for persisting records, Postman for making API requests, and third party packages such as gorilla/mux for routing, and other packages for loading environment variables, making http requests, encoding and decoding JSON, performing string conversions and checking types.
Both Go (Golang) programming language has become very popular among startups and the development community in general. Golang is a great language designed with simplicity, maintainability and performance in mind. Now is the best time to learn both Go.
Who this course is for:
- Beginner level Golang (Go programming language) developers
Course content
8 sections • 53 lectures
Introduction Preview 00:54
Setting up your environment Preview 02:55
Lecture 3: A few points on what to expect Preview 01:45
Join the student group Preview 00:15
Introduction to REST Preview 12:29
Create the Book model and books slice Preview 01:17
Install third party packages Preview 01:32
Create the router and register api-endpoints and handler Preview 08:04
Add static data and implement 'getBooks' Preview 02:11
Implement 'getBook' handler to get a single book Preview 08:16
Implement 'addBook' and use Postman for http requests Preview 07:34
Implement 'updateBook' Preview 04:51
Implement 'removeBook' Preview 03:48
Create a Postgres database-instance and table Preview 05:41
Refactor code to include database interaction Preview 04:29
Set and load environment variables Preview 04:21
Connect to the database instance Preview 03:43
Implement 'getBooks' to get all book records from the table Preview 04:36
Implement 'getBook' to get a book record from the table by its id Preview 02:58
Implement 'addBook' to add a book record to the table Preview 07:48
Implement 'updateBook' to update a book record on the table Preview 06:05
Implement 'removeBook' to remove a book record from the table by its id Preview 04:42
Go modules Preview 03:43
Apply Go Modules