Merge pull request #916 from gtardif/fix_compose_protos

Fix proto message names for ComposeStacks() input / output ; same for ComposeServices()
This commit is contained in:
Chris Crone 2020-11-17 11:02:46 +01:00 committed by GitHub
commit 367fbf35c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 119 additions and 117 deletions

View File

@ -264,7 +264,7 @@ func (x *ComposeDownResponse) GetProjectName() string {
return ""
}
type ComposeListRequest struct {
type ComposeStacksRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -272,8 +272,8 @@ type ComposeListRequest struct {
ProjectName string `protobuf:"bytes,1,opt,name=projectName,proto3" json:"projectName,omitempty"`
}
func (x *ComposeListRequest) Reset() {
*x = ComposeListRequest{}
func (x *ComposeStacksRequest) Reset() {
*x = ComposeStacksRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_protos_compose_v1_compose_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -281,13 +281,13 @@ func (x *ComposeListRequest) Reset() {
}
}
func (x *ComposeListRequest) String() string {
func (x *ComposeStacksRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeListRequest) ProtoMessage() {}
func (*ComposeStacksRequest) ProtoMessage() {}
func (x *ComposeListRequest) ProtoReflect() protoreflect.Message {
func (x *ComposeStacksRequest) ProtoReflect() protoreflect.Message {
mi := &file_protos_compose_v1_compose_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -299,19 +299,19 @@ func (x *ComposeListRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use ComposeListRequest.ProtoReflect.Descriptor instead.
func (*ComposeListRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use ComposeStacksRequest.ProtoReflect.Descriptor instead.
func (*ComposeStacksRequest) Descriptor() ([]byte, []int) {
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{4}
}
func (x *ComposeListRequest) GetProjectName() string {
func (x *ComposeStacksRequest) GetProjectName() string {
if x != nil {
return x.ProjectName
}
return ""
}
type ComposeListResponse struct {
type ComposeStacksResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -319,8 +319,8 @@ type ComposeListResponse struct {
Stacks []*Stack `protobuf:"bytes,1,rep,name=stacks,proto3" json:"stacks,omitempty"`
}
func (x *ComposeListResponse) Reset() {
*x = ComposeListResponse{}
func (x *ComposeStacksResponse) Reset() {
*x = ComposeStacksResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_protos_compose_v1_compose_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -328,13 +328,13 @@ func (x *ComposeListResponse) Reset() {
}
}
func (x *ComposeListResponse) String() string {
func (x *ComposeStacksResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeListResponse) ProtoMessage() {}
func (*ComposeStacksResponse) ProtoMessage() {}
func (x *ComposeListResponse) ProtoReflect() protoreflect.Message {
func (x *ComposeStacksResponse) ProtoReflect() protoreflect.Message {
mi := &file_protos_compose_v1_compose_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -346,12 +346,12 @@ func (x *ComposeListResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use ComposeListResponse.ProtoReflect.Descriptor instead.
func (*ComposeListResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use ComposeStacksResponse.ProtoReflect.Descriptor instead.
func (*ComposeStacksResponse) Descriptor() ([]byte, []int) {
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{5}
}
func (x *ComposeListResponse) GetStacks() []*Stack {
func (x *ComposeStacksResponse) GetStacks() []*Stack {
if x != nil {
return x.Stacks
}
@ -429,7 +429,7 @@ func (x *Stack) GetReason() string {
return ""
}
type ComposePsRequest struct {
type ComposeServicesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -439,8 +439,8 @@ type ComposePsRequest struct {
Files []string `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
}
func (x *ComposePsRequest) Reset() {
*x = ComposePsRequest{}
func (x *ComposeServicesRequest) Reset() {
*x = ComposeServicesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_protos_compose_v1_compose_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -448,13 +448,13 @@ func (x *ComposePsRequest) Reset() {
}
}
func (x *ComposePsRequest) String() string {
func (x *ComposeServicesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposePsRequest) ProtoMessage() {}
func (*ComposeServicesRequest) ProtoMessage() {}
func (x *ComposePsRequest) ProtoReflect() protoreflect.Message {
func (x *ComposeServicesRequest) ProtoReflect() protoreflect.Message {
mi := &file_protos_compose_v1_compose_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -466,33 +466,33 @@ func (x *ComposePsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use ComposePsRequest.ProtoReflect.Descriptor instead.
func (*ComposePsRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use ComposeServicesRequest.ProtoReflect.Descriptor instead.
func (*ComposeServicesRequest) Descriptor() ([]byte, []int) {
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{7}
}
func (x *ComposePsRequest) GetProjectName() string {
func (x *ComposeServicesRequest) GetProjectName() string {
if x != nil {
return x.ProjectName
}
return ""
}
func (x *ComposePsRequest) GetWorkDir() string {
func (x *ComposeServicesRequest) GetWorkDir() string {
if x != nil {
return x.WorkDir
}
return ""
}
func (x *ComposePsRequest) GetFiles() []string {
func (x *ComposeServicesRequest) GetFiles() []string {
if x != nil {
return x.Files
}
return nil
}
type ComposePsResponse struct {
type ComposeServicesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -500,8 +500,8 @@ type ComposePsResponse struct {
Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
}
func (x *ComposePsResponse) Reset() {
*x = ComposePsResponse{}
func (x *ComposeServicesResponse) Reset() {
*x = ComposeServicesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_protos_compose_v1_compose_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -509,13 +509,13 @@ func (x *ComposePsResponse) Reset() {
}
}
func (x *ComposePsResponse) String() string {
func (x *ComposeServicesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposePsResponse) ProtoMessage() {}
func (*ComposeServicesResponse) ProtoMessage() {}
func (x *ComposePsResponse) ProtoReflect() protoreflect.Message {
func (x *ComposeServicesResponse) ProtoReflect() protoreflect.Message {
mi := &file_protos_compose_v1_compose_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -527,12 +527,12 @@ func (x *ComposePsResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use ComposePsResponse.ProtoReflect.Descriptor instead.
func (*ComposePsResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use ComposeServicesResponse.ProtoReflect.Descriptor instead.
func (*ComposeServicesResponse) Descriptor() ([]byte, []int) {
return file_protos_compose_v1_compose_proto_rawDescGZIP(), []int{8}
}
func (x *ComposePsResponse) GetServices() []*Service {
func (x *ComposeServicesResponse) GetServices() []*Service {
if x != nil {
return x.Services
}
@ -645,28 +645,29 @@ var file_protos_compose_v1_compose_proto_rawDesc = []byte{
0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x22, 0x36, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74,
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, 0x22, 0x56, 0x0a, 0x13, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x27, 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, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x06, 0x73, 0x74, 0x61, 0x63, 0x6b,
0x73, 0x22, 0x5b, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x64,
0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x50, 0x73, 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, 0x5a, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x50,
0x65, 0x22, 0x38, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x53, 0x74, 0x61, 0x63,
0x6b, 0x73, 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, 0x22, 0x58, 0x0a, 0x15, 0x43,
0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 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, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x06, 0x73,
0x74, 0x61, 0x63, 0x6b, 0x73, 0x22, 0x5b, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73,
0x6f, 0x6e, 0x22, 0x6a, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 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, 0x60,
0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f,
0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f,
@ -679,7 +680,7 @@ var file_protos_compose_v1_compose_proto_rawDesc = []byte{
0x0d, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64,
0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x64, 0x65,
0x73, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05,
0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x32, 0xd9, 0x03, 0x0a, 0x07,
0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x32, 0xe9, 0x03, 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,
@ -694,21 +695,22 @@ var file_protos_compose_v1_compose_proto_rawDesc = []byte{
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, 0x12, 0x75, 0x0a, 0x06, 0x53,
0x74, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b,
0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x06, 0x53,
0x74, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x36, 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,
0x4c, 0x69, 0x73, 0x74, 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, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x73, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 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, 0x50, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e,
0x53, 0x74, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x12, 0x38, 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, 0x50, 0x73, 0x52,
0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 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, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f,
@ -730,28 +732,28 @@ func file_protos_compose_v1_compose_proto_rawDescGZIP() []byte {
var file_protos_compose_v1_compose_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
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
(*ComposeListRequest)(nil), // 4: com.docker.api.protos.compose.v1.ComposeListRequest
(*ComposeListResponse)(nil), // 5: com.docker.api.protos.compose.v1.ComposeListResponse
(*Stack)(nil), // 6: com.docker.api.protos.compose.v1.Stack
(*ComposePsRequest)(nil), // 7: com.docker.api.protos.compose.v1.ComposePsRequest
(*ComposePsResponse)(nil), // 8: com.docker.api.protos.compose.v1.ComposePsResponse
(*Service)(nil), // 9: com.docker.api.protos.compose.v1.Service
(*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
(*ComposeStacksRequest)(nil), // 4: com.docker.api.protos.compose.v1.ComposeStacksRequest
(*ComposeStacksResponse)(nil), // 5: com.docker.api.protos.compose.v1.ComposeStacksResponse
(*Stack)(nil), // 6: com.docker.api.protos.compose.v1.Stack
(*ComposeServicesRequest)(nil), // 7: com.docker.api.protos.compose.v1.ComposeServicesRequest
(*ComposeServicesResponse)(nil), // 8: com.docker.api.protos.compose.v1.ComposeServicesResponse
(*Service)(nil), // 9: com.docker.api.protos.compose.v1.Service
}
var file_protos_compose_v1_compose_proto_depIdxs = []int32{
6, // 0: com.docker.api.protos.compose.v1.ComposeListResponse.stacks:type_name -> com.docker.api.protos.compose.v1.Stack
9, // 1: com.docker.api.protos.compose.v1.ComposePsResponse.services:type_name -> com.docker.api.protos.compose.v1.Service
6, // 0: com.docker.api.protos.compose.v1.ComposeStacksResponse.stacks:type_name -> com.docker.api.protos.compose.v1.Stack
9, // 1: com.docker.api.protos.compose.v1.ComposeServicesResponse.services:type_name -> com.docker.api.protos.compose.v1.Service
0, // 2: com.docker.api.protos.compose.v1.Compose.Up:input_type -> com.docker.api.protos.compose.v1.ComposeUpRequest
2, // 3: com.docker.api.protos.compose.v1.Compose.Down:input_type -> com.docker.api.protos.compose.v1.ComposeDownRequest
4, // 4: com.docker.api.protos.compose.v1.Compose.Stacks:input_type -> com.docker.api.protos.compose.v1.ComposeListRequest
7, // 5: com.docker.api.protos.compose.v1.Compose.Services:input_type -> com.docker.api.protos.compose.v1.ComposePsRequest
4, // 4: com.docker.api.protos.compose.v1.Compose.Stacks:input_type -> com.docker.api.protos.compose.v1.ComposeStacksRequest
7, // 5: com.docker.api.protos.compose.v1.Compose.Services:input_type -> com.docker.api.protos.compose.v1.ComposeServicesRequest
1, // 6: com.docker.api.protos.compose.v1.Compose.Up:output_type -> com.docker.api.protos.compose.v1.ComposeUpResponse
3, // 7: com.docker.api.protos.compose.v1.Compose.Down:output_type -> com.docker.api.protos.compose.v1.ComposeDownResponse
5, // 8: com.docker.api.protos.compose.v1.Compose.Stacks:output_type -> com.docker.api.protos.compose.v1.ComposeListResponse
8, // 9: com.docker.api.protos.compose.v1.Compose.Services:output_type -> com.docker.api.protos.compose.v1.ComposePsResponse
5, // 8: com.docker.api.protos.compose.v1.Compose.Stacks:output_type -> com.docker.api.protos.compose.v1.ComposeStacksResponse
8, // 9: com.docker.api.protos.compose.v1.Compose.Services:output_type -> com.docker.api.protos.compose.v1.ComposeServicesResponse
6, // [6:10] is the sub-list for method output_type
2, // [2:6] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@ -814,7 +816,7 @@ func file_protos_compose_v1_compose_proto_init() {
}
}
file_protos_compose_v1_compose_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeListRequest); i {
switch v := v.(*ComposeStacksRequest); i {
case 0:
return &v.state
case 1:
@ -826,7 +828,7 @@ func file_protos_compose_v1_compose_proto_init() {
}
}
file_protos_compose_v1_compose_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeListResponse); i {
switch v := v.(*ComposeStacksResponse); i {
case 0:
return &v.state
case 1:
@ -850,7 +852,7 @@ func file_protos_compose_v1_compose_proto_init() {
}
}
file_protos_compose_v1_compose_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposePsRequest); i {
switch v := v.(*ComposeServicesRequest); i {
case 0:
return &v.state
case 1:
@ -862,7 +864,7 @@ func file_protos_compose_v1_compose_proto_init() {
}
}
file_protos_compose_v1_compose_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposePsResponse); i {
switch v := v.(*ComposeServicesResponse); i {
case 0:
return &v.state
case 1:
@ -920,8 +922,8 @@ const _ = grpc.SupportPackageIsVersion6
type ComposeClient interface {
Up(ctx context.Context, in *ComposeUpRequest, opts ...grpc.CallOption) (*ComposeUpResponse, error)
Down(ctx context.Context, in *ComposeDownRequest, opts ...grpc.CallOption) (*ComposeDownResponse, error)
Stacks(ctx context.Context, in *ComposeListRequest, opts ...grpc.CallOption) (*ComposeListResponse, error)
Services(ctx context.Context, in *ComposePsRequest, opts ...grpc.CallOption) (*ComposePsResponse, error)
Stacks(ctx context.Context, in *ComposeStacksRequest, opts ...grpc.CallOption) (*ComposeStacksResponse, error)
Services(ctx context.Context, in *ComposeServicesRequest, opts ...grpc.CallOption) (*ComposeServicesResponse, error)
}
type composeClient struct {
@ -950,8 +952,8 @@ func (c *composeClient) Down(ctx context.Context, in *ComposeDownRequest, opts .
return out, nil
}
func (c *composeClient) Stacks(ctx context.Context, in *ComposeListRequest, opts ...grpc.CallOption) (*ComposeListResponse, error) {
out := new(ComposeListResponse)
func (c *composeClient) Stacks(ctx context.Context, in *ComposeStacksRequest, opts ...grpc.CallOption) (*ComposeStacksResponse, error) {
out := new(ComposeStacksResponse)
err := c.cc.Invoke(ctx, "/com.docker.api.protos.compose.v1.Compose/Stacks", in, out, opts...)
if err != nil {
return nil, err
@ -959,8 +961,8 @@ func (c *composeClient) Stacks(ctx context.Context, in *ComposeListRequest, opts
return out, nil
}
func (c *composeClient) Services(ctx context.Context, in *ComposePsRequest, opts ...grpc.CallOption) (*ComposePsResponse, error) {
out := new(ComposePsResponse)
func (c *composeClient) Services(ctx context.Context, in *ComposeServicesRequest, opts ...grpc.CallOption) (*ComposeServicesResponse, error) {
out := new(ComposeServicesResponse)
err := c.cc.Invoke(ctx, "/com.docker.api.protos.compose.v1.Compose/Services", in, out, opts...)
if err != nil {
return nil, err
@ -972,8 +974,8 @@ func (c *composeClient) Services(ctx context.Context, in *ComposePsRequest, opts
type ComposeServer interface {
Up(context.Context, *ComposeUpRequest) (*ComposeUpResponse, error)
Down(context.Context, *ComposeDownRequest) (*ComposeDownResponse, error)
Stacks(context.Context, *ComposeListRequest) (*ComposeListResponse, error)
Services(context.Context, *ComposePsRequest) (*ComposePsResponse, error)
Stacks(context.Context, *ComposeStacksRequest) (*ComposeStacksResponse, error)
Services(context.Context, *ComposeServicesRequest) (*ComposeServicesResponse, error)
}
// UnimplementedComposeServer can be embedded to have forward compatible implementations.
@ -986,10 +988,10 @@ func (*UnimplementedComposeServer) Up(context.Context, *ComposeUpRequest) (*Comp
func (*UnimplementedComposeServer) Down(context.Context, *ComposeDownRequest) (*ComposeDownResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Down not implemented")
}
func (*UnimplementedComposeServer) Stacks(context.Context, *ComposeListRequest) (*ComposeListResponse, error) {
func (*UnimplementedComposeServer) Stacks(context.Context, *ComposeStacksRequest) (*ComposeStacksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stacks not implemented")
}
func (*UnimplementedComposeServer) Services(context.Context, *ComposePsRequest) (*ComposePsResponse, error) {
func (*UnimplementedComposeServer) Services(context.Context, *ComposeServicesRequest) (*ComposeServicesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Services not implemented")
}
@ -1034,7 +1036,7 @@ func _Compose_Down_Handler(srv interface{}, ctx context.Context, dec func(interf
}
func _Compose_Stacks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ComposeListRequest)
in := new(ComposeStacksRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -1046,13 +1048,13 @@ func _Compose_Stacks_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: "/com.docker.api.protos.compose.v1.Compose/Stacks",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ComposeServer).Stacks(ctx, req.(*ComposeListRequest))
return srv.(ComposeServer).Stacks(ctx, req.(*ComposeStacksRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Compose_Services_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ComposePsRequest)
in := new(ComposeServicesRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -1064,7 +1066,7 @@ func _Compose_Services_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: "/com.docker.api.protos.compose.v1.Compose/Services",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ComposeServer).Services(ctx, req.(*ComposePsRequest))
return srv.(ComposeServer).Services(ctx, req.(*ComposeServicesRequest))
}
return interceptor(ctx, in, info, handler)
}

View File

@ -22,8 +22,8 @@ option go_package = "github.com/docker/compose-cli/protos/compose/v1;v1";
service Compose {
rpc Up(ComposeUpRequest) returns (ComposeUpResponse);
rpc Down(ComposeDownRequest) returns (ComposeDownResponse);
rpc Stacks(ComposeListRequest)returns (ComposeListResponse);
rpc Services(ComposePsRequest)returns (ComposePsResponse);
rpc Stacks(ComposeStacksRequest)returns (ComposeStacksResponse);
rpc Services(ComposeServicesRequest)returns (ComposeServicesResponse);
}
message ComposeUpRequest {
@ -46,11 +46,11 @@ message ComposeDownResponse {
string projectName = 1;
}
message ComposeListRequest {
message ComposeStacksRequest {
string projectName = 1;
}
message ComposeListResponse {
message ComposeStacksResponse {
repeated Stack stacks = 1;
}
@ -61,13 +61,13 @@ message Stack {
string reason = 4;
}
message ComposePsRequest {
message ComposeServicesRequest {
string projectName = 1;
string workDir = 2;
repeated string files = 3;
}
message ComposePsResponse {
message ComposeServicesResponse {
repeated Service services = 1;
}

View File

@ -45,7 +45,7 @@ func (p *proxy) Down(ctx context.Context, request *composev1.ComposeDownRequest)
return &composev1.ComposeDownResponse{ProjectName: projectName}, Client(ctx).ComposeService().Down(ctx, projectName)
}
func (p *proxy) Services(ctx context.Context, request *composev1.ComposePsRequest) (*composev1.ComposePsResponse, error) {
func (p *proxy) Services(ctx context.Context, request *composev1.ComposeServicesRequest) (*composev1.ComposeServicesResponse, error) {
projectName := request.GetProjectName()
if projectName == "" {
project, err := getComposeProject(request.Files, request.WorkDir, request.ProjectName)
@ -68,10 +68,10 @@ func (p *proxy) Services(ctx context.Context, request *composev1.ComposePsReques
Ports: service.Ports,
})
}
return &composev1.ComposePsResponse{Services: response}, nil
return &composev1.ComposeServicesResponse{Services: response}, nil
}
func (p *proxy) Stacks(ctx context.Context, request *composev1.ComposeListRequest) (*composev1.ComposeListResponse, error) {
func (p *proxy) Stacks(ctx context.Context, request *composev1.ComposeStacksRequest) (*composev1.ComposeStacksResponse, error) {
stacks, err := Client(ctx).ComposeService().List(ctx, request.ProjectName)
if err != nil {
return nil, err
@ -85,7 +85,7 @@ func (p *proxy) Stacks(ctx context.Context, request *composev1.ComposeListReques
Reason: stack.Reason,
})
}
return &composev1.ComposeListResponse{Stacks: response}, nil
return &composev1.ComposeStacksResponse{Stacks: response}, nil
}
func getComposeProject(files []string, workingDir string, projectName string) (*types.Project, error) {