diff --git a/.github/labeler.yml b/.github/labeler.yml index c5d5ef7fa..3eb483464 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -8,11 +8,7 @@ cli: - cli/**/* api: - - containers/**/* - - compose/**/* - - secrets/**/* - - server/**/* - - protos/**/* + - api/**/* ci: - .github/**/* diff --git a/aci/aci.go b/aci/aci.go index ec189a29e..4a251d3f4 100644 --- a/aci/aci.go +++ b/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" diff --git a/aci/backend.go b/aci/backend.go index 0aaba0e16..02b578bfe 100644 --- a/aci/backend.go +++ b/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 ( diff --git a/aci/backend_test.go b/aci/backend_test.go index cea120bc2..aafcb52de 100644 --- a/aci/backend_test.go +++ b/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) { diff --git a/aci/convert/container.go b/aci/convert/container.go index 561e6083a..5d1d6e51f 100644 --- a/aci/convert/container.go +++ b/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 diff --git a/aci/convert/container_test.go b/aci/convert/container_test.go index 8c10b5c73..1227aa9ec 100644 --- a/aci/convert/container_test.go +++ b/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) { diff --git a/aci/convert/convert.go b/aci/convert/convert.go index 79a959b68..3df1ee055 100644 --- a/aci/convert/convert.go +++ b/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" ) diff --git a/aci/convert/convert_test.go b/aci/convert/convert_test.go index dfc60a099..d6c656dd6 100644 --- a/aci/convert/convert_test.go +++ b/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" ) diff --git a/aci/convert/ports.go b/aci/convert/ports.go index 6111ed590..336596a3e 100644 --- a/aci/convert/ports.go +++ b/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 diff --git a/aci/convert/ports_test.go b/aci/convert/ports_test.go index 6a7ce80d7..f9b9a378e 100644 --- a/aci/convert/ports_test.go +++ b/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) { diff --git a/client/client.go b/api/client/client.go similarity index 94% rename from client/client.go rename to api/client/client.go index 4b956a464..a6e19bf22 100644 --- a/client/client.go +++ b/api/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 diff --git a/client/compose.go b/api/client/compose.go similarity index 97% rename from client/compose.go rename to api/client/compose.go index 3bda30487..91387f24a 100644 --- a/client/compose.go +++ b/api/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" ) diff --git a/client/containers.go b/api/client/containers.go similarity index 97% rename from client/containers.go rename to api/client/containers.go index eaa57d0d1..41639f382 100644 --- a/client/containers.go +++ b/api/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" ) diff --git a/client/secrets.go b/api/client/secrets.go similarity index 96% rename from client/secrets.go rename to api/client/secrets.go index 254318f3e..24a754b11 100644 --- a/client/secrets.go +++ b/api/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 { diff --git a/compose/api.go b/api/compose/api.go similarity index 100% rename from compose/api.go rename to api/compose/api.go diff --git a/compose/tags.go b/api/compose/tags.go similarity index 100% rename from compose/tags.go rename to api/compose/tags.go diff --git a/containers/api.go b/api/containers/api.go similarity index 100% rename from containers/api.go rename to api/containers/api.go diff --git a/secrets/api.go b/api/secrets/api.go similarity index 100% rename from secrets/api.go rename to api/secrets/api.go diff --git a/backend/backend.go b/backend/backend.go index 8f3a36014..8185f873c 100644 --- a/backend/backend.go +++ b/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 ( diff --git a/cli/cmd/compose/compose.go b/cli/cmd/compose/compose.go index 90a185560..83c89cde2 100644 --- a/cli/cmd/compose/compose.go +++ b/cli/cmd/compose/compose.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/errdefs" ) diff --git a/cli/cmd/compose/convert.go b/cli/cmd/compose/convert.go index 10e577f4b..7a0360c60 100644 --- a/cli/cmd/compose/convert.go +++ b/cli/cmd/compose/convert.go @@ -23,7 +23,7 @@ import ( "github.com/compose-spec/compose-go/cli" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" ) func convertCommand() *cobra.Command { diff --git a/cli/cmd/compose/down.go b/cli/cmd/compose/down.go index a49d003d8..44281fa30 100644 --- a/cli/cmd/compose/down.go +++ b/cli/cmd/compose/down.go @@ -21,7 +21,7 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/progress" ) diff --git a/cli/cmd/compose/list.go b/cli/cmd/compose/list.go index ba71db247..03346f59f 100644 --- a/cli/cmd/compose/list.go +++ b/cli/cmd/compose/list.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" ) func listCommand() *cobra.Command { diff --git a/cli/cmd/compose/logs.go b/cli/cmd/compose/logs.go index de86e223f..e8e83ceef 100644 --- a/cli/cmd/compose/logs.go +++ b/cli/cmd/compose/logs.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" ) func logsCommand() *cobra.Command { diff --git a/cli/cmd/compose/ps.go b/cli/cmd/compose/ps.go index e52f80499..038f03123 100644 --- a/cli/cmd/compose/ps.go +++ b/cli/cmd/compose/ps.go @@ -26,7 +26,7 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" ) func psCommand() *cobra.Command { diff --git a/cli/cmd/compose/up.go b/cli/cmd/compose/up.go index f4f70da23..b1914128f 100644 --- a/cli/cmd/compose/up.go +++ b/cli/cmd/compose/up.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/progress" ) diff --git a/cli/cmd/context/create_aci.go b/cli/cmd/context/create_aci.go index 32ebb3e9c..ac07f8e4c 100644 --- a/cli/cmd/context/create_aci.go +++ b/cli/cmd/context/create_aci.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/docker/compose-cli/aci" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/errdefs" ) diff --git a/cli/cmd/context/create_ecs.go b/cli/cmd/context/create_ecs.go index 979b881c0..78fb62663 100644 --- a/cli/cmd/context/create_ecs.go +++ b/cli/cmd/context/create_ecs.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/ecs" "github.com/docker/compose-cli/errdefs" diff --git a/cli/cmd/exec.go b/cli/cmd/exec.go index 13644d126..7d09f2dd7 100644 --- a/cli/cmd/exec.go +++ b/cli/cmd/exec.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" - "github.com/docker/compose-cli/containers" + "github.com/docker/compose-cli/api/client" + "github.com/docker/compose-cli/api/containers" ) type execOpts struct { diff --git a/cli/cmd/inspect.go b/cli/cmd/inspect.go index 6eac9fb3b..7ffe50da6 100644 --- a/cli/cmd/inspect.go +++ b/cli/cmd/inspect.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/formatter" ) diff --git a/cli/cmd/kill.go b/cli/cmd/kill.go index 08c2c4f17..1eff1aabb 100644 --- a/cli/cmd/kill.go +++ b/cli/cmd/kill.go @@ -25,7 +25,7 @@ import ( "github.com/hashicorp/go-multierror" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/errdefs" ) diff --git a/cli/cmd/login/login.go b/cli/cmd/login/login.go index 90413ba70..11ca6eeb2 100644 --- a/cli/cmd/login/login.go +++ b/cli/cmd/login/login.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/cli/mobycli" - "github.com/docker/compose-cli/client" "github.com/docker/compose-cli/errdefs" ) diff --git a/cli/cmd/logout/azure.go b/cli/cmd/logout/azure.go index 6f7ee0b96..44d305c94 100644 --- a/cli/cmd/logout/azure.go +++ b/cli/cmd/logout/azure.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/errdefs" ) diff --git a/cli/cmd/logs.go b/cli/cmd/logs.go index 83e917b0c..dc478f4ee 100644 --- a/cli/cmd/logs.go +++ b/cli/cmd/logs.go @@ -25,8 +25,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" - "github.com/docker/compose-cli/containers" + "github.com/docker/compose-cli/api/client" + "github.com/docker/compose-cli/api/containers" ) type logsOpts struct { diff --git a/cli/cmd/ps.go b/cli/cmd/ps.go index 400fd1358..b918b6cd2 100644 --- a/cli/cmd/ps.go +++ b/cli/cmd/ps.go @@ -28,7 +28,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" formatter2 "github.com/docker/compose-cli/formatter" ) diff --git a/cli/cmd/rm.go b/cli/cmd/rm.go index f53bf6c58..f61f86dda 100644 --- a/cli/cmd/rm.go +++ b/cli/cmd/rm.go @@ -25,8 +25,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" - "github.com/docker/compose-cli/containers" + "github.com/docker/compose-cli/api/client" + "github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/errdefs" ) diff --git a/cli/cmd/run/run.go b/cli/cmd/run/run.go index 8a72c1a6d..a4283eba9 100644 --- a/cli/cmd/run/run.go +++ b/cli/cmd/run/run.go @@ -25,10 +25,10 @@ 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/api/client" "github.com/docker/compose-cli/cli/options/run" - "github.com/docker/compose-cli/client" "github.com/docker/compose-cli/progress" ) diff --git a/cli/cmd/secrets.go b/cli/cmd/secrets.go index 2351729f7..539fef93e 100644 --- a/cli/cmd/secrets.go +++ b/cli/cmd/secrets.go @@ -25,8 +25,8 @@ import ( "github.com/spf13/cobra" - "github.com/docker/compose-cli/client" - "github.com/docker/compose-cli/secrets" + "github.com/docker/compose-cli/api/client" + "github.com/docker/compose-cli/api/secrets" ) type createSecretOptions struct { diff --git a/cli/cmd/secrets_test.go b/cli/cmd/secrets_test.go index 162b63677..709681365 100644 --- a/cli/cmd/secrets_test.go +++ b/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) { diff --git a/cli/cmd/start.go b/cli/cmd/start.go index cb27abf5f..f65dd1d54 100644 --- a/cli/cmd/start.go +++ b/cli/cmd/start.go @@ -27,7 +27,7 @@ import ( "github.com/hashicorp/go-multierror" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" ) // StartCommand starts containers diff --git a/cli/cmd/stop.go b/cli/cmd/stop.go index e0003fd90..cbfeb3856 100644 --- a/cli/cmd/stop.go +++ b/cli/cmd/stop.go @@ -27,7 +27,7 @@ import ( "github.com/hashicorp/go-multierror" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" ) type stopOpts struct { diff --git a/cli/options/run/opts.go b/cli/options/run/opts.go index bc7e3e05b..91e68451b 100644 --- a/cli/options/run/opts.go +++ b/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" ) diff --git a/cli/options/run/opts_test.go b/cli/options/run/opts_test.go index 58a4bf03d..acf41c86c 100644 --- a/cli/options/run/opts_test.go +++ b/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 ( diff --git a/ecs/backend.go b/ecs/backend.go index f5ab5e496..ec18fe026 100644 --- a/ecs/backend.go +++ b/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 diff --git a/ecs/cloudformation.go b/ecs/cloudformation.go index 828032076..211838abf 100644 --- a/ecs/cloudformation.go +++ b/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" diff --git a/ecs/cloudformation_test.go b/ecs/cloudformation_test.go index 7f227564f..d3b457e40 100644 --- a/ecs/cloudformation_test.go +++ b/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" diff --git a/ecs/list.go b/ecs/list.go index cfe01ccc8..48873cd88 100644 --- a/ecs/list.go +++ b/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) { diff --git a/ecs/local/backend.go b/ecs/local/backend.go index 31633005a..1310cfec8 100644 --- a/ecs/local/backend.go +++ b/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" diff --git a/ecs/local/compose.go b/ecs/local/compose.go index c89db4883..bf80abcb9 100644 --- a/ecs/local/compose.go +++ b/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" diff --git a/ecs/ps.go b/ecs/ps.go index e1c643e04..eee44a93f 100644 --- a/ecs/ps.go +++ b/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) { diff --git a/ecs/sdk.go b/ecs/sdk.go index 8346ba169..426081c52 100644 --- a/ecs/sdk.go +++ b/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" diff --git a/ecs/secrets.go b/ecs/secrets.go index 03c8b8e74..662b10c96 100644 --- a/ecs/secrets.go +++ b/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) { diff --git a/example/backend.go b/example/backend.go index bc0d56467..2f9b420cf 100644 --- a/example/backend.go +++ b/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 { diff --git a/local/backend.go b/local/backend.go index 26b5c587b..63acaae60 100644 --- a/local/backend.go +++ b/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 { diff --git a/server/interceptor.go b/server/interceptor.go index ea3f3f8d1..aa6a8043d 100644 --- a/server/interceptor.go +++ b/server/interceptor.go @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/config" apicontext "github.com/docker/compose-cli/context" "github.com/docker/compose-cli/context/store" diff --git a/server/proxy/containers.go b/server/proxy/containers.go index dc3cc338e..1962be0bf 100644 --- a/server/proxy/containers.go +++ b/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" diff --git a/server/proxy/containers_test.go b/server/proxy/containers_test.go index 269be7231..035778544 100644 --- a/server/proxy/containers_test.go +++ b/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" ) diff --git a/server/proxy/proxy.go b/server/proxy/proxy.go index cac286739..4029f37c1 100644 --- a/server/proxy/proxy.go +++ b/server/proxy/proxy.go @@ -20,7 +20,7 @@ import ( "context" "sync" - "github.com/docker/compose-cli/client" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/config" containersv1 "github.com/docker/compose-cli/protos/containers/v1" contextsv1 "github.com/docker/compose-cli/protos/contexts/v1" diff --git a/tests/aci-e2e/e2e-aci_test.go b/tests/aci-e2e/e2e-aci_test.go index c16afeb74..13e32a496 100644 --- a/tests/aci-e2e/e2e-aci_test.go +++ b/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" diff --git a/tests/framework/e2e.go b/tests/framework/e2e.go index 8dc685e1c..91234fe53 100644 --- a/tests/framework/e2e.go +++ b/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 ( diff --git a/utils/formatter/container.go b/utils/formatter/container.go index 072c03e22..197a760ec 100644 --- a/utils/formatter/container.go +++ b/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 {