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/spf13/cobra"
"github.com/docker/compose-cli/cli/server" "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" "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 { type serveOpts struct {

View File

@ -34,13 +34,13 @@ import (
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/cli/metrics" "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/cli/server/proxy"
"github.com/docker/compose-cli/errdefs" "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) { func TestAllMethodsHaveCorrespondingCliCommand(t *testing.T) {

View File

@ -17,7 +17,7 @@ syntax = "proto3";
package com.docker.api.protos.compose.v1; 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 { service Compose {
rpc Up(ComposeUpRequest) returns (ComposeUpResponse); rpc Up(ComposeUpRequest) returns (ComposeUpResponse);

View File

@ -17,7 +17,7 @@ syntax = "proto3";
package com.docker.api.protos.containers.v1; 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 { service Containers {
rpc List(ListRequest) returns (ListResponse); rpc List(ListRequest) returns (ListResponse);

View File

@ -17,7 +17,7 @@ syntax = "proto3";
package com.docker.api.protos.context.v1; 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 { service Contexts {
// Sets the current request for all calls // 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"; 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 { service Streaming {
rpc NewStream(stream google.protobuf.Any) returns (stream google.protobuf.Any); 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"; 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 { service Volumes {
rpc VolumesCreate(VolumesCreateRequest) returns (VolumesCreateResponse); 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/cli"
"github.com/compose-spec/compose-go/types" "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) { 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" specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/docker/compose-cli/api/containers" "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/cli/server/proxy/streams"
"github.com/docker/compose-cli/formatter" "github.com/docker/compose-cli/formatter"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
) )
func portsToGrpc(ports []containers.Port) []*containersv1.Port { func portsToGrpc(ports []containers.Port) []*containersv1.Port {

View File

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

View File

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

View File

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

View File

@ -21,13 +21,13 @@ import (
"sync" "sync"
"github.com/docker/compose-cli/api/client" "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/cli/server/proxy/streams"
"github.com/docker/compose-cli/config" "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{} type clientKey struct{}

View File

@ -21,8 +21,8 @@ import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"google.golang.org/grpc/metadata" "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" "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 { func (p *proxy) NewStream(stream streamsv1.Streaming_NewStreamServer) error {

View File

@ -19,7 +19,7 @@ package streams
import ( import (
"github.com/golang/protobuf/ptypes" "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 // IO implements an io.ReadWriter that forwards everything to the stream

View File

@ -21,7 +21,7 @@ import (
"google.golang.org/grpc" "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 // 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"
"gotest.tools/v3/assert/cmp" "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 { type logServer struct {

View File

@ -19,7 +19,7 @@ package streams
import ( import (
"sync" "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 // Stream is a bidirectional stream for container IO

View File

@ -29,7 +29,7 @@ import (
"gotest.tools/v3/assert" "gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp" "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 { type byteStream struct {

View File

@ -21,7 +21,7 @@ import (
"github.com/docker/compose-cli/aci" "github.com/docker/compose-cli/aci"
"github.com/docker/compose-cli/api/volumes" "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. // VolumesCreate creates a volume.