Documentation
¶
Index ¶
- func AttachExtractor(middleware func(c *fiber.Ctx, extractor ExtractID) error, extractor ExtractID) fiber.Handler
- type AuthMiddlewareHandler
- func (m *AuthMiddlewareHandler) Authorize(requiredPermissions ...permission.Permission) fiber.Handler
- func (m *AuthMiddlewareHandler) ClubAuthorizeById(c *fiber.Ctx, extractor ExtractID) error
- func (m *AuthMiddlewareHandler) EventAuthorizeById(c *fiber.Ctx, extractor ExtractID) error
- func (m *AuthMiddlewareHandler) UserAuthorizeById(c *fiber.Ctx) error
- type AuthMiddlewareService
- type ExtractID
- func ExtractFromBody(key string) ExtractID
- func ExtractFromParamIntoQuery(param string, db *gorm.DB, query QueryFn) ExtractID
- func ExtractFromParams(param string) ExtractID
- func ExtractFromQuery(db *gorm.DB, id uuid.UUID, query QueryFn) ExtractID
- func FromExtractFromParamIntoQuery(param string, db *gorm.DB, query QueryFn) ExtractID
- type QueryFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachExtractor ¶
Types ¶
type AuthMiddlewareHandler ¶
type AuthMiddlewareHandler struct {
// contains filtered or unexported fields
}
func (*AuthMiddlewareHandler) Authorize ¶
func (m *AuthMiddlewareHandler) Authorize(requiredPermissions ...permission.Permission) fiber.Handler
func (*AuthMiddlewareHandler) ClubAuthorizeById ¶
func (m *AuthMiddlewareHandler) ClubAuthorizeById(c *fiber.Ctx, extractor ExtractID) error
Authorizes admins of the specific club to make this request, skips check if super user
func (*AuthMiddlewareHandler) EventAuthorizeById ¶
func (m *AuthMiddlewareHandler) EventAuthorizeById(c *fiber.Ctx, extractor ExtractID) error
Authorizes admins of the host club of this event to make this request, skips check if super user
func (*AuthMiddlewareHandler) UserAuthorizeById ¶
func (m *AuthMiddlewareHandler) UserAuthorizeById(c *fiber.Ctx) error
type AuthMiddlewareService ¶
type AuthMiddlewareService interface { ClubAuthorizeById(c *fiber.Ctx, extractor ExtractID) error UserAuthorizeById(c *fiber.Ctx) error EventAuthorizeById(c *fiber.Ctx, extractor ExtractID) error Authorize(requiredPermissions ...permission.Permission) fiber.Handler }
func New ¶
func New(db *gorm.DB, validate *validator.Validate) AuthMiddlewareService
Click to show internal directories.
Click to hide internal directories.