github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/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  }