middleware

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(l service.Logger, mwl ILogger) func(http.Handler) http.Handler

Logger is middleware to log request to elasticsearch.

func RealIP

func RealIP(h http.Handler) http.Handler

RealIP is go-chi wrapper.

func Recoverer

func Recoverer(next http.Handler) http.Handler

Recoverer is custom recoverer middleware. Will return 500.

Types

type ILogger

type ILogger interface {
	Send(string, interface{}) error
}

ILogger is middleware logger interface.

Jump to

Keyboard shortcuts

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