middleware

package
v0.0.0-...-937c394 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationHandler

type AuthenticationHandler func(http.ResponseWriter, *http.Request, db.User)

type EnsureAuthenticated

type EnsureAuthenticated struct {
	Handler AuthenticationHandler
	// contains filtered or unexported fields
}

func NewEnsureAuth

func NewEnsureAuth(handlerToWrap AuthenticationHandler, db *db.Queries) *EnsureAuthenticated

func (*EnsureAuthenticated) ServeHTTP

func (ea *EnsureAuthenticated) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LoggerMiddleware

type LoggerMiddleware struct {
	Handler http.Handler
}

func NewLoggerMiddleware

func NewLoggerMiddleware(handlerToWrap http.Handler) *LoggerMiddleware

func (*LoggerMiddleware) ServeHTTP

func (lm *LoggerMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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