Documentation ¶
Index ¶
- type DockerEngineAPIAPI
- func (o *DockerEngineAPIAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *DockerEngineAPIAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *DockerEngineAPIAPI) Authorizer() runtime.Authorizer
- func (o *DockerEngineAPIAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *DockerEngineAPIAPI) Context() *middleware.Context
- func (o *DockerEngineAPIAPI) DefaultConsumes() string
- func (o *DockerEngineAPIAPI) DefaultProduces() string
- func (o *DockerEngineAPIAPI) Formats() strfmt.Registry
- func (o *DockerEngineAPIAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *DockerEngineAPIAPI) Init()
- func (o *DockerEngineAPIAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *DockerEngineAPIAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *DockerEngineAPIAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *DockerEngineAPIAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *DockerEngineAPIAPI) Serve(builder middleware.Builder) http.Handler
- func (o *DockerEngineAPIAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *DockerEngineAPIAPI) SetDefaultConsumes(mediaType string)
- func (o *DockerEngineAPIAPI) SetDefaultProduces(mediaType string)
- func (o *DockerEngineAPIAPI) SetSpec(spec *loads.Document)
- func (o *DockerEngineAPIAPI) UseRedoc()
- func (o *DockerEngineAPIAPI) UseSwaggerUI()
- func (o *DockerEngineAPIAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerEngineAPIAPI ¶
type DockerEngineAPIAPI struct { Middleware func(middleware.Builder) http.Handler // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator // BinConsumer registers a consumer for the following mime types: // - application/octet-stream BinConsumer runtime.Consumer // JSONConsumer registers a consumer for the following mime types: // - application/json JSONConsumer runtime.Consumer // TarConsumer registers a consumer for the following mime types: // - application/x-tar TarConsumer runtime.Consumer // TxtConsumer registers a consumer for the following mime types: // - text/plain TxtConsumer runtime.Consumer // BinProducer registers a producer for the following mime types: // - application/octet-stream // - application/vnd.docker.raw-stream BinProducer runtime.Producer // JSONProducer registers a producer for the following mime types: // - application/json JSONProducer runtime.Producer // TarProducer registers a producer for the following mime types: // - application/x-tar TarProducer runtime.Producer // TxtProducer registers a producer for the following mime types: // - text/plain TxtProducer runtime.Producer // ImageBuildPruneHandler sets the operation handler for the build prune operation ImageBuildPruneHandler image.BuildPruneHandler // ConfigConfigCreateHandler sets the operation handler for the config create operation ConfigConfigCreateHandler config.ConfigCreateHandler // ConfigConfigDeleteHandler sets the operation handler for the config delete operation ConfigConfigDeleteHandler config.ConfigDeleteHandler // ConfigConfigInspectHandler sets the operation handler for the config inspect operation ConfigConfigInspectHandler config.ConfigInspectHandler // ConfigConfigListHandler sets the operation handler for the config list operation ConfigConfigListHandler config.ConfigListHandler // ConfigConfigUpdateHandler sets the operation handler for the config update operation ConfigConfigUpdateHandler config.ConfigUpdateHandler // ContainerContainerArchiveHandler sets the operation handler for the container archive operation ContainerContainerArchiveHandler container.ContainerArchiveHandler // ContainerContainerArchiveInfoHandler sets the operation handler for the container archive info operation ContainerContainerArchiveInfoHandler container.ContainerArchiveInfoHandler // ContainerContainerAttachHandler sets the operation handler for the container attach operation ContainerContainerAttachHandler container.ContainerAttachHandler // ContainerContainerAttachWebsocketHandler sets the operation handler for the container attach websocket operation ContainerContainerAttachWebsocketHandler container.ContainerAttachWebsocketHandler // ContainerContainerChangesHandler sets the operation handler for the container changes operation ContainerContainerChangesHandler container.ContainerChangesHandler // ContainerContainerCreateHandler sets the operation handler for the container create operation ContainerContainerCreateHandler container.ContainerCreateHandler // ContainerContainerDeleteHandler sets the operation handler for the container delete operation ContainerContainerDeleteHandler container.ContainerDeleteHandler // ExecContainerExecHandler sets the operation handler for the container exec operation ExecContainerExecHandler exec.ContainerExecHandler // ContainerContainerExportHandler sets the operation handler for the container export operation ContainerContainerExportHandler container.ContainerExportHandler // ContainerContainerInspectHandler sets the operation handler for the container inspect operation ContainerContainerInspectHandler container.ContainerInspectHandler // ContainerContainerKillHandler sets the operation handler for the container kill operation ContainerContainerKillHandler container.ContainerKillHandler // ContainerContainerListHandler sets the operation handler for the container list operation ContainerContainerListHandler container.ContainerListHandler // ContainerContainerLogsHandler sets the operation handler for the container logs operation ContainerContainerLogsHandler container.ContainerLogsHandler // ContainerContainerPauseHandler sets the operation handler for the container pause operation ContainerContainerPauseHandler container.ContainerPauseHandler // ContainerContainerPruneHandler sets the operation handler for the container prune operation ContainerContainerPruneHandler container.ContainerPruneHandler // ContainerContainerRenameHandler sets the operation handler for the container rename operation ContainerContainerRenameHandler container.ContainerRenameHandler // ContainerContainerResizeHandler sets the operation handler for the container resize operation ContainerContainerResizeHandler container.ContainerResizeHandler // ContainerContainerRestartHandler sets the operation handler for the container restart operation ContainerContainerRestartHandler container.ContainerRestartHandler // ContainerContainerStartHandler sets the operation handler for the container start operation ContainerContainerStartHandler container.ContainerStartHandler // ContainerContainerStatsHandler sets the operation handler for the container stats operation ContainerContainerStatsHandler container.ContainerStatsHandler // ContainerContainerStopHandler sets the operation handler for the container stop operation ContainerContainerStopHandler container.ContainerStopHandler // ContainerContainerTopHandler sets the operation handler for the container top operation ContainerContainerTopHandler container.ContainerTopHandler // ContainerContainerUnpauseHandler sets the operation handler for the container unpause operation ContainerContainerUnpauseHandler container.ContainerUnpauseHandler // ContainerContainerUpdateHandler sets the operation handler for the container update operation ContainerContainerUpdateHandler container.ContainerUpdateHandler // ContainerContainerWaitHandler sets the operation handler for the container wait operation ContainerContainerWaitHandler container.ContainerWaitHandler // DistributionDistributionInspectHandler sets the operation handler for the distribution inspect operation DistributionDistributionInspectHandler distribution.DistributionInspectHandler // ExecExecInspectHandler sets the operation handler for the exec inspect operation ExecExecInspectHandler exec.ExecInspectHandler // ExecExecResizeHandler sets the operation handler for the exec resize operation ExecExecResizeHandler exec.ExecResizeHandler // ExecExecStartHandler sets the operation handler for the exec start operation ExecExecStartHandler exec.ExecStartHandler // PluginGetPluginPrivilegesHandler sets the operation handler for the get plugin privileges operation PluginGetPluginPrivilegesHandler plugin.GetPluginPrivilegesHandler // ImageImageBuildHandler sets the operation handler for the image build operation ImageImageBuildHandler image.ImageBuildHandler // ImageImageCommitHandler sets the operation handler for the image commit operation ImageImageCommitHandler image.ImageCommitHandler // ImageImageCreateHandler sets the operation handler for the image create operation ImageImageCreateHandler image.ImageCreateHandler // ImageImageDeleteHandler sets the operation handler for the image delete operation ImageImageDeleteHandler image.ImageDeleteHandler // ImageImageGetHandler sets the operation handler for the image get operation ImageImageGetHandler image.ImageGetHandler // ImageImageGetAllHandler sets the operation handler for the image get all operation ImageImageGetAllHandler image.ImageGetAllHandler // ImageImageHistoryHandler sets the operation handler for the image history operation ImageImageHistoryHandler image.ImageHistoryHandler // ImageImageInspectHandler sets the operation handler for the image inspect operation ImageImageInspectHandler image.ImageInspectHandler // ImageImageListHandler sets the operation handler for the image list operation ImageImageListHandler image.ImageListHandler // ImageImageLoadHandler sets the operation handler for the image load operation ImageImageLoadHandler image.ImageLoadHandler // ImageImagePruneHandler sets the operation handler for the image prune operation ImageImagePruneHandler image.ImagePruneHandler // ImageImagePushHandler sets the operation handler for the image push operation ImageImagePushHandler image.ImagePushHandler // ImageImageSearchHandler sets the operation handler for the image search operation ImageImageSearchHandler image.ImageSearchHandler // ImageImageTagHandler sets the operation handler for the image tag operation ImageImageTagHandler image.ImageTagHandler // NetworkNetworkConnectHandler sets the operation handler for the network connect operation NetworkNetworkConnectHandler network.NetworkConnectHandler // NetworkNetworkCreateHandler sets the operation handler for the network create operation NetworkNetworkCreateHandler network.NetworkCreateHandler // NetworkNetworkDeleteHandler sets the operation handler for the network delete operation NetworkNetworkDeleteHandler network.NetworkDeleteHandler // NetworkNetworkDisconnectHandler sets the operation handler for the network disconnect operation NetworkNetworkDisconnectHandler network.NetworkDisconnectHandler // NetworkNetworkInspectHandler sets the operation handler for the network inspect operation NetworkNetworkInspectHandler network.NetworkInspectHandler // NetworkNetworkListHandler sets the operation handler for the network list operation NetworkNetworkListHandler network.NetworkListHandler // NetworkNetworkPruneHandler sets the operation handler for the network prune operation NetworkNetworkPruneHandler network.NetworkPruneHandler // NodeNodeDeleteHandler sets the operation handler for the node delete operation NodeNodeDeleteHandler node.NodeDeleteHandler // NodeNodeInspectHandler sets the operation handler for the node inspect operation NodeNodeInspectHandler node.NodeInspectHandler // NodeNodeListHandler sets the operation handler for the node list operation NodeNodeListHandler node.NodeListHandler // NodeNodeUpdateHandler sets the operation handler for the node update operation NodeNodeUpdateHandler node.NodeUpdateHandler // PluginPluginCreateHandler sets the operation handler for the plugin create operation PluginPluginCreateHandler plugin.PluginCreateHandler // PluginPluginDeleteHandler sets the operation handler for the plugin delete operation PluginPluginDeleteHandler plugin.PluginDeleteHandler // PluginPluginDisableHandler sets the operation handler for the plugin disable operation PluginPluginDisableHandler plugin.PluginDisableHandler // PluginPluginEnableHandler sets the operation handler for the plugin enable operation PluginPluginEnableHandler plugin.PluginEnableHandler // PluginPluginInspectHandler sets the operation handler for the plugin inspect operation PluginPluginInspectHandler plugin.PluginInspectHandler // PluginPluginListHandler sets the operation handler for the plugin list operation PluginPluginListHandler plugin.PluginListHandler // PluginPluginPullHandler sets the operation handler for the plugin pull operation PluginPluginPullHandler plugin.PluginPullHandler // PluginPluginPushHandler sets the operation handler for the plugin push operation PluginPluginPushHandler plugin.PluginPushHandler // PluginPluginSetHandler sets the operation handler for the plugin set operation PluginPluginSetHandler plugin.PluginSetHandler // PluginPluginUpgradeHandler sets the operation handler for the plugin upgrade operation PluginPluginUpgradeHandler plugin.PluginUpgradeHandler // ContainerPutContainerArchiveHandler sets the operation handler for the put container archive operation ContainerPutContainerArchiveHandler container.PutContainerArchiveHandler // SecretSecretCreateHandler sets the operation handler for the secret create operation SecretSecretCreateHandler secret.SecretCreateHandler // SecretSecretDeleteHandler sets the operation handler for the secret delete operation SecretSecretDeleteHandler secret.SecretDeleteHandler // SecretSecretInspectHandler sets the operation handler for the secret inspect operation SecretSecretInspectHandler secret.SecretInspectHandler // SecretSecretListHandler sets the operation handler for the secret list operation SecretSecretListHandler secret.SecretListHandler // SecretSecretUpdateHandler sets the operation handler for the secret update operation SecretSecretUpdateHandler secret.SecretUpdateHandler // ServiceServiceCreateHandler sets the operation handler for the service create operation ServiceServiceCreateHandler service.ServiceCreateHandler // ServiceServiceDeleteHandler sets the operation handler for the service delete operation ServiceServiceDeleteHandler service.ServiceDeleteHandler // ServiceServiceInspectHandler sets the operation handler for the service inspect operation ServiceServiceInspectHandler service.ServiceInspectHandler // ServiceServiceListHandler sets the operation handler for the service list operation ServiceServiceListHandler service.ServiceListHandler // ServiceServiceLogsHandler sets the operation handler for the service logs operation ServiceServiceLogsHandler service.ServiceLogsHandler // ServiceServiceUpdateHandler sets the operation handler for the service update operation ServiceServiceUpdateHandler service.ServiceUpdateHandler // SessionSessionHandler sets the operation handler for the session operation SessionSessionHandler session.SessionHandler // SwarmSwarmInitHandler sets the operation handler for the swarm init operation SwarmSwarmInitHandler swarm.SwarmInitHandler // SwarmSwarmInspectHandler sets the operation handler for the swarm inspect operation SwarmSwarmInspectHandler swarm.SwarmInspectHandler // SwarmSwarmJoinHandler sets the operation handler for the swarm join operation SwarmSwarmJoinHandler swarm.SwarmJoinHandler // SwarmSwarmLeaveHandler sets the operation handler for the swarm leave operation SwarmSwarmLeaveHandler swarm.SwarmLeaveHandler // SwarmSwarmUnlockHandler sets the operation handler for the swarm unlock operation SwarmSwarmUnlockHandler swarm.SwarmUnlockHandler // SwarmSwarmUnlockkeyHandler sets the operation handler for the swarm unlockkey operation SwarmSwarmUnlockkeyHandler swarm.SwarmUnlockkeyHandler // SwarmSwarmUpdateHandler sets the operation handler for the swarm update operation SwarmSwarmUpdateHandler swarm.SwarmUpdateHandler // SystemSystemAuthHandler sets the operation handler for the system auth operation SystemSystemAuthHandler system.SystemAuthHandler // SystemSystemDataUsageHandler sets the operation handler for the system data usage operation SystemSystemDataUsageHandler system.SystemDataUsageHandler // SystemSystemEventsHandler sets the operation handler for the system events operation SystemSystemEventsHandler system.SystemEventsHandler // SystemSystemInfoHandler sets the operation handler for the system info operation SystemSystemInfoHandler system.SystemInfoHandler // SystemSystemPingHandler sets the operation handler for the system ping operation SystemSystemPingHandler system.SystemPingHandler // SystemSystemPingHeadHandler sets the operation handler for the system ping head operation SystemSystemPingHeadHandler system.SystemPingHeadHandler // SystemSystemVersionHandler sets the operation handler for the system version operation SystemSystemVersionHandler system.SystemVersionHandler // TaskTaskInspectHandler sets the operation handler for the task inspect operation TaskTaskInspectHandler task.TaskInspectHandler // TaskTaskListHandler sets the operation handler for the task list operation TaskTaskListHandler task.TaskListHandler // TaskTaskLogsHandler sets the operation handler for the task logs operation TaskTaskLogsHandler task.TaskLogsHandler // VolumeVolumeCreateHandler sets the operation handler for the volume create operation VolumeVolumeCreateHandler volume.VolumeCreateHandler // VolumeVolumeDeleteHandler sets the operation handler for the volume delete operation VolumeVolumeDeleteHandler volume.VolumeDeleteHandler // VolumeVolumeInspectHandler sets the operation handler for the volume inspect operation VolumeVolumeInspectHandler volume.VolumeInspectHandler // VolumeVolumeListHandler sets the operation handler for the volume list operation VolumeVolumeListHandler volume.VolumeListHandler // VolumeVolumePruneHandler sets the operation handler for the volume prune operation VolumeVolumePruneHandler volume.VolumePruneHandler // ServeError is called when an error is received, there is a default handler // but you can set your own with this ServeError func(http.ResponseWriter, *http.Request, error) // PreServerShutdown is called before the HTTP(S) server is shutdown // This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic PreServerShutdown func() // ServerShutdown is called when the HTTP(S) server is shut down and done // handling all active connections and does not accept connections any more ServerShutdown func() // Custom command line argument groups with their descriptions CommandLineOptionsGroups []swag.CommandLineOptionsGroup // User defined logger function. Logger func(string, ...interface{}) // contains filtered or unexported fields }
DockerEngineAPIAPI The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls.
Errors ¶
The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
```
{ "message": "page not found" }
```
Versioning ¶
The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned.
If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release.
Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine.
The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons.
Authentication ¶
Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure:
```
{ "username": "string", "password": "string", "email": "string", "serveraddress": "string" }
```
The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required.
If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials:
```
{ "identitytoken": "9cbaf023786cd7..." }
```
func NewDockerEngineAPIAPI ¶
func NewDockerEngineAPIAPI(spec *loads.Document) *DockerEngineAPIAPI
NewDockerEngineAPIAPI creates a new DockerEngineAPI instance
func (*DockerEngineAPIAPI) AddMiddlewareFor ¶
func (o *DockerEngineAPIAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
AddMiddlewareFor adds a http middleware to existing handler
func (*DockerEngineAPIAPI) AuthenticatorsFor ¶
func (o *DockerEngineAPIAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*DockerEngineAPIAPI) Authorizer ¶
func (o *DockerEngineAPIAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*DockerEngineAPIAPI) ConsumersFor ¶
func (o *DockerEngineAPIAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.
func (*DockerEngineAPIAPI) Context ¶
func (o *DockerEngineAPIAPI) Context() *middleware.Context
Context returns the middleware context for the docker engine API API
func (*DockerEngineAPIAPI) DefaultConsumes ¶
func (o *DockerEngineAPIAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*DockerEngineAPIAPI) DefaultProduces ¶
func (o *DockerEngineAPIAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*DockerEngineAPIAPI) Formats ¶
func (o *DockerEngineAPIAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*DockerEngineAPIAPI) HandlerFor ¶
func (o *DockerEngineAPIAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*DockerEngineAPIAPI) Init ¶
func (o *DockerEngineAPIAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*DockerEngineAPIAPI) ProducersFor ¶
func (o *DockerEngineAPIAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.
func (*DockerEngineAPIAPI) RegisterConsumer ¶
func (o *DockerEngineAPIAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*DockerEngineAPIAPI) RegisterFormat ¶
func (o *DockerEngineAPIAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*DockerEngineAPIAPI) RegisterProducer ¶
func (o *DockerEngineAPIAPI) RegisterProducer(mediaType string, producer runtime.Producer)
RegisterProducer allows you to add (or override) a producer for a media type.
func (*DockerEngineAPIAPI) Serve ¶
func (o *DockerEngineAPIAPI) Serve(builder middleware.Builder) http.Handler
Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (*DockerEngineAPIAPI) ServeErrorFor ¶
func (o *DockerEngineAPIAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*DockerEngineAPIAPI) SetDefaultConsumes ¶
func (o *DockerEngineAPIAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*DockerEngineAPIAPI) SetDefaultProduces ¶
func (o *DockerEngineAPIAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*DockerEngineAPIAPI) SetSpec ¶
func (o *DockerEngineAPIAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*DockerEngineAPIAPI) UseRedoc ¶
func (o *DockerEngineAPIAPI) UseRedoc()
UseRedoc for documentation at /docs
func (*DockerEngineAPIAPI) UseSwaggerUI ¶
func (o *DockerEngineAPIAPI) UseSwaggerUI()
UseSwaggerUI for documentation at /docs
func (*DockerEngineAPIAPI) Validate ¶
func (o *DockerEngineAPIAPI) Validate() error
Validate validates the registrations in the DockerEngineAPIAPI