middleware

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package middleware provides utilities to inject the response writer and request reader for the original *http.Request into the context and also retrieve it.

Index

Constants

View Source
const ResponseWriterKey responseWriterKey = "response-writer"

ResponseWriterKey is the context key for the response writer.

Variables

This section is empty.

Functions

func ResponseWriterFromContext

func ResponseWriterFromContext(ctx context.Context) (http.ResponseWriter, error)

ResponseWriterFromContext is a helper function that retrieves the response writer from the context.

func ResponseWriterMiddleware

func ResponseWriterMiddleware(next http.Handler) http.Handler

ResponseWriterMiddleware is an http.Handler middleware that injects the response writer for the original *http.Request into the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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