middleware

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 5 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
}

Middleware wrapps all middlewares

func CreateMiddleware

func CreateMiddleware(l *infra.Logger) *Middleware

CreateMiddleware create a instance of a middleware

func (*Middleware) JSONResponse

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

JSONResponse add json content type to header

func (*Middleware) Logging

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

Logging logs the request time

Jump to

Keyboard shortcuts

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