Don't move velero v1 plugins to new proto dir

To preserve backwards compatibility, don't move velero
v1 plugins to new proto dir.

Signed-off-by: Scott Seago <sseago@redhat.com>
pull/5263/head
Scott Seago 2022-08-30 13:49:39 -04:00
parent 94a9a7c795
commit b15c59ba69
9 changed files with 120 additions and 118 deletions

View File

@ -0,0 +1 @@
Don't move velero v1 plugins to new proto dir

View File

@ -135,8 +135,11 @@ type ObjectStore interface {
The proto service definitions of the plugins will also be versioned and arranged by their plugin kind.
Currently, all the proto definitions reside under `pkg/plugin/proto` in a file corresponding to their plugin kind.
These files will be rearranged to be grouped by kind and then versioned: `pkg/plugin/proto/<plugin_kind>/<version>`.
The scripts to compile the proto service definitions will need to be updated to place the generated Go code under a matching directory structure.
These files will be rearranged to be grouped by kind and then versioned: `pkg/plugin/proto/<plugin_kind>/<version>`,
except for the current v1 plugins. Those will remain in their current package/location for backwards compatibility.
This will allow plugin images built with earlier versions of velero to work with the latest velero (for v1 plugins
only). The go_package option will be added to all proto service definitions to allow the proto compilation script
to place the generated go code for each plugin api version in the proper go package directory.
It is not possible to import an existing proto service into a new one, so any methods will need to be duplicated across versions if they are required by the new version.
The message definitions can be shared however, so these could be extracted from the service definition files and placed in a file that can be shared across all versions of the service.

View File

@ -20,6 +20,5 @@ echo "Updating plugin proto"
echo protoc --version
protoc pkg/plugin/proto/*.proto --go_out=plugins=grpc:pkg/plugin/generated/ --go_opt=module=github.com/vmware-tanzu/velero/pkg/plugin/generated -I pkg/plugin/proto/
protoc pkg/plugin/proto/backupitemaction/v1/*.proto --go_out=plugins=grpc:pkg/plugin/generated/ --go_opt=module=github.com/vmware-tanzu/velero/pkg/plugin/generated -I pkg/plugin/proto/
echo "Updating plugin proto - done!"

View File

@ -21,7 +21,7 @@ import (
"golang.org/x/net/context"
"google.golang.org/grpc"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated"
)
// BackupItemActionPlugin is an implementation of go-plugin's Plugin

View File

@ -27,7 +27,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
)

View File

@ -25,7 +25,7 @@ import (
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
)

View File

@ -31,7 +31,7 @@ import (
v1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/backup/mocks"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
velerotest "github.com/vmware-tanzu/velero/pkg/test"
)

View File

@ -2,14 +2,13 @@
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: backupitemaction/v1/BackupItemAction.proto
// source: BackupItemAction.proto
package v1
package generated
import (
context "context"
proto "github.com/golang/protobuf/proto"
generated "github.com/vmware-tanzu/velero/pkg/plugin/generated"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@ -43,7 +42,7 @@ type ExecuteRequest struct {
func (x *ExecuteRequest) Reset() {
*x = ExecuteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[0]
mi := &file_BackupItemAction_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -56,7 +55,7 @@ func (x *ExecuteRequest) String() string {
func (*ExecuteRequest) ProtoMessage() {}
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[0]
mi := &file_BackupItemAction_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -69,7 +68,7 @@ func (x *ExecuteRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{0}
return file_BackupItemAction_proto_rawDescGZIP(), []int{0}
}
func (x *ExecuteRequest) GetPlugin() string {
@ -98,14 +97,14 @@ type ExecuteResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
AdditionalItems []*generated.ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
}
func (x *ExecuteResponse) Reset() {
*x = ExecuteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[1]
mi := &file_BackupItemAction_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -118,7 +117,7 @@ func (x *ExecuteResponse) String() string {
func (*ExecuteResponse) ProtoMessage() {}
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[1]
mi := &file_BackupItemAction_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -131,7 +130,7 @@ func (x *ExecuteResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.
func (*ExecuteResponse) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{1}
return file_BackupItemAction_proto_rawDescGZIP(), []int{1}
}
func (x *ExecuteResponse) GetItem() []byte {
@ -141,7 +140,7 @@ func (x *ExecuteResponse) GetItem() []byte {
return nil
}
func (x *ExecuteResponse) GetAdditionalItems() []*generated.ResourceIdentifier {
func (x *ExecuteResponse) GetAdditionalItems() []*ResourceIdentifier {
if x != nil {
return x.AdditionalItems
}
@ -159,7 +158,7 @@ type BackupItemActionAppliesToRequest struct {
func (x *BackupItemActionAppliesToRequest) Reset() {
*x = BackupItemActionAppliesToRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[2]
mi := &file_BackupItemAction_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -172,7 +171,7 @@ func (x *BackupItemActionAppliesToRequest) String() string {
func (*BackupItemActionAppliesToRequest) ProtoMessage() {}
func (x *BackupItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[2]
mi := &file_BackupItemAction_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -185,7 +184,7 @@ func (x *BackupItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use BackupItemActionAppliesToRequest.ProtoReflect.Descriptor instead.
func (*BackupItemActionAppliesToRequest) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{2}
return file_BackupItemAction_proto_rawDescGZIP(), []int{2}
}
func (x *BackupItemActionAppliesToRequest) GetPlugin() string {
@ -200,13 +199,13 @@ type BackupItemActionAppliesToResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceSelector *generated.ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
}
func (x *BackupItemActionAppliesToResponse) Reset() {
*x = BackupItemActionAppliesToResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[3]
mi := &file_BackupItemAction_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -219,7 +218,7 @@ func (x *BackupItemActionAppliesToResponse) String() string {
func (*BackupItemActionAppliesToResponse) ProtoMessage() {}
func (x *BackupItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[3]
mi := &file_BackupItemAction_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -232,92 +231,91 @@ func (x *BackupItemActionAppliesToResponse) ProtoReflect() protoreflect.Message
// Deprecated: Use BackupItemActionAppliesToResponse.ProtoReflect.Descriptor instead.
func (*BackupItemActionAppliesToResponse) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{3}
return file_BackupItemAction_proto_rawDescGZIP(), []int{3}
}
func (x *BackupItemActionAppliesToResponse) GetResourceSelector() *generated.ResourceSelector {
func (x *BackupItemActionAppliesToResponse) GetResourceSelector() *ResourceSelector {
if x != nil {
return x.ResourceSelector
}
return nil
}
var File_backupitemaction_v1_BackupItemAction_proto protoreflect.FileDescriptor
var File_BackupItemAction_proto protoreflect.FileDescriptor
var file_backupitemaction_v1_BackupItemAction_proto_rawDesc = []byte{
0x0a, 0x2a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31,
0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54,
0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06,
0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x22, 0x6e, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x47, 0x0a, 0x0f, 0x61,
0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
0x69, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49,
0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74,
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54,
0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x22, 0x6c, 0x0a, 0x21, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x10, 0x52, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x32, 0xa0,
0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f,
0x12, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b,
0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c,
0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a,
0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78,
0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x76,
0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65, 0x6c,
0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x69,
0x74, 0x65, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
var file_BackupItemAction_proto_rawDesc = []byte{
0x0a, 0x16, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x65, 0x64, 0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69,
0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12,
0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x6e, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75,
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74,
0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x47,
0x0a, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75,
0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69,
0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x22, 0x6c, 0x0a, 0x21, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65,
0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52,
0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x32, 0xbc, 0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
0x73, 0x54, 0x6f, 0x12, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x2c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70,
0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40,
0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76,
0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65, 0x6c, 0x65,
0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_backupitemaction_v1_BackupItemAction_proto_rawDescOnce sync.Once
file_backupitemaction_v1_BackupItemAction_proto_rawDescData = file_backupitemaction_v1_BackupItemAction_proto_rawDesc
file_BackupItemAction_proto_rawDescOnce sync.Once
file_BackupItemAction_proto_rawDescData = file_BackupItemAction_proto_rawDesc
)
func file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP() []byte {
file_backupitemaction_v1_BackupItemAction_proto_rawDescOnce.Do(func() {
file_backupitemaction_v1_BackupItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_backupitemaction_v1_BackupItemAction_proto_rawDescData)
func file_BackupItemAction_proto_rawDescGZIP() []byte {
file_BackupItemAction_proto_rawDescOnce.Do(func() {
file_BackupItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_BackupItemAction_proto_rawDescData)
})
return file_backupitemaction_v1_BackupItemAction_proto_rawDescData
return file_BackupItemAction_proto_rawDescData
}
var file_backupitemaction_v1_BackupItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_backupitemaction_v1_BackupItemAction_proto_goTypes = []interface{}{
(*ExecuteRequest)(nil), // 0: v1.ExecuteRequest
(*ExecuteResponse)(nil), // 1: v1.ExecuteResponse
(*BackupItemActionAppliesToRequest)(nil), // 2: v1.BackupItemActionAppliesToRequest
(*BackupItemActionAppliesToResponse)(nil), // 3: v1.BackupItemActionAppliesToResponse
(*generated.ResourceIdentifier)(nil), // 4: generated.ResourceIdentifier
(*generated.ResourceSelector)(nil), // 5: generated.ResourceSelector
var file_BackupItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_BackupItemAction_proto_goTypes = []interface{}{
(*ExecuteRequest)(nil), // 0: generated.ExecuteRequest
(*ExecuteResponse)(nil), // 1: generated.ExecuteResponse
(*BackupItemActionAppliesToRequest)(nil), // 2: generated.BackupItemActionAppliesToRequest
(*BackupItemActionAppliesToResponse)(nil), // 3: generated.BackupItemActionAppliesToResponse
(*ResourceIdentifier)(nil), // 4: generated.ResourceIdentifier
(*ResourceSelector)(nil), // 5: generated.ResourceSelector
}
var file_backupitemaction_v1_BackupItemAction_proto_depIdxs = []int32{
4, // 0: v1.ExecuteResponse.additionalItems:type_name -> generated.ResourceIdentifier
5, // 1: v1.BackupItemActionAppliesToResponse.ResourceSelector:type_name -> generated.ResourceSelector
2, // 2: v1.BackupItemAction.AppliesTo:input_type -> v1.BackupItemActionAppliesToRequest
0, // 3: v1.BackupItemAction.Execute:input_type -> v1.ExecuteRequest
3, // 4: v1.BackupItemAction.AppliesTo:output_type -> v1.BackupItemActionAppliesToResponse
1, // 5: v1.BackupItemAction.Execute:output_type -> v1.ExecuteResponse
var file_BackupItemAction_proto_depIdxs = []int32{
4, // 0: generated.ExecuteResponse.additionalItems:type_name -> generated.ResourceIdentifier
5, // 1: generated.BackupItemActionAppliesToResponse.ResourceSelector:type_name -> generated.ResourceSelector
2, // 2: generated.BackupItemAction.AppliesTo:input_type -> generated.BackupItemActionAppliesToRequest
0, // 3: generated.BackupItemAction.Execute:input_type -> generated.ExecuteRequest
3, // 4: generated.BackupItemAction.AppliesTo:output_type -> generated.BackupItemActionAppliesToResponse
1, // 5: generated.BackupItemAction.Execute:output_type -> generated.ExecuteResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@ -325,13 +323,14 @@ var file_backupitemaction_v1_BackupItemAction_proto_depIdxs = []int32{
0, // [0:2] is the sub-list for field type_name
}
func init() { file_backupitemaction_v1_BackupItemAction_proto_init() }
func file_backupitemaction_v1_BackupItemAction_proto_init() {
if File_backupitemaction_v1_BackupItemAction_proto != nil {
func init() { file_BackupItemAction_proto_init() }
func file_BackupItemAction_proto_init() {
if File_BackupItemAction_proto != nil {
return
}
file_Shared_proto_init()
if !protoimpl.UnsafeEnabled {
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_BackupItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExecuteRequest); i {
case 0:
return &v.state
@ -343,7 +342,7 @@ func file_backupitemaction_v1_BackupItemAction_proto_init() {
return nil
}
}
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_BackupItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExecuteResponse); i {
case 0:
return &v.state
@ -355,7 +354,7 @@ func file_backupitemaction_v1_BackupItemAction_proto_init() {
return nil
}
}
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_BackupItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BackupItemActionAppliesToRequest); i {
case 0:
return &v.state
@ -367,7 +366,7 @@ func file_backupitemaction_v1_BackupItemAction_proto_init() {
return nil
}
}
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_BackupItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BackupItemActionAppliesToResponse); i {
case 0:
return &v.state
@ -384,20 +383,20 @@ func file_backupitemaction_v1_BackupItemAction_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_backupitemaction_v1_BackupItemAction_proto_rawDesc,
RawDescriptor: file_BackupItemAction_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_backupitemaction_v1_BackupItemAction_proto_goTypes,
DependencyIndexes: file_backupitemaction_v1_BackupItemAction_proto_depIdxs,
MessageInfos: file_backupitemaction_v1_BackupItemAction_proto_msgTypes,
GoTypes: file_BackupItemAction_proto_goTypes,
DependencyIndexes: file_BackupItemAction_proto_depIdxs,
MessageInfos: file_BackupItemAction_proto_msgTypes,
}.Build()
File_backupitemaction_v1_BackupItemAction_proto = out.File
file_backupitemaction_v1_BackupItemAction_proto_rawDesc = nil
file_backupitemaction_v1_BackupItemAction_proto_goTypes = nil
file_backupitemaction_v1_BackupItemAction_proto_depIdxs = nil
File_BackupItemAction_proto = out.File
file_BackupItemAction_proto_rawDesc = nil
file_BackupItemAction_proto_goTypes = nil
file_BackupItemAction_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
@ -426,7 +425,7 @@ func NewBackupItemActionClient(cc grpc.ClientConnInterface) BackupItemActionClie
func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error) {
out := new(BackupItemActionAppliesToResponse)
err := c.cc.Invoke(ctx, "/v1.BackupItemAction/AppliesTo", in, out, opts...)
err := c.cc.Invoke(ctx, "/generated.BackupItemAction/AppliesTo", in, out, opts...)
if err != nil {
return nil, err
}
@ -435,7 +434,7 @@ func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemAc
func (c *backupItemActionClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
out := new(ExecuteResponse)
err := c.cc.Invoke(ctx, "/v1.BackupItemAction/Execute", in, out, opts...)
err := c.cc.Invoke(ctx, "/generated.BackupItemAction/Execute", in, out, opts...)
if err != nil {
return nil, err
}
@ -473,7 +472,7 @@ func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.BackupItemAction/AppliesTo",
FullMethod: "/generated.BackupItemAction/AppliesTo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
@ -491,7 +490,7 @@ func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.BackupItemAction/Execute",
FullMethod: "/generated.BackupItemAction/Execute",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
@ -500,7 +499,7 @@ func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec
}
var _BackupItemAction_serviceDesc = grpc.ServiceDesc{
ServiceName: "v1.BackupItemAction",
ServiceName: "generated.BackupItemAction",
HandlerType: (*BackupItemActionServer)(nil),
Methods: []grpc.MethodDesc{
{
@ -513,5 +512,5 @@ var _BackupItemAction_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "backupitemaction/v1/BackupItemAction.proto",
Metadata: "BackupItemAction.proto",
}

View File

@ -1,6 +1,6 @@
syntax = "proto3";
package v1;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1";
package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto";
@ -12,7 +12,7 @@ message ExecuteRequest {
message ExecuteResponse {
bytes item = 1;
repeated generated.ResourceIdentifier additionalItems = 2;
repeated ResourceIdentifier additionalItems = 2;
}
service BackupItemAction {
@ -25,5 +25,5 @@ message BackupItemActionAppliesToRequest {
}
message BackupItemActionAppliesToResponse {
generated.ResourceSelector ResourceSelector = 1;
ResourceSelector ResourceSelector = 1;
}