Merge pull request #151 from rumpl/feat-protos

Put all protos inside the `protos` package
This commit is contained in:
Djordje Lukic 2020-05-25 07:24:46 -07:00 committed by GitHub
commit 1304df2b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 548 additions and 535 deletions

View File

@ -23,8 +23,7 @@ ENV GO111MODULE=on
RUN apk update && apk add protoc make
RUN go get github.com/golang/protobuf/protoc-gen-go@v1.4.1 && \
go get golang.org/x/tools/cmd/goimports
RUN go get github.com/golang/protobuf/protoc-gen-go@v1.4.1
WORKDIR ${PWD}
ADD go.* ${PWD}
@ -53,7 +52,7 @@ RUN --mount=id=build,type=cache,target=/root/.cache/go-build \
make -f builder.Makefile cross
FROM scratch AS protos
COPY --from=make-protos /api .
COPY --from=make-protos /api/protos .
FROM scratch AS cli
COPY --from=make-cli /api/bin/* .

View File

@ -33,7 +33,7 @@ all: cli
protos: ## Generate go code from .proto files
@docker build . \
--output type=local,dest=. \
--output type=local,dest=./protos \
--target protos
cli: ## Compile the cli

View File

@ -26,7 +26,7 @@
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
PROTOS=$(shell find . -not \( -path ./tests -prune \) -name \*.proto)
PROTOS=$(shell find protos -name \*.proto)
EXTENSION :=
ifeq ($(GOOS),windows)
@ -44,7 +44,6 @@ all: cli
protos:
@protoc -I. --go_out=plugins=grpc,paths=source_relative:. ${PROTOS}
@goimports -w -local github.com/docker/api .
cli:
GOOS=${GOOS} GOARCH=${GOARCH} $(GO_BUILD) -o $(BINARY_WITH_EXTENSION) ./cli

View File

@ -6,9 +6,9 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
cliv1 "github.com/docker/api/cli/v1"
containersv1 "github.com/docker/api/containers/v1"
"github.com/docker/api/context/store"
cliv1 "github.com/docker/api/protos/cli/v1"
containersv1 "github.com/docker/api/protos/containers/v1"
"github.com/docker/api/server"
"github.com/docker/api/server/proxy"

2
go.mod
View File

@ -17,7 +17,7 @@ require (
github.com/compose-spec/compose-go v0.0.0-20200423124427-63dcf8c22cae
github.com/containerd/console v1.0.0
github.com/containerd/containerd v1.3.4 // indirect
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible
github.com/docker/go-connections v0.4.0
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee // indirect

View File

@ -28,21 +28,20 @@
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.2
// source: cli/v1/cli.proto
// source: protos/cli/v1/cli.proto
package v1
import (
context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@ -68,7 +67,7 @@ type Context struct {
func (x *Context) Reset() {
*x = Context{}
if protoimpl.UnsafeEnabled {
mi := &file_cli_v1_cli_proto_msgTypes[0]
mi := &file_protos_cli_v1_cli_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -81,7 +80,7 @@ func (x *Context) String() string {
func (*Context) ProtoMessage() {}
func (x *Context) ProtoReflect() protoreflect.Message {
mi := &file_cli_v1_cli_proto_msgTypes[0]
mi := &file_protos_cli_v1_cli_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -94,7 +93,7 @@ func (x *Context) ProtoReflect() protoreflect.Message {
// Deprecated: Use Context.ProtoReflect.Descriptor instead.
func (*Context) Descriptor() ([]byte, []int) {
return file_cli_v1_cli_proto_rawDescGZIP(), []int{0}
return file_protos_cli_v1_cli_proto_rawDescGZIP(), []int{0}
}
func (x *Context) GetName() string {
@ -120,7 +119,7 @@ type ContextsRequest struct {
func (x *ContextsRequest) Reset() {
*x = ContextsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cli_v1_cli_proto_msgTypes[1]
mi := &file_protos_cli_v1_cli_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -133,7 +132,7 @@ func (x *ContextsRequest) String() string {
func (*ContextsRequest) ProtoMessage() {}
func (x *ContextsRequest) ProtoReflect() protoreflect.Message {
mi := &file_cli_v1_cli_proto_msgTypes[1]
mi := &file_protos_cli_v1_cli_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -146,7 +145,7 @@ func (x *ContextsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ContextsRequest.ProtoReflect.Descriptor instead.
func (*ContextsRequest) Descriptor() ([]byte, []int) {
return file_cli_v1_cli_proto_rawDescGZIP(), []int{1}
return file_protos_cli_v1_cli_proto_rawDescGZIP(), []int{1}
}
type ContextsResponse struct {
@ -160,7 +159,7 @@ type ContextsResponse struct {
func (x *ContextsResponse) Reset() {
*x = ContextsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cli_v1_cli_proto_msgTypes[2]
mi := &file_protos_cli_v1_cli_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -173,7 +172,7 @@ func (x *ContextsResponse) String() string {
func (*ContextsResponse) ProtoMessage() {}
func (x *ContextsResponse) ProtoReflect() protoreflect.Message {
mi := &file_cli_v1_cli_proto_msgTypes[2]
mi := &file_protos_cli_v1_cli_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -186,7 +185,7 @@ func (x *ContextsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ContextsResponse.ProtoReflect.Descriptor instead.
func (*ContextsResponse) Descriptor() ([]byte, []int) {
return file_cli_v1_cli_proto_rawDescGZIP(), []int{2}
return file_protos_cli_v1_cli_proto_rawDescGZIP(), []int{2}
}
func (x *ContextsResponse) GetContexts() []*Context {
@ -196,55 +195,58 @@ func (x *ContextsResponse) GetContexts() []*Context {
return nil
}
var File_cli_v1_cli_proto protoreflect.FileDescriptor
var File_protos_cli_v1_cli_proto protoreflect.FileDescriptor
var file_cli_v1_cli_proto_rawDesc = []byte{
0x0a, 0x10, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a,
0x10, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x3a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x32, 0x62, 0x0a,
0x03, 0x43, 0x6c, 0x69, 0x12, 0x5b, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
0x12, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76,
0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_protos_cli_v1_cli_proto_rawDesc = []byte{
0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f,
0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65,
0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x78, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74,
0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x10, 0x43,
0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x41, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
0x74, 0x73, 0x32, 0x70, 0x0a, 0x03, 0x43, 0x6c, 0x69, 0x12, 0x69, 0x0a, 0x08, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b,
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6c,
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6c, 0x69,
0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_cli_v1_cli_proto_rawDescOnce sync.Once
file_cli_v1_cli_proto_rawDescData = file_cli_v1_cli_proto_rawDesc
file_protos_cli_v1_cli_proto_rawDescOnce sync.Once
file_protos_cli_v1_cli_proto_rawDescData = file_protos_cli_v1_cli_proto_rawDesc
)
func file_cli_v1_cli_proto_rawDescGZIP() []byte {
file_cli_v1_cli_proto_rawDescOnce.Do(func() {
file_cli_v1_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_cli_v1_cli_proto_rawDescData)
func file_protos_cli_v1_cli_proto_rawDescGZIP() []byte {
file_protos_cli_v1_cli_proto_rawDescOnce.Do(func() {
file_protos_cli_v1_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_cli_v1_cli_proto_rawDescData)
})
return file_cli_v1_cli_proto_rawDescData
return file_protos_cli_v1_cli_proto_rawDescData
}
var file_cli_v1_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_cli_v1_cli_proto_goTypes = []interface{}{
(*Context)(nil), // 0: com.docker.api.cli.v1.Context
(*ContextsRequest)(nil), // 1: com.docker.api.cli.v1.ContextsRequest
(*ContextsResponse)(nil), // 2: com.docker.api.cli.v1.ContextsResponse
var file_protos_cli_v1_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_protos_cli_v1_cli_proto_goTypes = []interface{}{
(*Context)(nil), // 0: com.docker.api.protos.cli.v1.Context
(*ContextsRequest)(nil), // 1: com.docker.api.protos.cli.v1.ContextsRequest
(*ContextsResponse)(nil), // 2: com.docker.api.protos.cli.v1.ContextsResponse
}
var file_cli_v1_cli_proto_depIdxs = []int32{
0, // 0: com.docker.api.cli.v1.ContextsResponse.contexts:type_name -> com.docker.api.cli.v1.Context
1, // 1: com.docker.api.cli.v1.Cli.Contexts:input_type -> com.docker.api.cli.v1.ContextsRequest
2, // 2: com.docker.api.cli.v1.Cli.Contexts:output_type -> com.docker.api.cli.v1.ContextsResponse
var file_protos_cli_v1_cli_proto_depIdxs = []int32{
0, // 0: com.docker.api.protos.cli.v1.ContextsResponse.contexts:type_name -> com.docker.api.protos.cli.v1.Context
1, // 1: com.docker.api.protos.cli.v1.Cli.Contexts:input_type -> com.docker.api.protos.cli.v1.ContextsRequest
2, // 2: com.docker.api.protos.cli.v1.Cli.Contexts:output_type -> com.docker.api.protos.cli.v1.ContextsResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
@ -252,13 +254,13 @@ var file_cli_v1_cli_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_cli_v1_cli_proto_init() }
func file_cli_v1_cli_proto_init() {
if File_cli_v1_cli_proto != nil {
func init() { file_protos_cli_v1_cli_proto_init() }
func file_protos_cli_v1_cli_proto_init() {
if File_protos_cli_v1_cli_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cli_v1_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_protos_cli_v1_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Context); i {
case 0:
return &v.state
@ -270,7 +272,7 @@ func file_cli_v1_cli_proto_init() {
return nil
}
}
file_cli_v1_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_protos_cli_v1_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContextsRequest); i {
case 0:
return &v.state
@ -282,7 +284,7 @@ func file_cli_v1_cli_proto_init() {
return nil
}
}
file_cli_v1_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_protos_cli_v1_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContextsResponse); i {
case 0:
return &v.state
@ -299,20 +301,20 @@ func file_cli_v1_cli_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cli_v1_cli_proto_rawDesc,
RawDescriptor: file_protos_cli_v1_cli_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_cli_v1_cli_proto_goTypes,
DependencyIndexes: file_cli_v1_cli_proto_depIdxs,
MessageInfos: file_cli_v1_cli_proto_msgTypes,
GoTypes: file_protos_cli_v1_cli_proto_goTypes,
DependencyIndexes: file_protos_cli_v1_cli_proto_depIdxs,
MessageInfos: file_protos_cli_v1_cli_proto_msgTypes,
}.Build()
File_cli_v1_cli_proto = out.File
file_cli_v1_cli_proto_rawDesc = nil
file_cli_v1_cli_proto_goTypes = nil
file_cli_v1_cli_proto_depIdxs = nil
File_protos_cli_v1_cli_proto = out.File
file_protos_cli_v1_cli_proto_rawDesc = nil
file_protos_cli_v1_cli_proto_goTypes = nil
file_protos_cli_v1_cli_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
@ -341,7 +343,7 @@ func NewCliClient(cc grpc.ClientConnInterface) CliClient {
func (c *cliClient) Contexts(ctx context.Context, in *ContextsRequest, opts ...grpc.CallOption) (*ContextsResponse, error) {
out := new(ContextsResponse)
err := c.cc.Invoke(ctx, "/com.docker.api.cli.v1.Cli/Contexts", in, out, opts...)
err := c.cc.Invoke(ctx, "/com.docker.api.protos.cli.v1.Cli/Contexts", in, out, opts...)
if err != nil {
return nil, err
}
@ -376,7 +378,7 @@ func _Cli_Contexts_Handler(srv interface{}, ctx context.Context, dec func(interf
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.docker.api.cli.v1.Cli/Contexts",
FullMethod: "/com.docker.api.protos.cli.v1.Cli/Contexts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CliServer).Contexts(ctx, req.(*ContextsRequest))
@ -385,7 +387,7 @@ func _Cli_Contexts_Handler(srv interface{}, ctx context.Context, dec func(interf
}
var _Cli_serviceDesc = grpc.ServiceDesc{
ServiceName: "com.docker.api.cli.v1.Cli",
ServiceName: "com.docker.api.protos.cli.v1.Cli",
HandlerType: (*CliServer)(nil),
Methods: []grpc.MethodDesc{
{
@ -394,5 +396,5 @@ var _Cli_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cli/v1/cli.proto",
Metadata: "protos/cli/v1/cli.proto",
}

View File

@ -27,9 +27,9 @@
syntax = "proto3";
package com.docker.api.cli.v1;
package com.docker.api.protos.cli.v1;
option go_package = "github.com/docker/api/cli/v1;v1";
option go_package = "github.com/docker/api/protos/cli/v1;v1";
service Cli {
// Returns the list of existing contexts

View File

@ -28,21 +28,20 @@
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.2
// source: compose/v1/compose.proto
// source: protos/compose/v1/compose.proto
package v1
import (
context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@ -69,7 +68,7 @@ type ComposeUpRequest struct {
func (x *ComposeUpRequest) Reset() {
*x = ComposeUpRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_compose_v1_compose_proto_msgTypes[0]
mi := &file_protos_compose_v1_compose_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -82,7 +81,7 @@ func (x *ComposeUpRequest) String() string {
func (*ComposeUpRequest) ProtoMessage() {}
func (x *ComposeUpRequest) ProtoReflect() protoreflect.Message {
mi := &file_compose_v1_compose_proto_msgTypes[0]
mi := &file_protos_compose_v1_compose_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -95,7 +94,7 @@ func (x *ComposeUpRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ComposeUpRequest.ProtoReflect.Descriptor instead.
func (*ComposeUpRequest) Descriptor() ([]byte, []int) {
return file_compose_v1_compose_proto_rawDescGZIP(), []int{0}
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{0}
}
func (x *ComposeUpRequest) GetProjectName() string {
@ -128,7 +127,7 @@ type ComposeUpResponse struct {
func (x *ComposeUpResponse) Reset() {
*x = ComposeUpResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_compose_v1_compose_proto_msgTypes[1]
mi := &file_protos_compose_v1_compose_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -141,7 +140,7 @@ func (x *ComposeUpResponse) String() string {
func (*ComposeUpResponse) ProtoMessage() {}
func (x *ComposeUpResponse) ProtoReflect() protoreflect.Message {
mi := &file_compose_v1_compose_proto_msgTypes[1]
mi := &file_protos_compose_v1_compose_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -154,7 +153,7 @@ func (x *ComposeUpResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ComposeUpResponse.ProtoReflect.Descriptor instead.
func (*ComposeUpResponse) Descriptor() ([]byte, []int) {
return file_compose_v1_compose_proto_rawDescGZIP(), []int{1}
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{1}
}
type ComposeDownRequest struct {
@ -166,7 +165,7 @@ type ComposeDownRequest struct {
func (x *ComposeDownRequest) Reset() {
*x = ComposeDownRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_compose_v1_compose_proto_msgTypes[2]
mi := &file_protos_compose_v1_compose_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -179,7 +178,7 @@ func (x *ComposeDownRequest) String() string {
func (*ComposeDownRequest) ProtoMessage() {}
func (x *ComposeDownRequest) ProtoReflect() protoreflect.Message {
mi := &file_compose_v1_compose_proto_msgTypes[2]
mi := &file_protos_compose_v1_compose_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -192,7 +191,7 @@ func (x *ComposeDownRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ComposeDownRequest.ProtoReflect.Descriptor instead.
func (*ComposeDownRequest) Descriptor() ([]byte, []int) {
return file_compose_v1_compose_proto_rawDescGZIP(), []int{2}
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{2}
}
type ComposeDownResponse struct {
@ -204,7 +203,7 @@ type ComposeDownResponse struct {
func (x *ComposeDownResponse) Reset() {
*x = ComposeDownResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_compose_v1_compose_proto_msgTypes[3]
mi := &file_protos_compose_v1_compose_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -217,7 +216,7 @@ func (x *ComposeDownResponse) String() string {
func (*ComposeDownResponse) ProtoMessage() {}
func (x *ComposeDownResponse) ProtoReflect() protoreflect.Message {
mi := &file_compose_v1_compose_proto_msgTypes[3]
mi := &file_protos_compose_v1_compose_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -230,68 +229,72 @@ func (x *ComposeDownResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ComposeDownResponse.ProtoReflect.Descriptor instead.
func (*ComposeDownResponse) Descriptor() ([]byte, []int) {
return file_compose_v1_compose_proto_rawDescGZIP(), []int{3}
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{3}
}
var File_compose_v1_compose_proto protoreflect.FileDescriptor
var File_protos_compose_v1_compose_proto protoreflect.FileDescriptor
var file_compose_v1_compose_proto_rawDesc = []byte{
0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x6d, 0x2e,
0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f,
0x73, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x64, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f,
0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77,
0x6f, 0x72, 0x6b, 0x44, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f,
0x72, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03,
0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x43,
0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x14, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd1, 0x01,
0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x02, 0x55, 0x70, 0x12,
0x2b, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70,
0x6f, 0x73, 0x65, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63,
0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x44, 0x6f,
0x77, 0x6e, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43,
0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f,
0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f,
0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_protos_compose_v1_compose_proto_rawDesc = []byte{
0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
0x2e, 0x76, 0x31, 0x22, 0x64, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x70,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65,
0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72,
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x6f, 0x72,
0x6b, 0x44, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b,
0x44, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14,
0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44,
0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xed, 0x01, 0x0a, 0x07,
0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x02, 0x55, 0x70, 0x12, 0x32, 0x2e,
0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x70, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x04, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x34,
0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x44,
0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70,
0x6f, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_compose_v1_compose_proto_rawDescOnce sync.Once
file_compose_v1_compose_proto_rawDescData = file_compose_v1_compose_proto_rawDesc
file_protos_compose_v1_compose_proto_rawDescOnce sync.Once
file_protos_compose_v1_compose_proto_rawDescData = file_protos_compose_v1_compose_proto_rawDesc
)
func file_compose_v1_compose_proto_rawDescGZIP() []byte {
file_compose_v1_compose_proto_rawDescOnce.Do(func() {
file_compose_v1_compose_proto_rawDescData = protoimpl.X.CompressGZIP(file_compose_v1_compose_proto_rawDescData)
func file_protos_compose_v1_compose_proto_rawDescGZIP() []byte {
file_protos_compose_v1_compose_proto_rawDescOnce.Do(func() {
file_protos_compose_v1_compose_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_compose_v1_compose_proto_rawDescData)
})
return file_compose_v1_compose_proto_rawDescData
return file_protos_compose_v1_compose_proto_rawDescData
}
var file_compose_v1_compose_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_compose_v1_compose_proto_goTypes = []interface{}{
(*ComposeUpRequest)(nil), // 0: com.docker.api.compose.v1.ComposeUpRequest
(*ComposeUpResponse)(nil), // 1: com.docker.api.compose.v1.ComposeUpResponse
(*ComposeDownRequest)(nil), // 2: com.docker.api.compose.v1.ComposeDownRequest
(*ComposeDownResponse)(nil), // 3: com.docker.api.compose.v1.ComposeDownResponse
var file_protos_compose_v1_compose_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_protos_compose_v1_compose_proto_goTypes = []interface{}{
(*ComposeUpRequest)(nil), // 0: com.docker.api.protos.compose.v1.ComposeUpRequest
(*ComposeUpResponse)(nil), // 1: com.docker.api.protos.compose.v1.ComposeUpResponse
(*ComposeDownRequest)(nil), // 2: com.docker.api.protos.compose.v1.ComposeDownRequest
(*ComposeDownResponse)(nil), // 3: com.docker.api.protos.compose.v1.ComposeDownResponse
}
var file_compose_v1_compose_proto_depIdxs = []int32{
0, // 0: com.docker.api.compose.v1.Compose.Up:input_type -> com.docker.api.compose.v1.ComposeUpRequest
2, // 1: com.docker.api.compose.v1.Compose.Down:input_type -> com.docker.api.compose.v1.ComposeDownRequest
1, // 2: com.docker.api.compose.v1.Compose.Up:output_type -> com.docker.api.compose.v1.ComposeUpResponse
3, // 3: com.docker.api.compose.v1.Compose.Down:output_type -> com.docker.api.compose.v1.ComposeDownResponse
var file_protos_compose_v1_compose_proto_depIdxs = []int32{
0, // 0: com.docker.api.protos.compose.v1.Compose.Up:input_type -> com.docker.api.protos.compose.v1.ComposeUpRequest
2, // 1: com.docker.api.protos.compose.v1.Compose.Down:input_type -> com.docker.api.protos.compose.v1.ComposeDownRequest
1, // 2: com.docker.api.protos.compose.v1.Compose.Up:output_type -> com.docker.api.protos.compose.v1.ComposeUpResponse
3, // 3: com.docker.api.protos.compose.v1.Compose.Down:output_type -> com.docker.api.protos.compose.v1.ComposeDownResponse
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
@ -299,13 +302,13 @@ var file_compose_v1_compose_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_compose_v1_compose_proto_init() }
func file_compose_v1_compose_proto_init() {
if File_compose_v1_compose_proto != nil {
func init() { file_protos_compose_v1_compose_proto_init() }
func file_protos_compose_v1_compose_proto_init() {
if File_protos_compose_v1_compose_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_compose_v1_compose_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_protos_compose_v1_compose_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeUpRequest); i {
case 0:
return &v.state
@ -317,7 +320,7 @@ func file_compose_v1_compose_proto_init() {
return nil
}
}
file_compose_v1_compose_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_protos_compose_v1_compose_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeUpResponse); i {
case 0:
return &v.state
@ -329,7 +332,7 @@ func file_compose_v1_compose_proto_init() {
return nil
}
}
file_compose_v1_compose_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_protos_compose_v1_compose_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeDownRequest); i {
case 0:
return &v.state
@ -341,7 +344,7 @@ func file_compose_v1_compose_proto_init() {
return nil
}
}
file_compose_v1_compose_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_protos_compose_v1_compose_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeDownResponse); i {
case 0:
return &v.state
@ -358,20 +361,20 @@ func file_compose_v1_compose_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_compose_v1_compose_proto_rawDesc,
RawDescriptor: file_protos_compose_v1_compose_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_compose_v1_compose_proto_goTypes,
DependencyIndexes: file_compose_v1_compose_proto_depIdxs,
MessageInfos: file_compose_v1_compose_proto_msgTypes,
GoTypes: file_protos_compose_v1_compose_proto_goTypes,
DependencyIndexes: file_protos_compose_v1_compose_proto_depIdxs,
MessageInfos: file_protos_compose_v1_compose_proto_msgTypes,
}.Build()
File_compose_v1_compose_proto = out.File
file_compose_v1_compose_proto_rawDesc = nil
file_compose_v1_compose_proto_goTypes = nil
file_compose_v1_compose_proto_depIdxs = nil
File_protos_compose_v1_compose_proto = out.File
file_protos_compose_v1_compose_proto_rawDesc = nil
file_protos_compose_v1_compose_proto_goTypes = nil
file_protos_compose_v1_compose_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
@ -400,7 +403,7 @@ func NewComposeClient(cc grpc.ClientConnInterface) ComposeClient {
func (c *composeClient) Up(ctx context.Context, in *ComposeUpRequest, opts ...grpc.CallOption) (*ComposeUpResponse, error) {
out := new(ComposeUpResponse)
err := c.cc.Invoke(ctx, "/com.docker.api.compose.v1.Compose/Up", in, out, opts...)
err := c.cc.Invoke(ctx, "/com.docker.api.protos.compose.v1.Compose/Up", in, out, opts...)
if err != nil {
return nil, err
}
@ -409,7 +412,7 @@ func (c *composeClient) Up(ctx context.Context, in *ComposeUpRequest, opts ...gr
func (c *composeClient) Down(ctx context.Context, in *ComposeDownRequest, opts ...grpc.CallOption) (*ComposeDownResponse, error) {
out := new(ComposeDownResponse)
err := c.cc.Invoke(ctx, "/com.docker.api.compose.v1.Compose/Down", in, out, opts...)
err := c.cc.Invoke(ctx, "/com.docker.api.protos.compose.v1.Compose/Down", in, out, opts...)
if err != nil {
return nil, err
}
@ -447,7 +450,7 @@ func _Compose_Up_Handler(srv interface{}, ctx context.Context, dec func(interfac
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.docker.api.compose.v1.Compose/Up",
FullMethod: "/com.docker.api.protos.compose.v1.Compose/Up",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ComposeServer).Up(ctx, req.(*ComposeUpRequest))
@ -465,7 +468,7 @@ func _Compose_Down_Handler(srv interface{}, ctx context.Context, dec func(interf
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.docker.api.compose.v1.Compose/Down",
FullMethod: "/com.docker.api.protos.compose.v1.Compose/Down",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ComposeServer).Down(ctx, req.(*ComposeDownRequest))
@ -474,7 +477,7 @@ func _Compose_Down_Handler(srv interface{}, ctx context.Context, dec func(interf
}
var _Compose_serviceDesc = grpc.ServiceDesc{
ServiceName: "com.docker.api.compose.v1.Compose",
ServiceName: "com.docker.api.protos.compose.v1.Compose",
HandlerType: (*ComposeServer)(nil),
Methods: []grpc.MethodDesc{
{
@ -487,5 +490,5 @@ var _Compose_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "compose/v1/compose.proto",
Metadata: "protos/compose/v1/compose.proto",
}

View File

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

View File

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

View File

@ -4,7 +4,7 @@ import (
"context"
"github.com/docker/api/containers"
v1 "github.com/docker/api/containers/v1"
v1 "github.com/docker/api/protos/containers/v1"
)
// NewContainerAPI creates a proxy container server

View File

@ -3,7 +3,7 @@ package proxy
import (
"io"
v1 "github.com/docker/api/containers/v1"
v1 "github.com/docker/api/protos/containers/v1"
)
type streamWriter struct {

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/metadata"
v1 "github.com/docker/api/containers/v1"
v1 "github.com/docker/api/protos/containers/v1"
)
type logServer struct {

View File

@ -1,16 +1,16 @@
node_modules/.bin/grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:./grpc \
--grpc_out=generate_package_definition:./grpc \
-I ../../cli/v1 \
-I ../../containers/v1 \
../../cli/v1/*.proto \
../../containers/v1/*.proto
-I ../../protos/cli/v1 \
-I ../../protos/containers/v1 \
../../protos/cli/v1/*.proto \
../../protos/containers/v1/*.proto
# generate d.ts codes
protoc \
--plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
--ts_out=generate_package_definition:./grpc \
-I ../../cli/v1 \
-I ../../containers/v1 \
../../cli/v1/*.proto \
../../containers/v1/*.proto
-I ../../protos/cli/v1 \
-I ../../protos/containers/v1 \
../../protos/cli/v1/*.proto \
../../protos/containers/v1/*.proto

View File

@ -5,7 +5,7 @@ import { ListRequest, ListResponse } from "./grpc/containers_pb";
let address = process.argv[3] || "unix:///tmp/backend.sock";
const ContainersServiceClient = grpc.makeClientConstructor(
continersPb["com.docker.api.containers.v1.Containers"],
continersPb["com.docker.api.protos.containers.v1.Containers"],
"ContainersClient"
);
const client = (new ContainersServiceClient(