Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultConfig is the default CasbinAuth middleware config. DefaultConfig = Config{ Skipper: middleware.DefaultSkipper, } )
Functions ¶
func Middleware ¶
func Middleware(ce *casbin.Enforcer) echo.MiddlewareFunc
func MiddlewareWithConfig ¶
func MiddlewareWithConfig(config Config) echo.MiddlewareFunc
Types ¶
type Config ¶
type Config struct { // Skipper defines a function to skip middleware. Skipper middleware.Skipper // Enforcer CasbinAuth main rule. // Required. Enforcer *casbin.Enforcer }
Config defines the config for CasbinAuth middleware.
func (*Config) CheckPermission ¶
Click to show internal directories.
Click to hide internal directories.