middleware

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorSchemeDetection

func ColorSchemeDetection(next echo.HandlerFunc) echo.HandlerFunc

ColorSchemeDetection detects the current color scheme and sets it in the context based on the "Sec-CH-Prefers-Color-Scheme" header

func ErrorHandler

func ErrorHandler(next echo.HandlerFunc) echo.HandlerFunc

func InitSessionMiddleware

func InitSessionMiddleware(a *server.App) echo.MiddlewareFunc

InitSessionMiddleware initializes the session middleware with secure options

func LanguageDetection

func LanguageDetection(next echo.HandlerFunc) echo.HandlerFunc

LanguageDetectiondetects the current language and sets it in the context

func RequireLogin

func RequireLogin(a *server.App) echo.MiddlewareFunc

func RequireToken

func RequireToken(a *server.App) echo.MiddlewareFunc

RequireToken is a middleware that checks for a valid GitHub token in the request

func SecureRoutes

func SecureRoutes(a *server.App) echo.MiddlewareFunc

func SetCommonDataMiddleware

func SetCommonDataMiddleware(a *server.App) echo.MiddlewareFunc

Types

type GithubUserInfo

type GithubUserInfo = queries.GithubUserInfo

GithubUserInfo is an alias for the type defined in the queries package

Jump to

Keyboard shortcuts

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