- Simple, flexible and testable architecture
- Light-weight server component
- Easy to replace components with your own library of choice (router, database driver, etc)
- Guaranteed thread-safety for each request: uses
gorilla/contextfor per-request context - Uses dependency-inversion principle (DI) to reduce complexity and manage package dependencies.
- Not a framework
- More like a project to quickly kick-start your own REST API server, customized to your own needs.
- Easily extend the project with your own REST resources, in addition to the built-in
usersandsessionsresources.
- Each REST resource is a separate package
- Modular approach
- Separation between
model,controlleranddatalayers - Clear abstraction from
serverpackage - Take a look at built-in resources for examples:
usersandsessions - More example projects coming soon!
- Batteries come included
- API versioning using using Accept header, for e.g:
Accept=application/json;version=1.0,*/* - Default resources for
usersandsessions - Access control using activity-based access control (ABAC)
- Authentication and session management using JWT token
- Context middleware using
gorilla/contextfor per-request context - JSON response rendering using
unrolled/render; extensible to XML or other formats for response - MongoDB middleware for database; extensible for other database drivers
- API versioning using using Accept header, for e.g:
- Highly-testable code base
- Unit-tested
server; 100% code coverage - Easily test REST resources routes
- Parallelizable test suite
- Uses
ginkgofor test framework; optional.
- Unit-tested
<img src="http://i.imgur.com/HwIhPz7.png"/ height="750"/>