Commit Graph

896 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
005b488506 api/types: fix non-constant format string in call (govet)
api/types/container/hostconfig.go:328:43: printf: non-constant format string in call to fmt.Errorf (govet)
                return &errInvalidParameter{fmt.Errorf(msg)}
                                                       ^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-27 10:41:58 +02:00
Sebastiaan van Stijn
e77e543b58 api/types/registry: fix godoc, and add some doc-links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-13 14:36:55 +02:00
Paweł Gronowski
050afe1e1a api/list: Expose manifests
Add `Manifests` field to `ImageSummary` which exposes all image
manifests (which includes other blobs using the image media type, like
buildkit attestations).

There's also a new `manifests` query field that needs to be set in order
for the response to contain the new information.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-07 13:48:54 +02:00
Paweł Gronowski
efb3c50799 swagger: Disable ImageSummary model generation
Our version of go-swagger doesn't handle the `omitempty` correctly for
the new field.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-07 13:48:50 +02:00
Sebastiaan van Stijn
ac145a82fd api/types: NewHijackedResponse: fix typo in GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-31 22:42:55 +02:00
Rob Murray
d4d8611164 Added API create/inspect option EnableIPv4
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-31 18:38:43 +01:00
Paweł Gronowski
cd11843df8 images: Extract ImageInspect from GetImage
Remove a special `Details` parameter from the `GetImage` options and
extract its behavior to a `ImageInspect` method as it was only used by
the `/images/{name}/json` endpoint (`docker image inspect`).

This makes it easier for the containerd image service to output an image
inspect output without having to use the same data structures as the
graphdrivers.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-25 20:13:41 +02:00
Sebastiaan van Stijn
fb18966aa5 api/types/container: InspectResponse: keep old name for embedded type
This is a follow-up to 1abc8f6158, which
moved the ContainerJSONBase to api/types/container, but also renamed it
to container.InspectBase. This field is embedded into the InspectResponse
type, which meant that renaming the type also implicitly renamed the
field when creating this type from a struct-literal.

While we're planning to merge these types (which would be a breaking
change for users constructing it through struct-literals), let's keep
it backward-compatible for now (other than deprecating the old names).

We can continue the other changes separately.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-03 17:14:03 +02:00
Sebastiaan van Stijn
ef356c53ba api/types: remove deprecated ContainerNode, ContainerJSONBase.Node
It was moved and deprecated in 1fc9236119
(4587688258 for v27.0). This patch removes the
temporary alias and removes the relocated  api/types/container.ContainerNode
as well as the Node field on the api/types/container.Base struct.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:20:38 +02:00
Sebastiaan van Stijn
5b9ed8081b api/types: remove deprecated ImageLoadResponse
It moved to api/types/image.LoadResponse in 6c2934f373.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:56 +02:00
Sebastiaan van Stijn
d3defe9140 api/types: remove deprecated ImageImportSource
It moved to api/types/image.ImportSource in eb675cce71.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
6cdb123b6f api/types: remove deprecated ImageSearchOptions
It moved to api/types/registry.SearchOptions in f6cc76ceb9.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
67b7b15674 api/types: remove deprecated EventsOptions
It moved to api/types/events.ListOptions in b5f15bc0aa.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
3cbc166d2e api/types: remove deprecated container stats types
These types were moved to api/types/container in 0a4277abf4.

This removes the temporary aliases for:

- ThrottlingData
- CPUUsage
- CPUStats
- MemoryStats
- BlkioStatEntry
- BlkioStats
- StorageStats
- NetworkStats
- PidsStats
- Stats
- StatsJSON (moved/renamed to api/types/container.StatsResponse)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
ec5cede0a2 api/types: remove deprecated ContainerStats
It moved to api/types/container.StatsResponseReader in 17c3269a37.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
4ffe497ba4 api/types: remove deprecated CopyToContainerOptions
It moved to api/types/container.CopyToContainerOptions in fd1d8f323b.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
345e31ab96 api/types: remove deprecated ContainerPathStat
It moved to api/types/container.PathStat in 47d7c9e31d.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
2bceb34717 api/types: remove deprecated ContainersPruneReport
It moved to api/types/container.PruneReport in db2f1acd5d.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
0e64c9e93b api/types: remove deprecated ContainerExecInspect
It moved to api/types/container.ExecInspect in 5b27e71521.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
6f0caec226 api/types: remove deprecated ExecStartCheck
It's replaced by api/types/container.ExecStartOptions and ExecAttachOptions
in cd76e3e7f8. This patch removes the temporary
alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
13fbd394ee api/types: remove deprecated ExecConfig
It moved to api/types/container.ExecOptions in cd76e3e7f8.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
665eef54db api/types: remove deprecated NetworksPruneReport
It moved to api/types/network.PruneReport in e5f9484ab6.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
d2256faa0e api/types: remove deprecated NetworkResource
It's replaced by api/types/network.Inspect and api/types/network.Summary in
68bf0e7625. This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
ffdd2de674 api/types: remove deprecated EndpointResource
It moved to api/types/network.EndpointResource in 68bf0e7625.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
f0f2b8f7cb api/types: remove deprecated NetworkDisconnect
It moved to api/types/network.DisconnectOptions in 245d12175f.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
cf9d9ff50d api/types: remove deprecated NetworkConnect
It moved to api/types/network.ConnectOptions in 245d12175f.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
39c7b5f3e3 api/types: remove deprecated NetworkInspectOptions
It moved to api/types/network.InspectOptions in 5bea0c38bc.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
64583771f0 api/types: remove deprecated NetworkCreateResponse
It moved to api/types/network.CreateResponse in 89624e09e6.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
c99e0bc8ae api/types: remove deprecated NetworkListOptions
It moved to api/types/network.ListOptions in f78dac35e5.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
48f147e8d3 api/types: remove deprecated NetworkCreate
It moved to api/types/network.CreateOptions in 162ef4f8d1.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
ff1f1c58d5 api/types: remove deprecated NetworkCreateRequest
It moved to api/types/network.CreateRequest in 162ef4f8d1.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:51 +02:00
Sebastiaan van Stijn
4117a9308d api/types: remove deprecated VolumesPruneReport
It moved to api/types/volume in 162ef4f8d1.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:51 +02:00
Sebastiaan van Stijn
e0156f0f16 api/types: remove deprecated ImagesPruneReport
It moved to api/types/image in ecb24afaaf.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:51 +02:00
Sebastiaan van Stijn
1abc8f6158 api/types: move container-inspect types to api/types/container
This moves the `ContainerJSONBase`, `ContainerJSON` and `ContainerNode`
types to the api/types/container package and deprecates the old location.

- `ContainerJSONBase` was renamed to `InspectBase`
- `ContainerJSON` was rnamed to `InspectResponse`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:50:24 +02:00
Sebastiaan van Stijn
05b0e653dd api/types: move Container to api/types/container
This moves the `Container` type to the containere package, rename
it to `Summary`, and deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:48 +02:00
Sebastiaan van Stijn
84ffc644ef api/types: move ContainerState to api/types/image
This moves the `ContainerState` type to the container package,
renames it to `State`, and deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:48 +02:00
Sebastiaan van Stijn
7053007f71 api/types: move ImageInspect and RootFS to api/types/image
This moves the `ImageInspect` and `RootFS` types to the image package,
and deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:48 +02:00
Sebastiaan van Stijn
da039ca918 api/types: move GraphDriverData to api/types/storage
The `GraphDriverData` type is shared between images and containers, and
putting it in either package would result in a circular import, so adding
a new package for this type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
e12b7493b9 api/types: move Port to api/types/container
This moves the `Port` type to the container package, and
deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
5517322cf9 api/types: move MountPoint to api/types/container
This moves the `MountPoint` type to the container package, and
deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
c130ce1f5d api/types: move container Health types to api/types/container
This moves the `Health` and `HealthcheckResult` types to the container package,
as well as the related `NoHealthcheck`, `Starting`, `Healthy`, and `Unhealthy`
consts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
df22a511cb api/types: move container-networksettings types to api/types/container
This moves the NetworkSettings, NetworkSettingsBase, DefaultNetworkSettings,
and SummaryNetworkSettings types to the api/types/container package, and
deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:45 +02:00
Sebastiaan van Stijn
e4d792a06d api/types/system: remove Info.ExecutionDriver
The execution-driver was replaced with containerd since docker 1.11 (API
v1.23) in 9c4570a958, after which the value
was no longer set. The field was left in the type definition.
Commit 1fb1136fec removed its use from the
CLI and [docker/engine-api@39c7d7e] removed it from the API type, followed
by an update to the API docs in 3c6ef4c29d.

Changes to the API types were not pulled into the engine until v1.13, and
probably because of that gated it on API version < 1.25 instead of < 1.24
(see 6d98e344c7); setting a "not supported"
value for older versions.

Based on the above; this field was deprecated in API v1.23, and empty
since then. Given that the minimum API version supported by the engine
is not v1.24, we can safely remove it.

[docker/engine-api@39c7d7e]: 39c7d7ec19

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 01:29:36 +02:00
Sebastiaan van Stijn
8768145519 api/types: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 23:18:46 +02:00
Sebastiaan van Stijn
1fc9236119 api/types: deprecate ContainerJSONBase.Node, ContainerNode
The `Node` field and related `ContainerNode` type were used by the classic
(standalone) Swarm API. API documentation for this field was already removed
in 234d5a78fe (API 1.41 / docker 20.10), and
as the Docker Engine didn't implement these fields for the Swarm API, it
would always have been unset / nil.

Let's do a quick deprecation, and remove it on the next release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-25 18:47:59 +02:00
Sebastiaan van Stijn
0a4277abf4 api/types: move stats-types to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-20 10:21:42 +02:00
Paweł Gronowski
fe60fa241b Merge pull request #48039 from thaJeztah/fixo_typo
api/types: fix typo in GoDoc
2024-06-20 10:15:35 +02:00
Sebastiaan van Stijn
91a2a574d7 api/types: rename container.StatsResponse to StatsResponseReader
commit 17c3269a37 moved the ContainerStats
type to the container package, and renamed it to StatsResponse. However,
this name is chosen poorly, as it documents it to be the response of
the API endpoint, but is more accurately a wrapper around a reader,
used to read a (stream of) StatsJSON. We want to change StatsJSON
to StatsResponse, as it's more consistent with other response types.

As 17c3269a37 did not make it into a
non-pre-release, we can still change this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-20 08:54:52 +02:00
Sebastiaan van Stijn
6fafc8762f api/types: fix typo in GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-20 01:39:32 +02:00
Sebastiaan van Stijn
517fb0991e api/types/container: provide alias for github.com/docker/go-units.Ulimit
This type is included in various types used in the API, but comes from
a separate module. The go-units module may be moving to the moby org,
and it is yet to be decided if the Ulimit type is a good fit for that
module (which deals with more generic units, such as "size" and "duration"
otherwise).

This patch introduces an alias to help during the transition of this type
to it's new location. The alias makes sure that existing code continues
to work (at least for now), but we need to start updating such code after
this PR is merged.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-18 13:18:20 +02:00