CoursesAI WorkshopCompaniesPricingBlogNewsletter
  • Courses
  • AI Workshop
  • Companies
  • Pricing
  • Blog
  • Newsletter
Subscribe
  • Courses
  • Companies
  • Communities
  • Blog
  • Gift card
  • Newsletter
  • Help
  • Shop
  • ConfAiBot
  • Contact
  • Legal notice
  • General conditions
  • Privacy policy
  • Cookies policy

Course of HTTP API in Go Applying Hexagonal Architecture

Standard
Adrián PérezJoan López de la FrancaJavier Ferrer

By Adrián Pérez, Joan López de la Franca y Javier Ferrer – Software Design and Architecture y Backend

Learn how to develop your first HTTP API in Go by applying some of the fundamentals of Hexagonal Architecture.

Go to course

💸 First lesson available without registration!

The use case for HTTP APIs (and similar) is one of the most frequent today in the development world, so there's no better way to continue learning the Go programming language than by implementing one.

To do this, we will follow some of the fundamentals of Hexagonal Architecture, which will help us in terms of maintainability, adaptability, testability, and scalability of the code.

What we will see in this course:

  • 📂 Structure of a project in Go applying the fundamentals of Hexagonal Architecture.
  • ⚡ Create an HTTP API in Go from the basics.
  • 🌍 Define our HTTP interface and middlewares using the standard library and a framework (Gin).
  • 💾 Create an implementation of our repository compatible with MySQL.
  • 📬 Modeling, publishing, and subscribing to our domain events.
  • ✅ Testing!: We will test our application using mocks, seeing examples as close to real life as possible.

Although some concepts are reviewed, this course assumes basic knowledge of both the Go programming language and Hexagonal Architecture.

Therefore, we recommend that you first take the course on Introduction to Go and the course on Hexagonal Architecture and then jump to this.

Videos of the course

  • 🏁 Our First HTTP Endpoint in Go
  • 🍸 Using Gin: Our First Framework
  • 👷 Structuring Our Health Check
  • 🤔 Let’s Review!

  • 🎓 Implementing the Course Creation Endpoint
  • 💉 Injecting Our Repository
  • ✅ Testing Our Endpoint
  • ⭕ Adding Validations to Our Domain
  • 🤔 Let’s Review!
  • 🛠 Let’s Practice!

  • Implementing Our Repository for MySQL
  • Testing Our Repository
  • 🤔 Let’s Review!
  • 🛠 Let’s Practice!

  • 🏗️ Refactoring the Endpoint to Extract the Application Service
  • ✅ Testing the Application Service
  • 🚌 Unifying Our Use Cases: Command Bus
  • 🤔 Let’s Review!
  • 🛠 Let’s Practice!

  • 🛌 Graceful Shutdown
  • ⌛ Timeouts in Asynchronous Operations: Repository
  • 🤔 Let’s Review!
  • 🛠 Let’s Practice!

  • 🔗 Using HTTP Middlewares in Go
  • 🤫 The Best-Kept Secret of Go and Its Dates
  • 🏩 Implementing the Error Recovery Middleware in Gin
  • 🤔 Let’s Review!
  • 🛠 Let’s Practice!

  • 📮 Publishing Course Created Events
  • 📬 Implementing Our Event Subscriber
  • 🚎 Implementing the Event Bus
  • 🛠 Let’s Practice!

  • 🍃 Reading Configuration from Environment Variables
  • 🚀 Build, Deploy and Time for Production!
  • 🐳 Generating the Docker Image and Debugging Errors

  • 📦 How to Manage Dependency Injection in Go?
  • 🤦 Dramatic Moments in Go

  • Conclusion and Next Steps
Go to course

Related courses

Standard
Design patterns: Inbox and Outbox

📬 Design patterns: Inbox and Outbox

Javier FerrerRafa Gómez

Learn when to use (and when not to use) the Inbox and Outbox patterns.

See course
Standard
Clean transactions [Debate]

🤲 Clean transactions [Debate]

Javier FerrerRafa Gómez

Debate where we look at alternatives on how to apply transactions.

See course
Standard
Event Bus in a Database [Infrastructure Design]

🚏 Event Bus in a Database [Infrastructure Design]

Javier FerrerRafa Gómez

Add scalability by using your own database as an event bus.

See course
See full catalogue

Pay according to your needs

lite (only monthly)

19 €
per month
  • Essential programming courses to build a solid foundation
Popular

standard

24,92 €
Discount vs monthly of 49 €
Annual payment of 299 €
per month
  • Main catalog to master writing maintainable, scalable, and testable code
  • Receive job offers verified by Codely
  • Company invoice
  • Accumulate renewal discounts

premium

41,58 €
Discount vs monthly of 89 €
Annual payment of 499 €
per month
  • Exclusive AI courses to keep you always up to date
  • Early access to new courses
  • Discount on workshops
  • Receive job offers verified by Codely
  • Company invoice
  • Accumulate renewal discounts

We won't increase the price while your subscription is active

SubscribeSign in