middleware

package
v0.0.0-...-0efd02e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoMiddleware

type GoMiddleware struct {
	// contains filtered or unexported fields
}

GoMiddleware represent the data-struct for middleware

func InitMiddleware

func InitMiddleware(logger *zap.Logger) *GoMiddleware

InitMiddleware initialize the middleware

func (*GoMiddleware) CORS

func (m *GoMiddleware) CORS(next echo.HandlerFunc) echo.HandlerFunc

CORS will handle the CORS middleware

func (*GoMiddleware) HasRole

func (m *GoMiddleware) HasRole(roles ...string) echo.MiddlewareFunc

HasRole validates that an authenticated user has at least one role from a specified list. This method constructs the actual function that is used.

func (*GoMiddleware) Logger

func (m *GoMiddleware) Logger(next echo.HandlerFunc) echo.HandlerFunc

Logger is a middleware that logs requests

Jump to

Keyboard shortcuts

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