middleware

package
v0.0.0-...-091137d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

Middelware represents the singular of middleware.

func NewMiddleware

func NewMiddleware(l *logger.Logger, p *presenter.Presenter) *Middleware

NewMiddleware creates a middleware.

func (*Middleware) Log

func (mw *Middleware) Log(next http.Handler) http.Handler

Log is a middleware for logging. It logs the access log. It also adds a trace id to the context.

func (*Middleware) Recovery

func (mw *Middleware) Recovery(next http.Handler) http.Handler

Recovery is a middleware for recovering from panic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL