vendor: github.com/docker/docker v28.2.0-dev (b45aa469cac7)
full diff: c04dec1143...b45aa469ca
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
628b2f1a81
commit
be03dc9ce7
@ -3,16 +3,16 @@ package builder
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types/build"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type fakeClient struct {
|
type fakeClient struct {
|
||||||
client.Client
|
client.Client
|
||||||
builderPruneFunc func(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
|
builderPruneFunc func(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *fakeClient) BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) {
|
func (c *fakeClient) BuildCachePrune(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error) {
|
||||||
if c.builderPruneFunc != nil {
|
if c.builderPruneFunc != nil {
|
||||||
return c.builderPruneFunc(ctx, opts)
|
return c.builderPruneFunc(ctx, opts)
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/docker/cli/cli/command/completion"
|
"github.com/docker/cli/cli/command/completion"
|
||||||
"github.com/docker/cli/internal/prompt"
|
"github.com/docker/cli/internal/prompt"
|
||||||
"github.com/docker/cli/opts"
|
"github.com/docker/cli/opts"
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types/build"
|
||||||
"github.com/docker/docker/errdefs"
|
"github.com/docker/docker/errdefs"
|
||||||
units "github.com/docker/go-units"
|
units "github.com/docker/go-units"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@ -79,7 +79,7 @@ func runPrune(ctx context.Context, dockerCli command.Cli, options pruneOptions)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
report, err := dockerCli.Client().BuildCachePrune(ctx, types.BuildCachePruneOptions{
|
report, err := dockerCli.Client().BuildCachePrune(ctx, build.CachePruneOptions{
|
||||||
All: options.all,
|
All: options.all,
|
||||||
KeepStorage: options.keepStorage.Value(), // FIXME(thaJeztah): rewrite to use new options; see https://github.com/moby/moby/pull/48720
|
KeepStorage: options.keepStorage.Value(), // FIXME(thaJeztah): rewrite to use new options; see https://github.com/moby/moby/pull/48720
|
||||||
Filters: pruneFilters,
|
Filters: pruneFilters,
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/cli/internal/test"
|
"github.com/docker/cli/internal/test"
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types/build"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuilderPromptTermination(t *testing.T) {
|
func TestBuilderPromptTermination(t *testing.T) {
|
||||||
@ -15,7 +15,7 @@ func TestBuilderPromptTermination(t *testing.T) {
|
|||||||
t.Cleanup(cancel)
|
t.Cleanup(cancel)
|
||||||
|
|
||||||
cli := test.NewFakeCli(&fakeClient{
|
cli := test.NewFakeCli(&fakeClient{
|
||||||
builderPruneFunc: func(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) {
|
builderPruneFunc: func(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error) {
|
||||||
return nil, errors.New("fakeClient builderPruneFunc should not be called")
|
return nil, errors.New("fakeClient builderPruneFunc should not be called")
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -15,7 +15,7 @@ require (
|
|||||||
github.com/distribution/reference v0.6.0
|
github.com/distribution/reference v0.6.0
|
||||||
github.com/docker/cli-docs-tool v0.9.0
|
github.com/docker/cli-docs-tool v0.9.0
|
||||||
github.com/docker/distribution v2.8.3+incompatible
|
github.com/docker/distribution v2.8.3+incompatible
|
||||||
github.com/docker/docker v28.1.2-0.20250516114456-c04dec11437f+incompatible // master, v28.x dev
|
github.com/docker/docker v28.1.2-0.20250516164234-b45aa469cac7+incompatible // master, v28.x dev
|
||||||
github.com/docker/docker-credential-helpers v0.9.3
|
github.com/docker/docker-credential-helpers v0.9.3
|
||||||
github.com/docker/go-connections v0.5.0
|
github.com/docker/go-connections v0.5.0
|
||||||
github.com/docker/go-units v0.5.0
|
github.com/docker/go-units v0.5.0
|
||||||
|
@ -55,8 +55,8 @@ github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3T
|
|||||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/docker v28.1.2-0.20250516114456-c04dec11437f+incompatible h1:0jSTstSvJ1S0l/wH/vJ5JMnsSNpWx6dmqblTwe87dVc=
|
github.com/docker/docker v28.1.2-0.20250516164234-b45aa469cac7+incompatible h1:xtuKFtxaqylpM2HVDGIJn11TYgIbo7B6aW+PwVFvZj8=
|
||||||
github.com/docker/docker v28.1.2-0.20250516114456-c04dec11437f+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v28.1.2-0.20250516164234-b45aa469cac7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
|
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
|
||||||
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
|
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||||
|
2
vendor/github.com/docker/docker/api/common.go
generated
vendored
2
vendor/github.com/docker/docker/api/common.go
generated
vendored
@ -3,7 +3,7 @@ package api // import "github.com/docker/docker/api"
|
|||||||
// Common constants for daemon and client.
|
// Common constants for daemon and client.
|
||||||
const (
|
const (
|
||||||
// DefaultVersion of the current REST API.
|
// DefaultVersion of the current REST API.
|
||||||
DefaultVersion = "1.49"
|
DefaultVersion = "1.50"
|
||||||
|
|
||||||
// MinSupportedAPIVersion is the minimum API version that can be supported
|
// MinSupportedAPIVersion is the minimum API version that can be supported
|
||||||
// by the API server, specified as "major.minor". Note that the daemon
|
// by the API server, specified as "major.minor". Note that the daemon
|
||||||
|
34
vendor/github.com/docker/docker/api/swagger.yaml
generated
vendored
34
vendor/github.com/docker/docker/api/swagger.yaml
generated
vendored
@ -19,10 +19,10 @@ produces:
|
|||||||
consumes:
|
consumes:
|
||||||
- "application/json"
|
- "application/json"
|
||||||
- "text/plain"
|
- "text/plain"
|
||||||
basePath: "/v1.49"
|
basePath: "/v1.50"
|
||||||
info:
|
info:
|
||||||
title: "Docker Engine API"
|
title: "Docker Engine API"
|
||||||
version: "1.49"
|
version: "1.50"
|
||||||
x-logo:
|
x-logo:
|
||||||
url: "https://docs.docker.com/assets/images/logo-docker-main.png"
|
url: "https://docs.docker.com/assets/images/logo-docker-main.png"
|
||||||
description: |
|
description: |
|
||||||
@ -55,8 +55,8 @@ info:
|
|||||||
the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
|
the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
|
||||||
is returned.
|
is returned.
|
||||||
|
|
||||||
If you omit the version-prefix, the current version of the API (v1.49) is used.
|
If you omit the version-prefix, the current version of the API (v1.50) is used.
|
||||||
For example, calling `/info` is the same as calling `/v1.49/info`. Using the
|
For example, calling `/info` is the same as calling `/v1.50/info`. Using the
|
||||||
API without a version-prefix is deprecated and will be removed in a future release.
|
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,
|
Engine releases in the near future should support this version of the API,
|
||||||
@ -2956,6 +2956,23 @@ definitions:
|
|||||||
progressDetail:
|
progressDetail:
|
||||||
$ref: "#/definitions/ProgressDetail"
|
$ref: "#/definitions/ProgressDetail"
|
||||||
|
|
||||||
|
DeviceInfo:
|
||||||
|
type: "object"
|
||||||
|
description: |
|
||||||
|
DeviceInfo represents a device that can be used by a container.
|
||||||
|
properties:
|
||||||
|
Source:
|
||||||
|
type: "string"
|
||||||
|
example: "cdi"
|
||||||
|
description: |
|
||||||
|
The origin device driver.
|
||||||
|
ID:
|
||||||
|
type: "string"
|
||||||
|
example: "vendor.com/gpu=0"
|
||||||
|
description: |
|
||||||
|
The unique identifier for the device within its source driver.
|
||||||
|
For CDI devices, this would be an FQDN like "vendor.com/gpu=0".
|
||||||
|
|
||||||
ErrorDetail:
|
ErrorDetail:
|
||||||
type: "object"
|
type: "object"
|
||||||
properties:
|
properties:
|
||||||
@ -6858,6 +6875,15 @@ definitions:
|
|||||||
example: "24"
|
example: "24"
|
||||||
FirewallBackend:
|
FirewallBackend:
|
||||||
$ref: "#/definitions/FirewallInfo"
|
$ref: "#/definitions/FirewallInfo"
|
||||||
|
DiscoveredDevices:
|
||||||
|
description: |
|
||||||
|
List of devices discovered by device drivers.
|
||||||
|
|
||||||
|
Each device includes information about its source driver, kind, name,
|
||||||
|
and additional driver-specific attributes.
|
||||||
|
type: "array"
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/DeviceInfo"
|
||||||
Warnings:
|
Warnings:
|
||||||
description: |
|
description: |
|
||||||
List of warnings / informational messages about missing features, or
|
List of warnings / informational messages about missing features, or
|
||||||
|
24
vendor/github.com/docker/docker/api/types/build/cache.go
generated
vendored
24
vendor/github.com/docker/docker/api/types/build/cache.go
generated
vendored
@ -1,6 +1,10 @@
|
|||||||
package build
|
package build
|
||||||
|
|
||||||
import "time"
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/docker/docker/api/types/filters"
|
||||||
|
)
|
||||||
|
|
||||||
// CacheRecord contains information about a build cache record.
|
// CacheRecord contains information about a build cache record.
|
||||||
type CacheRecord struct {
|
type CacheRecord struct {
|
||||||
@ -28,3 +32,21 @@ type CacheRecord struct {
|
|||||||
LastUsedAt *time.Time
|
LastUsedAt *time.Time
|
||||||
UsageCount int
|
UsageCount int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CachePruneOptions hold parameters to prune the build cache.
|
||||||
|
type CachePruneOptions struct {
|
||||||
|
All bool
|
||||||
|
ReservedSpace int64
|
||||||
|
MaxUsedSpace int64
|
||||||
|
MinFreeSpace int64
|
||||||
|
Filters filters.Args
|
||||||
|
|
||||||
|
KeepStorage int64 // Deprecated: deprecated in API 1.48.
|
||||||
|
}
|
||||||
|
|
||||||
|
// CachePruneReport contains the response for Engine API:
|
||||||
|
// POST "/build/prune"
|
||||||
|
type CachePruneReport struct {
|
||||||
|
CachesDeleted []string
|
||||||
|
SpaceReclaimed uint64
|
||||||
|
}
|
||||||
|
10
vendor/github.com/docker/docker/api/types/system/info.go
generated
vendored
10
vendor/github.com/docker/docker/api/types/system/info.go
generated
vendored
@ -75,6 +75,7 @@ type Info struct {
|
|||||||
DefaultAddressPools []NetworkAddressPool `json:",omitempty"`
|
DefaultAddressPools []NetworkAddressPool `json:",omitempty"`
|
||||||
FirewallBackend *FirewallInfo `json:"FirewallBackend,omitempty"`
|
FirewallBackend *FirewallInfo `json:"FirewallBackend,omitempty"`
|
||||||
CDISpecDirs []string
|
CDISpecDirs []string
|
||||||
|
DiscoveredDevices []DeviceInfo `json:",omitempty"`
|
||||||
|
|
||||||
Containerd *ContainerdInfo `json:",omitempty"`
|
Containerd *ContainerdInfo `json:",omitempty"`
|
||||||
|
|
||||||
@ -160,3 +161,12 @@ type FirewallInfo struct {
|
|||||||
// Info is a list of label/value pairs, containing information related to the firewall.
|
// Info is a list of label/value pairs, containing information related to the firewall.
|
||||||
Info [][2]string `json:"Info,omitempty"`
|
Info [][2]string `json:"Info,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeviceInfo represents a discoverable device from a device driver.
|
||||||
|
type DeviceInfo struct {
|
||||||
|
// Source indicates the origin device driver.
|
||||||
|
Source string `json:"Source"`
|
||||||
|
// ID is the unique identifier for the device.
|
||||||
|
// Example: CDI FQDN like "vendor.com/gpu=0", or other driver-specific device ID
|
||||||
|
ID string `json:"ID"`
|
||||||
|
}
|
||||||
|
25
vendor/github.com/docker/docker/api/types/types.go
generated
vendored
25
vendor/github.com/docker/docker/api/types/types.go
generated
vendored
@ -90,17 +90,10 @@ type DiskUsage struct {
|
|||||||
Images []*image.Summary
|
Images []*image.Summary
|
||||||
Containers []*container.Summary
|
Containers []*container.Summary
|
||||||
Volumes []*volume.Volume
|
Volumes []*volume.Volume
|
||||||
BuildCache []*BuildCache
|
BuildCache []*build.CacheRecord
|
||||||
BuilderSize int64 `json:",omitempty"` // Deprecated: deprecated in API 1.38, and no longer used since API 1.40.
|
BuilderSize int64 `json:",omitempty"` // Deprecated: deprecated in API 1.38, and no longer used since API 1.40.
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildCachePruneReport contains the response for Engine API:
|
|
||||||
// POST "/build/prune"
|
|
||||||
type BuildCachePruneReport struct {
|
|
||||||
CachesDeleted []string
|
|
||||||
SpaceReclaimed uint64
|
|
||||||
}
|
|
||||||
|
|
||||||
// SecretCreateResponse contains the information returned to a client
|
// SecretCreateResponse contains the information returned to a client
|
||||||
// on the creation of a new secret.
|
// on the creation of a new secret.
|
||||||
type SecretCreateResponse struct {
|
type SecretCreateResponse struct {
|
||||||
@ -138,19 +131,3 @@ type PushResult struct {
|
|||||||
type BuildResult struct {
|
type BuildResult struct {
|
||||||
ID string
|
ID string
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildCache contains information about a build cache record.
|
|
||||||
//
|
|
||||||
// Deprecated: deprecated in API 1.49. Use [build.CacheRecord] instead.
|
|
||||||
type BuildCache = build.CacheRecord
|
|
||||||
|
|
||||||
// BuildCachePruneOptions hold parameters to prune the build cache
|
|
||||||
type BuildCachePruneOptions struct {
|
|
||||||
All bool
|
|
||||||
ReservedSpace int64
|
|
||||||
MaxUsedSpace int64
|
|
||||||
MinFreeSpace int64
|
|
||||||
Filters filters.Args
|
|
||||||
|
|
||||||
KeepStorage int64 // Deprecated: deprecated in API 1.48.
|
|
||||||
}
|
|
||||||
|
17
vendor/github.com/docker/docker/api/types/types_deprecated.go
generated
vendored
17
vendor/github.com/docker/docker/api/types/types_deprecated.go
generated
vendored
@ -3,6 +3,7 @@ package types
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"github.com/docker/docker/api/types/build"
|
||||||
"github.com/docker/docker/api/types/common"
|
"github.com/docker/docker/api/types/common"
|
||||||
"github.com/docker/docker/api/types/container"
|
"github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/api/types/image"
|
"github.com/docker/docker/api/types/image"
|
||||||
@ -113,3 +114,19 @@ type ImageInspect = image.InspectResponse
|
|||||||
//
|
//
|
||||||
// Deprecated: moved to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
// Deprecated: moved to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
||||||
type RequestPrivilegeFunc func(context.Context) (string, error)
|
type RequestPrivilegeFunc func(context.Context) (string, error)
|
||||||
|
|
||||||
|
// BuildCache contains information about a build cache record.
|
||||||
|
//
|
||||||
|
// Deprecated: deprecated in API 1.49. Use [build.CacheRecord] instead.
|
||||||
|
type BuildCache = build.CacheRecord
|
||||||
|
|
||||||
|
// BuildCachePruneOptions hold parameters to prune the build cache
|
||||||
|
//
|
||||||
|
// Deprecated: use [build.CachePruneOptions].
|
||||||
|
type BuildCachePruneOptions = build.CachePruneOptions
|
||||||
|
|
||||||
|
// BuildCachePruneReport contains the response for Engine API:
|
||||||
|
// POST "/build/prune"
|
||||||
|
//
|
||||||
|
// Deprecated: use [build.CachePruneReport].
|
||||||
|
type BuildCachePruneReport = build.CachePruneReport
|
||||||
|
6
vendor/github.com/docker/docker/client/build_prune.go
generated
vendored
6
vendor/github.com/docker/docker/client/build_prune.go
generated
vendored
@ -6,13 +6,13 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types/build"
|
||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BuildCachePrune requests the daemon to delete unused cache data
|
// BuildCachePrune requests the daemon to delete unused cache data
|
||||||
func (cli *Client) BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) {
|
func (cli *Client) BuildCachePrune(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error) {
|
||||||
if err := cli.NewVersionError(ctx, "1.31", "build prune"); err != nil {
|
if err := cli.NewVersionError(ctx, "1.31", "build prune"); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ func (cli *Client) BuildCachePrune(ctx context.Context, opts types.BuildCachePru
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
report := types.BuildCachePruneReport{}
|
report := build.CachePruneReport{}
|
||||||
if err := json.NewDecoder(resp.Body).Decode(&report); err != nil {
|
if err := json.NewDecoder(resp.Body).Decode(&report); err != nil {
|
||||||
return nil, errors.Wrap(err, "error retrieving disk usage")
|
return nil, errors.Wrap(err, "error retrieving disk usage")
|
||||||
}
|
}
|
||||||
|
3
vendor/github.com/docker/docker/client/client_interfaces.go
generated
vendored
3
vendor/github.com/docker/docker/client/client_interfaces.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
|
"github.com/docker/docker/api/types/build"
|
||||||
"github.com/docker/docker/api/types/container"
|
"github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/api/types/events"
|
"github.com/docker/docker/api/types/events"
|
||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
@ -110,7 +111,7 @@ type DistributionAPIClient interface {
|
|||||||
// ImageAPIClient defines API client methods for the images
|
// ImageAPIClient defines API client methods for the images
|
||||||
type ImageAPIClient interface {
|
type ImageAPIClient interface {
|
||||||
ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
|
ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
|
||||||
BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
|
BuildCachePrune(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error)
|
||||||
BuildCancel(ctx context.Context, id string) error
|
BuildCancel(ctx context.Context, id string) error
|
||||||
ImageCreate(ctx context.Context, parentReference string, options image.CreateOptions) (io.ReadCloser, error)
|
ImageCreate(ctx context.Context, parentReference string, options image.CreateOptions) (io.ReadCloser, error)
|
||||||
ImageImport(ctx context.Context, source image.ImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error)
|
ImageImport(ctx context.Context, source image.ImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error)
|
||||||
|
8
vendor/github.com/docker/docker/client/errors.go
generated
vendored
8
vendor/github.com/docker/docker/client/errors.go
generated
vendored
@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
cerrdefs "github.com/containerd/errdefs"
|
||||||
"github.com/docker/docker/api/types/versions"
|
"github.com/docker/docker/api/types/versions"
|
||||||
"github.com/docker/docker/errdefs"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// errConnectionFailed implements an error returned when connection failed.
|
// errConnectionFailed implements an error returned when connection failed.
|
||||||
@ -48,9 +48,11 @@ func connectionFailed(host string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IsErrNotFound returns true if the error is a NotFound error, which is returned
|
// IsErrNotFound returns true if the error is a NotFound error, which is returned
|
||||||
// by the API when some object is not found. It is an alias for [errdefs.IsNotFound].
|
// by the API when some object is not found. It is an alias for [cerrdefs.IsNotFound].
|
||||||
|
//
|
||||||
|
// Deprecated: use [cerrdefs.IsNotFound] instead.
|
||||||
func IsErrNotFound(err error) bool {
|
func IsErrNotFound(err error) bool {
|
||||||
return errdefs.IsNotFound(err)
|
return cerrdefs.IsNotFound(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
type objectNotFoundError struct {
|
type objectNotFoundError struct {
|
||||||
|
2
vendor/github.com/docker/docker/errdefs/doc.go
generated
vendored
2
vendor/github.com/docker/docker/errdefs/doc.go
generated
vendored
@ -4,5 +4,5 @@
|
|||||||
// Packages should not reference these interfaces directly, only implement them.
|
// Packages should not reference these interfaces directly, only implement them.
|
||||||
// To check if a particular error implements one of these interfaces, there are helper
|
// To check if a particular error implements one of these interfaces, there are helper
|
||||||
// functions provided (e.g. `Is<SomeError>`) which can be used rather than asserting the interfaces directly.
|
// functions provided (e.g. `Is<SomeError>`) which can be used rather than asserting the interfaces directly.
|
||||||
// If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`).
|
// If you must assert on these interfaces, be sure to check the causal chain (`err.Unwrap()`).
|
||||||
package errdefs // import "github.com/docker/docker/errdefs"
|
package errdefs // import "github.com/docker/docker/errdefs"
|
||||||
|
127
vendor/github.com/docker/docker/errdefs/is.go
generated
vendored
127
vendor/github.com/docker/docker/errdefs/is.go
generated
vendored
@ -3,119 +3,74 @@ package errdefs
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
|
cerrdefs "github.com/containerd/errdefs"
|
||||||
)
|
)
|
||||||
|
|
||||||
type causer interface {
|
|
||||||
Cause() error
|
|
||||||
}
|
|
||||||
|
|
||||||
type wrapErr interface {
|
|
||||||
Unwrap() error
|
|
||||||
}
|
|
||||||
|
|
||||||
func getImplementer(err error) error {
|
|
||||||
switch e := err.(type) {
|
|
||||||
case
|
|
||||||
ErrNotFound,
|
|
||||||
ErrInvalidParameter,
|
|
||||||
ErrConflict,
|
|
||||||
ErrUnauthorized,
|
|
||||||
ErrUnavailable,
|
|
||||||
ErrForbidden,
|
|
||||||
ErrSystem,
|
|
||||||
ErrNotModified,
|
|
||||||
ErrNotImplemented,
|
|
||||||
ErrCancelled,
|
|
||||||
ErrDeadline,
|
|
||||||
ErrDataLoss,
|
|
||||||
ErrUnknown:
|
|
||||||
return err
|
|
||||||
case causer:
|
|
||||||
return getImplementer(e.Cause())
|
|
||||||
case wrapErr:
|
|
||||||
return getImplementer(e.Unwrap())
|
|
||||||
default:
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsNotFound returns if the passed in error is an [ErrNotFound],
|
// IsNotFound returns if the passed in error is an [ErrNotFound],
|
||||||
func IsNotFound(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrNotFound)
|
// Deprecated: use containerd [cerrdefs.IsNotFound]
|
||||||
return ok
|
var IsNotFound = cerrdefs.IsNotFound
|
||||||
}
|
|
||||||
|
|
||||||
// IsInvalidParameter returns if the passed in error is an [ErrInvalidParameter].
|
// IsInvalidParameter returns if the passed in error is an [ErrInvalidParameter].
|
||||||
func IsInvalidParameter(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrInvalidParameter)
|
// Deprecated: use containerd [cerrdefs.IsInvalidArgument]
|
||||||
return ok
|
var IsInvalidParameter = cerrdefs.IsInvalidArgument
|
||||||
}
|
|
||||||
|
|
||||||
// IsConflict returns if the passed in error is an [ErrConflict].
|
// IsConflict returns if the passed in error is an [ErrConflict].
|
||||||
func IsConflict(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrConflict)
|
// Deprecated: use containerd [cerrdefs.IsConflict]
|
||||||
return ok
|
var IsConflict = cerrdefs.IsConflict
|
||||||
}
|
|
||||||
|
|
||||||
// IsUnauthorized returns if the passed in error is an [ErrUnauthorized].
|
// IsUnauthorized returns if the passed in error is an [ErrUnauthorized].
|
||||||
func IsUnauthorized(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrUnauthorized)
|
// Deprecated: use containerd [cerrdefs.IsUnauthorized]
|
||||||
return ok
|
var IsUnauthorized = cerrdefs.IsUnauthorized
|
||||||
}
|
|
||||||
|
|
||||||
// IsUnavailable returns if the passed in error is an [ErrUnavailable].
|
// IsUnavailable returns if the passed in error is an [ErrUnavailable].
|
||||||
func IsUnavailable(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrUnavailable)
|
// Deprecated: use containerd [cerrdefs.IsUnavailable]
|
||||||
return ok
|
var IsUnavailable = cerrdefs.IsUnavailable
|
||||||
}
|
|
||||||
|
|
||||||
// IsForbidden returns if the passed in error is an [ErrForbidden].
|
// IsForbidden returns if the passed in error is an [ErrForbidden].
|
||||||
func IsForbidden(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrForbidden)
|
// Deprecated: use containerd [cerrdefs.IsPermissionDenied]
|
||||||
return ok
|
var IsForbidden = cerrdefs.IsPermissionDenied
|
||||||
}
|
|
||||||
|
|
||||||
// IsSystem returns if the passed in error is an [ErrSystem].
|
// IsSystem returns if the passed in error is an [ErrSystem].
|
||||||
func IsSystem(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrSystem)
|
// Deprecated: use containerd [cerrdefs.IsInternal]
|
||||||
return ok
|
var IsSystem = cerrdefs.IsInternal
|
||||||
}
|
|
||||||
|
|
||||||
// IsNotModified returns if the passed in error is an [ErrNotModified].
|
// IsNotModified returns if the passed in error is an [ErrNotModified].
|
||||||
func IsNotModified(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrNotModified)
|
// Deprecated: use containerd [cerrdefs.IsNotModified]
|
||||||
return ok
|
var IsNotModified = cerrdefs.IsNotModified
|
||||||
}
|
|
||||||
|
|
||||||
// IsNotImplemented returns if the passed in error is an [ErrNotImplemented].
|
// IsNotImplemented returns if the passed in error is an [ErrNotImplemented].
|
||||||
func IsNotImplemented(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrNotImplemented)
|
// Deprecated: use containerd [cerrdefs.IsNotImplemented]
|
||||||
return ok
|
var IsNotImplemented = cerrdefs.IsNotImplemented
|
||||||
}
|
|
||||||
|
|
||||||
// IsUnknown returns if the passed in error is an [ErrUnknown].
|
// IsUnknown returns if the passed in error is an [ErrUnknown].
|
||||||
func IsUnknown(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrUnknown)
|
// Deprecated: use containerd [cerrdefs.IsUnknown]
|
||||||
return ok
|
var IsUnknown = cerrdefs.IsUnknown
|
||||||
}
|
|
||||||
|
|
||||||
// IsCancelled returns if the passed in error is an [ErrCancelled].
|
// IsCancelled returns if the passed in error is an [ErrCancelled].
|
||||||
func IsCancelled(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrCancelled)
|
// Deprecated: use containerd [cerrdefs.IsCanceled]
|
||||||
return ok
|
var IsCancelled = cerrdefs.IsCanceled
|
||||||
}
|
|
||||||
|
|
||||||
// IsDeadline returns if the passed in error is an [ErrDeadline].
|
// IsDeadline returns if the passed in error is an [ErrDeadline].
|
||||||
func IsDeadline(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrDeadline)
|
// Deprecated: use containerd [cerrdefs.IsDeadlineExceeded]
|
||||||
return ok
|
var IsDeadline = cerrdefs.IsDeadlineExceeded
|
||||||
}
|
|
||||||
|
|
||||||
// IsDataLoss returns if the passed in error is an [ErrDataLoss].
|
// IsDataLoss returns if the passed in error is an [ErrDataLoss].
|
||||||
func IsDataLoss(err error) bool {
|
//
|
||||||
_, ok := getImplementer(err).(ErrDataLoss)
|
// Deprecated: use containerd [cerrdefs.IsDataLoss]
|
||||||
return ok
|
var IsDataLoss = cerrdefs.IsDataLoss
|
||||||
}
|
|
||||||
|
|
||||||
// IsContext returns if the passed in error is due to context cancellation or deadline exceeded.
|
// IsContext returns if the passed in error is due to context cancellation or deadline exceeded.
|
||||||
func IsContext(err error) bool {
|
func IsContext(err error) bool {
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -61,7 +61,7 @@ github.com/docker/distribution/registry/client/transport
|
|||||||
github.com/docker/distribution/registry/storage/cache
|
github.com/docker/distribution/registry/storage/cache
|
||||||
github.com/docker/distribution/registry/storage/cache/memory
|
github.com/docker/distribution/registry/storage/cache/memory
|
||||||
github.com/docker/distribution/uuid
|
github.com/docker/distribution/uuid
|
||||||
# github.com/docker/docker v28.1.2-0.20250516114456-c04dec11437f+incompatible
|
# github.com/docker/docker v28.1.2-0.20250516164234-b45aa469cac7+incompatible
|
||||||
## explicit
|
## explicit
|
||||||
github.com/docker/docker/api
|
github.com/docker/docker/api
|
||||||
github.com/docker/docker/api/types
|
github.com/docker/docker/api/types
|
||||||
|
Loading…
x
Reference in New Issue
Block a user