Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APILoggerKey = &contextKey{"logger"}
APILoggerKey is a context key used for associating a logger with a request.
View Source
var StartTimeKey = &contextKey{"startTime"}
StartTimeKey is a context key used for storing the start time of a request.
Functions ¶
func APILogger ¶
APILogger is a middleware that injects a logger, configured with a request ID, into the request context for use throughout the request's lifecycle.
func DefaultLogger ¶
DefaultLogger is a middleware that provides basic request logging using chi's built-in Logger middleware.
func GetStartTime ¶
GetStartTime returns the start time from the given context if one is present. If the start time is not present or the context is nil, returns the zero time.
func ReadOnlyMode ¶
ReadOnlyMode disallows non-GET requests in read-only mode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.