Documentation ¶
Index ¶
- func CatchPanicMiddlewares[R, S any](ctx *Context[R, S])
- func LogRequestResponseMiddlewares[R, S any](ctx *Context[R, S])
- type Context
- func (c *Context[R, S]) Abort()
- func (c *Context[R, S]) AbortWithError(err error)
- func (c *Context[R, S]) AbortWithErrorAndCode(code int, err error)
- func (c *Context[R, S]) Context() context.Context
- func (c *Context[R, S]) Error(err error)
- func (c *Context[R, S]) GetError() error
- func (c *Context[R, S]) IsAborted() bool
- func (c *Context[R, S]) Logger() *zerolog.Logger
- func (c *Context[R, S]) MustBoolValue(key interface{}) bool
- func (c *Context[R, S]) MustFloat64Value(key interface{}) float64
- func (c *Context[R, S]) MustInt64Value(key interface{}) int64
- func (c *Context[R, S]) MustIntValue(key interface{}) int
- func (c *Context[R, S]) MustStringValue(key interface{}) string
- func (c *Context[R, S]) MustStringValueSlice(key interface{}) []string
- func (c *Context[R, S]) MustUint64Value(key interface{}) uint64
- func (c *Context[R, S]) MustValue(key interface{}) interface{}
- func (c *Context[R, S]) Next()
- func (c *Context[R, Q]) Request() R
- func (c *Context[P, S]) Response() S
- func (c *Context[R, S]) StatusCode() int
- func (c *Context[R, S]) Value(key interface{}) interface{}
- func (c *Context[R, S]) WithValue(key, val interface{}) *Context[R, S]
- type ContextProcessorBuilder
- func (b *ContextProcessorBuilder[R, S]) Build() MiddlewareProcessor[R, S]
- func (b *ContextProcessorBuilder[R, S]) WithContext(ctx context.Context) *ContextProcessorBuilder[R, S]
- func (b *ContextProcessorBuilder[R, S]) WithHandlers(handlers ...HandlerFunc[R, S]) *ContextProcessorBuilder[R, S]
- func (b *ContextProcessorBuilder[R, S]) WithLogger(logger zerolog.Logger) *ContextProcessorBuilder[R, S]
- func (b *ContextProcessorBuilder[R, S]) WithMiddlewares(middlewares ...HandlerFunc[R, S]) *ContextProcessorBuilder[R, S]
- type HandlerFunc
- type HandlersChain
- type MiddlewareProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatchPanicMiddlewares ¶
Types ¶
type Context ¶
type Context[R, S any] struct { // contains filtered or unexported fields }
func (*Context[R, S]) AbortWithError ¶
func (*Context[R, S]) AbortWithErrorAndCode ¶
func (*Context[R, S]) MustBoolValue ¶
func (*Context[R, S]) MustFloat64Value ¶
func (*Context[R, S]) MustInt64Value ¶
func (*Context[R, S]) MustIntValue ¶
func (*Context[R, S]) MustStringValue ¶
func (*Context[R, S]) MustStringValueSlice ¶
func (*Context[R, S]) MustUint64Value ¶
func (*Context[R, S]) StatusCode ¶
type ContextProcessorBuilder ¶
type ContextProcessorBuilder[R, S any] struct { // contains filtered or unexported fields }
func NewProcessor ¶
func NewProcessor[R, S any]() *ContextProcessorBuilder[R, S]
func (*ContextProcessorBuilder[R, S]) Build ¶
func (b *ContextProcessorBuilder[R, S]) Build() MiddlewareProcessor[R, S]
func (*ContextProcessorBuilder[R, S]) WithContext ¶
func (b *ContextProcessorBuilder[R, S]) WithContext(ctx context.Context) *ContextProcessorBuilder[R, S]
func (*ContextProcessorBuilder[R, S]) WithHandlers ¶
func (b *ContextProcessorBuilder[R, S]) WithHandlers(handlers ...HandlerFunc[R, S]) *ContextProcessorBuilder[R, S]
func (*ContextProcessorBuilder[R, S]) WithLogger ¶
func (b *ContextProcessorBuilder[R, S]) WithLogger(logger zerolog.Logger) *ContextProcessorBuilder[R, S]
func (*ContextProcessorBuilder[R, S]) WithMiddlewares ¶
func (b *ContextProcessorBuilder[R, S]) WithMiddlewares(middlewares ...HandlerFunc[R, S]) *ContextProcessorBuilder[R, S]
type HandlerFunc ¶
type HandlersChain ¶
type HandlersChain[R, S any] []HandlerFunc[R, S]
type MiddlewareProcessor ¶
Click to show internal directories.
Click to hide internal directories.