Documentation
¶
Index ¶
Constants ¶
const ( CtxRequestProtocolKey ctxInfo = iota CtxRequestMethodKey CtxRequestPathKey )
const CtxRequestIDKey = ctxID(iota)
Variables ¶
This section is empty.
Functions ¶
func ID ¶ added in v0.0.4
ID is a server level middleware. It is called on every request to handle `X-Request-ID` header. If the header already exists in the request, nothing else is done otherwise a new UUID V4 format is generated and added to request `context`.
func IDFromContext ¶ added in v0.0.20
IDFromContext retrieves the `X-Request-ID` from the current request `context`.
func Info ¶ added in v0.0.4
Info is a server level middleware. It is called on every request to construct request protocol, method and path values then added to request `context`.
func MethodFromContext ¶ added in v0.0.20
MethodFromContext retrieves the request method from the current request `context`.
func PathFromContext ¶ added in v0.0.20
PathFromContext retrieves the request path from the current request `context`.
func ProtocolFromContext ¶ added in v0.0.20
ProtocolFromContext retrieves the request protocol from the current request `context`.
Types ¶
This section is empty.