middleware

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MWHandler

type MWHandler struct {
	Cfg     *configuration.AppConfig
	Ds      *dbservice.DBService
	SessMgr *sessionstore.SessionManager
	Logger  *logrus.Entry
}

func (*MWHandler) Auth

func (h *MWHandler) Auth(next http.Handler) http.Handler

func (*MWHandler) AuthWithAdmin

func (h *MWHandler) AuthWithAdmin(next http.Handler) http.Handler

func (*MWHandler) ContextLogger

func (h *MWHandler) ContextLogger(context string) *logrus.Entry

func (*MWHandler) Headers

func (h *MWHandler) Headers(next http.Handler) http.Handler

Headers middleware sets default headers to prevent caching and other things

func (*MWHandler) Limit

func (h *MWHandler) Limit(next http.Handler) http.Handler

Limit middleware limits the number of requests

func (*MWHandler) Recover

func (h *MWHandler) Recover(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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