Преглед на файлове

Move containers, compose, secrets to /api

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif преди 5 години
родител
ревизия
d06aa2827f

+ 1 - 1
aci/aci.go

@@ -35,7 +35,7 @@ import (
 
 	"github.com/docker/compose-cli/aci/convert"
 	"github.com/docker/compose-cli/aci/login"
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/context/store"
 	"github.com/docker/compose-cli/errdefs"
 	"github.com/docker/compose-cli/progress"

+ 3 - 3
aci/backend.go

@@ -33,14 +33,14 @@ import (
 
 	"github.com/docker/compose-cli/aci/convert"
 	"github.com/docker/compose-cli/aci/login"
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/backend"
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
 	apicontext "github.com/docker/compose-cli/context"
 	"github.com/docker/compose-cli/context/cloud"
 	"github.com/docker/compose-cli/context/store"
 	"github.com/docker/compose-cli/errdefs"
-	"github.com/docker/compose-cli/secrets"
 )
 
 const (

+ 1 - 1
aci/backend_test.go

@@ -23,7 +23,7 @@ import (
 	"github.com/stretchr/testify/mock"
 	"gotest.tools/v3/assert"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 func TestGetContainerName(t *testing.T) {

+ 1 - 1
aci/convert/container.go

@@ -22,7 +22,7 @@ import (
 
 	"github.com/compose-spec/compose-go/types"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 // ContainerToComposeProject convert container config to compose project

+ 1 - 1
aci/convert/container_test.go

@@ -23,7 +23,7 @@ import (
 	"github.com/compose-spec/compose-go/types"
 	"gotest.tools/v3/assert"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 func TestConvertContainerEnvironment(t *testing.T) {

+ 2 - 2
aci/convert/convert.go

@@ -26,7 +26,7 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 	"github.com/docker/compose-cli/utils/formatter"
 
 	"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance"
@@ -35,7 +35,7 @@ import (
 	"github.com/pkg/errors"
 
 	"github.com/docker/compose-cli/aci/login"
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/context/store"
 )
 

+ 2 - 2
aci/convert/convert_test.go

@@ -21,7 +21,7 @@ import (
 	"os"
 	"testing"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 
 	"github.com/Azure/azure-sdk-for-go/profiles/latest/containerinstance/mgmt/containerinstance"
 	"github.com/Azure/go-autorest/autorest/to"
@@ -29,7 +29,7 @@ import (
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/context/store"
 )
 

+ 1 - 1
aci/convert/ports.go

@@ -21,7 +21,7 @@ import (
 
 	"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 // ToPorts converts Azure container ports to api ports

+ 1 - 1
aci/convert/ports_test.go

@@ -23,7 +23,7 @@ import (
 	"github.com/Azure/go-autorest/autorest/to"
 	"gotest.tools/v3/assert"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 func TestPortConvert(t *testing.T) {

+ 88 - 0
api/client/client.go

@@ -0,0 +1,88 @@
+/*
+   Copyright 2020 Docker, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+package client
+
+import (
+	"context"
+
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
+	"github.com/docker/compose-cli/backend"
+	apicontext "github.com/docker/compose-cli/context"
+	"github.com/docker/compose-cli/context/cloud"
+	"github.com/docker/compose-cli/context/store"
+)
+
+// New returns a backend client associated with current context
+func New(ctx context.Context) (*Client, error) {
+	currentContext := apicontext.CurrentContext(ctx)
+	s := store.ContextStore(ctx)
+
+	cc, err := s.Get(currentContext)
+	if err != nil {
+		return nil, err
+	}
+
+	service, err := backend.Get(ctx, cc.Type())
+	if err != nil {
+		return nil, err
+	}
+
+	return &Client{
+		backendType: cc.Type(),
+		bs:          service,
+	}, nil
+}
+
+// GetCloudService returns a backend CloudService (typically login, create context)
+func GetCloudService(ctx context.Context, backendType string) (cloud.Service, error) {
+	return backend.GetCloudService(ctx, backendType)
+}
+
+// Client is a multi-backend client
+type Client struct {
+	backendType string
+	bs          backend.Service
+}
+
+// ContainerService returns the backend service for the current context
+func (c *Client) ContainerService() containers.Service {
+	if cs := c.bs.ContainerService(); cs != nil {
+		return cs
+	}
+
+	return &containerService{}
+}
+
+// ComposeService returns the backend service for the current context
+func (c *Client) ComposeService() compose.Service {
+	if cs := c.bs.ComposeService(); cs != nil {
+		return cs
+	}
+
+	return &composeService{}
+}
+
+// SecretsService returns the backend service for the current context
+func (c *Client) SecretsService() secrets.Service {
+	if ss := c.bs.SecretsService(); ss != nil {
+		return ss
+	}
+
+	return &secretsService{}
+}

+ 60 - 0
api/client/compose.go

@@ -0,0 +1,60 @@
+/*
+   Copyright 2020 Docker, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+package client
+
+import (
+	"context"
+	"io"
+
+	"github.com/compose-spec/compose-go/types"
+
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/errdefs"
+)
+
+type composeService struct {
+}
+
+// Up executes the equivalent to a `compose up`
+func (c *composeService) Up(context.Context, *types.Project) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Down executes the equivalent to a `compose down`
+func (c *composeService) Down(context.Context, string) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Logs executes the equivalent to a `compose logs`
+func (c *composeService) Logs(context.Context, string, io.Writer) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Ps executes the equivalent to a `compose ps`
+func (c *composeService) Ps(context.Context, string) ([]compose.ServiceStatus, error) {
+	return nil, errdefs.ErrNotImplemented
+}
+
+// List executes the equivalent to a `docker stack ls`
+func (c *composeService) List(context.Context, string) ([]compose.Stack, error) {
+	return nil, errdefs.ErrNotImplemented
+}
+
+// Convert translate compose model into backend's native format
+func (c *composeService) Convert(context.Context, *types.Project) ([]byte, error) {
+	return nil, errdefs.ErrNotImplemented
+}

+ 71 - 0
api/client/containers.go

@@ -0,0 +1,71 @@
+/*
+   Copyright 2020 Docker, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+package client
+
+import (
+	"context"
+
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/errdefs"
+)
+
+type containerService struct {
+}
+
+// List returns all the containers
+func (c *containerService) List(context.Context, bool) ([]containers.Container, error) {
+	return nil, errdefs.ErrNotImplemented
+}
+
+// Start starts a stopped container
+func (c *containerService) Start(context.Context, string) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Stop stops the running container
+func (c *containerService) Stop(context.Context, string, *uint32) error {
+	return errdefs.ErrNotImplemented
+}
+
+func (c *containerService) Kill(ctx context.Context, containerID string, signal string) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Run creates and starts a container
+func (c *containerService) Run(context.Context, containers.ContainerConfig) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Exec executes a command inside a running container
+func (c *containerService) Exec(context.Context, string, containers.ExecRequest) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Logs returns all the logs of a container
+func (c *containerService) Logs(context.Context, string, containers.LogsRequest) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Delete removes containers
+func (c *containerService) Delete(context.Context, string, containers.DeleteRequest) error {
+	return errdefs.ErrNotImplemented
+}
+
+// Inspect get a specific container
+func (c *containerService) Inspect(context.Context, string) (containers.Container, error) {
+	return containers.Container{}, errdefs.ErrNotImplemented
+}

+ 43 - 0
api/client/secrets.go

@@ -0,0 +1,43 @@
+/*
+   Copyright 2020 Docker, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+package client
+
+import (
+	"context"
+
+	"github.com/docker/compose-cli/api/secrets"
+	"github.com/docker/compose-cli/errdefs"
+)
+
+type secretsService struct {
+}
+
+func (s *secretsService) CreateSecret(context.Context, secrets.Secret) (string, error) {
+	return "", errdefs.ErrNotImplemented
+}
+
+func (s *secretsService) InspectSecret(context.Context, string) (secrets.Secret, error) {
+	return secrets.Secret{}, errdefs.ErrNotImplemented
+}
+
+func (s *secretsService) ListSecrets(context.Context) ([]secrets.Secret, error) {
+	return nil, errdefs.ErrNotImplemented
+}
+
+func (s *secretsService) DeleteSecret(context.Context, string, bool) error {
+	return errdefs.ErrNotImplemented
+}

+ 0 - 0
compose/api.go → api/compose/api.go


+ 0 - 0
compose/tags.go → api/compose/tags.go


+ 0 - 0
containers/api.go → api/containers/api.go


+ 0 - 0
secrets/api.go → api/secrets/api.go


+ 3 - 3
backend/backend.go

@@ -23,11 +23,11 @@ import (
 
 	"github.com/sirupsen/logrus"
 
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/context/cloud"
 	"github.com/docker/compose-cli/errdefs"
-	"github.com/docker/compose-cli/secrets"
 )
 
 var (

+ 1 - 1
cli/cmd/exec.go

@@ -26,8 +26,8 @@ import (
 	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/client"
-	"github.com/docker/compose-cli/containers"
 )
 
 type execOpts struct {

+ 1 - 1
cli/cmd/logs.go

@@ -25,8 +25,8 @@ import (
 	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/client"
-	"github.com/docker/compose-cli/containers"
 )
 
 type logsOpts struct {

+ 1 - 1
cli/cmd/rm.go

@@ -25,8 +25,8 @@ import (
 	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/client"
-	"github.com/docker/compose-cli/containers"
 	"github.com/docker/compose-cli/errdefs"
 )
 

+ 1 - 1
cli/cmd/run/run.go

@@ -25,7 +25,7 @@ import (
 	"github.com/containerd/console"
 	"github.com/spf13/cobra"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 
 	"github.com/docker/compose-cli/cli/options/run"
 	"github.com/docker/compose-cli/client"

+ 1 - 1
cli/cmd/secrets.go

@@ -25,8 +25,8 @@ import (
 
 	"github.com/spf13/cobra"
 
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/client"
-	"github.com/docker/compose-cli/secrets"
 )
 
 type createSecretOptions struct {

+ 1 - 1
cli/cmd/secrets_test.go

@@ -22,7 +22,7 @@ import (
 
 	"gotest.tools/v3/golden"
 
-	"github.com/docker/compose-cli/secrets"
+	"github.com/docker/compose-cli/api/secrets"
 )
 
 func TestPrintList(t *testing.T) {

+ 1 - 1
cli/options/run/opts.go

@@ -26,7 +26,7 @@ import (
 	"github.com/docker/docker/pkg/namesgenerator"
 	"github.com/docker/go-connections/nat"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/formatter"
 )
 

+ 1 - 1
cli/options/run/opts_test.go

@@ -25,7 +25,7 @@ import (
 	"gotest.tools/v3/assert"
 	"gotest.tools/v3/assert/cmp"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 var (

+ 3 - 3
client/client.go

@@ -19,13 +19,13 @@ package client
 import (
 	"context"
 
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/backend"
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
 	apicontext "github.com/docker/compose-cli/context"
 	"github.com/docker/compose-cli/context/cloud"
 	"github.com/docker/compose-cli/context/store"
-	"github.com/docker/compose-cli/secrets"
 )
 
 // New returns a backend client associated with current context

+ 1 - 1
client/compose.go

@@ -22,7 +22,7 @@ import (
 
 	"github.com/compose-spec/compose-go/types"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 	"github.com/docker/compose-cli/errdefs"
 )
 

+ 1 - 1
client/containers.go

@@ -19,7 +19,7 @@ package client
 import (
 	"context"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/errdefs"
 )
 

+ 1 - 1
client/secrets.go

@@ -19,8 +19,8 @@ package client
 import (
 	"context"
 
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/errdefs"
-	"github.com/docker/compose-cli/secrets"
 )
 
 type secretsService struct {

+ 3 - 3
ecs/backend.go

@@ -22,14 +22,14 @@ import (
 	"github.com/aws/aws-sdk-go/aws"
 	"github.com/aws/aws-sdk-go/aws/session"
 
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/backend"
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
 	apicontext "github.com/docker/compose-cli/context"
 	"github.com/docker/compose-cli/context/cloud"
 	"github.com/docker/compose-cli/context/store"
 	"github.com/docker/compose-cli/errdefs"
-	"github.com/docker/compose-cli/secrets"
 )
 
 const backendType = store.EcsContextType

+ 1 - 1
ecs/cloudformation.go

@@ -23,7 +23,7 @@ import (
 	"regexp"
 	"strings"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 
 	ecsapi "github.com/aws/aws-sdk-go/service/ecs"
 	"github.com/aws/aws-sdk-go/service/elbv2"

+ 1 - 1
ecs/cloudformation_test.go

@@ -21,7 +21,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 
 	"github.com/aws/aws-sdk-go/service/elbv2"
 	"github.com/awslabs/goformation/v4/cloudformation"

+ 1 - 1
ecs/list.go

@@ -19,7 +19,7 @@ package ecs
 import (
 	"context"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 )
 
 func (b *ecsAPIService) List(ctx context.Context, project string) ([]compose.Stack, error) {

+ 3 - 3
ecs/local/backend.go

@@ -19,9 +19,9 @@ package local
 import (
 	"context"
 
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
-	"github.com/docker/compose-cli/secrets"
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/docker/client"
 
 	"github.com/docker/compose-cli/backend"

+ 1 - 1
ecs/local/compose.go

@@ -30,7 +30,7 @@ import (
 	types2 "github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types/filters"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 	"github.com/docker/compose-cli/errdefs"
 
 	"github.com/aws/aws-sdk-go/aws"

+ 1 - 1
ecs/ps.go

@@ -21,7 +21,7 @@ import (
 	"fmt"
 	"strings"
 
-	"github.com/docker/compose-cli/compose"
+	"github.com/docker/compose-cli/api/compose"
 )
 
 func (b *ecsAPIService) Ps(ctx context.Context, project string) ([]compose.ServiceStatus, error) {

+ 2 - 2
ecs/sdk.go

@@ -24,8 +24,8 @@ import (
 
 	"github.com/aws/aws-sdk-go/aws/client"
 
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/secrets"
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/secrets"
 
 	"github.com/aws/aws-sdk-go/aws"
 	"github.com/aws/aws-sdk-go/service/cloudformation"

+ 1 - 1
ecs/secrets.go

@@ -19,7 +19,7 @@ package ecs
 import (
 	"context"
 
-	"github.com/docker/compose-cli/secrets"
+	"github.com/docker/compose-cli/api/secrets"
 )
 
 func (b *ecsAPIService) CreateSecret(ctx context.Context, secret secrets.Secret) (string, error) {

+ 3 - 3
example/backend.go

@@ -26,12 +26,12 @@ import (
 
 	"github.com/compose-spec/compose-go/types"
 
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/backend"
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
 	"github.com/docker/compose-cli/context/cloud"
 	"github.com/docker/compose-cli/errdefs"
-	"github.com/docker/compose-cli/secrets"
 )
 
 type apiService struct {

+ 3 - 3
local/backend.go

@@ -36,12 +36,12 @@ import (
 	"github.com/docker/docker/pkg/stdcopy"
 	"github.com/pkg/errors"
 
+	"github.com/docker/compose-cli/api/compose"
+	"github.com/docker/compose-cli/api/containers"
+	"github.com/docker/compose-cli/api/secrets"
 	"github.com/docker/compose-cli/backend"
-	"github.com/docker/compose-cli/compose"
-	"github.com/docker/compose-cli/containers"
 	"github.com/docker/compose-cli/context/cloud"
 	"github.com/docker/compose-cli/errdefs"
-	"github.com/docker/compose-cli/secrets"
 )
 
 type local struct {

+ 1 - 1
server/proxy/containers.go

@@ -20,7 +20,7 @@ import (
 	"context"
 	"errors"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/formatter"
 	containersv1 "github.com/docker/compose-cli/protos/containers/v1"
 	"github.com/docker/compose-cli/server/proxy/streams"

+ 1 - 1
server/proxy/containers_test.go

@@ -21,7 +21,7 @@ import (
 
 	"gotest.tools/v3/assert"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/formatter"
 	containersv1 "github.com/docker/compose-cli/protos/containers/v1"
 )

+ 1 - 1
tests/aci-e2e/e2e-aci_test.go

@@ -45,7 +45,7 @@ import (
 
 	"github.com/docker/compose-cli/aci"
 	"github.com/docker/compose-cli/aci/login"
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 	"github.com/docker/compose-cli/context/store"
 	"github.com/docker/compose-cli/errdefs"
 	"github.com/docker/compose-cli/tests/aci-e2e/storage"

+ 1 - 1
tests/framework/e2e.go

@@ -33,7 +33,7 @@ import (
 	is "gotest.tools/v3/assert/cmp"
 	"gotest.tools/v3/icmd"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 var (

+ 1 - 1
utils/formatter/container.go

@@ -22,7 +22,7 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/docker/compose-cli/containers"
+	"github.com/docker/compose-cli/api/containers"
 )
 
 type portGroup struct {