github.com/getong/docker@v1.13.1/api/server/middleware/middleware.go (about)

     1  package middleware
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"golang.org/x/net/context"
     7  )
     8  
     9  // Middleware is an interface to allow the use of ordinary functions as Docker API filters.
    10  // Any struct that has the appropriate signature can be registered as a middleware.
    11  type Middleware interface {
    12  	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
    13  }