types

package
v28.2.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 13 Imported by: 16,618

Documentation

Index

Constants

View Source
const (
	// MediaTypeRawStream is vendor specific MIME-Type set for raw TTY streams
	MediaTypeRawStream = "application/vnd.docker.raw-stream"

	// MediaTypeMultiplexedStream is vendor specific MIME-Type set for stdin/stdout/stderr multiplexed streams
	MediaTypeMultiplexedStream = "application/vnd.docker.multiplexed-stream"
)
View Source
const (
	NoHealthcheck = container.NoHealthcheck // Deprecated: use [container.NoHealthcheck].
	Starting      = container.Starting      // Deprecated: use [container.Starting].
	Healthy       = container.Healthy       // Deprecated: use [container.Healthy].
	Unhealthy     = container.Unhealthy     // Deprecated: use [container.Unhealthy].
)

Health states

View Source
const (
	RegistryAuthFromSpec         = swarm.RegistryAuthFromSpec         // Deprecated: use [swarm.RegistryAuthFromSpec].
	RegistryAuthFromPreviousSpec = swarm.RegistryAuthFromPreviousSpec // Deprecated: use [swarm.RegistryAuthFromPreviousSpec].
)
View Source
const (
	// BuilderV1 is the first generation builder in docker daemon
	//
	// Deprecated: use [build.BuilderV1].
	BuilderV1 = build.BuilderV1
	// BuilderBuildKit is builder based on moby/buildkit project
	//
	// Deprecated: use [build.BuilderBuildKit].
	BuilderBuildKit = build.BuilderBuildKit
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCache deprecated

type BuildCache = build.CacheRecord

BuildCache contains information about a build cache record.

Deprecated: deprecated in API 1.49. Use build.CacheRecord instead.

type BuildCachePruneOptions deprecated

type BuildCachePruneOptions = build.CachePruneOptions

BuildCachePruneOptions hold parameters to prune the build cache

Deprecated: use build.CachePruneOptions.

type BuildCachePruneReport deprecated

type BuildCachePruneReport = build.CachePruneReport

BuildCachePruneReport contains the response for Engine API: POST "/build/prune"

Deprecated: use build.CachePruneReport.

type BuildResult deprecated

type BuildResult = build.Result

BuildResult contains the image id of a successful build/

Deprecated: use build.Result.

type BuilderVersion deprecated

type BuilderVersion = build.BuilderVersion

BuilderVersion sets the version of underlying builder to use

Deprecated: use build.BuilderVersion.

type CloseWriter added in v1.13.0

type CloseWriter interface {
	CloseWrite() error
}

CloseWriter is an interface that implements structs that close input streams to prevent from writing.

type ComponentVersion

type ComponentVersion struct {
	Name    string
	Version string
	Details map[string]string `json:",omitempty"`
}

ComponentVersion describes the version information for a specific component.

type ConfigCreateResponse deprecated

type ConfigCreateResponse = swarm.ConfigCreateResponse

ConfigCreateResponse contains the information returned to a client on the creation of a new config.

Deprecated: use swarm.ConfigCreateResponse.

type ConfigListOptions deprecated

type ConfigListOptions = swarm.ConfigListOptions

ConfigListOptions holds parameters to list configs

Deprecated: use swarm.ConfigListOptions.

type Container deprecated added in v1.7.0

type Container = container.Summary

Container contains response of Engine API: GET "/containers/json"

Deprecated: use container.Summary.

type ContainerJSON deprecated added in v1.7.0

type ContainerJSON = container.InspectResponse

ContainerJSON is the response for the GET "/containers/{name:.*}/json" endpoint.

Deprecated: use container.InspectResponse. It will be removed in the next release.

type ContainerJSONBase deprecated added in v1.7.0

type ContainerJSONBase = container.ContainerJSONBase

ContainerJSONBase contains response of Engine API GET "/containers/{name:.*}/json" for API version 1.18 and older.

Deprecated: use container.InspectResponse or container.ContainerJSONBase. It will be removed in the next release.

type ContainerState deprecated added in v1.7.0

type ContainerState = container.State

ContainerState stores container's running state

Deprecated: use container.State.

type DefaultNetworkSettings deprecated added in v1.9.0

type DefaultNetworkSettings = container.DefaultNetworkSettings

DefaultNetworkSettings holds network information during the 2 release deprecation period. It will be removed in Docker 1.11.

Deprecated: use container.DefaultNetworkSettings.

type DiskUsage added in v1.13.0

type DiskUsage struct {
	LayersSize  int64
	Images      []*image.Summary
	Containers  []*container.Summary
	Volumes     []*volume.Volume
	BuildCache  []*build.CacheRecord
	BuilderSize int64 `json:",omitempty"` // Deprecated: deprecated in API 1.38, and no longer used since API 1.40.
}

DiskUsage contains response of Engine API: GET "/system/df"

type DiskUsageObject

type DiskUsageObject string

DiskUsageObject represents an object type used for disk usage query filtering.

const (
	// ContainerObject represents a container DiskUsageObject.
	ContainerObject DiskUsageObject = "container"
	// ImageObject represents an image DiskUsageObject.
	ImageObject DiskUsageObject = "image"
	// VolumeObject represents a volume DiskUsageObject.
	VolumeObject DiskUsageObject = "volume"
	// BuildCacheObject represents a build-cache DiskUsageObject.
	BuildCacheObject DiskUsageObject = "build-cache"
)

type DiskUsageOptions

type DiskUsageOptions struct {
	// Types specifies what object types to include in the response. If empty,
	// all object types are returned.
	Types []DiskUsageObject
}

DiskUsageOptions holds parameters for system disk usage query.

type ErrorResponse added in v1.13.0

type ErrorResponse struct {

	// The error message.
	// Required: true
	Message string `json:"message"`
}

ErrorResponse Represents an error. swagger:model ErrorResponse

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

Error returns the error message

type GraphDriverData deprecated added in v1.8.0

type GraphDriverData = storage.DriverData

GraphDriverData Information about the storage driver used to store the container's and image's filesystem.

Deprecated: use storage.DriverData.

type Health deprecated added in v1.13.0

type Health = container.Health

Health stores information about the container's healthcheck results.

Deprecated: use container.Health.

type HealthcheckResult deprecated added in v1.13.0

type HealthcheckResult = container.HealthcheckResult

HealthcheckResult stores information about a single run of a healthcheck probe.

Deprecated: use container.HealthcheckResult.

type HijackedResponse added in v1.13.0

type HijackedResponse struct {
	Conn   net.Conn
	Reader *bufio.Reader
	// contains filtered or unexported fields
}

HijackedResponse holds connection information for a hijacked request.

func NewHijackedResponse

func NewHijackedResponse(conn net.Conn, mediaType string) HijackedResponse

NewHijackedResponse initializes a HijackedResponse type.

func (*HijackedResponse) Close added in v1.13.0

func (h *HijackedResponse) Close()

Close closes the hijacked connection and reader.

func (*HijackedResponse) CloseWrite added in v1.13.0

func (h *HijackedResponse) CloseWrite() error

CloseWrite closes a readWriter for writing.

func (*HijackedResponse) MediaType

func (h *HijackedResponse) MediaType() (string, bool)

MediaType let client know if HijackedResponse hold a raw or multiplexed stream. returns false if HTTP Content-Type is not relevant, and container must be inspected

type IDResponse deprecated added in v1.13.0

type IDResponse = common.IDResponse

IDResponse Response to an API call that returns just an Id.

Deprecated: use either container.CommitResponse or container.ExecCreateResponse. It will be removed in the next release.

type ImageBuildOptions deprecated added in v1.13.0

type ImageBuildOptions = build.ImageBuildOptions

ImageBuildOptions holds the information necessary to build images.

Deprecated: use build.ImageBuildOptions.

type ImageBuildOutput deprecated

type ImageBuildOutput = build.ImageBuildOutput

ImageBuildOutput defines configuration for exporting a build result

Deprecated: use build.ImageBuildOutput.

type ImageBuildResponse deprecated added in v1.13.0

type ImageBuildResponse = build.ImageBuildResponse

ImageBuildResponse holds information returned by a server after building an image.

Deprecated: use build.ImageBuildResponse.

type ImageInspect deprecated added in v1.7.0

type ImageInspect = image.InspectResponse

ImageInspect contains response of Engine API: GET "/images/{name:.*}/json"

Deprecated: use image.InspectResponse.

type MountPoint deprecated added in v1.8.0

type MountPoint = container.MountPoint

MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container.

Deprecated: use container.MountPoint.

type NetworkSettings deprecated added in v1.9.0

type NetworkSettings = container.NetworkSettings

NetworkSettings exposes the network settings in the api.

Deprecated: use container.NetworkSettings.

type NetworkSettingsBase deprecated added in v1.9.0

type NetworkSettingsBase = container.NetworkSettingsBase

NetworkSettingsBase holds networking state for a container when inspecting it.

Deprecated: use container.NetworkSettingsBase.

type NodeListOptions deprecated added in v1.13.0

type NodeListOptions = swarm.NodeListOptions

NodeListOptions holds parameters to list nodes with.

Deprecated: use swarm.NodeListOptions.

type NodeRemoveOptions deprecated added in v1.13.0

type NodeRemoveOptions = swarm.NodeRemoveOptions

NodeRemoveOptions holds parameters to remove nodes with.

Deprecated: use swarm.NodeRemoveOptions.

type Ping added in v1.13.0

type Ping struct {
	APIVersion     string
	OSType         string
	Experimental   bool
	BuilderVersion build.BuilderVersion

	// SwarmStatus provides information about the current swarm status of the
	// engine, obtained from the "Swarm" header in the API response.
	//
	// It can be a nil struct if the API version does not provide this header
	// in the ping response, or if an error occurred, in which case the client
	// should use other ways to get the current swarm status, such as the /swarm
	// endpoint.
	SwarmStatus *swarm.Status
}

Ping contains response of Engine API: GET "/_ping"

type Plugin added in v1.13.0

type Plugin struct {

	// config
	// Required: true
	Config PluginConfig `json:"Config"`

	// True if the plugin is running. False if the plugin is not running, only installed.
	// Required: true
	Enabled bool `json:"Enabled"`

	// Id
	ID string `json:"Id,omitempty"`

	// name
	// Required: true
	Name string `json:"Name"`

	// plugin remote reference used to push/pull the plugin
	PluginReference string `json:"PluginReference,omitempty"`

	// settings
	// Required: true
	Settings PluginSettings `json:"Settings"`
}

Plugin A plugin for the Engine API swagger:model Plugin

type PluginConfig added in v1.13.0

type PluginConfig struct {

	// args
	// Required: true
	Args PluginConfigArgs `json:"Args"`

	// description
	// Required: true
	Description string `json:"Description"`

	// Docker Version used to create the plugin
	DockerVersion string `json:"DockerVersion,omitempty"`

	// documentation
	// Required: true
	Documentation string `json:"Documentation"`

	// entrypoint
	// Required: true
	Entrypoint []string `json:"Entrypoint"`

	// env
	// Required: true
	Env []PluginEnv `json:"Env"`

	// interface
	// Required: true
	Interface PluginConfigInterface `json:"Interface"`

	// ipc host
	// Required: true
	IpcHost bool `json:"IpcHost"`

	// linux
	// Required: true
	Linux PluginConfigLinux `json:"Linux"`

	// mounts
	// Required: true
	Mounts []PluginMount `json:"Mounts"`

	// network
	// Required: true
	Network PluginConfigNetwork `json:"Network"`

	// pid host
	// Required: true
	PidHost bool `json:"PidHost"`

	// propagated mount
	// Required: true
	PropagatedMount string `json:"PropagatedMount"`

	// user
	User PluginConfigUser `json:"User,omitempty"`

	// work dir
	// Required: true
	WorkDir string `json:"WorkDir"`

	// rootfs
	Rootfs *PluginConfigRootfs `json:"rootfs,omitempty"`
}

PluginConfig The config of a plugin. swagger:model PluginConfig

type PluginConfigArgs added in v1.13.0

type PluginConfigArgs struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// name
	// Required: true
	Name string `json:"Name"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`

	// value
	// Required: true
	Value []string `json:"Value"`
}

PluginConfigArgs plugin config args swagger:model PluginConfigArgs

type PluginConfigInterface added in v1.13.0

type PluginConfigInterface struct {

	// Protocol to use for clients connecting to the plugin.
	ProtocolScheme string `json:"ProtocolScheme,omitempty"`

	// socket
	// Required: true
	Socket string `json:"Socket"`

	// types
	// Required: true
	Types []PluginInterfaceType `json:"Types"`
}

PluginConfigInterface The interface between Docker and the plugin swagger:model PluginConfigInterface

type PluginConfigLinux added in v1.13.0

type PluginConfigLinux struct {

	// allow all devices
	// Required: true
	AllowAllDevices bool `json:"AllowAllDevices"`

	// capabilities
	// Required: true
	Capabilities []string `json:"Capabilities"`

	// devices
	// Required: true
	Devices []PluginDevice `json:"Devices"`
}

PluginConfigLinux plugin config linux swagger:model PluginConfigLinux

type PluginConfigNetwork added in v1.13.0

type PluginConfigNetwork struct {

	// type
	// Required: true
	Type string `json:"Type"`
}

PluginConfigNetwork plugin config network swagger:model PluginConfigNetwork

type PluginConfigRootfs added in v1.13.0

type PluginConfigRootfs struct {

	// diff ids
	DiffIds []string `json:"diff_ids"`

	// type
	Type string `json:"type,omitempty"`
}

PluginConfigRootfs plugin config rootfs swagger:model PluginConfigRootfs

type PluginConfigUser added in v1.13.0

type PluginConfigUser struct {

	// g ID
	GID uint32 `json:"GID,omitempty"`

	// UID
	UID uint32 `json:"UID,omitempty"`
}

PluginConfigUser plugin config user swagger:model PluginConfigUser

type PluginCreateOptions added in v1.13.0

type PluginCreateOptions struct {
	RepoName string
}

PluginCreateOptions hold all options to plugin create.

type PluginDevice added in v1.13.0

type PluginDevice struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// name
	// Required: true
	Name string `json:"Name"`

	// path
	// Required: true
	Path *string `json:"Path"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`
}

PluginDevice plugin device swagger:model PluginDevice

type PluginDisableOptions added in v1.13.0

type PluginDisableOptions struct {
	Force bool
}

PluginDisableOptions holds parameters to disable plugins.

type PluginEnableOptions added in v1.13.0

type PluginEnableOptions struct {
	Timeout int
}

PluginEnableOptions holds parameters to enable plugins.

type PluginEnv added in v1.13.0

type PluginEnv struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// name
	// Required: true
	Name string `json:"Name"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`

	// value
	// Required: true
	Value *string `json:"Value"`
}

PluginEnv plugin env swagger:model PluginEnv

type PluginInstallOptions added in v1.13.0

type PluginInstallOptions struct {
	Disabled             bool
	AcceptAllPermissions bool
	RegistryAuth         string // RegistryAuth is the base64 encoded credentials for the registry
	RemoteRef            string // RemoteRef is the plugin name on the registry

	// PrivilegeFunc is a function that clients can supply to retry operations
	// after getting an authorization error. This function returns the registry
	// authentication header value in base64 encoded format, or an error if the
	// privilege request fails.
	//
	// For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
	PrivilegeFunc         func(context.Context) (string, error)
	AcceptPermissionsFunc func(context.Context, PluginPrivileges) (bool, error)
	Args                  []string
}

PluginInstallOptions holds parameters to install a plugin.

type PluginInterfaceType added in v1.13.0

type PluginInterfaceType struct {

	// capability
	// Required: true
	Capability string `json:"Capability"`

	// prefix
	// Required: true
	Prefix string `json:"Prefix"`

	// version
	// Required: true
	Version string `json:"Version"`
}

PluginInterfaceType plugin interface type swagger:model PluginInterfaceType

func (*PluginInterfaceType) MarshalJSON added in v1.13.0

func (t *PluginInterfaceType) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for PluginInterfaceType

func (PluginInterfaceType) String added in v1.13.0

func (t PluginInterfaceType) String() string

String implements fmt.Stringer for PluginInterfaceType

func (*PluginInterfaceType) UnmarshalJSON added in v1.13.0

func (t *PluginInterfaceType) UnmarshalJSON(p []byte) error

UnmarshalJSON implements json.Unmarshaler for PluginInterfaceType

type PluginMount added in v1.13.0

type PluginMount struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// destination
	// Required: true
	Destination string `json:"Destination"`

	// name
	// Required: true
	Name string `json:"Name"`

	// options
	// Required: true
	Options []string `json:"Options"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`

	// source
	// Required: true
	Source *string `json:"Source"`

	// type
	// Required: true
	Type string `json:"Type"`
}

PluginMount plugin mount swagger:model PluginMount

type PluginPrivilege added in v1.13.0

type PluginPrivilege struct {
	Name        string
	Description string
	Value       []string
}

PluginPrivilege describes a permission the user has to accept upon installing a plugin.

type PluginPrivileges added in v1.13.0

type PluginPrivileges []PluginPrivilege

PluginPrivileges is a list of PluginPrivilege

func (PluginPrivileges) Len

func (s PluginPrivileges) Len() int

func (PluginPrivileges) Less

func (s PluginPrivileges) Less(i, j int) bool

func (PluginPrivileges) Swap

func (s PluginPrivileges) Swap(i, j int)

type PluginRemoveOptions added in v1.13.0

type PluginRemoveOptions struct {
	Force bool
}

PluginRemoveOptions holds parameters to remove plugins.

type PluginSettings added in v1.13.0

type PluginSettings struct {

	// args
	// Required: true
	Args []string `json:"Args"`

	// devices
	// Required: true
	Devices []PluginDevice `json:"Devices"`

	// env
	// Required: true
	Env []string `json:"Env"`

	// mounts
	// Required: true
	Mounts []PluginMount `json:"Mounts"`
}

PluginSettings Settings that can be modified by users. swagger:model PluginSettings

type PluginsListResponse added in v1.13.0

type PluginsListResponse []*Plugin

PluginsListResponse contains the response for the Engine API

type Port deprecated added in v1.7.0

type Port = container.Port

Port An open port on a container

Deprecated: use container.Port.

type PushResult

type PushResult struct {
	Tag    string
	Digest string
	Size   int
}

PushResult contains the tag, manifest digest, and manifest size from the push. It's used to signal this information to the trust code in the client so it can sign the manifest if necessary.

type RequestPrivilegeFunc deprecated added in v1.13.0

type RequestPrivilegeFunc func(context.Context) (string, error)

RequestPrivilegeFunc is a function interface that clients can supply to retry operations after getting an authorization error. This function returns the registry authentication header value in base64 format, or an error if the privilege request fails.

Deprecated: moved to github.com/docker/docker/api/types/registry.RequestAuthConfig.

type RootFS deprecated added in v1.13.0

type RootFS = image.RootFS

RootFS returns Image's RootFS description including the layer IDs.

Deprecated: use image.RootFS.

type SecretCreateResponse deprecated added in v1.13.0

type SecretCreateResponse = swarm.SecretCreateResponse

SecretCreateResponse contains the information returned to a client on the creation of a new secret.

Deprecated: use swarm.SecretCreateResponse.

type SecretListOptions deprecated added in v1.13.0

type SecretListOptions = swarm.SecretListOptions

SecretListOptions holds parameters to list secrets

Deprecated: use swarm.SecretListOptions.

type ServiceCreateOptions deprecated added in v1.13.0

type ServiceCreateOptions = swarm.ServiceCreateOptions

ServiceCreateOptions contains the options to use when creating a service.

Deprecated: use swarm.ServiceCreateOptions.

type ServiceInspectOptions deprecated

type ServiceInspectOptions = swarm.ServiceInspectOptions

ServiceInspectOptions holds parameters related to the "service inspect" operation.

Deprecated: use swarm.ServiceInspectOptions.

type ServiceListOptions deprecated added in v1.13.0

type ServiceListOptions = swarm.ServiceListOptions

ServiceListOptions holds parameters to list services with.

Deprecated: use swarm.ServiceListOptions.

type ServiceUpdateOptions deprecated added in v1.13.0

type ServiceUpdateOptions = swarm.ServiceUpdateOptions

ServiceUpdateOptions contains the options to be used for updating services.

Deprecated: use swarm.ServiceCreateOptions.

type SummaryNetworkSettings deprecated added in v1.13.0

type SummaryNetworkSettings = container.NetworkSettingsSummary

SummaryNetworkSettings provides a summary of container's networks in /containers/json.

Deprecated: use container.NetworkSettingsSummary.

type SwarmUnlockKeyResponse deprecated added in v1.13.0

type SwarmUnlockKeyResponse = swarm.UnlockKeyResponse

SwarmUnlockKeyResponse contains the response for Engine API: GET /swarm/unlockkey

Deprecated: use swarm.UnlockKeyResponse.

type TaskListOptions deprecated added in v1.13.0

type TaskListOptions = swarm.TaskListOptions

TaskListOptions holds parameters to list tasks with.

Deprecated: use swarm.TaskListOptions.

type Version added in v1.7.0

type Version struct {
	Platform   struct{ Name string } `json:",omitempty"`
	Components []ComponentVersion    `json:",omitempty"`

	Version       string
	APIVersion    string `json:"ApiVersion"`
	MinAPIVersion string `json:"MinAPIVersion,omitempty"`
	GitCommit     string
	GoVersion     string
	Os            string
	Arch          string
	KernelVersion string `json:",omitempty"`
	Experimental  bool   `json:",omitempty"`
	BuildTime     string `json:",omitempty"`
}

Version contains response of Engine API: GET "/version"

Directories

Path Synopsis
Package backend includes types to send information to server backends.
Package backend includes types to send information to server backends.
Package filters provides tools for encoding a mapping of keys to a set of multiple values.
Package filters provides tools for encoding a mapping of keys to a set of multiple values.
plugins

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL