Top 3.4% dependent packages on proxy.golang.org
Top 2.5% dependent repos on proxy.golang.org
proxy.golang.org : github.com/muir/nvelope
Package nvelope provides injection handlers that make building HTTP endpoints simple. In combination with npoint and nject it provides a API endpoint framework. The main things it provides are a request decoder and a response encoder. The request decoder will fill in a struct to capture all the parts of the request: path parameters, query parameters, headers, and the body. The decoding is driven by struct tags that are interpreted at program startup. The response encoder is comparatively simpler: given a model and an error, it encodes the error or the model appropriately. Deferred writer allows output to be buffered and then abandoned. NotFound, Forbidden, and BadRequest provide easy ways to annotate an error return to cause a specific HTTP error code to be sent. CatchPanic makes it easy to turn panics into error returns. The provided example puts it all together. Example shows an injection chain handling a single endpoint using nject, nape, and nvelope.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/muir/nvelope
Keywords:
dependency-injection
, encode
, go
, golang
, http-server
License: MIT
Latest release: 2 months ago
First release: about 3 years ago
Namespace: github.com/muir
Dependent packages: 3
Dependent repositories: 4
Stars: 3 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago