middleware

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	OptionsContextKey   contextKey = "autopdf_options"
	RequestIDContextKey contextKey = "request_id"
)

Variables

This section is empty.

Functions

func DebugMiddleware

func DebugMiddleware(baseConfig *config.APIDebugConfig) func(http.Handler) http.Handler

DebugMiddleware extracts debug options from request headers

func GetOptionsFromContext

func GetOptionsFromContext(ctx context.Context) (generation.PDFGenerationOptions, bool)

GetOptionsFromContext extracts PDF generation options from context

func GetRequestIDFromContext

func GetRequestIDFromContext(ctx context.Context) (string, bool)

GetRequestIDFromContext extracts request ID from context

func RequestLoggingMiddleware

func RequestLoggingMiddleware() func(http.Handler) http.Handler

RequestLoggingMiddleware adds request logging with timing

Types

This section is empty.

Jump to

Keyboard shortcuts

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