middleware

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const LanguageCookieName = "svarog_language"

Variables

This section is empty.

Functions

func AssetsCacheMiddleware

func AssetsCacheMiddleware(next echo.HandlerFunc) echo.HandlerFunc

AssetsCacheMiddleware sets Cache-Control for /assets. Development serves the files written by the Tailwind and script watchers and must not keep a copy from the previous process. Production keeps the hashed component bundle immutable and revalidates every other file.

func AuthContextMiddleware

func AuthContextMiddleware(authService auth.AuthService) echo.MiddlewareFunc

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(c *echo.Context, err error)

func LanguageMiddleware

func LanguageMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func NoStoreMiddleware

func NoStoreMiddleware(next echo.HandlerFunc) echo.HandlerFunc

NoStoreMiddleware marks private responses uncacheable. Apply it to the private group only. /assets uses AssetsCacheMiddleware. The header is set when the status is written, and a handler that already set Cache-Control keeps its value.

func RequiresProjectAccessMiddleware

func RequiresProjectAccessMiddleware(authService auth.AuthService, projectsService projects.ProjectsService) echo.MiddlewareFunc

func RequiresRoleMiddleware

func RequiresRoleMiddleware(role auth.Role) echo.MiddlewareFunc

func RestPasswordMiddleware

func RestPasswordMiddleware() echo.MiddlewareFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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