middleware
packageThis package is not in the latest version of its module.
Details
Valid go.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
Types¶
typeExperimentalMiddleware¶added inv1.13.0
type ExperimentalMiddleware struct {// contains filtered or unexported fields}ExperimentalMiddleware is a the middleware in charge of adding the'Docker-Experimental' header to every outgoing request
funcNewExperimentalMiddleware¶added inv1.13.0
func NewExperimentalMiddleware(experimentalEnabledbool)ExperimentalMiddleware
NewExperimentalMiddleware creates a new ExperimentalMiddleware
func (ExperimentalMiddleware)WrapHandler¶added inv1.13.0
func (eExperimentalMiddleware) WrapHandler(handler func(ctxcontext.Context, whttp.ResponseWriter, r *http.Request, vars map[string]string)error) func(ctxcontext.Context, whttp.ResponseWriter, r *http.Request, vars map[string]string)error
WrapHandler returns a new handler function wrapping the previous one in the request chain.
typeMiddleware¶
type Middleware interface {WrapHandler(func(ctxcontext.Context, whttp.ResponseWriter, r *http.Request, vars map[string]string)error) func(ctxcontext.Context, whttp.ResponseWriter, r *http.Request, vars map[string]string)error}Middleware is an interface to allow the use of ordinary functions as Docker API filters.Any struct that has the appropriate signature can be registered as a middleware.
typeVersionMiddleware¶added inv1.12.0
type VersionMiddleware struct {// contains filtered or unexported fields}VersionMiddleware is a middleware thatvalidates the client and server versions.
funcNewVersionMiddleware¶
func NewVersionMiddleware(serverVersion, defaultAPIVersion, minAPIVersionstring) (*VersionMiddleware,error)
NewVersionMiddleware creates a VersionMiddleware with the given versions.
func (VersionMiddleware)WrapHandler¶added inv1.12.0
func (vVersionMiddleware) WrapHandler(handler func(ctxcontext.Context, whttp.ResponseWriter, r *http.Request, vars map[string]string)error) func(ctxcontext.Context, whttp.ResponseWriter, r *http.Request, vars map[string]string)error
WrapHandler returns a new handler function wrapping the previous one in the request chain.