Design first. Then win.

goa is a holistic approach for building microservices in Go.

 

Code Generation

Goa relies on code generation to alleviate the need for reflection or repetitive coding.
The goagen tool generates various artifacts including code, documentation, clients and even custom outputs via plugins. The end result is application code that is clean and terse.

Design Based

The goa design language is flexible and stays out of the way – you decide how your API works. The design is the Single Source Of Truth from which both behavior and docs are derived. The goa design language being a Go DSL is easy to customize and the resulting designs are simple to share.

Powerful Context

Request handlers get handed over a endpoint specific context object that exposes both the request state through convenient fields and the response state through methods that write the response back.

The API Development Life Cycle

Design

Creating a service with goa starts with the design. The goa DSL lets you describe the global properties, types and endpoints that make up the service API. The apidsl package docs provides a quick reference to all the DSL functions.

Implement

Once the design of the API is in place goagen generates the corresponding data structures, validation code and handlers. Handlers are defined as interface methods. Implementing the service is thus as simple as implementing the generated interfaces.

Extend

The best part about the goa DSL is that the engine is completely decoupled. Plugins can implement custom DSLs to extend the concepts described in the design. Plugins can also generate arbitrary outputs.

Getting Started

1 Implement a simple goa service with the Getting Started Guide.

2 Learn more about the goa DSL.

3 Consult the examples and the goa-cellar service.

4 Join the slack channel (sign up here).

Learn more

Just Generate Everything with goa

Just Generate Everything with goa

Kevin Keuning – Chicago Ultimate Golang, October 2016

goa for Microservices

goa for Microservices

Alexandre Bourget – Golang Montréal, August 2016

Go Time

Go Time #7: goa The Framework for Building Microservices

Raphael Simon – Interview, July 2016

goa GopherCon slides

Building Microservices From Design (slides)

Raphael Simon – GopherCon, July 2016

goa video

Generate All The Things

Brian Ketelsen – Tempa Go Meetup, March 2016