Move protos => cli/server/

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2021-01-15 15:49:44 +01:00
parent 6a8b344885
commit deb7bc34e0
28 changed files with 32 additions and 32 deletions

View File

@ -24,12 +24,12 @@ import (
"github.com/spf13/cobra"
"github.com/docker/compose-cli/cli/server"
composev1 "github.com/docker/compose-cli/cli/server/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
volumesv1 "github.com/docker/compose-cli/cli/server/protos/volumes/v1"
"github.com/docker/compose-cli/cli/server/proxy"
composev1 "github.com/docker/compose-cli/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
volumesv1 "github.com/docker/compose-cli/protos/volumes/v1"
)
type serveOpts struct {

View File

@ -34,13 +34,13 @@ import (
"github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/cli/metrics"
composev1 "github.com/docker/compose-cli/cli/server/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
volumesv1 "github.com/docker/compose-cli/cli/server/protos/volumes/v1"
"github.com/docker/compose-cli/cli/server/proxy"
"github.com/docker/compose-cli/errdefs"
composev1 "github.com/docker/compose-cli/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
volumesv1 "github.com/docker/compose-cli/protos/volumes/v1"
)
func TestAllMethodsHaveCorrespondingCliCommand(t *testing.T) {

View File

@ -17,7 +17,7 @@ syntax = "proto3";
package com.docker.api.protos.compose.v1;
option go_package = "github.com/docker/compose-cli/protos/compose/v1;v1";
option go_package = "github.com/docker/compose-cli/cli/server/protos/compose/v1;v1";
service Compose {
rpc Up(ComposeUpRequest) returns (ComposeUpResponse);

View File

@ -17,7 +17,7 @@ syntax = "proto3";
package com.docker.api.protos.containers.v1;
option go_package = "github.com/docker/compose-cli/protos/containers/v1;v1";
option go_package = "github.com/docker/compose-cli/cli/server/protos/containers/v1;v1";
service Containers {
rpc List(ListRequest) returns (ListResponse);

View File

@ -17,7 +17,7 @@ syntax = "proto3";
package com.docker.api.protos.context.v1;
option go_package = "github.com/docker/compose-cli/protos/context/v1;v1";
option go_package = "github.com/docker/compose-cli/cli/server/protos/context/v1;v1";
service Contexts {
// Sets the current request for all calls

View File

@ -19,7 +19,7 @@ package com.docker.api.protos.streams.v1;
import "google/protobuf/any.proto";
option go_package = "github.com/docker/compose-cli/protos/streams/v1;v1";
option go_package = "github.com/docker/compose-cli/cli/server/protos/streams/v1;v1";
service Streaming {
rpc NewStream(stream google.protobuf.Any) returns (stream google.protobuf.Any);

View File

@ -19,7 +19,7 @@ package com.docker.api.protos.volumes.v1;
import "google/protobuf/any.proto";
option go_package = "github.com/docker/compose-cli/protos/volumes/v1;v1";
option go_package = "github.com/docker/compose-cli/cli/server/protos/volumes/v1;v1";
service Volumes {
rpc VolumesCreate(VolumesCreateRequest) returns (VolumesCreateResponse);

View File

@ -24,7 +24,7 @@ import (
"github.com/compose-spec/compose-go/cli"
"github.com/compose-spec/compose-go/types"
composev1 "github.com/docker/compose-cli/protos/compose/v1"
composev1 "github.com/docker/compose-cli/cli/server/protos/compose/v1"
)
func (p *proxy) Up(ctx context.Context, request *composev1.ComposeUpRequest) (*composev1.ComposeUpResponse, error) {

View File

@ -25,9 +25,9 @@ import (
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/docker/compose-cli/api/containers"
containersv1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
"github.com/docker/compose-cli/cli/server/proxy/streams"
"github.com/docker/compose-cli/formatter"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
)
func portsToGrpc(ports []containers.Port) []*containersv1.Port {

View File

@ -22,8 +22,8 @@ import (
"gotest.tools/v3/assert"
"github.com/docker/compose-cli/api/containers"
containersv1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
"github.com/docker/compose-cli/formatter"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
)
func TestGrpcContainerToContainerConfig(t *testing.T) {

View File

@ -19,9 +19,9 @@ package proxy
import (
"context"
contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1"
"github.com/docker/compose-cli/config"
"github.com/docker/compose-cli/context/store"
contextsv1 "github.com/docker/compose-cli/protos/contexts/v1"
)
type contextsProxy struct {

View File

@ -21,8 +21,8 @@ import (
"gotest.tools/v3/assert"
contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1"
"github.com/docker/compose-cli/context/store"
contextsv1 "github.com/docker/compose-cli/protos/contexts/v1"
"github.com/google/go-cmp/cmp/cmpopts"
)

View File

@ -21,13 +21,13 @@ import (
"sync"
"github.com/docker/compose-cli/api/client"
composev1 "github.com/docker/compose-cli/cli/server/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
volumesv1 "github.com/docker/compose-cli/cli/server/protos/volumes/v1"
"github.com/docker/compose-cli/cli/server/proxy/streams"
"github.com/docker/compose-cli/config"
composev1 "github.com/docker/compose-cli/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
volumesv1 "github.com/docker/compose-cli/protos/volumes/v1"
)
type clientKey struct{}

View File

@ -21,8 +21,8 @@ import (
"github.com/sirupsen/logrus"
"google.golang.org/grpc/metadata"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
"github.com/docker/compose-cli/cli/server/proxy/streams"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
)
func (p *proxy) NewStream(stream streamsv1.Streaming_NewStreamServer) error {

View File

@ -19,7 +19,7 @@ package streams
import (
"github.com/golang/protobuf/ptypes"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
)
// IO implements an io.ReadWriter that forwards everything to the stream

View File

@ -21,7 +21,7 @@ import (
"google.golang.org/grpc"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
containersv1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
)
// Log implements an io.Writer that proxies logs over a gRPC stream

View File

@ -24,7 +24,7 @@ import (
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
v1 "github.com/docker/compose-cli/protos/containers/v1"
v1 "github.com/docker/compose-cli/cli/server/protos/containers/v1"
)
type logServer struct {

View File

@ -19,7 +19,7 @@ package streams
import (
"sync"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
)
// Stream is a bidirectional stream for container IO

View File

@ -29,7 +29,7 @@ import (
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
streamsv1 "github.com/docker/compose-cli/cli/server/protos/streams/v1"
)
type byteStream struct {

View File

@ -21,7 +21,7 @@ import (
"github.com/docker/compose-cli/aci"
"github.com/docker/compose-cli/api/volumes"
volumesv1 "github.com/docker/compose-cli/protos/volumes/v1"
volumesv1 "github.com/docker/compose-cli/cli/server/protos/volumes/v1"
)
// VolumesCreate creates a volume.