middleware

package
v0.0.0-...-6dea0d5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJSONValid

func IsJSONValid(next http.HandlerFunc) http.HandlerFunc

IsJSONValid validates if JSON in request body is valid

Types

type Middleware

type Middleware struct {
	Logger zerolog.Logger
}

Middleware contains dependencies for middleware structure

func (*Middleware) HTTPLogger

func (md *Middleware) HTTPLogger(next http.Handler) http.Handler

HTTPLogger middleware to log http request

func (*Middleware) SetLogger

func (m *Middleware) SetLogger(logger zerolog.Logger)

SetLogger sets logger

Jump to

Keyboard shortcuts

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