Quantcast
Channel:
Browsing latest articles
Browse All 285 View Live

Running the Service

After designing and implementing your gRPC-based Goa service, you’ll want to run it locally and confirm it works as expected. In this tutorial, we’ll: Launch the gRPC server. Test the service using...

View Article


Running the Concerts Service

You’ve designed your API and implemented the service methods. Now it’s time to run the Concerts service and test its endpoints. 1. Start the Server From your project root, build and run your app: go...

View Article


Overriding Error Serialization

This guide explains how to customize the way errors are serialized in Goa services. Error serialization is the process of converting error objects into a format that can be transmitted over HTTP or...

View Article

JWT Authentication

JSON Web Tokens (JWT) provide a secure way to transmit claims between parties. They’re particularly useful in microservices architectures where you need to pass authentication and authorization...

View Article

Interceptor Implementation

This guide explains how to implement interceptors in Goa, focusing on the flexibility provided by the interceptor pattern and the next function. Implementation Structure Goa generates type-safe...

View Article


Error Types

Goa allows you to define errors using either the default ErrorResult type or custom user-defined types. Choosing the appropriate error type depends on the complexity and specificity of the errors you...

View Article

Architecture Diagrams as Code

Modern software architectures, especially those built around microservices, require clear and maintainable documentation. While service contracts and API documentation are essential, understanding how...

View Article

Writing Service Clients

When building microservices, a common challenge is how to structure the communication between services. This section covers best practices for writing clients to Goa services, focusing on creating...

View Article


Why Choose Goa?

When building microservices and APIs in Go, Goa’s code generation capabilities and design-first approach dramatically accelerate development. Let’s explore why Goa might be the perfect choice for your...

View Article


Types of Interceptors

Goa supports several types of interceptors to handle different scenarios. This guide explains the different types and when to use them. Core Concepts When designing interceptors, there are three key...

View Article

Template Integration

Goa services can render dynamic HTML content using Go’s standard html/template package. This guide shows you how to integrate template rendering into your Goa service. Design First, define the service...

View Article

Getting Support

Community Support Channels Slack Channel Join our Slack channel (part of the Gophers Slack) to: Chat with other Goa users Get quick help with questions Share ideas and experiences Connect with the...

View Article

Stream Interceptors

Stream gRPC Interceptors Stream interceptors handle streaming RPCs in gRPC services. They’re used when either the client, server, or both send multiple messages over a single connection. This guide...

View Article


Service Design

This guide explains how to design gRPC services using Goa’s DSL, focusing on service definitions and message types. For a comprehensive overview of Goa’s type system and data modeling capabilities,...

View Article

HTTP Routing

Goa provides a powerful routing system that maps HTTP requests to your service methods. This guide covers: Basic routing concepts and service definitions HTTP methods and URL patterns Parameter...

View Article


Working with Multiple Services in Goa

In real-world applications, it’s common to have multiple services that work together to form a complete system. Goa makes it easy to design and implement multiple services within a single project. This...

View Article

Implementing the Service

After designing your gRPC service with Goa’s DSL, it’s time to bring it to life! This guide will walk you through implementing your service step by step. You’ll learn how to: Generate the gRPC...

View Article


Implementing

After designing your REST API with Goa’s DSL, it’s time to implement the service. This tutorial walks you through the implementation process step by step. Generate code using the Goa CLI (goa gen)...

View Article

Generation Process

Generation Pipeline When you run goa gen, Goa follows a systematic process to transform your design into working code: 1. Bootstrap Phase Goa first creates and runs a temporary program: During this...

View Article

First Service

Prerequisites Ready to build something awesome? This guide assumes you have curl installed. Any other HTTP client will work as well. 1. Create a New Module Let’s start our journey by setting up a fresh...

View Article

File Uploads & Downloads

When building web services, handling file uploads and downloads is a common requirement. Whether you’re building a file sharing service, an image upload API, or a document management system, you’ll...

View Article


Error Propagation

This guide explains how errors propagate through different layers of a Goa service, from the business logic to the client. Overview Error propagation in Goa follows a clear path: Business logic...

View Article


Distributed Tracing

Modern applications are complex distributed systems where a single user request might touch dozens of services, databases, and external APIs. When something goes wrong, it can be challenging to...

View Article

Designing Streaming Endpoints

Designing streaming endpoints in Goa involves defining methods that can handle the transmission of a sequence of results. Whether you’re implementing server-side streaming, client-side streaming, or...

View Article

Defining Errors

Goa provides a flexible and powerful way to define errors within your service designs. By leveraging Goa’s Domain-Specific Language (DSL), you can specify both service-level and method-level errors,...

View Article


Custom HTTP Middleware

Goa services use standard Go HTTP handlers, which means you can use any HTTP middleware that follows Go’s standard middleware pattern. This guide shows you how to create effective HTTP middleware that...

View Article

API Key Authentication

API Key authentication is a simple and popular way to secure APIs. It involves distributing unique keys to clients who then include these keys in their requests. This method is particularly useful for...

View Article

API Definition

API Definition The API function is a top-level DSL that defines the global properties of your service. It acts as the root of your design and establishes the foundation for all other components. Each...

View Article

What is Goa?

Now that you understand why Goa can transform your API development, let’s explore how it works in practice. At its core, Goa is a design-first framework that revolutionizes how you build microservices...

View Article



Unary Interceptors

Unary gRPC Interceptors Unary interceptors handle single request/response RPCs in gRPC services. They’re ideal for protocol-level concerns like metadata handling, logging, and monitoring. This guide...

View Article

Serving Files

Goa provides a straightforward way to serve static assets such as HTML, CSS, JavaScript, and images through the Files function in the service DSL. This function allows you to map HTTP paths to...

View Article

Protocol Buffer Integration

Protocol Buffer Integration Goa manages Protocol Buffer generation and compilation through several key components: Automatic .proto Generation Goa automatically creates Protocol Buffer definitions from...

View Article

Understanding Plugins

Goa plugins extend and customize the functionality of your APIs. Whether you need to add rate limiting, integrate monitoring tools, or generate code in different languages, plugins provide a flexible...

View Article


gRPC Overview

Goa provides first-class support for designing and implementing gRPC services. This guide introduces the core concepts of using gRPC with Goa. What is gRPC? gRPC is a high-performance RPC (Remote...

View Article

Introduction

Streaming is a powerful feature that allows APIs to handle large volumes of data and real-time updates efficiently. In Goa, streaming support enables you to define endpoints that can send or receive a...

View Article

Introduction

Effective error handling is a cornerstone of building reliable and maintainable APIs. In the context of Goa, a design-first framework for building microservices Effective error handling is a...

View Article


Installation

Prerequisites Goa requires the use of Go modules, so ensure they’re enabled in your Go environment. Use Go 1.18+ (recommended). Enable Go Modules: Confirm they’re enabled in your environment (e.g.,...

View Article


Getting Started with Interceptors

This guide will walk you through creating and using your first Goa interceptor. We’ll create a simple logging interceptor that records the timing of method calls. Defining an Interceptor Interceptors...

View Article

Domain Vs Transport

When designing error handling in Goa, it’s important to understand the distinction between domain errors and their transport representation. This separation allows you to maintain clean domain logic...

View Article

Designing gRPC Services

In this tutorial, you’ll design a simple gRPC service with Goa. While Goa is often used for REST endpoints, it also has first-class support for gRPC transports. You’ll see how to: Define a service and...

View Article

Designing a REST API

This tutorial walks you through designing a REST API for managing music concerts using Goa. You’ll learn how to create a complete API design that includes common operations, proper HTTP mappings, and...

View Article


Data Modeling

Goa provides a powerful type system that allows you to model your domain with precision and clarity. From simple primitives to complex nested structures, the DSL offers a natural way to express data...

View Article

Contributing to Goa

Welcome to the Goa contributor’s guide! This document will help you understand how you can contribute to making Goa better. Whether you’re interested in improving code, documentation, or helping other...

View Article


Content Negotiation

Content negotiation allows your HTTP services to support multiple content types and formats. Goa provides a flexible encoding and decoding strategy that makes it possible to associate arbitrary...

View Article

Command Line Tool

Installation Install Goa’s command-line tools using: go install goa.design/goa/v3/cmd/goa@latest Available Commands Generate Code (goa gen) goa gen <design-package-import-path> [-o...

View Article


Combining Middleware and Interceptors

HTTP middleware and Goa interceptors can work together to create powerful, layered solutions. This guide explores patterns and strategies for combining them effectively. Core Concepts Data Flow The...

View Article

Basic Setup

Setting up observability in a Goa service involves configuring Clue and OpenTelemetry. This guide walks through the essential setup steps. Prerequisites First, add the required dependencies to your...

View Article

Basic Authentication

Basic Authentication is a simple authentication scheme built into the HTTP protocol. While it’s one of the simplest forms of authentication, it’s still widely used, especially for internal APIs or...

View Article

Server-Sent Events

Server-Sent Events (SSE) is a HTTP-based server-to-client streaming protocol that enables real-time updates from the server to the client. Goa provides native support for implementing SSE endpoints,...

View Article


Sticky Cookies

When using streaming services / websockets you need to do some additional steps in your deployment. Why do we need sticky cookies? You might want to deploy your Goa Services into Kubernetes and do a...

View Article

Browsing latest articles
Browse All 285 View Live