middleware.go 544 B

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