middlewares

package
v0.0.0-...-c0662df Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContentType

func CheckContentType(r *http.Request) bool

CheckContentType is used to check the real contents of Content-type in http header

Types

type ContentCheckMiddleware

type ContentCheckMiddleware struct {
}

ContentCheckMiddleware is used to check if content-Type of the POST Request is an acceptable type.

func (*ContentCheckMiddleware) ServeHTTP

ServeHTTP implements the negroni middleware function

type LoggingMiddleWare

type LoggingMiddleWare struct {
}

LoggingMiddleWare is used to depict a request logger

func (*LoggingMiddleWare) ServeHTTP

func (lm *LoggingMiddleWare) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

ServeHTTP implements the negroni middleware function

Jump to

Keyboard shortcuts

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