github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/engine/api/server/middleware/middleware.go (about) 1 package middleware // import "github.com/docker/docker/api/server/middleware" 2 3 import ( 4 "context" 5 "net/http" 6 ) 7 8 // Middleware is an interface to allow the use of ordinary functions as Docker API filters. 9 // Any struct that has the appropriate signature can be registered as a middleware. 10 type Middleware interface { 11 WrapHandler(func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error) func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error 12 }