middleware

package
v0.0.0-...-d93b30e Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth[
	LoginInputType, JWTAuthenticatedPayloadType, RefreshTokenInputType, UserType any,
](loginUseCase usecase.LoginUseCase[
	LoginInputType, JWTAuthenticatedPayloadType, RefreshTokenInputType, UserType,
],
) iris.Handler

func Common

func Common() iris.Handler

func Logger

func Logger(l logger.Interface) iris.Handler

func Permission

func Permission[UserType any](
	handleErrorFunc func(iris.Context, error, logger.Interface),
	l logger.Interface,
	checkers ...usecase.UserPermissionCheckerUseCase[UserType],
) iris.Handler

func Recover

func Recover(
	handleErrorFunc func(iris.Context, error, logger.Interface),
	l logger.Interface,
) context.Handler

New returns a new recover middleware, it recovers from panics and logs the panic message to the application's logger "Warn" level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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