Documentation ¶
Overview ¶
Package middlewares contains common middlewares helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Identity is a middleware that does nothing.
Functions ¶
func ResponseError ¶
func ResponseError(w http.ResponseWriter, code int, err *openapi.Error)
ResponseError writes an error response to w.
Types ¶
type Middleware ¶
A Middleware https://cs.opensource.google/go/x/pkgsite/+/68be0dd1:internal/middleware/middleware.go
func Chain ¶ added in v0.6.0
func Chain(ms ...Middleware) Middleware
Chain middlewares into one middleware.
Click to show internal directories.
Click to hide internal directories.