middlewares

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindRequestPayload added in v0.2.1

func BindRequestPayload(payloadInst interface{}) echo.MiddlewareFunc

func RequireResourceIdInParam

func RequireResourceIdInParam(paramName string) echo.MiddlewareFunc

Types

type MiddlewareManager

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

MiddlewareManager ... This file contains common functions for auth

func NewMiddlewareManager

func NewMiddlewareManager(
	appConf *config.AppConfig,

	userRepo coreRepo.UserRepository,
	userOrgRepo coreRepo.UserOrgRepository,
	orgRepo coreRepo.OrgRepository,
	projectRepo projectRepo.ProjectRepository,

	userUC usecases.UserUsecase,
) *MiddlewareManager

NewMiddlewareManager will create new an MiddlewareManager object

func (MiddlewareManager) Auth

func (m MiddlewareManager) Auth() echo.MiddlewareFunc

func (MiddlewareManager) CheckPolicies

func (m MiddlewareManager) CheckPolicies() echo.MiddlewareFunc

func (MiddlewareManager) CheckPoliciesWithOrg

func (m MiddlewareManager) CheckPoliciesWithOrg() echo.MiddlewareFunc

func (MiddlewareManager) CheckPoliciesWithProject

func (m MiddlewareManager) CheckPoliciesWithProject() echo.MiddlewareFunc

func (MiddlewareManager) CheckPoliciesWithRequestPayload

func (m MiddlewareManager) CheckPoliciesWithRequestPayload(payloadInst interface{}) echo.MiddlewareFunc

NOTES: everywhen we call this function, we should pass a new instance of payloadInst to avoid race condition

func (*MiddlewareManager) FireBaseAuth added in v0.3.0

func (m *MiddlewareManager) FireBaseAuth(next echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

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