mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
These fields have been removed from the API specification, and the struct was only needed to produce legacy responses (server), or to unmarshal legacy responses in the client. As the API module only provides API definitions for the current API version, we should remove these legacy structs, and keep them internal to the daemon and client. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
28 lines
1.0 KiB
Go
28 lines
1.0 KiB
Go
package system
|
|
|
|
import (
|
|
buildtypes "github.com/moby/moby/api/types/build"
|
|
"github.com/moby/moby/api/types/container"
|
|
"github.com/moby/moby/api/types/image"
|
|
"github.com/moby/moby/api/types/system"
|
|
"github.com/moby/moby/api/types/volume"
|
|
)
|
|
|
|
// diskUsageCompat is used to provide API responses with backward-compatibility
|
|
// for API < v1.52, which used a different format. For API v1.52, we return
|
|
// both "old" and "new" responses if the client did not explicitly opt in to
|
|
// using the new format (through the use of the "verbose" query-parameter).
|
|
type diskUsageCompat struct {
|
|
*legacyDiskUsage
|
|
*system.DiskUsage
|
|
}
|
|
|
|
// legacyDiskUsage is the response as was used by API < v1.52.
|
|
type legacyDiskUsage struct {
|
|
LayersSize int64 `json:"LayersSize,omitempty"`
|
|
Images []image.Summary `json:"Images,omitzero"`
|
|
Containers []container.Summary `json:"Containers,omitzero"`
|
|
Volumes []volume.Volume `json:"Volumes,omitzero"`
|
|
BuildCache []buildtypes.CacheRecord `json:"BuildCache,omitzero"`
|
|
}
|