Documentation
¶
Index ¶
- func CanonicalizeListFilters(session handlers.SessionManager) func(next http.Handler) http.Handler
- func CanonicalizeSearchParams(session handlers.SessionManager) func(next http.Handler) http.Handler
- func DetectClient(req *http.Request) models.ClientType
- func ExtractUserFromSession(users UserService, auth handlers.Authenticator, ...) func(next http.Handler) http.Handler
- func Logger(next http.Handler) http.Handler
- func NoCache(next http.Handler) http.Handler
- func Otel(next http.Handler) http.Handler
- func Recoverer(next http.Handler) http.Handler
- func RequireValidUser(next http.Handler) http.Handler
- func SetClient(next http.Handler) http.Handler
- func SkipUpdatesRoute(next http.Handler) func(res http.ResponseWriter, req *http.Request) bool
- type AppConfig
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalizeListFilters ¶ added in v0.221.2
CanonicalizeListFilters handles processing and storing the fully-specified, whitelisted list filters for the user.
func CanonicalizeSearchParams ¶ added in v0.221.2
CanonicalizeSearchParams processes and stores the search params requested by a user.
func DetectClient ¶ added in v0.154.0
func DetectClient(req *http.Request) models.ClientType
DetectClient detects the type of client accessing the app.
func ExtractUserFromSession ¶ added in v0.143.0
func ExtractUserFromSession( users UserService, auth handlers.Authenticator, session handlers.SessionManager, ) func(next http.Handler) http.Handler
ExtractUserFromSession will extract the user data from the session, retrieve the user details from the backend and then store the user object in the context for use by later handlers.
func Recoverer ¶ added in v0.134.0
Recoverer is a modified version of the standard chi Recoverer middleware that additional logs to the GCP error console.
func RequireValidUser ¶ added in v0.143.0
RequireValidUser will ensure that protected routes have a valid user status before continuing.
func SetClient ¶ added in v0.154.0
SetClient is a middleware that detects and sets a client variable in the context.
func SkipUpdatesRoute ¶ added in v0.244.2
SkipUpdatesRoute skips the ExtractUserFromSession middleware for /updates routes.