turtleware is an opinionated framework for creating REST services. It provides pluggable middlewares and some utility methods to simplify life. It uses JWT bearer authentication, and relies heavily on caching.
The framework is built on some core libraries:
- zerolog for logging
- lestrrat-go/jwx v2 for JWT parsing
- opentelemetry for tracing
- emissione for correct error handling
Download:
go get github.com/kernle32dll/turtleware
Detailed documentation can be found on pkg.go.dev.
turtleware is actively used in productive projects by the author.
Still, this project is still pretty much work-in-progress. Bugs happen, and breaking-changes might occur at any time. Also, only the most recent Go version is supported at any time for now. Code coverage is low, and documentation slim, so be warned.
turtleware provides three distinct functionalities:
- A set of middlewares, which can be chained individually (e.g., auth)
- Composition methods for chaining these middlewares together in a meaningful way (e.g. a GET endpoint)
- Optional multi tenancy
For a complete example, look at the main.go in the examples folder.