Skip to content
/ rest Public

A set of restful http handlers for quickly building RESTful services with any database backend.

License

Notifications You must be signed in to change notification settings

dndungu/rest

Repository files navigation

GoDoc Build Status codecov Go Report Card Issue Count

REST

REST is an opinionated library for quickly creating RESTful micro services. It is built using lessons learned while architecting micro services.

Event driven architecture

REST makes it easy to use an event broker to send state changes between services.

Metrics

REST makes it easy to track function performance metrics.

Unit Testing

REST makes it easy to mock database, metrics client, and event broker to allow for 100% test code coverage in a RESTful.

Example

package main

import("github.com/dndungu/rest")

todoResource := NewResource("todo").
	UseHeaders(headers).
	UseType(reflect.TypeOf(FakeFields{})).
	UseStorage(&Mongo{}).
	UseValidator(&FakeValidator{}).
	UseSerializer(&JSON{})