request

package
v0.0.0-...-16952c6 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IDKey = IDType("requestID")
View Source
var LoggerKey = LoggerType("logger")

Functions

func GetID

func GetID(r *http.Request) string

GetID returns the requestID. Panic indicates coding error.

func GetLogger

func GetLogger(r *http.Request) *slog.Logger

GetLogger returns the logger. Panic indicates coding error.

func Middleware

func Middleware(st *app.State) func(http.Handler) http.Handler

Middleware provides a per-request ID.

Types

type IDType

type IDType string

type LoggerType

type LoggerType string

Jump to

Keyboard shortcuts

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