middleware

package
v0.0.0-...-08ab0e6 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiMiddleware

func ApiMiddleware(secretCallback func(id string) string) echo.MiddlewareFunc

func AuthMiddleware

func AuthMiddleware(app string, renewals ...time.Duration) echo.MiddlewareFunc

func Can

func Can(permissions map[string]bool, name string) error

func OperateMiddleware

func OperateMiddleware(UserType string) echo.MiddlewareFunc

func PermissionMiddleware

func PermissionMiddleware(permission PermissionFun) echo.MiddlewareFunc

func VisitorMiddleware

func VisitorMiddleware(next echo.HandlerFunc) echo.HandlerFunc

Types

type PermissionFun

type PermissionFun func(id string) (map[string]bool, error)

Jump to

Keyboard shortcuts

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