fire
fire copied to clipboard
An idiomatic micro-framework for building Ember.js compatible APIs with Go.
Go on Fire
An idiomatic micro-framework for building Ember.js compatible APIs with Go.
- Introduction
- Features
- Example
- Installation
- Models
- Controllers
- Authentication
- Authorization
Introduction
Go on Fire is built on top of the wonderful built-in http package, implements the JSON API specification through the dedicated jsonapi library, uses the official mongo driver for persisting resources with MongoDB and leverages the dedicated oauth2 library to provide out of the box support for OAuth2 authentication using JWT tokens. Additionally, it provides packages for request authorization, asynchronous job processing and WebSocket/SSE based event sourcing.
The deliberate and tight integration of these components provides a very simple and extensible set of abstractions for rapidly building backend services for websites that use Ember.js as their frontend framework. Of course, it can also be used in conjunction with any other single page application framework or as a backend for native mobile applications.
To quickly get started with building an API with Go on Fire read the following sections in this documentation and refer to the package documentation for more detailed information on the used types and methods.
Features
Go on Fire ships with builtin support for various features to also provide a complete toolkit for advanced projects:
- Declarative definition of models and resource controllers.
- Custom group, collection and resource actions.
- Builtin validators incl. automatic relationship validation.
- Callback based plugin system for easy extendability.
- Integrated asynchronous and distributed job processing system.
- Event sourcing via WebSockets and SSE.
- Declarative authentication and authorization framework.
- Integrated OAuth2 authenticator and authorizer.
- Support for tracing via opentracing.
Example
The example application implements an API that uses most Go on Fire features.
Installation
To get started, install the package using the go tool:
$ go get -u github.com/256dpi/fire
License
The MIT License (MIT)
Copyright (c) 2016 Joël Gähwiler