Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Building Microservices API in Go

Packt via Coursera

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
If you're eager to advance your programming skills, mastering Go is essential in today's tech environment. This course offers a deep dive into Go programming, focusing on building efficient and scalable microservices using REST-based APIs. - You'll explore security best practices, including authentication, authorization, role-based access control, and JWT token generation. - You'll covers unit testing techniques, such as state-based testing, testing routes and services, and using mocks and stubs. - Additionally, you'll learn about logging and error handling, creating Go modules for better code organization. - You'll modularize your code with the banking-lib module, integrate it into your APIs, and understand Claims domain objects and refresh tokens for secure access. By the end, you'll be proficient in building secure, reliable Go applications and optimizing code organization. Ideal for developers, college students, and IT professionals, this course elevates your Go programming and microservices skills.

Syllabus

  • Introduction
    • In this module, we will introduce the course and discuss its objectives, providing a roadmap for what you will learn. We will also cover the essential tools required for developing REST-based microservices APIs in Go, including setting up your development environment and understanding the tools that will be used throughout the course.
  • Router Basics
    • In this module, we will cover the fundamentals of building and configuring an HTTP web server in Go, starting with a simple "Hello World" example. We'll delve into JSON and XML encoding, teaching you how to marshal data and handle headers. Additionally, we'll refactor our codebase for better organization with Go modules and explore the advanced routing features of the gorilla/mux library to enhance your API capabilities.
  • Application Development
    • In this module, we will delve into advanced application development techniques in Go, starting with the principles of hexagonal architecture and practical implementation in a banking application. You'll learn to build a database adapter, handle errors effectively, and conduct structured logging with uber/zap. We will also cover the use of Sqlx for database interactions, managing application configuration with environment variables, and practical assignments to enhance API functionalities, such as creating new bank accounts and handling transactions.
  • Security
    • In this module, we will focus on securing your Go application by implementing robust authentication and authorization mechanisms. We'll start with an overview of security strategies and best practices, followed by a deep dive into JWT tokens for managing user authentication. You will learn to build an authentication server with login and verification APIs, implement role-based access control, and use middleware for token verification to maintain the security and integrity of your APIs.
  • Unit Testing
    • In this module, we will delve into the fundamentals of unit testing, starting with state-based testing to ensure the functionality of your code. You'll learn to differentiate between mocks and stubs, and how to use them effectively for testing routes. We will also cover unit testing for services, focusing on writing reliable tests and refactoring code to enhance readability and reliability. By the end of this module, you'll be equipped with the skills to write robust unit tests that shorten feedback loops and improve your development process.
  • Advanced Topics
    • In this module, we will delve into advanced topics essential for building robust and maintainable microservices in Go. We'll start with an overview of the concepts, followed by extracting reusable components from our banking project to create Go modules. You'll learn to integrate these modules into different APIs, refactor APIs for better maintainability, and understand the use of refresh tokens for enhanced security. By the end of this module, you'll be proficient in creating secure, efficient, and reusable components for your microservices architecture.

Taught by

Packt - Course Instructors

Reviews

Start your review of Building Microservices API in Go

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.