middleware
packageThis package is not in the latest version of its module.
Details
Validgo.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¶
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¶
func NewExperimentalMiddleware(experimentalEnabledbool)ExperimentalMiddleware
NewExperimentalMiddleware creates a new ExperimentalMiddleware
func (ExperimentalMiddleware)WrapHandler¶
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¶
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¶
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.