diff --git a/Makefile b/Makefile deleted file mode 100644 index 0b40d45a3..000000000 --- a/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -GRPCURL_VERSION=1.8.7 -GRPCURL_CMD=grpcurl -GRPC_HOST=grpc.localtest.me -GRPC_PORT=8988 - - -.PHONY: grpc-test -grpc-test: | $(GRPCURL_HOME) - @echo "Testing gRPC service methods" - @echo "" - go run tests/grpc/client/main.go - -.PHONY: grpc-list -grpc-list: - $(GRPCURL_CMD) -plaintext -authority $(GRPC_HOST) $(GRPC_HOST):$(GRPC_PORT) list - $(GRPCURL_CMD) -plaintext -authority $(GRPC_HOST) $(GRPC_HOST):$(GRPC_PORT) list installation.v1alpha1.Installations - -.PHONY: grpc-serve -grpc-serve: - @echo "Start GRPC server. Ctrl+C to exit..." - @printf "#porter-service config.yaml\ngrpc-port: $(GRPC_PORT)\n" > $(PWD)/config.yaml - ./bin/porter-service --config-path=$(PWD) - -.PHONY: grpc-regenerate -grpc-regenerate: - @echo "Regenerating gRPC code from protobuf" - @docker build --rm -t protoc:local -f protoc.Dockerfile . - mkdir -p gen/proto/go/helloworld/v1alpha - docker run -v $(PWD):/proto protoc:local protoc \ - --go_out=gen/proto/go/helloworld/v1alpha --go_opt=module=get.porter.sh/porter/gen/proto/go/helloworld/v1alpha \ - --go-grpc_out=gen/proto/go/helloworld/v1alpha --go-grpc_opt=module=get.porter.sh/porter/gen/proto/go/helloworld/v1alpha \ - proto/porterapis/helloword/v1alpha/helloworld.proto \ No newline at end of file diff --git a/gen/proto/go/porterapis/installation/v1alpha1/installation.pb.go b/gen/proto/go/porterapis/installation/v1alpha1/installation.pb.go index ac7624e60..78f4ed4fd 100644 --- a/gen/proto/go/porterapis/installation/v1alpha1/installation.pb.go +++ b/gen/proto/go/porterapis/installation/v1alpha1/installation.pb.go @@ -180,9 +180,11 @@ type Installation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Bundle *Bundle `protobuf:"bytes,3,opt,name=bundle,proto3" json:"bundle,omitempty"` + // Unique installation ID + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + Bundle *Bundle `protobuf:"bytes,6,opt,name=bundle,proto3" json:"bundle,omitempty"` State InstallationState `protobuf:"varint,4,opt,name=state,proto3,enum=installation.v1alpha1.InstallationState" json:"state,omitempty"` Status InstallationStatus `protobuf:"varint,5,opt,name=status,proto3,enum=installation.v1alpha1.InstallationStatus" json:"status,omitempty"` } @@ -219,6 +221,13 @@ func (*Installation) Descriptor() ([]byte, []int) { return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{1} } +func (x *Installation) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + func (x *Installation) GetName() string { if x != nil { return x.Name @@ -258,6 +267,12 @@ type ListInstallationsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + Skip int64 `protobuf:"varint,4,opt,name=skip,proto3" json:"skip,omitempty"` + Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ListInstallationsRequest) Reset() { @@ -292,6 +307,41 @@ func (*ListInstallationsRequest) Descriptor() ([]byte, []int) { return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{2} } +func (x *ListInstallationsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ListInstallationsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListInstallationsRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListInstallationsRequest) GetSkip() int64 { + if x != nil { + return x.Skip + } + return 0 +} + +func (x *ListInstallationsRequest) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + type ListInstallationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -339,6 +389,240 @@ func (x *ListInstallationsResponse) GetInstallation() []*Installation { return nil } +type InstallationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Installation *Installation `protobuf:"bytes,1,opt,name=installation,proto3" json:"installation,omitempty"` +} + +func (x *InstallationRequest) Reset() { + *x = InstallationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstallationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallationRequest) ProtoMessage() {} + +func (x *InstallationRequest) ProtoReflect() protoreflect.Message { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallationRequest.ProtoReflect.Descriptor instead. +func (*InstallationRequest) Descriptor() ([]byte, []int) { + return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{4} +} + +func (x *InstallationRequest) GetInstallation() *Installation { + if x != nil { + return x.Installation + } + return nil +} + +type InstallationRun struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Installation *Installation `protobuf:"bytes,2,opt,name=installation,proto3" json:"installation,omitempty"` +} + +func (x *InstallationRun) Reset() { + *x = InstallationRun{} + if protoimpl.UnsafeEnabled { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstallationRun) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallationRun) ProtoMessage() {} + +func (x *InstallationRun) ProtoReflect() protoreflect.Message { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallationRun.ProtoReflect.Descriptor instead. +func (*InstallationRun) Descriptor() ([]byte, []int) { + return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{5} +} + +func (x *InstallationRun) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *InstallationRun) GetInstallation() *Installation { + if x != nil { + return x.Installation + } + return nil +} + +type ListInstallationRunsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Run []*InstallationRun `protobuf:"bytes,1,rep,name=run,proto3" json:"run,omitempty"` +} + +func (x *ListInstallationRunsResponse) Reset() { + *x = ListInstallationRunsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstallationRunsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstallationRunsResponse) ProtoMessage() {} + +func (x *ListInstallationRunsResponse) ProtoReflect() protoreflect.Message { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstallationRunsResponse.ProtoReflect.Descriptor instead. +func (*ListInstallationRunsResponse) Descriptor() ([]byte, []int) { + return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{6} +} + +func (x *ListInstallationRunsResponse) GetRun() []*InstallationRun { + if x != nil { + return x.Run + } + return nil +} + +type InstallationRunRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Run *InstallationRun `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` +} + +func (x *InstallationRunRequest) Reset() { + *x = InstallationRunRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstallationRunRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallationRunRequest) ProtoMessage() {} + +func (x *InstallationRunRequest) ProtoReflect() protoreflect.Message { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallationRunRequest.ProtoReflect.Descriptor instead. +func (*InstallationRunRequest) Descriptor() ([]byte, []int) { + return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{7} +} + +func (x *InstallationRunRequest) GetRun() *InstallationRun { + if x != nil { + return x.Run + } + return nil +} + +type ListInstallationRunOutputsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListInstallationRunOutputsResponse) Reset() { + *x = ListInstallationRunOutputsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstallationRunOutputsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstallationRunOutputsResponse) ProtoMessage() {} + +func (x *ListInstallationRunOutputsResponse) ProtoReflect() protoreflect.Message { + mi := &file_installation_v1alpha1_installation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstallationRunOutputsResponse.ProtoReflect.Descriptor instead. +func (*ListInstallationRunOutputsResponse) Descriptor() ([]byte, []int) { + return file_installation_v1alpha1_installation_proto_rawDescGZIP(), []int{8} +} + var File_installation_v1alpha1_installation_proto protoreflect.FileDescriptor var file_installation_v1alpha1_installation_proto_rawDesc = []byte{ @@ -350,12 +634,13 @@ var file_installation_v1alpha1_installation_proto_rawDesc = []byte{ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfa, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, @@ -366,48 +651,80 @@ var file_installation_v1alpha1_installation_proto_rawDesc = []byte{ 0x29, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, - 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x40, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x53, - 0x54, 0x41, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x4e, - 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, - 0x49, 0x4e, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x3f, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, - 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x53, 0x54, 0x41, - 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x32, 0x89, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x78, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, + 0x75, 0x73, 0x22, 0x86, 0x02, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x53, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x64, 0x0a, 0x19, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0xfc, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x2e, 0x73, 0x68, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x5e, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x6a, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, + 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x52, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x38, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x24, 0x0a, 0x22, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2a, 0x40, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, + 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x4e, 0x53, 0x54, 0x41, + 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, + 0x44, 0x10, 0x02, 0x2a, 0x3f, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x42, 0xfc, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x2e, 0x73, 0x68, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, + 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -423,27 +740,36 @@ func file_installation_v1alpha1_installation_proto_rawDescGZIP() []byte { } var file_installation_v1alpha1_installation_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_installation_v1alpha1_installation_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_installation_v1alpha1_installation_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_installation_v1alpha1_installation_proto_goTypes = []interface{}{ - (InstallationState)(0), // 0: installation.v1alpha1.InstallationState - (InstallationStatus)(0), // 1: installation.v1alpha1.InstallationStatus - (*Bundle)(nil), // 2: installation.v1alpha1.Bundle - (*Installation)(nil), // 3: installation.v1alpha1.Installation - (*ListInstallationsRequest)(nil), // 4: installation.v1alpha1.ListInstallationsRequest - (*ListInstallationsResponse)(nil), // 5: installation.v1alpha1.ListInstallationsResponse + (InstallationState)(0), // 0: installation.v1alpha1.InstallationState + (InstallationStatus)(0), // 1: installation.v1alpha1.InstallationStatus + (*Bundle)(nil), // 2: installation.v1alpha1.Bundle + (*Installation)(nil), // 3: installation.v1alpha1.Installation + (*ListInstallationsRequest)(nil), // 4: installation.v1alpha1.ListInstallationsRequest + (*ListInstallationsResponse)(nil), // 5: installation.v1alpha1.ListInstallationsResponse + (*InstallationRequest)(nil), // 6: installation.v1alpha1.InstallationRequest + (*InstallationRun)(nil), // 7: installation.v1alpha1.InstallationRun + (*ListInstallationRunsResponse)(nil), // 8: installation.v1alpha1.ListInstallationRunsResponse + (*InstallationRunRequest)(nil), // 9: installation.v1alpha1.InstallationRunRequest + (*ListInstallationRunOutputsResponse)(nil), // 10: installation.v1alpha1.ListInstallationRunOutputsResponse + nil, // 11: installation.v1alpha1.ListInstallationsRequest.LabelsEntry } var file_installation_v1alpha1_installation_proto_depIdxs = []int32{ - 2, // 0: installation.v1alpha1.Installation.bundle:type_name -> installation.v1alpha1.Bundle - 0, // 1: installation.v1alpha1.Installation.state:type_name -> installation.v1alpha1.InstallationState - 1, // 2: installation.v1alpha1.Installation.status:type_name -> installation.v1alpha1.InstallationStatus - 3, // 3: installation.v1alpha1.ListInstallationsResponse.installation:type_name -> installation.v1alpha1.Installation - 4, // 4: installation.v1alpha1.Installations.ListInstallations:input_type -> installation.v1alpha1.ListInstallationsRequest - 5, // 5: installation.v1alpha1.Installations.ListInstallations:output_type -> installation.v1alpha1.ListInstallationsResponse - 5, // [5:6] is the sub-list for method output_type - 4, // [4:5] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 2, // 0: installation.v1alpha1.Installation.bundle:type_name -> installation.v1alpha1.Bundle + 0, // 1: installation.v1alpha1.Installation.state:type_name -> installation.v1alpha1.InstallationState + 1, // 2: installation.v1alpha1.Installation.status:type_name -> installation.v1alpha1.InstallationStatus + 11, // 3: installation.v1alpha1.ListInstallationsRequest.labels:type_name -> installation.v1alpha1.ListInstallationsRequest.LabelsEntry + 3, // 4: installation.v1alpha1.ListInstallationsResponse.installation:type_name -> installation.v1alpha1.Installation + 3, // 5: installation.v1alpha1.InstallationRequest.installation:type_name -> installation.v1alpha1.Installation + 3, // 6: installation.v1alpha1.InstallationRun.installation:type_name -> installation.v1alpha1.Installation + 7, // 7: installation.v1alpha1.ListInstallationRunsResponse.run:type_name -> installation.v1alpha1.InstallationRun + 7, // 8: installation.v1alpha1.InstallationRunRequest.run:type_name -> installation.v1alpha1.InstallationRun + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_installation_v1alpha1_installation_proto_init() } @@ -500,6 +826,66 @@ func file_installation_v1alpha1_installation_proto_init() { return nil } } + file_installation_v1alpha1_installation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstallationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_installation_v1alpha1_installation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstallationRun); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_installation_v1alpha1_installation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListInstallationRunsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_installation_v1alpha1_installation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstallationRunRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_installation_v1alpha1_installation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListInstallationRunOutputsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -507,9 +893,9 @@ func file_installation_v1alpha1_installation_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_installation_v1alpha1_installation_proto_rawDesc, NumEnums: 2, - NumMessages: 4, + NumMessages: 10, NumExtensions: 0, - NumServices: 1, + NumServices: 0, }, GoTypes: file_installation_v1alpha1_installation_proto_goTypes, DependencyIndexes: file_installation_v1alpha1_installation_proto_depIdxs, diff --git a/gen/proto/go/porterapis/installation/v1alpha1/installation_grpc.pb.go b/gen/proto/go/porterapis/installation/v1alpha1/installation_grpc.pb.go deleted file mode 100644 index cade3a17f..000000000 --- a/gen/proto/go/porterapis/installation/v1alpha1/installation_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: installation/v1alpha1/installation.proto - -package installationv1alpha1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// InstallationsClient is the client API for Installations service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type InstallationsClient interface { - ListInstallations(ctx context.Context, in *ListInstallationsRequest, opts ...grpc.CallOption) (*ListInstallationsResponse, error) -} - -type installationsClient struct { - cc grpc.ClientConnInterface -} - -func NewInstallationsClient(cc grpc.ClientConnInterface) InstallationsClient { - return &installationsClient{cc} -} - -func (c *installationsClient) ListInstallations(ctx context.Context, in *ListInstallationsRequest, opts ...grpc.CallOption) (*ListInstallationsResponse, error) { - out := new(ListInstallationsResponse) - err := c.cc.Invoke(ctx, "/installation.v1alpha1.Installations/ListInstallations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// InstallationsServer is the server API for Installations service. -// All implementations must embed UnimplementedInstallationsServer -// for forward compatibility -type InstallationsServer interface { - ListInstallations(context.Context, *ListInstallationsRequest) (*ListInstallationsResponse, error) - mustEmbedUnimplementedInstallationsServer() -} - -// UnimplementedInstallationsServer must be embedded to have forward compatible implementations. -type UnimplementedInstallationsServer struct { -} - -func (UnimplementedInstallationsServer) ListInstallations(context.Context, *ListInstallationsRequest) (*ListInstallationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListInstallations not implemented") -} -func (UnimplementedInstallationsServer) mustEmbedUnimplementedInstallationsServer() {} - -// UnsafeInstallationsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to InstallationsServer will -// result in compilation errors. -type UnsafeInstallationsServer interface { - mustEmbedUnimplementedInstallationsServer() -} - -func RegisterInstallationsServer(s grpc.ServiceRegistrar, srv InstallationsServer) { - s.RegisterService(&Installations_ServiceDesc, srv) -} - -func _Installations_ListInstallations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListInstallationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InstallationsServer).ListInstallations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/installation.v1alpha1.Installations/ListInstallations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InstallationsServer).ListInstallations(ctx, req.(*ListInstallationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Installations_ServiceDesc is the grpc.ServiceDesc for Installations service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Installations_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "installation.v1alpha1.Installations", - HandlerType: (*InstallationsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListInstallations", - Handler: _Installations_ListInstallations_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "installation/v1alpha1/installation.proto", -} diff --git a/gen/proto/go/porterapis/porter/v1alpha1/porter.pb.go b/gen/proto/go/porterapis/porter/v1alpha1/porter.pb.go new file mode 100644 index 000000000..e71ed9dde --- /dev/null +++ b/gen/proto/go/porterapis/porter/v1alpha1/porter.pb.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: porter/v1alpha1/porter.proto + +//option go_package = "get.porter.sh/porter/gen/proto/go/installation/v1alpha1"; + +package porterv1alpha1 + +import ( + v1alpha1 "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_porter_v1alpha1_porter_proto protoreflect.FileDescriptor + +var file_porter_v1alpha1_porter_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, + 0x28, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x87, 0x03, 0x0a, 0x0c, 0x50, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x2f, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x30, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x23, 0x2e, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x33, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x88, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xcc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x65, 0x74, 0x2e, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x73, 0x68, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x0f, + 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, + 0x02, 0x0f, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0xe2, 0x02, 0x1b, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x10, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_porter_v1alpha1_porter_proto_goTypes = []interface{}{ + (*v1alpha1.ListInstallationsRequest)(nil), // 0: installation.v1alpha1.ListInstallationsRequest + (*v1alpha1.Installation)(nil), // 1: installation.v1alpha1.Installation + (*v1alpha1.InstallationRunRequest)(nil), // 2: installation.v1alpha1.InstallationRunRequest + (*v1alpha1.ListInstallationsResponse)(nil), // 3: installation.v1alpha1.ListInstallationsResponse + (*v1alpha1.ListInstallationRunsResponse)(nil), // 4: installation.v1alpha1.ListInstallationRunsResponse + (*v1alpha1.ListInstallationRunOutputsResponse)(nil), // 5: installation.v1alpha1.ListInstallationRunOutputsResponse +} +var file_porter_v1alpha1_porter_proto_depIdxs = []int32{ + 0, // 0: porter.v1alpha1.PorterBundle.ListInstallations:input_type -> installation.v1alpha1.ListInstallationsRequest + 1, // 1: porter.v1alpha1.PorterBundle.ListInstallationRuns:input_type -> installation.v1alpha1.Installation + 2, // 2: porter.v1alpha1.PorterBundle.ListInstallationRunOutputs:input_type -> installation.v1alpha1.InstallationRunRequest + 3, // 3: porter.v1alpha1.PorterBundle.ListInstallations:output_type -> installation.v1alpha1.ListInstallationsResponse + 4, // 4: porter.v1alpha1.PorterBundle.ListInstallationRuns:output_type -> installation.v1alpha1.ListInstallationRunsResponse + 5, // 5: porter.v1alpha1.PorterBundle.ListInstallationRunOutputs:output_type -> installation.v1alpha1.ListInstallationRunOutputsResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_porter_v1alpha1_porter_proto_init() } +func file_porter_v1alpha1_porter_proto_init() { + if File_porter_v1alpha1_porter_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_porter_v1alpha1_porter_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_porter_v1alpha1_porter_proto_goTypes, + DependencyIndexes: file_porter_v1alpha1_porter_proto_depIdxs, + }.Build() + File_porter_v1alpha1_porter_proto = out.File + file_porter_v1alpha1_porter_proto_rawDesc = nil + file_porter_v1alpha1_porter_proto_goTypes = nil + file_porter_v1alpha1_porter_proto_depIdxs = nil +} diff --git a/gen/proto/go/porterapis/porter/v1alpha1/porter_grpc.pb.go b/gen/proto/go/porterapis/porter/v1alpha1/porter_grpc.pb.go new file mode 100644 index 000000000..7367f46ae --- /dev/null +++ b/gen/proto/go/porterapis/porter/v1alpha1/porter_grpc.pb.go @@ -0,0 +1,186 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: porter/v1alpha1/porter.proto + +package porterv1alpha1 + +import ( + context "context" + v1alpha1 "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// PorterBundleClient is the client API for PorterBundle service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PorterBundleClient interface { + // Returns a list of all installations + ListInstallations(ctx context.Context, in *v1alpha1.ListInstallationsRequest, opts ...grpc.CallOption) (*v1alpha1.ListInstallationsResponse, error) + // Returns a list of all runs for a single installation + ListInstallationRuns(ctx context.Context, in *v1alpha1.Installation, opts ...grpc.CallOption) (*v1alpha1.ListInstallationRunsResponse, error) + // Returns a list of all outputs for a single installation run + // Must support a "latest" run id + ListInstallationRunOutputs(ctx context.Context, in *v1alpha1.InstallationRunRequest, opts ...grpc.CallOption) (*v1alpha1.ListInstallationRunOutputsResponse, error) +} + +type porterBundleClient struct { + cc grpc.ClientConnInterface +} + +func NewPorterBundleClient(cc grpc.ClientConnInterface) PorterBundleClient { + return &porterBundleClient{cc} +} + +func (c *porterBundleClient) ListInstallations(ctx context.Context, in *v1alpha1.ListInstallationsRequest, opts ...grpc.CallOption) (*v1alpha1.ListInstallationsResponse, error) { + out := new(v1alpha1.ListInstallationsResponse) + err := c.cc.Invoke(ctx, "/porter.v1alpha1.PorterBundle/ListInstallations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *porterBundleClient) ListInstallationRuns(ctx context.Context, in *v1alpha1.Installation, opts ...grpc.CallOption) (*v1alpha1.ListInstallationRunsResponse, error) { + out := new(v1alpha1.ListInstallationRunsResponse) + err := c.cc.Invoke(ctx, "/porter.v1alpha1.PorterBundle/ListInstallationRuns", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *porterBundleClient) ListInstallationRunOutputs(ctx context.Context, in *v1alpha1.InstallationRunRequest, opts ...grpc.CallOption) (*v1alpha1.ListInstallationRunOutputsResponse, error) { + out := new(v1alpha1.ListInstallationRunOutputsResponse) + err := c.cc.Invoke(ctx, "/porter.v1alpha1.PorterBundle/ListInstallationRunOutputs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PorterBundleServer is the server API for PorterBundle service. +// All implementations must embed UnimplementedPorterBundleServer +// for forward compatibility +type PorterBundleServer interface { + // Returns a list of all installations + ListInstallations(context.Context, *v1alpha1.ListInstallationsRequest) (*v1alpha1.ListInstallationsResponse, error) + // Returns a list of all runs for a single installation + ListInstallationRuns(context.Context, *v1alpha1.Installation) (*v1alpha1.ListInstallationRunsResponse, error) + // Returns a list of all outputs for a single installation run + // Must support a "latest" run id + ListInstallationRunOutputs(context.Context, *v1alpha1.InstallationRunRequest) (*v1alpha1.ListInstallationRunOutputsResponse, error) + mustEmbedUnimplementedPorterBundleServer() +} + +// UnimplementedPorterBundleServer must be embedded to have forward compatible implementations. +type UnimplementedPorterBundleServer struct { +} + +func (UnimplementedPorterBundleServer) ListInstallations(context.Context, *v1alpha1.ListInstallationsRequest) (*v1alpha1.ListInstallationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInstallations not implemented") +} +func (UnimplementedPorterBundleServer) ListInstallationRuns(context.Context, *v1alpha1.Installation) (*v1alpha1.ListInstallationRunsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInstallationRuns not implemented") +} +func (UnimplementedPorterBundleServer) ListInstallationRunOutputs(context.Context, *v1alpha1.InstallationRunRequest) (*v1alpha1.ListInstallationRunOutputsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInstallationRunOutputs not implemented") +} +func (UnimplementedPorterBundleServer) mustEmbedUnimplementedPorterBundleServer() {} + +// UnsafePorterBundleServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PorterBundleServer will +// result in compilation errors. +type UnsafePorterBundleServer interface { + mustEmbedUnimplementedPorterBundleServer() +} + +func RegisterPorterBundleServer(s grpc.ServiceRegistrar, srv PorterBundleServer) { + s.RegisterService(&PorterBundle_ServiceDesc, srv) +} + +func _PorterBundle_ListInstallations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListInstallationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PorterBundleServer).ListInstallations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/porter.v1alpha1.PorterBundle/ListInstallations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PorterBundleServer).ListInstallations(ctx, req.(*v1alpha1.ListInstallationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PorterBundle_ListInstallationRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.Installation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PorterBundleServer).ListInstallationRuns(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/porter.v1alpha1.PorterBundle/ListInstallationRuns", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PorterBundleServer).ListInstallationRuns(ctx, req.(*v1alpha1.Installation)) + } + return interceptor(ctx, in, info, handler) +} + +func _PorterBundle_ListInstallationRunOutputs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.InstallationRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PorterBundleServer).ListInstallationRunOutputs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/porter.v1alpha1.PorterBundle/ListInstallationRunOutputs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PorterBundleServer).ListInstallationRunOutputs(ctx, req.(*v1alpha1.InstallationRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PorterBundle_ServiceDesc is the grpc.ServiceDesc for PorterBundle service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PorterBundle_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "porter.v1alpha1.PorterBundle", + HandlerType: (*PorterBundleServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListInstallations", + Handler: _PorterBundle_ListInstallations_Handler, + }, + { + MethodName: "ListInstallationRuns", + Handler: _PorterBundle_ListInstallationRuns_Handler, + }, + { + MethodName: "ListInstallationRunOutputs", + Handler: _PorterBundle_ListInstallationRunOutputs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "porter/v1alpha1/porter.proto", +} diff --git a/mage/setup/tools.go b/mage/setup/tools.go index 835837a71..e5c56b5cf 100644 --- a/mage/setup/tools.go +++ b/mage/setup/tools.go @@ -8,9 +8,13 @@ import ( "github.com/carolynvs/magex/pkg" "github.com/carolynvs/magex/pkg/archive" "github.com/carolynvs/magex/pkg/downloads" + "github.com/magefile/mage/mg" ) func EnsureProtobufTools() { + //TODO: add more tools + // https://github.com/bufbuild/buf/releases protoc-gen-buf-breaking, protoc-gen-buf-lint + // protoc https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip`` mgx.Must(pkg.EnsurePackageWith(pkg.EnsurePackageOptions{ Name: "google.golang.org/protobuf/cmd/protoc-gen-go", DefaultVersion: "v1.28", @@ -33,6 +37,7 @@ func IsCommandInPath(cmd string) (bool, error) { } func EnsureBufBuild() { + mg.Deps(EnsureProtobufTools) if ok, _ := pkg.IsCommandAvailable("buf", "--version", "1.11.0"); ok { return } diff --git a/magefile.go b/magefile.go index bdb836732..c4a5ea44c 100644 --- a/magefile.go +++ b/magefile.go @@ -55,7 +55,9 @@ func CheckGoVersion() { } func GenerateGRPCProtobufs() { - mg.SerialDeps(buildGRPCProtocImage) + mg.Deps(setup.EnsureBufBuild) + must.Command("buf", "build").In("proto").RunV() + must.Command("buf", "generate").In("proto").RunV() } // Builds all code artifacts in the repository @@ -252,6 +254,21 @@ func TestSmoke() error { return shx.Command("go", "test", "-count=1", "-timeout=20m", "-tags", "smoke", v, "./tests/smoke/...").CollapseArgs().RunV() } +// Run grpc service tests +func TestGRPCService() { + var run string + runTest := os.Getenv("PORTER_RUN_TEST") + if runTest != "" { + run = "-run=" + runTest + } + + verbose := "" + if mg.Verbose() { + verbose = "-v" + } + must.Command("go", "test", verbose, "-timeout=5m", run, "./tests/grpc/...").CollapseArgs().RunV() +} + func getRegistry() string { registry := os.Getenv("PORTER_REGISTRY") if registry == "" { diff --git a/pkg/grpc/installation/installation.go b/pkg/grpc/installation/installation.go index 56b5b4e91..4980fbbc7 100644 --- a/pkg/grpc/installation/installation.go +++ b/pkg/grpc/installation/installation.go @@ -4,29 +4,30 @@ import ( "context" "log" - igrpc "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + iGRPC "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + pGRPC "get.porter.sh/porter/gen/proto/go/porterapis/porter/v1alpha1" ) // server is used to implement helloworld.GreeterServer. -type InstallationServer struct { - igrpc.UnimplementedInstallationsServer +type PorterServer struct { + pGRPC.UnimplementedPorterBundleServer } // SayHello implements helloworld.GreeterServer -func (s *InstallationServer) ListInstallations(ctx context.Context, in *igrpc.ListInstallationsRequest) (*igrpc.ListInstallationsResponse, error) { +func (s *PorterServer) ListInstallations(ctx context.Context, in *iGRPC.ListInstallationsRequest) (*iGRPC.ListInstallationsResponse, error) { log.Printf("IN LIST INSTALLATIONS") - inst := igrpc.Installation{ + inst := iGRPC.Installation{ Name: "test installation", Namespace: "foo", - Bundle: &igrpc.Bundle{ + Bundle: &iGRPC.Bundle{ Repository: "test.repo", Version: "v1.0.0", }, - State: igrpc.InstallationState_INSTALLED, - Status: igrpc.InstallationStatus_SUCCEEDED, + State: iGRPC.InstallationState_INSTALLED, + Status: iGRPC.InstallationStatus_SUCCEEDED, } - insts := []*igrpc.Installation{&inst} - res := igrpc.ListInstallationsResponse{ + insts := []*iGRPC.Installation{&inst} + res := iGRPC.ListInstallationsResponse{ Installation: insts, } return &res, nil diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go index e8489508c..0db3bfd82 100644 --- a/pkg/grpc/server.go +++ b/pkg/grpc/server.go @@ -49,7 +49,7 @@ func (s *PorterGRPCService) ListenAndServe() *grpc.Server { healthServer := health.NewServer() reflection.Register(srv) grpc_health_v1.RegisterHealthServer(srv, healthServer) - isrv := &installation.InstallationServer{} + isrv := &installation.PorterServer{} igrpc.RegisterInstallationsServer(srv, isrv) healthServer.SetServingStatus(s.config.ServiceName, grpc_health_v1.HealthCheckResponse_SERVING) diff --git a/proto/porterapis/buf.gen.yaml b/proto/buf.gen.yaml similarity index 81% rename from proto/porterapis/buf.gen.yaml rename to proto/buf.gen.yaml index db57da78d..dbaf1372f 100644 --- a/proto/porterapis/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -7,8 +7,8 @@ managed: - buf.build/googleapis/googleapis plugins: - plugin: go - out: ../../gen/proto/go/porterapis + out: ../gen/proto/go/porterapis opt: module=get.porter.sh/porter/gen/proto/go/porterapis - plugin: go-grpc - out: ../../gen/proto/go/porterapis + out: ../gen/proto/go/porterapis opt: module=get.porter.sh/porter/gen/proto/go/porterapis diff --git a/proto/buf.work.yaml b/proto/buf.work.yaml new file mode 100644 index 000000000..94e6fe5ff --- /dev/null +++ b/proto/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - porterapis diff --git a/proto/porterapis/installation/v1alpha1/installation.proto b/proto/porterapis/installation/v1alpha1/installation.proto index 965bd5bcc..db0d5c75b 100644 --- a/proto/porterapis/installation/v1alpha1/installation.proto +++ b/proto/porterapis/installation/v1alpha1/installation.proto @@ -2,10 +2,6 @@ syntax = "proto3"; //option go_package = "get.porter.sh/porter/gen/proto/go/installation/v1alpha1"; package installation.v1alpha1; -service Installations { - rpc ListInstallations (ListInstallationsRequest) returns (ListInstallationsResponse) {} -} - enum InstallationState { INSTALLED = 0; UNINSTALLED = 1; @@ -24,15 +20,41 @@ message Bundle { } message Installation { - string name = 1; - string namespace = 2; - Bundle bundle = 3; + // Unique installation ID + int64 id = 1; + string name = 2; + string namespace = 3; + Bundle bundle = 6; InstallationState state = 4; InstallationStatus status = 5; } -message ListInstallationsRequest {} +message ListInstallationsRequest { + string name = 1; + string namespace = 2; + int64 limit = 3; + int64 skip = 4; + map labels = 5; +} message ListInstallationsResponse { repeated Installation installation = 1; -} \ No newline at end of file +} + +message InstallationRequest { + Installation installation = 1; +} +message InstallationRun { + int64 id = 1; + Installation installation = 2; +} + +message ListInstallationRunsResponse { + repeated InstallationRun run = 1; +} + +message InstallationRunRequest { + InstallationRun run = 1; +} + +message ListInstallationRunOutputsResponse {} \ No newline at end of file diff --git a/proto/porterapis/porter/buf.yaml b/proto/porterapis/porter/buf.yaml new file mode 100644 index 000000000..cf86b8789 --- /dev/null +++ b/proto/porterapis/porter/buf.yaml @@ -0,0 +1,8 @@ +version: v1 +name: buf.build/porter/porter +breaking: + use: + - FILE +lint: + use: + - DEFAULT diff --git a/proto/porterapis/porter/v1alpha1/porter.proto b/proto/porterapis/porter/v1alpha1/porter.proto new file mode 100644 index 000000000..8b955f904 --- /dev/null +++ b/proto/porterapis/porter/v1alpha1/porter.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +//option go_package = "get.porter.sh/porter/gen/proto/go/installation/v1alpha1"; +package porter.v1alpha1; + +import "installation/v1alpha1/installation.proto"; + +service PorterBundle { + //Returns a list of all installations + rpc ListInstallations (installation.v1alpha1.ListInstallationsRequest) returns (installation.v1alpha1.ListInstallationsResponse) {} + + //Returns a list of all runs for a single installation + rpc ListInstallationRuns(installation.v1alpha1.Installation) returns(installation.v1alpha1.ListInstallationRunsResponse) {} + + //Returns a list of all outputs for a single installation run + //Must support a "latest" run id + rpc ListInstallationRunOutputs(installation.v1alpha1.InstallationRunRequest) returns(installation.v1alpha1.ListInstallationRunOutputsResponse) {} +} \ No newline at end of file diff --git a/tests/grpc/client/main.go b/tests/grpc/client/main.go deleted file mode 100644 index 8c53c5ac2..000000000 --- a/tests/grpc/client/main.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "context" - "fmt" - "log" - - // Remote Packages with buf.build - // petgrpc "buf.build/gen/go/gettys/petapis/grpc/go/pet/v1/petv1grpc" - // petv1 "buf.build/gen/go/gettys/petapis/protocolbuffers/go/pet/v1" - - // Local generated files - igrpc "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" - "google.golang.org/grpc" -) - -var grpcSvcPort = "8988" - -func main() { - log.Println("grpc client test") - if err := run(); err != nil { - log.Fatal(err) - } -} -func run() error { - connectTo := fmt.Sprintf("127.0.0.1:%s", grpcSvcPort) - conn, err := grpc.Dial(connectTo, grpc.WithBlock(), grpc.WithInsecure()) - if err != nil { - return fmt.Errorf("failed to connect to PetStoreService on %s: %w", connectTo, err) - } - log.Println("Connected to", connectTo) - - instClient := igrpc.NewInstallationsClient(conn) - resp, err := instClient.ListInstallations(context.Background(), &igrpc.ListInstallationsRequest{}) - if err != nil { - return fmt.Errorf("failed to ListInstallations: %w", err) - } - log.Println("Successfully Listed Installation") - log.Println(resp) - return nil -} diff --git a/tests/grpc/install_test.go b/tests/grpc/install_test.go index a76dad405..7cc384af7 100644 --- a/tests/grpc/install_test.go +++ b/tests/grpc/install_test.go @@ -5,7 +5,8 @@ import ( //"fmt" "testing" - igrpc "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + iGRPC "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + pGRPC "get.porter.sh/porter/gen/proto/go/porterapis/porter/v1alpha1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" @@ -19,8 +20,8 @@ func TestInstall_installationMessage(t *testing.T) { t.Fatalf("failed to dial bufnet: %v", err) } defer conn.Close() - instClient := igrpc.NewInstallationsClient(conn) - resp, err := instClient.ListInstallations(context.Background(), &igrpc.ListInstallationsRequest{}) + instClient := pGRPC.NewPorterBundleClient(conn) + resp, err := instClient.ListInstallations(context.Background(), &iGRPC.ListInstallationsRequest{}) require.NoError(t, err) - assert.Equal(t, resp.String(), `installation:{name:"test installation" namespace:"foo" bundle:{repository:"test.repo" version:"v1.0.0"}}`) + assert.Equal(t, resp.String(), `installation:{name:"test installation" namespace:"foo" bundle:{repository:"test.repo" version:"v1.0.0"}}`) } diff --git a/tests/grpc/test_utils.go b/tests/grpc/test_utils.go index e28eead1d..5d38eacf5 100644 --- a/tests/grpc/test_utils.go +++ b/tests/grpc/test_utils.go @@ -8,7 +8,7 @@ import ( //"go.uber.org/zap" //"go.uber.org/zap/zapcore" - igrpc "get.porter.sh/porter/gen/proto/go/porterapis/installation/v1alpha1" + pGRPC "get.porter.sh/porter/gen/proto/go/porterapis/porter/v1alpha1" "get.porter.sh/porter/pkg/grpc/installation" "get.porter.sh/porter/pkg/porter" @@ -45,8 +45,8 @@ func (s *TestPorterGRPCService) ListenAndServe() *grpc.Server { healthServer := health.NewServer() reflection.Register(srv) grpc_health_v1.RegisterHealthServer(srv, healthServer) - isrv := &installation.InstallationServer{} - igrpc.RegisterInstallationsServer(srv, isrv) + isrv := &installation.PorterServer{} + pGRPC.RegisterPorterBundleServer(srv, isrv) healthServer.SetServingStatus("test-health", grpc_health_v1.HealthCheckResponse_SERVING) go func() {