filter

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasGroupOrApiToken

func HasGroupOrApiToken(group string, handler http.HandlerFunc) http.HandlerFunc

func IsGroupOrApiTokenCond

func IsGroupOrApiTokenCond(r *http.Request, group string) bool

func IsSubjectOrGroupOrApiToken

func IsSubjectOrGroupOrApiToken(w http.ResponseWriter, r *http.Request, subject string, group string) error

IsSubjectOrGroupOrApiToken cannot be used as a filter because the subject needs to be loaded from the database first (part of the attendee admin data). Use in your handler functions.

Do not forget to return from the handler if an error is returned!

func LoggedIn

func LoggedIn(handler http.HandlerFunc) http.HandlerFunc

func LoggedInOrApiToken

func LoggedInOrApiToken(handler http.HandlerFunc) http.HandlerFunc

func WithTimeout

func WithTimeout(timeout time.Duration, handler http.HandlerFunc) http.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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