Skip to content
Workflow based REST framework code generator
Go Makefile Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bootstrap Remove accidental revert of timeout param Aug 10, 2017
cmd License file clean ups. MIT License. Jul 24, 2017
compliance Fix tests. Broken since pointer cleanup Jul 21, 2017
flowgen Merge pull request #21 from grofers/join_coordinator Aug 10, 2017
generator Exit with error code when workflow generation fails Jun 27, 2017
runtime Change config runtime to parse into map of string to interface Jul 12, 2017
scripts Add basic compliance tests structure Jun 20, 2017
shared Update README and add attributions Jul 24, 2017
.gitignore Add compliance tests for most task components Jun 22, 2017
.travis.yml Remove token from travis.yml Oct 7, 2018
Dockerfile Add dockerfile (#34) May 1, 2019
Makefile Add dockerfile (#34) May 1, 2019 Update Sep 7, 2017
glide.lock Change repo dependency urls from ssh to https Sep 11, 2018
glide.yaml Change repo dependency urls from ssh to https Sep 11, 2018


Generates Go server code from a combination of REST and Workflow DSLs.

Build Status

A codon service has three components:

  • Server: Accepts and validates HTTP requests
  • Clients: Clients for upstream services which this service consumes
  • Workflows: Procedures for every REST endpoint of this server which consume Clients and other custom actions.

Server and Client side specifications are written in Swagger. Swagger code generation is done through go-swagger. Workflow is written in Flow, a Mistral inspired workflow specification in YAML. Its specification can be found here.

Check out wiki section for more information. Follow this tutorial for a very basic example on how to use this tool.


Set up your Golang development environment (Getting Started). Set your GOPATH and GOBIN directories. Also add GOBIN to your PATH so that golang tools can be used in command line.

Download the latest binary from Github releases and put it in your GOBIN directory. Or to install from source do:

mkdir -p $GOPATH/src/
cd $GOPATH/src/
git clone
cd go-codon
make install


This is what a workflow looks like (for an API to get posts and the comments for each post concurrently):

name: get_posts_comments
    - get_posts
        action: clients.jplaceholder.get_posts
            userId: <%jmes main.userId %>
            posts: <%jmes action %>
            - get_all_comments: true
        action: clients.jplaceholder.get_comments
            postId: <%jmes main.postId %>
            comments: <%jmes action %>
        with-items: <%jmes main.posts %>
            task: get_comments
                postId: <%jmes %>
                combined: <%jmes {"post_details":item,"comments":task.comments} %>
    body: <%jmes main.combined %>
    status_code: 200

To run this example checkout examples.

Projects go-codon would not exist without

(Or just projects I am really thankful for)

  • go-swagger: Provides code generators for client and server side components using Swagger specification.
  • go-jmespath: Allows for easy querying and manipulation of json objects in workflows.
  • Pongo2: Django template renderer. Used for templates and workflow expressions in codon.
  • Mistral DSL: A workflow spec used for infrastructure orchestration. Codon's workflow DSL is inspired from Mistral's but modified for use in REST context.
  • mapstructure
You can’t perform that action at this time.