diff --git a/pkg/plugin/api/v1alpha1/deployment/api.pb.go b/pkg/plugin/api/v1alpha1/deployment/api.pb.go index cea4990c70..b1a2fea2c6 100644 --- a/pkg/plugin/api/v1alpha1/deployment/api.pb.go +++ b/pkg/plugin/api/v1alpha1/deployment/api.pb.go @@ -519,6 +519,110 @@ func (x *FetchDefinedStagesResponse) GetStages() []string { return nil } +type ExecuteStageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *ExecutePluginInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *ExecuteStageRequest) Reset() { + *x = ExecuteStageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteStageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteStageRequest) ProtoMessage() {} + +func (x *ExecuteStageRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[10] + 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 ExecuteStageRequest.ProtoReflect.Descriptor instead. +func (*ExecuteStageRequest) Descriptor() ([]byte, []int) { + return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{10} +} + +func (x *ExecuteStageRequest) GetInput() *ExecutePluginInput { + if x != nil { + return x.Input + } + return nil +} + +type ExecuteStageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The result of the stage execution. + Status model.StageStatus `protobuf:"varint,1,opt,name=status,proto3,enum=model.StageStatus" json:"status,omitempty"` + // The detailed message of the stage execution. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ExecuteStageResponse) Reset() { + *x = ExecuteStageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteStageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteStageResponse) ProtoMessage() {} + +func (x *ExecuteStageResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[11] + 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 ExecuteStageResponse.ProtoReflect.Descriptor instead. +func (*ExecuteStageResponse) Descriptor() ([]byte, []int) { + return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{11} +} + +func (x *ExecuteStageResponse) GetStatus() model.StageStatus { + if x != nil { + return x.Status + } + return model.StageStatus(0) +} + +func (x *ExecuteStageResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + type PlanPluginInput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -537,7 +641,7 @@ type PlanPluginInput struct { func (x *PlanPluginInput) Reset() { *x = PlanPluginInput{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[10] + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -550,7 +654,7 @@ func (x *PlanPluginInput) String() string { func (*PlanPluginInput) ProtoMessage() {} func (x *PlanPluginInput) ProtoReflect() protoreflect.Message { - mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[10] + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -563,7 +667,7 @@ func (x *PlanPluginInput) ProtoReflect() protoreflect.Message { // Deprecated: Use PlanPluginInput.ProtoReflect.Descriptor instead. func (*PlanPluginInput) Descriptor() ([]byte, []int) { - return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{10} + return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{12} } func (x *PlanPluginInput) GetDeployment() *model.Deployment { @@ -594,6 +698,90 @@ func (x *PlanPluginInput) GetTargetDeploymentSource() *DeploymentSource { return nil } +type ExecutePluginInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The deployment to execute the stage for. + Deployment *model.Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"` + // The stage to execute. + Stage *model.PipelineStage `protobuf:"bytes,2,opt,name=stage,proto3" json:"stage,omitempty"` + // The configuration of plugin that handles the deployment. + PluginConfig []byte `protobuf:"bytes,3,opt,name=plugin_config,json=pluginConfig,proto3" json:"plugin_config,omitempty"` + // The running deployment source. + RunningDeploymentSource *DeploymentSource `protobuf:"bytes,4,opt,name=running_deployment_source,json=runningDeploymentSource,proto3" json:"running_deployment_source,omitempty"` + // The target deployment source. + TargetDeploymentSource *DeploymentSource `protobuf:"bytes,5,opt,name=target_deployment_source,json=targetDeploymentSource,proto3" json:"target_deployment_source,omitempty"` +} + +func (x *ExecutePluginInput) Reset() { + *x = ExecutePluginInput{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutePluginInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutePluginInput) ProtoMessage() {} + +func (x *ExecutePluginInput) ProtoReflect() protoreflect.Message { + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[13] + 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 ExecutePluginInput.ProtoReflect.Descriptor instead. +func (*ExecutePluginInput) Descriptor() ([]byte, []int) { + return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{13} +} + +func (x *ExecutePluginInput) GetDeployment() *model.Deployment { + if x != nil { + return x.Deployment + } + return nil +} + +func (x *ExecutePluginInput) GetStage() *model.PipelineStage { + if x != nil { + return x.Stage + } + return nil +} + +func (x *ExecutePluginInput) GetPluginConfig() []byte { + if x != nil { + return x.PluginConfig + } + return nil +} + +func (x *ExecutePluginInput) GetRunningDeploymentSource() *DeploymentSource { + if x != nil { + return x.RunningDeploymentSource + } + return nil +} + +func (x *ExecutePluginInput) GetTargetDeploymentSource() *DeploymentSource { + if x != nil { + return x.TargetDeploymentSource + } + return nil +} + type DeploymentSource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -613,7 +801,7 @@ type DeploymentSource struct { func (x *DeploymentSource) Reset() { *x = DeploymentSource{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[11] + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -626,7 +814,7 @@ func (x *DeploymentSource) String() string { func (*DeploymentSource) ProtoMessage() {} func (x *DeploymentSource) ProtoReflect() protoreflect.Message { - mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[11] + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -639,7 +827,7 @@ func (x *DeploymentSource) ProtoReflect() protoreflect.Message { // Deprecated: Use DeploymentSource.ProtoReflect.Descriptor instead. func (*DeploymentSource) Descriptor() ([]byte, []int) { - return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{11} + return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP(), []int{14} } func (x *DeploymentSource) GetApplicationDirectory() string { @@ -695,7 +883,7 @@ type BuildPipelineSyncStagesRequest_StageConfig struct { func (x *BuildPipelineSyncStagesRequest_StageConfig) Reset() { *x = BuildPipelineSyncStagesRequest_StageConfig{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[12] + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -708,7 +896,7 @@ func (x *BuildPipelineSyncStagesRequest_StageConfig) String() string { func (*BuildPipelineSyncStagesRequest_StageConfig) ProtoMessage() {} func (x *BuildPipelineSyncStagesRequest_StageConfig) ProtoReflect() protoreflect.Message { - mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[12] + mi := &file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -844,96 +1032,142 @@ var file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x1a, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x0f, 0x50, 0x6c, - 0x61, 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3b, 0x0a, - 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x70, 0x0a, 0x19, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x17, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x6e, 0x0a, 0x18, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x16, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x9a, 0x06, 0x0a, 0x11, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, - 0x12, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, - 0x67, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, - 0x69, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x13, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x56, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x5c, 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x12, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x6e, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x19, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x17, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x6e, + 0x0a, 0x18, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x16, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x8e, + 0x03, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, + 0x19, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x17, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x6e, 0x0a, 0x18, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x16, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, + 0xd2, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xa0, 0x07, 0x0a, 0x11, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x12, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x44, 0x65, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x74, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa4, - 0x01, 0x0a, 0x17, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x42, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x79, 0x6e, - 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x9b, 0x01, 0x0a, 0x14, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, - 0x75, 0x69, 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3f, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x53, + 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa4, 0x01, 0x0a, + 0x17, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x2d, 0x63, 0x64, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x63, 0x64, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x22, 0x00, 0x12, 0x9b, 0x01, 0x0a, 0x14, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, 0x75, 0x69, + 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x63, + 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x53, 0x79, 0x6e, + 0x63, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x83, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x67, 0x65, 0x12, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x2d, 0x63, 0x64, 0x2f, 0x70, 0x69, + 0x70, 0x65, 0x63, 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -948,7 +1182,7 @@ func file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescGZIP() []byte { return file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDescData } -var file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_pkg_plugin_api_v1alpha1_deployment_api_proto_goTypes = []interface{}{ (*DetermineVersionsRequest)(nil), // 0: grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsRequest (*DetermineVersionsResponse)(nil), // 1: grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsResponse @@ -960,40 +1194,52 @@ var file_pkg_plugin_api_v1alpha1_deployment_api_proto_goTypes = []interface{}{ (*BuildQuickSyncStagesResponse)(nil), // 7: grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesResponse (*FetchDefinedStagesRequest)(nil), // 8: grpc.plugin.deploymentapi.v1alpha1.FetchDefinedStagesRequest (*FetchDefinedStagesResponse)(nil), // 9: grpc.plugin.deploymentapi.v1alpha1.FetchDefinedStagesResponse - (*PlanPluginInput)(nil), // 10: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput - (*DeploymentSource)(nil), // 11: grpc.plugin.deploymentapi.v1alpha1.DeploymentSource - (*BuildPipelineSyncStagesRequest_StageConfig)(nil), // 12: grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest.StageConfig - (*model.ArtifactVersion)(nil), // 13: model.ArtifactVersion - (model.SyncStrategy)(0), // 14: model.SyncStrategy - (*model.PipelineStage)(nil), // 15: model.PipelineStage - (*model.Deployment)(nil), // 16: model.Deployment + (*ExecuteStageRequest)(nil), // 10: grpc.plugin.deploymentapi.v1alpha1.ExecuteStageRequest + (*ExecuteStageResponse)(nil), // 11: grpc.plugin.deploymentapi.v1alpha1.ExecuteStageResponse + (*PlanPluginInput)(nil), // 12: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput + (*ExecutePluginInput)(nil), // 13: grpc.plugin.deploymentapi.v1alpha1.ExecutePluginInput + (*DeploymentSource)(nil), // 14: grpc.plugin.deploymentapi.v1alpha1.DeploymentSource + (*BuildPipelineSyncStagesRequest_StageConfig)(nil), // 15: grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest.StageConfig + (*model.ArtifactVersion)(nil), // 16: model.ArtifactVersion + (model.SyncStrategy)(0), // 17: model.SyncStrategy + (*model.PipelineStage)(nil), // 18: model.PipelineStage + (model.StageStatus)(0), // 19: model.StageStatus + (*model.Deployment)(nil), // 20: model.Deployment } var file_pkg_plugin_api_v1alpha1_deployment_api_proto_depIdxs = []int32{ - 10, // 0: grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsRequest.input:type_name -> grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput - 13, // 1: grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsResponse.versions:type_name -> model.ArtifactVersion - 10, // 2: grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyRequest.input:type_name -> grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput - 14, // 3: grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyResponse.sync_strategy:type_name -> model.SyncStrategy - 12, // 4: grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest.stages:type_name -> grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest.StageConfig - 15, // 5: grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesResponse.stages:type_name -> model.PipelineStage - 15, // 6: grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesResponse.stages:type_name -> model.PipelineStage - 16, // 7: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput.deployment:type_name -> model.Deployment - 11, // 8: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput.running_deployment_source:type_name -> grpc.plugin.deploymentapi.v1alpha1.DeploymentSource - 11, // 9: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput.target_deployment_source:type_name -> grpc.plugin.deploymentapi.v1alpha1.DeploymentSource - 8, // 10: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.FetchDefinedStages:input_type -> grpc.plugin.deploymentapi.v1alpha1.FetchDefinedStagesRequest - 0, // 11: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineVersions:input_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsRequest - 2, // 12: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineStrategy:input_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyRequest - 4, // 13: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildPipelineSyncStages:input_type -> grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest - 6, // 14: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildQuickSyncStages:input_type -> grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesRequest - 9, // 15: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.FetchDefinedStages:output_type -> grpc.plugin.deploymentapi.v1alpha1.FetchDefinedStagesResponse - 1, // 16: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineVersions:output_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsResponse - 3, // 17: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineStrategy:output_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyResponse - 5, // 18: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildPipelineSyncStages:output_type -> grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesResponse - 7, // 19: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildQuickSyncStages:output_type -> grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesResponse - 15, // [15:20] is the sub-list for method output_type - 10, // [10:15] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 12, // 0: grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsRequest.input:type_name -> grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput + 16, // 1: grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsResponse.versions:type_name -> model.ArtifactVersion + 12, // 2: grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyRequest.input:type_name -> grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput + 17, // 3: grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyResponse.sync_strategy:type_name -> model.SyncStrategy + 15, // 4: grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest.stages:type_name -> grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest.StageConfig + 18, // 5: grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesResponse.stages:type_name -> model.PipelineStage + 18, // 6: grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesResponse.stages:type_name -> model.PipelineStage + 13, // 7: grpc.plugin.deploymentapi.v1alpha1.ExecuteStageRequest.input:type_name -> grpc.plugin.deploymentapi.v1alpha1.ExecutePluginInput + 19, // 8: grpc.plugin.deploymentapi.v1alpha1.ExecuteStageResponse.status:type_name -> model.StageStatus + 20, // 9: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput.deployment:type_name -> model.Deployment + 14, // 10: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput.running_deployment_source:type_name -> grpc.plugin.deploymentapi.v1alpha1.DeploymentSource + 14, // 11: grpc.plugin.deploymentapi.v1alpha1.PlanPluginInput.target_deployment_source:type_name -> grpc.plugin.deploymentapi.v1alpha1.DeploymentSource + 20, // 12: grpc.plugin.deploymentapi.v1alpha1.ExecutePluginInput.deployment:type_name -> model.Deployment + 18, // 13: grpc.plugin.deploymentapi.v1alpha1.ExecutePluginInput.stage:type_name -> model.PipelineStage + 14, // 14: grpc.plugin.deploymentapi.v1alpha1.ExecutePluginInput.running_deployment_source:type_name -> grpc.plugin.deploymentapi.v1alpha1.DeploymentSource + 14, // 15: grpc.plugin.deploymentapi.v1alpha1.ExecutePluginInput.target_deployment_source:type_name -> grpc.plugin.deploymentapi.v1alpha1.DeploymentSource + 8, // 16: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.FetchDefinedStages:input_type -> grpc.plugin.deploymentapi.v1alpha1.FetchDefinedStagesRequest + 0, // 17: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineVersions:input_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsRequest + 2, // 18: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineStrategy:input_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyRequest + 4, // 19: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildPipelineSyncStages:input_type -> grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesRequest + 6, // 20: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildQuickSyncStages:input_type -> grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesRequest + 10, // 21: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.ExecuteStage:input_type -> grpc.plugin.deploymentapi.v1alpha1.ExecuteStageRequest + 9, // 22: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.FetchDefinedStages:output_type -> grpc.plugin.deploymentapi.v1alpha1.FetchDefinedStagesResponse + 1, // 23: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineVersions:output_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineVersionsResponse + 3, // 24: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.DetermineStrategy:output_type -> grpc.plugin.deploymentapi.v1alpha1.DetermineStrategyResponse + 5, // 25: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildPipelineSyncStages:output_type -> grpc.plugin.deploymentapi.v1alpha1.BuildPipelineSyncStagesResponse + 7, // 26: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.BuildQuickSyncStages:output_type -> grpc.plugin.deploymentapi.v1alpha1.BuildQuickSyncStagesResponse + 11, // 27: grpc.plugin.deploymentapi.v1alpha1.DeploymentService.ExecuteStage:output_type -> grpc.plugin.deploymentapi.v1alpha1.ExecuteStageResponse + 22, // [22:28] is the sub-list for method output_type + 16, // [16:22] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_pkg_plugin_api_v1alpha1_deployment_api_proto_init() } @@ -1123,7 +1369,7 @@ func file_pkg_plugin_api_v1alpha1_deployment_api_proto_init() { } } file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlanPluginInput); i { + switch v := v.(*ExecuteStageRequest); i { case 0: return &v.state case 1: @@ -1135,7 +1381,7 @@ func file_pkg_plugin_api_v1alpha1_deployment_api_proto_init() { } } file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeploymentSource); i { + switch v := v.(*ExecuteStageResponse); i { case 0: return &v.state case 1: @@ -1147,6 +1393,42 @@ func file_pkg_plugin_api_v1alpha1_deployment_api_proto_init() { } } file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlanPluginInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutePluginInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeploymentSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_plugin_api_v1alpha1_deployment_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BuildPipelineSyncStagesRequest_StageConfig); i { case 0: return &v.state @@ -1165,7 +1447,7 @@ func file_pkg_plugin_api_v1alpha1_deployment_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_plugin_api_v1alpha1_deployment_api_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/plugin/api/v1alpha1/deployment/api.pb.validate.go b/pkg/plugin/api/v1alpha1/deployment/api.pb.validate.go index cf678a4453..1325d0a454 100644 --- a/pkg/plugin/api/v1alpha1/deployment/api.pb.validate.go +++ b/pkg/plugin/api/v1alpha1/deployment/api.pb.validate.go @@ -1287,6 +1287,254 @@ var _ interface { ErrorName() string } = FetchDefinedStagesResponseValidationError{} +// Validate checks the field values on ExecuteStageRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExecuteStageRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExecuteStageRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExecuteStageRequestMultiError, or nil if none found. +func (m *ExecuteStageRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ExecuteStageRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetInput() == nil { + err := ExecuteStageRequestValidationError{ + field: "Input", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetInput()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecuteStageRequestValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecuteStageRequestValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecuteStageRequestValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExecuteStageRequestMultiError(errors) + } + + return nil +} + +// ExecuteStageRequestMultiError is an error wrapping multiple validation +// errors returned by ExecuteStageRequest.ValidateAll() if the designated +// constraints aren't met. +type ExecuteStageRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExecuteStageRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExecuteStageRequestMultiError) AllErrors() []error { return m } + +// ExecuteStageRequestValidationError is the validation error returned by +// ExecuteStageRequest.Validate if the designated constraints aren't met. +type ExecuteStageRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExecuteStageRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExecuteStageRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExecuteStageRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExecuteStageRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExecuteStageRequestValidationError) ErrorName() string { + return "ExecuteStageRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ExecuteStageRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExecuteStageRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExecuteStageRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExecuteStageRequestValidationError{} + +// Validate checks the field values on ExecuteStageResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExecuteStageResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExecuteStageResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExecuteStageResponseMultiError, or nil if none found. +func (m *ExecuteStageResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ExecuteStageResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Status + + // no validation rules for Message + + if len(errors) > 0 { + return ExecuteStageResponseMultiError(errors) + } + + return nil +} + +// ExecuteStageResponseMultiError is an error wrapping multiple validation +// errors returned by ExecuteStageResponse.ValidateAll() if the designated +// constraints aren't met. +type ExecuteStageResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExecuteStageResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExecuteStageResponseMultiError) AllErrors() []error { return m } + +// ExecuteStageResponseValidationError is the validation error returned by +// ExecuteStageResponse.Validate if the designated constraints aren't met. +type ExecuteStageResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExecuteStageResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExecuteStageResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExecuteStageResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExecuteStageResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExecuteStageResponseValidationError) ErrorName() string { + return "ExecuteStageResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ExecuteStageResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExecuteStageResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExecuteStageResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExecuteStageResponseValidationError{} + // Validate checks the field values on PlanPluginInput with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. @@ -1487,6 +1735,248 @@ var _ interface { ErrorName() string } = PlanPluginInputValidationError{} +// Validate checks the field values on ExecutePluginInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExecutePluginInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExecutePluginInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExecutePluginInputMultiError, or nil if none found. +func (m *ExecutePluginInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ExecutePluginInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetDeployment() == nil { + err := ExecutePluginInputValidationError{ + field: "Deployment", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDeployment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "Deployment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "Deployment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeployment()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecutePluginInputValidationError{ + field: "Deployment", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetStage() == nil { + err := ExecutePluginInputValidationError{ + field: "Stage", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "Stage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "Stage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecutePluginInputValidationError{ + field: "Stage", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for PluginConfig + + if all { + switch v := interface{}(m.GetRunningDeploymentSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "RunningDeploymentSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "RunningDeploymentSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRunningDeploymentSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecutePluginInputValidationError{ + field: "RunningDeploymentSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTargetDeploymentSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "TargetDeploymentSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecutePluginInputValidationError{ + field: "TargetDeploymentSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTargetDeploymentSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecutePluginInputValidationError{ + field: "TargetDeploymentSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExecutePluginInputMultiError(errors) + } + + return nil +} + +// ExecutePluginInputMultiError is an error wrapping multiple validation errors +// returned by ExecutePluginInput.ValidateAll() if the designated constraints +// aren't met. +type ExecutePluginInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExecutePluginInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExecutePluginInputMultiError) AllErrors() []error { return m } + +// ExecutePluginInputValidationError is the validation error returned by +// ExecutePluginInput.Validate if the designated constraints aren't met. +type ExecutePluginInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExecutePluginInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExecutePluginInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExecutePluginInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExecutePluginInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExecutePluginInputValidationError) ErrorName() string { + return "ExecutePluginInputValidationError" +} + +// Error satisfies the builtin error interface +func (e ExecutePluginInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExecutePluginInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExecutePluginInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExecutePluginInputValidationError{} + // Validate checks the field values on DeploymentSource with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. diff --git a/pkg/plugin/api/v1alpha1/deployment/api.proto b/pkg/plugin/api/v1alpha1/deployment/api.proto index 062b5426e0..b5ecb21869 100644 --- a/pkg/plugin/api/v1alpha1/deployment/api.proto +++ b/pkg/plugin/api/v1alpha1/deployment/api.proto @@ -33,6 +33,9 @@ service DeploymentService { rpc BuildPipelineSyncStages(BuildPipelineSyncStagesRequest) returns (BuildPipelineSyncStagesResponse) {} // BuildQuickSyncStages builds the deployment quick sync stages. rpc BuildQuickSyncStages(BuildQuickSyncStagesRequest) returns (BuildQuickSyncStagesResponse) {} + + // ExecuteStage executes the given stage. + rpc ExecuteStage(ExecuteStageRequest) returns (ExecuteStageResponse) {} } message DetermineVersionsRequest { @@ -98,6 +101,17 @@ message FetchDefinedStagesResponse { repeated string stages = 1; } +message ExecuteStageRequest { + ExecutePluginInput input = 1 [(validate.rules).message.required = true]; +} + +message ExecuteStageResponse { + // The result of the stage execution. + model.StageStatus status = 1; + // The detailed message of the stage execution. + string message = 2; +} + message PlanPluginInput { // The deployment to build a plan for. model.Deployment deployment = 1 [(validate.rules).message.required = true]; @@ -110,6 +124,21 @@ message PlanPluginInput { DeploymentSource target_deployment_source = 4; } +message ExecutePluginInput { + // The deployment to execute the stage for. + model.Deployment deployment = 1 [(validate.rules).message.required = true]; + // The stage to execute. + model.PipelineStage stage = 2 [(validate.rules).message.required = true]; + + // The configuration of plugin that handles the deployment. + bytes plugin_config = 3; + + // The running deployment source. + DeploymentSource running_deployment_source = 4; + // The target deployment source. + DeploymentSource target_deployment_source = 5; +} + message DeploymentSource { // The application directory where the source code is located. string application_directory = 1; diff --git a/pkg/plugin/api/v1alpha1/deployment/api_grpc.pb.go b/pkg/plugin/api/v1alpha1/deployment/api_grpc.pb.go index 45ea31b593..27540f63b6 100644 --- a/pkg/plugin/api/v1alpha1/deployment/api_grpc.pb.go +++ b/pkg/plugin/api/v1alpha1/deployment/api_grpc.pb.go @@ -32,6 +32,8 @@ type DeploymentServiceClient interface { BuildPipelineSyncStages(ctx context.Context, in *BuildPipelineSyncStagesRequest, opts ...grpc.CallOption) (*BuildPipelineSyncStagesResponse, error) // BuildQuickSyncStages builds the deployment quick sync stages. BuildQuickSyncStages(ctx context.Context, in *BuildQuickSyncStagesRequest, opts ...grpc.CallOption) (*BuildQuickSyncStagesResponse, error) + // ExecuteStage executes the given stage. + ExecuteStage(ctx context.Context, in *ExecuteStageRequest, opts ...grpc.CallOption) (*ExecuteStageResponse, error) } type deploymentServiceClient struct { @@ -87,6 +89,15 @@ func (c *deploymentServiceClient) BuildQuickSyncStages(ctx context.Context, in * return out, nil } +func (c *deploymentServiceClient) ExecuteStage(ctx context.Context, in *ExecuteStageRequest, opts ...grpc.CallOption) (*ExecuteStageResponse, error) { + out := new(ExecuteStageResponse) + err := c.cc.Invoke(ctx, "/grpc.plugin.deploymentapi.v1alpha1.DeploymentService/ExecuteStage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // DeploymentServiceServer is the server API for DeploymentService service. // All implementations must embed UnimplementedDeploymentServiceServer // for forward compatibility @@ -101,6 +112,8 @@ type DeploymentServiceServer interface { BuildPipelineSyncStages(context.Context, *BuildPipelineSyncStagesRequest) (*BuildPipelineSyncStagesResponse, error) // BuildQuickSyncStages builds the deployment quick sync stages. BuildQuickSyncStages(context.Context, *BuildQuickSyncStagesRequest) (*BuildQuickSyncStagesResponse, error) + // ExecuteStage executes the given stage. + ExecuteStage(context.Context, *ExecuteStageRequest) (*ExecuteStageResponse, error) mustEmbedUnimplementedDeploymentServiceServer() } @@ -123,6 +136,9 @@ func (UnimplementedDeploymentServiceServer) BuildPipelineSyncStages(context.Cont func (UnimplementedDeploymentServiceServer) BuildQuickSyncStages(context.Context, *BuildQuickSyncStagesRequest) (*BuildQuickSyncStagesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BuildQuickSyncStages not implemented") } +func (UnimplementedDeploymentServiceServer) ExecuteStage(context.Context, *ExecuteStageRequest) (*ExecuteStageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecuteStage not implemented") +} func (UnimplementedDeploymentServiceServer) mustEmbedUnimplementedDeploymentServiceServer() {} // UnsafeDeploymentServiceServer may be embedded to opt out of forward compatibility for this service. @@ -226,6 +242,24 @@ func _DeploymentService_BuildQuickSyncStages_Handler(srv interface{}, ctx contex return interceptor(ctx, in, info, handler) } +func _DeploymentService_ExecuteStage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecuteStageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeploymentServiceServer).ExecuteStage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.plugin.deploymentapi.v1alpha1.DeploymentService/ExecuteStage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeploymentServiceServer).ExecuteStage(ctx, req.(*ExecuteStageRequest)) + } + return interceptor(ctx, in, info, handler) +} + // DeploymentService_ServiceDesc is the grpc.ServiceDesc for DeploymentService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -253,6 +287,10 @@ var DeploymentService_ServiceDesc = grpc.ServiceDesc{ MethodName: "BuildQuickSyncStages", Handler: _DeploymentService_BuildQuickSyncStages_Handler, }, + { + MethodName: "ExecuteStage", + Handler: _DeploymentService_ExecuteStage_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/plugin/api/v1alpha1/deployment/api.proto",