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>
This commit is contained in:
Sebastiaan van Stijn
2024-06-26 00:46:34 +02:00
parent 05b0e653dd
commit 1abc8f6158
18 changed files with 120 additions and 97 deletions

View File

@@ -1,13 +1,13 @@
package daemon // import "github.com/docker/docker/daemon"
import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/container"
"github.com/docker/docker/api/types/container"
containerpkg "github.com/docker/docker/container"
)
// This sets platform-specific fields
func setPlatformSpecificContainerFields(container *container.Container, contJSONBase *types.ContainerJSONBase) *types.ContainerJSONBase {
func setPlatformSpecificContainerFields(container *containerpkg.Container, contJSONBase *container.InspectBase) *container.InspectBase {
contJSONBase.AppArmorProfile = container.AppArmorProfile
contJSONBase.ResolvConfPath = container.ResolvConfPath
contJSONBase.HostnamePath = container.HostnamePath
@@ -16,7 +16,7 @@ func setPlatformSpecificContainerFields(container *container.Container, contJSON
return contJSONBase
}
func inspectExecProcessConfig(e *container.ExecConfig) *backend.ExecProcessConfig {
func inspectExecProcessConfig(e *containerpkg.ExecConfig) *backend.ExecProcessConfig {
return &backend.ExecProcessConfig{
Tty: e.Tty,
Entrypoint: e.Entrypoint,