middlewareutility

package
v0.0.0-...-f356f3c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 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 Service

type Service struct {
	*enforcer.Enforcer
	// contains filtered or unexported fields
}

func NewService

func NewService(log *logger.Logger, enforcerPolicy *enforcer.Enforcer, storage storage) *Service

NewService creates a new timeout handler service

func (*Service) AuthorizeAccess

func (svc *Service) AuthorizeAccess(resourceCode string, act string) func(next http.Handler) http.Handler

AuthorizeAccess is a middleware to enforce function's access control of the requester

func (*Service) Log

func (svc *Service) Log(level zapcore.Level, msg string)

Log logs message based on the log level

Jump to

Keyboard shortcuts

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