Categorygithub.com/juanjiTech/jin
modulepackage
0.0.0-20240610131617-93c79097b509
Repository: https://github.com/juanjitech/jin.git
Documentation: pkg.go.dev

# README

Jǐn

瑾,瑾瑜,美玉也。

Jin is a HTTP web framework written in Go (Golang) with a slim core but limitless extensibility.

Feature

  • Middleware support
  • Dependency injection
  • Integrate non-intrusively

Performance

Due to the speed of reflect.Call, every inject process will take about 200ns, which means if the handler in handler-chain didn't support fast-invoke will take about 200ns for dependency inject (on mac m2).

Status

Alpha. Expect API changes and bug fixes.

License

MIT

# Packages

No description provided by the author
No description provided by the author

# Functions

Default returns an Engine instance with the Logger and Recovery middleware already attached.
No description provided by the author
Mode returns current Jin mode.
No description provided by the author
Recovery returns a middleware handler that recovers from any panics and writes a 500 status code to the response if there was one.
SetMode sets gin mode according to input string.

# Constants

DebugMode indicates Jin mode is debug.
EnvJinMode indicates environment name for Jin mode.
ReleaseMode indicates Jin mode is release.
TestMode indicates Jin mode is test.

# Variables

DebugPrintRouteFunc indicates debug log output format.
DefaultErrorWriter is the default io.Writer used by Jin to debug errors.
DefaultWriter is the default io.Writer used by Jin for debug output and middleware output like Logger() or Recovery().

# Structs

No description provided by the author
No description provided by the author
Param is a single URL parameter, consisting of a key and a value.
RouterGroup is used internally to configure router, a RouterGroup is associated with a prefix and an array of handlers (middleware).

# Interfaces

HandlerFunc defines the handler used by Jin middleware as return value.
IRouter defines all router handle interface includes single and group router.
IRoutes defines all router handle interface.
No description provided by the author

# Type aliases

ContextInvoker is an inject.FastInvoker implementation of `func(Context)`.
HandlersChain defines a HandlerFunc slice.
Params is a Param-slice, as returned by the router.