Documentation
¶
Index ¶
- func BoolParamsSkipper(sourceParam string, contextKey string, skipAfter bool) func(echo.Context) (bool, error)
- func Init(globals utils.Globals, e *echo.Echo)
- func Int64ParamsSkipper(sourceParam string, contextKey string, skipAfter bool) func(echo.Context) (bool, error)
- func LimitParamsSkipper(sourceParam string, contextKey string, skipAfter bool) func(echo.Context) (bool, error)
- func PermissionsVerification(globals utils.Globals, permissions []string, ...) echo.MiddlewareFunc
- func SkipOrSetUser(isSkipper bool) func(echo.Context) (bool, error)
- func TokenVerification(globals utils.Globals, skipper func(c echo.Context) (bool, error)) echo.MiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolParamsSkipper ¶
func BoolParamsSkipper(sourceParam string, contextKey string, skipAfter bool) func(echo.Context) (bool, error)
BoolParamsSkipper return true when skipAfter and no param provided (only for bool param). If a param is provided it can assign it to a context 'variable' if contextKey is passed
func Int64ParamsSkipper ¶
func Int64ParamsSkipper(sourceParam string, contextKey string, skipAfter bool) func(echo.Context) (bool, error)
Int64ParamsSkipper return true when skipAfter and no param provided (only for int64 param). If a param is provided it can assign it to a context 'variable' if contextKey is passed
func LimitParamsSkipper ¶
func LimitParamsSkipper(sourceParam string, contextKey string, skipAfter bool) func(echo.Context) (bool, error)
LimitParamsSkipper return true when skipAfter and the param provided is not superior to MaxLimit (only for int param). If a param is provided it can assign it to a context 'variable' if contextKey is passed
func PermissionsVerification ¶
func PermissionsVerification(globals utils.Globals, permissions []string, skipper func(c echo.Context) (bool, error)) echo.MiddlewareFunc
PermissionsVerification it will check if the user as the provided permission, there is a skipper to skip if not needed
func SkipOrSetUser ¶
SkipOrSetUser I use this 'skipper' has a function to set the user id present in the body so that permissions can check for it later
func TokenVerification ¶
func TokenVerification(globals utils.Globals, skipper func(c echo.Context) (bool, error)) echo.MiddlewareFunc
TokenVerification it will check if the token is present and its authenticity then add its user information to a context variable there is a skipper to skip if not needed
Types ¶
This section is empty.