Merge pull request #4943 from phuongatemc/refactor_plugin_biav1

Refactor BackupItemAction to backupitemaction/v1
pull/5264/head
Shubham Pampattiwar 2022-08-30 09:48:26 -04:00 committed by GitHub
commit 94a9a7c795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 4977 additions and 1565 deletions

View File

@ -0,0 +1 @@
Refactor BackupItemAction proto and related code to backupitemaction/v1 package. This is part of implementation of the plugin version design https://github.com/vmware-tanzu/velero/blob/main/design/plugin-versioning.md

2
go.mod
View File

@ -42,6 +42,7 @@ require (
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/api v0.74.0 google.golang.org/api v0.74.0
google.golang.org/grpc v1.45.0 google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.28.0
k8s.io/api v0.22.2 k8s.io/api v0.22.2
k8s.io/apiextensions-apiserver v0.22.2 k8s.io/apiextensions-apiserver v0.22.2
k8s.io/apimachinery v0.22.2 k8s.io/apimachinery v0.22.2
@ -133,7 +134,6 @@ require (
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb // indirect google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect

View File

@ -45,11 +45,11 @@ RUN go get golang.org/x/tools/cmd/goimports@11e9d9cc0042e6bd10337d4d2c3e5d929550
# get protoc compiler and golang plugin # get protoc compiler and golang plugin
WORKDIR /root WORKDIR /root
RUN apt-get update && apt-get install -y unzip RUN apt-get update && apt-get install -y unzip
RUN wget --quiet https://github.com/protocolbuffers/protobuf/releases/download/v3.9.1/protoc-3.9.1-linux-x86_64.zip && \ RUN wget --quiet https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip && \
unzip protoc-3.9.1-linux-x86_64.zip && \ unzip protoc-3.14.0-linux-x86_64.zip && \
mv bin/protoc /usr/bin/protoc && \ mv bin/protoc /usr/bin/protoc && \
chmod +x /usr/bin/protoc chmod +x /usr/bin/protoc
RUN go get github.com/golang/protobuf/protoc-gen-go@v1.0.0 RUN go get github.com/golang/protobuf/protoc-gen-go@v1.4.3
# get goreleaser # get goreleaser
RUN wget --quiet https://github.com/goreleaser/goreleaser/releases/download/v0.120.8/goreleaser_Linux_x86_64.tar.gz && \ RUN wget --quiet https://github.com/goreleaser/goreleaser/releases/download/v0.120.8/goreleaser_Linux_x86_64.tar.gz && \

View File

@ -18,6 +18,8 @@ HACK_DIR=$(dirname "${BASH_SOURCE}")
echo "Updating plugin proto" echo "Updating plugin proto"
protoc pkg/plugin/proto/*.proto --go_out=plugins=grpc:pkg/plugin/generated/ -I pkg/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!" echo "Updating plugin proto - done!"

View File

@ -15,4 +15,4 @@
# limitations under the License. # limitations under the License.
HACK_DIR=$(dirname "${BASH_SOURCE[0]}") HACK_DIR=$(dirname "${BASH_SOURCE[0]}")
"${HACK_DIR}"/update-fmt.sh --verify "${HACK_DIR}"/update-1fmt.sh --verify

View File

@ -16,7 +16,7 @@
HACK_DIR=$(dirname "${BASH_SOURCE}") HACK_DIR=$(dirname "${BASH_SOURCE}")
${HACK_DIR}/update-generated-crd-code.sh ${HACK_DIR}/update-3generated-crd-code.sh
# ensure no changes to generated CRDs # ensure no changes to generated CRDs
if ! git diff --exit-code config/crd/v1/crds/crds.go >/dev/null; then if ! git diff --exit-code config/crd/v1/crds/crds.go >/dev/null; then

View File

@ -27,7 +27,7 @@ cleanup() {
} }
echo "Verifying generated Github issue template" echo "Verifying generated Github issue template"
${HACK_DIR}/update-generated-issue-template.sh ${OUT_TMP_FILE} > /dev/null ${HACK_DIR}/update-4generated-issue-template.sh ${OUT_TMP_FILE} > /dev/null
output=$(echo "`diff ${ISSUE_TEMPLATE_FILE} ${OUT_TMP_FILE}`") output=$(echo "`diff ${ISSUE_TEMPLATE_FILE} ${OUT_TMP_FILE}`")
if [[ -n "${output}" ]] ; then if [[ -n "${output}" ]] ; then

View File

@ -45,6 +45,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/kuberesource" "github.com/vmware-tanzu/velero/pkg/kuberesource"
"github.com/vmware-tanzu/velero/pkg/plugin/framework" "github.com/vmware-tanzu/velero/pkg/plugin/framework"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
"github.com/vmware-tanzu/velero/pkg/podexec" "github.com/vmware-tanzu/velero/pkg/podexec"
"github.com/vmware-tanzu/velero/pkg/podvolume" "github.com/vmware-tanzu/velero/pkg/podvolume"
"github.com/vmware-tanzu/velero/pkg/util/boolptr" "github.com/vmware-tanzu/velero/pkg/util/boolptr"
@ -62,7 +63,7 @@ const BackupFormatVersion = "1.1.0"
type Backupper interface { type Backupper interface {
// Backup takes a backup using the specification in the velerov1api.Backup and writes backup and log data // Backup takes a backup using the specification in the velerov1api.Backup and writes backup and log data
// to the given writers. // to the given writers.
Backup(logger logrus.FieldLogger, backup *Request, backupFile io.Writer, actions []velero.BackupItemAction, volumeSnapshotterGetter VolumeSnapshotterGetter) error Backup(logger logrus.FieldLogger, backup *Request, backupFile io.Writer, actions []biav1.BackupItemAction, volumeSnapshotterGetter VolumeSnapshotterGetter) error
BackupWithResolvers(log logrus.FieldLogger, backupRequest *Request, backupFile io.Writer, BackupWithResolvers(log logrus.FieldLogger, backupRequest *Request, backupFile io.Writer,
backupItemActionResolver framework.BackupItemActionResolver, itemSnapshotterResolver framework.ItemSnapshotterResolver, backupItemActionResolver framework.BackupItemActionResolver, itemSnapshotterResolver framework.ItemSnapshotterResolver,
volumeSnapshotterGetter VolumeSnapshotterGetter) error volumeSnapshotterGetter VolumeSnapshotterGetter) error
@ -170,7 +171,7 @@ type VolumeSnapshotterGetter interface {
// back up individual resources that don't prevent the backup from continuing to be processed) are logged // back up individual resources that don't prevent the backup from continuing to be processed) are logged
// to the backup log. // to the backup log.
func (kb *kubernetesBackupper) Backup(log logrus.FieldLogger, backupRequest *Request, backupFile io.Writer, func (kb *kubernetesBackupper) Backup(log logrus.FieldLogger, backupRequest *Request, backupFile io.Writer,
actions []velero.BackupItemAction, volumeSnapshotterGetter VolumeSnapshotterGetter) error { actions []biav1.BackupItemAction, volumeSnapshotterGetter VolumeSnapshotterGetter) error {
backupItemActions := framework.NewBackupItemActionResolver(actions) backupItemActions := framework.NewBackupItemActionResolver(actions)
itemSnapshotters := framework.NewItemSnapshotterResolver(nil) itemSnapshotters := framework.NewItemSnapshotterResolver(nil)
return kb.BackupWithResolvers(log, backupRequest, backupFile, backupItemActions, itemSnapshotters, return kb.BackupWithResolvers(log, backupRequest, backupFile, backupItemActions, itemSnapshotters,
@ -206,16 +207,19 @@ func (kb *kubernetesBackupper) BackupWithResolvers(log logrus.FieldLogger,
var err error var err error
backupRequest.ResourceHooks, err = getResourceHooks(backupRequest.Spec.Hooks.Resources, kb.discoveryHelper) backupRequest.ResourceHooks, err = getResourceHooks(backupRequest.Spec.Hooks.Resources, kb.discoveryHelper)
if err != nil { if err != nil {
log.WithError(errors.WithStack(err)).Debugf("Error from getResourceHooks")
return err return err
} }
backupRequest.ResolvedActions, err = backupItemActionResolver.ResolveActions(kb.discoveryHelper) backupRequest.ResolvedActions, err = backupItemActionResolver.ResolveActions(kb.discoveryHelper)
if err != nil { if err != nil {
log.WithError(errors.WithStack(err)).Debugf("Error from backupItemActionResolver.ResolveActions")
return err return err
} }
backupRequest.ResolvedItemSnapshotters, err = itemSnapshotterResolver.ResolveActions(kb.discoveryHelper) backupRequest.ResolvedItemSnapshotters, err = itemSnapshotterResolver.ResolveActions(kb.discoveryHelper)
if err != nil { if err != nil {
log.WithError(errors.WithStack(err)).Debugf("Error from itemSnapshotterResolver.ResolveActions")
return err return err
} }
@ -238,6 +242,7 @@ func (kb *kubernetesBackupper) BackupWithResolvers(log logrus.FieldLogger,
if kb.resticBackupperFactory != nil { if kb.resticBackupperFactory != nil {
resticBackupper, err = kb.resticBackupperFactory.NewBackupper(ctx, backupRequest.Backup) resticBackupper, err = kb.resticBackupperFactory.NewBackupper(ctx, backupRequest.Backup)
if err != nil { if err != nil {
log.WithError(errors.WithStack(err)).Debugf("Error from NewBackupper")
return errors.WithStack(err) return errors.WithStack(err)
} }
} }

View File

@ -47,6 +47,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/discovery" "github.com/vmware-tanzu/velero/pkg/discovery"
"github.com/vmware-tanzu/velero/pkg/kuberesource" "github.com/vmware-tanzu/velero/pkg/kuberesource"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
"github.com/vmware-tanzu/velero/pkg/podvolume" "github.com/vmware-tanzu/velero/pkg/podvolume"
"github.com/vmware-tanzu/velero/pkg/test" "github.com/vmware-tanzu/velero/pkg/test"
testutil "github.com/vmware-tanzu/velero/pkg/test" testutil "github.com/vmware-tanzu/velero/pkg/test"
@ -1360,7 +1361,7 @@ func TestBackupActionsRunForCorrectItems(t *testing.T) {
h.addItems(t, resource) h.addItems(t, resource)
} }
actions := []velero.BackupItemAction{} actions := []biav1.BackupItemAction{}
for action := range tc.actions { for action := range tc.actions {
actions = append(actions, action) actions = append(actions, action)
} }
@ -1386,7 +1387,7 @@ func TestBackupWithInvalidActions(t *testing.T) {
name string name string
backup *velerov1.Backup backup *velerov1.Backup
apiResources []*test.APIResource apiResources []*test.APIResource
actions []velero.BackupItemAction actions []biav1.BackupItemAction
}{ }{
{ {
name: "action with invalid label selector results in an error", name: "action with invalid label selector results in an error",
@ -1402,7 +1403,7 @@ func TestBackupWithInvalidActions(t *testing.T) {
builder.ForPersistentVolume("baz").Result(), builder.ForPersistentVolume("baz").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
new(recordResourcesAction).ForLabelSelector("=invalid-selector"), new(recordResourcesAction).ForLabelSelector("=invalid-selector"),
}, },
}, },
@ -1420,7 +1421,7 @@ func TestBackupWithInvalidActions(t *testing.T) {
builder.ForPersistentVolume("baz").Result(), builder.ForPersistentVolume("baz").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&appliesToErrorAction{}, &appliesToErrorAction{},
}, },
}, },
@ -1482,7 +1483,7 @@ func TestBackupActionModifications(t *testing.T) {
name string name string
backup *velerov1.Backup backup *velerov1.Backup
apiResources []*test.APIResource apiResources []*test.APIResource
actions []velero.BackupItemAction actions []biav1.BackupItemAction
want map[string]unstructuredObject want map[string]unstructuredObject
}{ }{
{ {
@ -1493,7 +1494,7 @@ func TestBackupActionModifications(t *testing.T) {
builder.ForPod("ns-1", "pod-1").Result(), builder.ForPod("ns-1", "pod-1").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
modifyingActionGetter(func(item *unstructured.Unstructured) { modifyingActionGetter(func(item *unstructured.Unstructured) {
item.SetLabels(map[string]string{"updated": "true"}) item.SetLabels(map[string]string{"updated": "true"})
}), }),
@ -1510,7 +1511,7 @@ func TestBackupActionModifications(t *testing.T) {
builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("should-be-removed", "true")).Result(), builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("should-be-removed", "true")).Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
modifyingActionGetter(func(item *unstructured.Unstructured) { modifyingActionGetter(func(item *unstructured.Unstructured) {
item.SetLabels(nil) item.SetLabels(nil)
}), }),
@ -1527,7 +1528,7 @@ func TestBackupActionModifications(t *testing.T) {
builder.ForPod("ns-1", "pod-1").Result(), builder.ForPod("ns-1", "pod-1").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
modifyingActionGetter(func(item *unstructured.Unstructured) { modifyingActionGetter(func(item *unstructured.Unstructured) {
item.Object["spec"].(map[string]interface{})["nodeName"] = "foo" item.Object["spec"].(map[string]interface{})["nodeName"] = "foo"
}), }),
@ -1545,7 +1546,7 @@ func TestBackupActionModifications(t *testing.T) {
builder.ForPod("ns-1", "pod-1").Result(), builder.ForPod("ns-1", "pod-1").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
modifyingActionGetter(func(item *unstructured.Unstructured) { modifyingActionGetter(func(item *unstructured.Unstructured) {
item.SetName(item.GetName() + "-updated") item.SetName(item.GetName() + "-updated")
item.SetNamespace(item.GetNamespace() + "-updated") item.SetNamespace(item.GetNamespace() + "-updated")
@ -1586,7 +1587,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
name string name string
backup *velerov1.Backup backup *velerov1.Backup
apiResources []*test.APIResource apiResources []*test.APIResource
actions []velero.BackupItemAction actions []biav1.BackupItemAction
want []string want []string
}{ }{
{ {
@ -1599,7 +1600,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPod("ns-3", "pod-3").Result(), builder.ForPod("ns-3", "pod-3").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
selector: velero.ResourceSelector{IncludedNamespaces: []string{"ns-1"}}, selector: velero.ResourceSelector{IncludedNamespaces: []string{"ns-1"}},
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {
@ -1631,7 +1632,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPod("ns-3", "pod-3").Result(), builder.ForPod("ns-3", "pod-3").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {
additionalItems := []velero.ResourceIdentifier{ additionalItems := []velero.ResourceIdentifier{
@ -1661,7 +1662,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPersistentVolume("pv-2").Result(), builder.ForPersistentVolume("pv-2").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {
additionalItems := []velero.ResourceIdentifier{ additionalItems := []velero.ResourceIdentifier{
@ -1694,7 +1695,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPersistentVolume("pv-2").Result(), builder.ForPersistentVolume("pv-2").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {
additionalItems := []velero.ResourceIdentifier{ additionalItems := []velero.ResourceIdentifier{
@ -1724,7 +1725,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPersistentVolume("pv-2").Result(), builder.ForPersistentVolume("pv-2").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {
additionalItems := []velero.ResourceIdentifier{ additionalItems := []velero.ResourceIdentifier{
@ -1755,7 +1756,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPersistentVolume("pv-2").Result(), builder.ForPersistentVolume("pv-2").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {
additionalItems := []velero.ResourceIdentifier{ additionalItems := []velero.ResourceIdentifier{
@ -1785,7 +1786,7 @@ func TestBackupActionAdditionalItems(t *testing.T) {
builder.ForPod("ns-3", "pod-3").Result(), builder.ForPod("ns-3", "pod-3").Result(),
), ),
}, },
actions: []velero.BackupItemAction{ actions: []biav1.BackupItemAction{
&pluggableAction{ &pluggableAction{
selector: velero.ResourceSelector{IncludedNamespaces: []string{"ns-1"}}, selector: velero.ResourceSelector{IncludedNamespaces: []string{"ns-1"}},
executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) { executeFunc: func(item runtime.Unstructured, backup *velerov1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error) {

View File

@ -49,7 +49,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/plugin/clientmgmt" "github.com/vmware-tanzu/velero/pkg/plugin/clientmgmt"
"github.com/vmware-tanzu/velero/pkg/plugin/framework" "github.com/vmware-tanzu/velero/pkg/plugin/framework"
pluginmocks "github.com/vmware-tanzu/velero/pkg/plugin/mocks" pluginmocks "github.com/vmware-tanzu/velero/pkg/plugin/mocks"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
velerotest "github.com/vmware-tanzu/velero/pkg/test" velerotest "github.com/vmware-tanzu/velero/pkg/test"
"github.com/vmware-tanzu/velero/pkg/util/boolptr" "github.com/vmware-tanzu/velero/pkg/util/boolptr"
"github.com/vmware-tanzu/velero/pkg/util/logging" "github.com/vmware-tanzu/velero/pkg/util/logging"
@ -59,7 +59,7 @@ type fakeBackupper struct {
mock.Mock mock.Mock
} }
func (b *fakeBackupper) Backup(logger logrus.FieldLogger, backup *pkgbackup.Request, backupFile io.Writer, actions []velero.BackupItemAction, volumeSnapshotterGetter pkgbackup.VolumeSnapshotterGetter) error { func (b *fakeBackupper) Backup(logger logrus.FieldLogger, backup *pkgbackup.Request, backupFile io.Writer, actions []biav1.BackupItemAction, volumeSnapshotterGetter pkgbackup.VolumeSnapshotterGetter) error {
args := b.Called(logger, backup, backupFile, actions, volumeSnapshotterGetter) args := b.Called(logger, backup, backupFile, actions, volumeSnapshotterGetter)
return args.Error(0) return args.Error(0)
} }
@ -843,7 +843,7 @@ func TestProcessBackupCompletions(t *testing.T) {
pluginManager.On("GetBackupItemActions").Return(nil, nil) pluginManager.On("GetBackupItemActions").Return(nil, nil)
pluginManager.On("CleanupClients").Return(nil) pluginManager.On("CleanupClients").Return(nil)
pluginManager.On("GetItemSnapshotters").Return(nil, nil) pluginManager.On("GetItemSnapshotters").Return(nil, nil)
backupper.On("Backup", mock.Anything, mock.Anything, mock.Anything, []velero.BackupItemAction(nil), pluginManager).Return(nil) backupper.On("Backup", mock.Anything, mock.Anything, mock.Anything, []biav1.BackupItemAction(nil), pluginManager).Return(nil)
backupper.On("BackupWithResolvers", mock.Anything, mock.Anything, mock.Anything, framework.BackupItemActionResolver{}, framework.ItemSnapshotterResolver{}, pluginManager).Return(nil) backupper.On("BackupWithResolvers", mock.Anything, mock.Anything, mock.Anything, framework.BackupItemActionResolver{}, framework.ItemSnapshotterResolver{}, pluginManager).Return(nil)
backupStore.On("BackupExists", test.backupLocation.Spec.StorageType.ObjectStorage.Bucket, test.backup.Name).Return(test.backupExists, test.existenceCheckError) backupStore.On("BackupExists", test.backupLocation.Spec.StorageType.ObjectStorage.Bucket, test.backup.Name).Return(test.backupExists, test.existenceCheckError)

View File

@ -20,12 +20,12 @@ import (
"strings" "strings"
"sync" "sync"
v1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/vmware-tanzu/velero/pkg/plugin/framework" "github.com/vmware-tanzu/velero/pkg/plugin/framework"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
) )
// Manager manages the lifecycles of plugins. // Manager manages the lifecycles of plugins.
@ -37,10 +37,10 @@ type Manager interface {
GetVolumeSnapshotter(name string) (velero.VolumeSnapshotter, error) GetVolumeSnapshotter(name string) (velero.VolumeSnapshotter, error)
// GetBackupItemActions returns all backup item action plugins. // GetBackupItemActions returns all backup item action plugins.
GetBackupItemActions() ([]velero.BackupItemAction, error) GetBackupItemActions() ([]biav1.BackupItemAction, error)
// GetBackupItemAction returns the backup item action plugin for name. // GetBackupItemAction returns the backup item action plugin for name.
GetBackupItemAction(name string) (velero.BackupItemAction, error) GetBackupItemAction(name string) (biav1.BackupItemAction, error)
// GetRestoreItemActions returns all restore item action plugins. // GetRestoreItemActions returns all restore item action plugins.
GetRestoreItemActions() ([]velero.RestoreItemAction, error) GetRestoreItemActions() ([]velero.RestoreItemAction, error)
@ -55,10 +55,10 @@ type Manager interface {
GetDeleteItemAction(name string) (velero.DeleteItemAction, error) GetDeleteItemAction(name string) (velero.DeleteItemAction, error)
// GetItemSnapshotter returns the item snapshotter plugin for name // GetItemSnapshotter returns the item snapshotter plugin for name
GetItemSnapshotter(name string) (v1.ItemSnapshotter, error) GetItemSnapshotter(name string) (isv1.ItemSnapshotter, error)
// GetItemSnapshotters returns all item snapshotter plugins // GetItemSnapshotters returns all item snapshotter plugins
GetItemSnapshotters() ([]v1.ItemSnapshotter, error) GetItemSnapshotters() ([]isv1.ItemSnapshotter, error)
// CleanupClients terminates all of the Manager's running plugin processes. // CleanupClients terminates all of the Manager's running plugin processes.
CleanupClients() CleanupClients()
@ -166,10 +166,10 @@ func (m *manager) GetVolumeSnapshotter(name string) (velero.VolumeSnapshotter, e
} }
// GetBackupItemActions returns all backup item actions as restartableBackupItemActions. // GetBackupItemActions returns all backup item actions as restartableBackupItemActions.
func (m *manager) GetBackupItemActions() ([]velero.BackupItemAction, error) { func (m *manager) GetBackupItemActions() ([]biav1.BackupItemAction, error) {
list := m.registry.List(framework.PluginKindBackupItemAction) list := m.registry.List(framework.PluginKindBackupItemAction)
actions := make([]velero.BackupItemAction, 0, len(list)) actions := make([]biav1.BackupItemAction, 0, len(list))
for i := range list { for i := range list {
id := list[i] id := list[i]
@ -186,7 +186,7 @@ func (m *manager) GetBackupItemActions() ([]velero.BackupItemAction, error) {
} }
// GetBackupItemAction returns a restartableBackupItemAction for name. // GetBackupItemAction returns a restartableBackupItemAction for name.
func (m *manager) GetBackupItemAction(name string) (velero.BackupItemAction, error) { func (m *manager) GetBackupItemAction(name string) (biav1.BackupItemAction, error) {
name = sanitizeName(name) name = sanitizeName(name)
restartableProcess, err := m.getRestartableProcess(framework.PluginKindBackupItemAction, name) restartableProcess, err := m.getRestartableProcess(framework.PluginKindBackupItemAction, name)
@ -264,7 +264,7 @@ func (m *manager) GetDeleteItemAction(name string) (velero.DeleteItemAction, err
return r, nil return r, nil
} }
func (m *manager) GetItemSnapshotter(name string) (v1.ItemSnapshotter, error) { func (m *manager) GetItemSnapshotter(name string) (isv1.ItemSnapshotter, error) {
name = sanitizeName(name) name = sanitizeName(name)
restartableProcess, err := m.getRestartableProcess(framework.PluginKindItemSnapshotter, name) restartableProcess, err := m.getRestartableProcess(framework.PluginKindItemSnapshotter, name)
@ -276,10 +276,10 @@ func (m *manager) GetItemSnapshotter(name string) (v1.ItemSnapshotter, error) {
return r, nil return r, nil
} }
func (m *manager) GetItemSnapshotters() ([]v1.ItemSnapshotter, error) { func (m *manager) GetItemSnapshotters() ([]isv1.ItemSnapshotter, error) {
list := m.registry.List(framework.PluginKindItemSnapshotter) list := m.registry.List(framework.PluginKindItemSnapshotter)
actions := make([]v1.ItemSnapshotter, 0, len(list)) actions := make([]isv1.ItemSnapshotter, 0, len(list))
for i := range list { for i := range list {
id := list[i] id := list[i]

View File

@ -23,6 +23,7 @@ import (
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/plugin/framework" "github.com/vmware-tanzu/velero/pkg/plugin/framework"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
) )
// restartableBackupItemAction is a backup item action for a given implementation (such as "pod"). It is associated with // restartableBackupItemAction is a backup item action for a given implementation (such as "pod"). It is associated with
@ -45,13 +46,13 @@ func newRestartableBackupItemAction(name string, sharedPluginProcess Restartable
// getBackupItemAction returns the backup item action for this restartableBackupItemAction. It does *not* restart the // getBackupItemAction returns the backup item action for this restartableBackupItemAction. It does *not* restart the
// plugin process. // plugin process.
func (r *restartableBackupItemAction) getBackupItemAction() (velero.BackupItemAction, error) { func (r *restartableBackupItemAction) getBackupItemAction() (biav1.BackupItemAction, error) {
plugin, err := r.sharedPluginProcess.getByKindAndName(r.key) plugin, err := r.sharedPluginProcess.getByKindAndName(r.key)
if err != nil { if err != nil {
return nil, err return nil, err
} }
backupItemAction, ok := plugin.(velero.BackupItemAction) backupItemAction, ok := plugin.(biav1.BackupItemAction)
if !ok { if !ok {
return nil, errors.Errorf("%T is not a BackupItemAction!", plugin) return nil, errors.Errorf("%T is not a BackupItemAction!", plugin)
} }
@ -60,7 +61,7 @@ func (r *restartableBackupItemAction) getBackupItemAction() (velero.BackupItemAc
} }
// getDelegate restarts the plugin process (if needed) and returns the backup item action for this restartableBackupItemAction. // getDelegate restarts the plugin process (if needed) and returns the backup item action for this restartableBackupItemAction.
func (r *restartableBackupItemAction) getDelegate() (velero.BackupItemAction, error) { func (r *restartableBackupItemAction) getDelegate() (biav1.BackupItemAction, error) {
if err := r.sharedPluginProcess.resetIfNeeded(); err != nil { if err := r.sharedPluginProcess.resetIfNeeded(); err != nil {
return nil, err return nil, err
} }

View File

@ -22,10 +22,10 @@ import (
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
"github.com/vmware-tanzu/velero/pkg/discovery" "github.com/vmware-tanzu/velero/pkg/discovery"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
"github.com/vmware-tanzu/velero/pkg/util/collections" "github.com/vmware-tanzu/velero/pkg/util/collections"
) )
@ -98,11 +98,11 @@ func resolveAction(helper discovery.Helper, action velero.Applicable) (resources
} }
type BackupItemResolvedAction struct { type BackupItemResolvedAction struct {
velero.BackupItemAction biav1.BackupItemAction
resolvedAction resolvedAction
} }
func NewBackupItemActionResolver(actions []velero.BackupItemAction) BackupItemActionResolver { func NewBackupItemActionResolver(actions []biav1.BackupItemAction) BackupItemActionResolver {
return BackupItemActionResolver{ return BackupItemActionResolver{
actions: actions, actions: actions,
} }
@ -131,7 +131,7 @@ type ActionResolver interface {
} }
type BackupItemActionResolver struct { type BackupItemActionResolver struct {
actions []velero.BackupItemAction actions []biav1.BackupItemAction
} }
func (recv BackupItemActionResolver) ResolveActions(helper discovery.Helper) ([]BackupItemResolvedAction, error) { func (recv BackupItemActionResolver) ResolveActions(helper discovery.Helper) ([]BackupItemResolvedAction, error) {

View File

@ -21,7 +21,7 @@ import (
"golang.org/x/net/context" "golang.org/x/net/context"
"google.golang.org/grpc" "google.golang.org/grpc"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated" protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
) )
// BackupItemActionPlugin is an implementation of go-plugin's Plugin // BackupItemActionPlugin is an implementation of go-plugin's Plugin
@ -39,6 +39,6 @@ func (p *BackupItemActionPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBro
// GRPCServer registers a BackupItemAction gRPC server. // GRPCServer registers a BackupItemAction gRPC server.
func (p *BackupItemActionPlugin) GRPCServer(_ *plugin.GRPCBroker, server *grpc.Server) error { func (p *BackupItemActionPlugin) GRPCServer(_ *plugin.GRPCBroker, server *grpc.Server) error {
proto.RegisterBackupItemActionServer(server, &BackupItemActionGRPCServer{mux: p.serverMux}) protobiav1.RegisterBackupItemActionServer(server, &BackupItemActionGRPCServer{mux: p.serverMux})
return nil return nil
} }

View File

@ -27,7 +27,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" 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"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
) )
@ -42,18 +42,18 @@ func NewBackupItemActionPlugin(options ...PluginOption) *BackupItemActionPlugin
// gRPC client to make calls to the plugin server. // gRPC client to make calls to the plugin server.
type BackupItemActionGRPCClient struct { type BackupItemActionGRPCClient struct {
*clientBase *clientBase
grpcClient proto.BackupItemActionClient grpcClient protobiav1.BackupItemActionClient
} }
func newBackupItemActionGRPCClient(base *clientBase, clientConn *grpc.ClientConn) interface{} { func newBackupItemActionGRPCClient(base *clientBase, clientConn *grpc.ClientConn) interface{} {
return &BackupItemActionGRPCClient{ return &BackupItemActionGRPCClient{
clientBase: base, clientBase: base,
grpcClient: proto.NewBackupItemActionClient(clientConn), grpcClient: protobiav1.NewBackupItemActionClient(clientConn),
} }
} }
func (c *BackupItemActionGRPCClient) AppliesTo() (velero.ResourceSelector, error) { func (c *BackupItemActionGRPCClient) AppliesTo() (velero.ResourceSelector, error) {
req := &proto.BackupItemActionAppliesToRequest{ req := &protobiav1.BackupItemActionAppliesToRequest{
Plugin: c.plugin, Plugin: c.plugin,
} }
@ -86,7 +86,7 @@ func (c *BackupItemActionGRPCClient) Execute(item runtime.Unstructured, backup *
return nil, nil, errors.WithStack(err) return nil, nil, errors.WithStack(err)
} }
req := &proto.ExecuteRequest{ req := &protobiav1.ExecuteRequest{
Plugin: c.plugin, Plugin: c.plugin,
Item: itemJSON, Item: itemJSON,
Backup: backupJSON, Backup: backupJSON,

View File

@ -25,7 +25,9 @@ import (
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated" proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
) )
// BackupItemActionGRPCServer implements the proto-generated BackupItemAction interface, and accepts // BackupItemActionGRPCServer implements the proto-generated BackupItemAction interface, and accepts
@ -34,13 +36,13 @@ type BackupItemActionGRPCServer struct {
mux *serverMux mux *serverMux
} }
func (s *BackupItemActionGRPCServer) getImpl(name string) (velero.BackupItemAction, error) { func (s *BackupItemActionGRPCServer) getImpl(name string) (biav1.BackupItemAction, error) {
impl, err := s.mux.getHandler(name) impl, err := s.mux.getHandler(name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
itemAction, ok := impl.(velero.BackupItemAction) itemAction, ok := impl.(biav1.BackupItemAction)
if !ok { if !ok {
return nil, errors.Errorf("%T is not a backup item action", impl) return nil, errors.Errorf("%T is not a backup item action", impl)
} }
@ -48,7 +50,9 @@ func (s *BackupItemActionGRPCServer) getImpl(name string) (velero.BackupItemActi
return itemAction, nil return itemAction, nil
} }
func (s *BackupItemActionGRPCServer) AppliesTo(ctx context.Context, req *proto.BackupItemActionAppliesToRequest) (response *proto.BackupItemActionAppliesToResponse, err error) { func (s *BackupItemActionGRPCServer) AppliesTo(
ctx context.Context, req *protobiav1.BackupItemActionAppliesToRequest) (
response *protobiav1.BackupItemActionAppliesToResponse, err error) {
defer func() { defer func() {
if recoveredErr := handlePanic(recover()); recoveredErr != nil { if recoveredErr := handlePanic(recover()); recoveredErr != nil {
err = recoveredErr err = recoveredErr
@ -65,8 +69,8 @@ func (s *BackupItemActionGRPCServer) AppliesTo(ctx context.Context, req *proto.B
return nil, newGRPCError(err) return nil, newGRPCError(err)
} }
return &proto.BackupItemActionAppliesToResponse{ return &protobiav1.BackupItemActionAppliesToResponse{
&proto.ResourceSelector{ ResourceSelector: &proto.ResourceSelector{
IncludedNamespaces: resourceSelector.IncludedNamespaces, IncludedNamespaces: resourceSelector.IncludedNamespaces,
ExcludedNamespaces: resourceSelector.ExcludedNamespaces, ExcludedNamespaces: resourceSelector.ExcludedNamespaces,
IncludedResources: resourceSelector.IncludedResources, IncludedResources: resourceSelector.IncludedResources,
@ -76,7 +80,8 @@ func (s *BackupItemActionGRPCServer) AppliesTo(ctx context.Context, req *proto.B
}, nil }, nil
} }
func (s *BackupItemActionGRPCServer) Execute(ctx context.Context, req *proto.ExecuteRequest) (response *proto.ExecuteResponse, err error) { func (s *BackupItemActionGRPCServer) Execute(
ctx context.Context, req *protobiav1.ExecuteRequest) (response *protobiav1.ExecuteResponse, err error) {
defer func() { defer func() {
if recoveredErr := handlePanic(recover()); recoveredErr != nil { if recoveredErr := handlePanic(recover()); recoveredErr != nil {
err = recoveredErr err = recoveredErr
@ -115,7 +120,7 @@ func (s *BackupItemActionGRPCServer) Execute(ctx context.Context, req *proto.Exe
} }
} }
res := &proto.ExecuteResponse{ res := &protobiav1.ExecuteResponse{
Item: updatedItemJSON, Item: updatedItemJSON,
} }

View File

@ -31,6 +31,7 @@ import (
v1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" v1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/backup/mocks" "github.com/vmware-tanzu/velero/pkg/backup/mocks"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated" proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
protobiav1 "github.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v1"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
velerotest "github.com/vmware-tanzu/velero/pkg/test" velerotest "github.com/vmware-tanzu/velero/pkg/test"
) )
@ -160,7 +161,7 @@ func TestBackupItemActionGRPCServerExecute(t *testing.T) {
}, },
}} }}
req := &proto.ExecuteRequest{ req := &protobiav1.ExecuteRequest{
Plugin: "xyz", Plugin: "xyz",
Item: test.item, Item: test.item,
Backup: test.backup, Backup: test.backup,

View File

@ -66,7 +66,7 @@ func (s *DeleteItemActionGRPCServer) AppliesTo(ctx context.Context, req *proto.D
} }
return &proto.DeleteItemActionAppliesToResponse{ return &proto.DeleteItemActionAppliesToResponse{
&proto.ResourceSelector{ ResourceSelector: &proto.ResourceSelector{
IncludedNamespaces: resourceSelector.IncludedNamespaces, IncludedNamespaces: resourceSelector.IncludedNamespaces,
ExcludedNamespaces: resourceSelector.ExcludedNamespaces, ExcludedNamespaces: resourceSelector.ExcludedNamespaces,
IncludedResources: resourceSelector.IncludedResources, IncludedResources: resourceSelector.IncludedResources,

View File

@ -21,14 +21,13 @@ import (
"encoding/json" "encoding/json"
"time" "time"
isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
"github.com/pkg/errors" "github.com/pkg/errors"
"google.golang.org/grpc" "google.golang.org/grpc"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated" proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
"github.com/vmware-tanzu/velero/pkg/plugin/velero" "github.com/vmware-tanzu/velero/pkg/plugin/velero"
isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
) )
// NewItemSnapshotterPlugin constructs a ItemSnapshotterPlugin. // NewItemSnapshotterPlugin constructs a ItemSnapshotterPlugin.

View File

@ -88,7 +88,7 @@ func (recv *ItemSnapshotterGRPCServer) AppliesTo(ctx context.Context, req *proto
} }
return &proto.ItemSnapshotterAppliesToResponse{ return &proto.ItemSnapshotterAppliesToResponse{
&proto.ResourceSelector{ ResourceSelector: &proto.ResourceSelector{
IncludedNamespaces: resourceSelector.IncludedNamespaces, IncludedNamespaces: resourceSelector.IncludedNamespaces,
ExcludedNamespaces: resourceSelector.ExcludedNamespaces, ExcludedNamespaces: resourceSelector.ExcludedNamespaces,
IncludedResources: resourceSelector.IncludedResources, IncludedResources: resourceSelector.IncludedResources,

View File

@ -66,7 +66,7 @@ func (s *RestoreItemActionGRPCServer) AppliesTo(ctx context.Context, req *proto.
} }
return &proto.RestoreItemActionAppliesToResponse{ return &proto.RestoreItemActionAppliesToResponse{
&proto.ResourceSelector{ ResourceSelector: &proto.ResourceSelector{
IncludedNamespaces: resourceSelector.IncludedNamespaces, IncludedNamespaces: resourceSelector.IncludedNamespaces,
ExcludedNamespaces: resourceSelector.ExcludedNamespaces, ExcludedNamespaces: resourceSelector.ExcludedNamespaces,
IncludedResources: resourceSelector.IncludedResources, IncludedResources: resourceSelector.IncludedResources,

View File

@ -1,323 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: BackupItemAction.proto
/*
Package generated is a generated protocol buffer package.
It is generated from these files:
BackupItemAction.proto
DeleteItemAction.proto
ItemSnapshotter.proto
ObjectStore.proto
PluginLister.proto
RestoreItemAction.proto
Shared.proto
VolumeSnapshotter.proto
It has these top-level messages:
ExecuteRequest
ExecuteResponse
BackupItemActionAppliesToRequest
BackupItemActionAppliesToResponse
DeleteItemActionExecuteRequest
DeleteItemActionAppliesToRequest
DeleteItemActionAppliesToResponse
ItemSnapshotterAppliesToRequest
ItemSnapshotterAppliesToResponse
AlsoHandlesRequest
AlsoHandlesResponse
SnapshotItemRequest
SnapshotItemResponse
ProgressRequest
ProgressResponse
DeleteItemSnapshotRequest
CreateItemFromSnapshotRequest
CreateItemFromSnapshotResponse
ItemSnapshotterInitRequest
PutObjectRequest
ObjectExistsRequest
ObjectExistsResponse
GetObjectRequest
Bytes
ListCommonPrefixesRequest
ListCommonPrefixesResponse
ListObjectsRequest
ListObjectsResponse
DeleteObjectRequest
CreateSignedURLRequest
CreateSignedURLResponse
ObjectStoreInitRequest
PluginIdentifier
ListPluginsResponse
RestoreItemActionExecuteRequest
RestoreItemActionExecuteResponse
RestoreItemActionAppliesToRequest
RestoreItemActionAppliesToResponse
Empty
Stack
StackFrame
ResourceIdentifier
ResourceSelector
CreateVolumeRequest
CreateVolumeResponse
GetVolumeInfoRequest
GetVolumeInfoResponse
CreateSnapshotRequest
CreateSnapshotResponse
DeleteSnapshotRequest
GetVolumeIDRequest
GetVolumeIDResponse
SetVolumeIDRequest
SetVolumeIDResponse
VolumeSnapshotterInitRequest
*/
package generated
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type ExecuteRequest struct {
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
}
func (m *ExecuteRequest) Reset() { *m = ExecuteRequest{} }
func (m *ExecuteRequest) String() string { return proto.CompactTextString(m) }
func (*ExecuteRequest) ProtoMessage() {}
func (*ExecuteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *ExecuteRequest) GetPlugin() string {
if m != nil {
return m.Plugin
}
return ""
}
func (m *ExecuteRequest) GetItem() []byte {
if m != nil {
return m.Item
}
return nil
}
func (m *ExecuteRequest) GetBackup() []byte {
if m != nil {
return m.Backup
}
return nil
}
type ExecuteResponse struct {
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems" json:"additionalItems,omitempty"`
}
func (m *ExecuteResponse) Reset() { *m = ExecuteResponse{} }
func (m *ExecuteResponse) String() string { return proto.CompactTextString(m) }
func (*ExecuteResponse) ProtoMessage() {}
func (*ExecuteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *ExecuteResponse) GetItem() []byte {
if m != nil {
return m.Item
}
return nil
}
func (m *ExecuteResponse) GetAdditionalItems() []*ResourceIdentifier {
if m != nil {
return m.AdditionalItems
}
return nil
}
type BackupItemActionAppliesToRequest struct {
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
}
func (m *BackupItemActionAppliesToRequest) Reset() { *m = BackupItemActionAppliesToRequest{} }
func (m *BackupItemActionAppliesToRequest) String() string { return proto.CompactTextString(m) }
func (*BackupItemActionAppliesToRequest) ProtoMessage() {}
func (*BackupItemActionAppliesToRequest) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{2}
}
func (m *BackupItemActionAppliesToRequest) GetPlugin() string {
if m != nil {
return m.Plugin
}
return ""
}
type BackupItemActionAppliesToResponse struct {
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector" json:"ResourceSelector,omitempty"`
}
func (m *BackupItemActionAppliesToResponse) Reset() { *m = BackupItemActionAppliesToResponse{} }
func (m *BackupItemActionAppliesToResponse) String() string { return proto.CompactTextString(m) }
func (*BackupItemActionAppliesToResponse) ProtoMessage() {}
func (*BackupItemActionAppliesToResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{3}
}
func (m *BackupItemActionAppliesToResponse) GetResourceSelector() *ResourceSelector {
if m != nil {
return m.ResourceSelector
}
return nil
}
func init() {
proto.RegisterType((*ExecuteRequest)(nil), "generated.ExecuteRequest")
proto.RegisterType((*ExecuteResponse)(nil), "generated.ExecuteResponse")
proto.RegisterType((*BackupItemActionAppliesToRequest)(nil), "generated.BackupItemActionAppliesToRequest")
proto.RegisterType((*BackupItemActionAppliesToResponse)(nil), "generated.BackupItemActionAppliesToResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for BackupItemAction service
type BackupItemActionClient interface {
AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error)
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
}
type backupItemActionClient struct {
cc *grpc.ClientConn
}
func NewBackupItemActionClient(cc *grpc.ClientConn) BackupItemActionClient {
return &backupItemActionClient{cc}
}
func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error) {
out := new(BackupItemActionAppliesToResponse)
err := grpc.Invoke(ctx, "/generated.BackupItemAction/AppliesTo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *backupItemActionClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
out := new(ExecuteResponse)
err := grpc.Invoke(ctx, "/generated.BackupItemAction/Execute", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for BackupItemAction service
type BackupItemActionServer interface {
AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error)
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
}
func RegisterBackupItemActionServer(s *grpc.Server, srv BackupItemActionServer) {
s.RegisterService(&_BackupItemAction_serviceDesc, srv)
}
func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BackupItemActionAppliesToRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BackupItemActionServer).AppliesTo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/generated.BackupItemAction/AppliesTo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExecuteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BackupItemActionServer).Execute(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/generated.BackupItemAction/Execute",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
}
return interceptor(ctx, in, info, handler)
}
var _BackupItemAction_serviceDesc = grpc.ServiceDesc{
ServiceName: "generated.BackupItemAction",
HandlerType: (*BackupItemActionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AppliesTo",
Handler: _BackupItemAction_AppliesTo_Handler,
},
{
MethodName: "Execute",
Handler: _BackupItemAction_Execute_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "BackupItemAction.proto",
}
func init() { proto.RegisterFile("BackupItemAction.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 293 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x4a, 0xc3, 0x40,
0x10, 0x86, 0x49, 0x2b, 0x95, 0x4e, 0x8b, 0x2d, 0x7b, 0x28, 0x31, 0x22, 0xc4, 0x9c, 0x02, 0x4a,
0x0e, 0xf1, 0xe6, 0xc9, 0x0a, 0x52, 0x7a, 0xdd, 0xf6, 0x05, 0xd2, 0x64, 0x5a, 0x17, 0xd3, 0xdd,
0x75, 0x77, 0x03, 0x3e, 0x9c, 0x0f, 0x27, 0xd9, 0x6e, 0x43, 0x8c, 0xc5, 0x7a, 0xcb, 0x64, 0xe6,
0xff, 0xe7, 0xfb, 0xd9, 0x81, 0xd9, 0x4b, 0x96, 0xbf, 0x57, 0x72, 0x69, 0x70, 0x3f, 0xcf, 0x0d,
0x13, 0x3c, 0x91, 0x4a, 0x18, 0x41, 0x86, 0x3b, 0xe4, 0xa8, 0x32, 0x83, 0x45, 0x30, 0x5e, 0xbd,
0x65, 0x0a, 0x8b, 0x43, 0x23, 0x5a, 0xc3, 0xd5, 0xeb, 0x27, 0xe6, 0x95, 0x41, 0x8a, 0x1f, 0x15,
0x6a, 0x43, 0x66, 0x30, 0x90, 0x65, 0xb5, 0x63, 0xdc, 0xf7, 0x42, 0x2f, 0x1e, 0x52, 0x57, 0x11,
0x02, 0x17, 0xcc, 0xe0, 0xde, 0xef, 0x85, 0x5e, 0x3c, 0xa6, 0xf6, 0xbb, 0x9e, 0xdd, 0xd8, 0x85,
0x7e, 0xdf, 0xfe, 0x75, 0x55, 0xc4, 0x61, 0xd2, 0xb8, 0x6a, 0x29, 0xb8, 0xc6, 0x46, 0xee, 0xb5,
0xe4, 0x0b, 0x98, 0x64, 0x45, 0xc1, 0x6a, 0xce, 0xac, 0xac, 0x99, 0xb5, 0xdf, 0x0b, 0xfb, 0xf1,
0x28, 0xbd, 0x4d, 0x1a, 0xde, 0x84, 0xa2, 0x16, 0x95, 0xca, 0x71, 0x59, 0x20, 0x37, 0x6c, 0xcb,
0x50, 0xd1, 0xae, 0x2a, 0x7a, 0x82, 0xb0, 0x1b, 0x7c, 0x2e, 0x65, 0xc9, 0x50, 0xaf, 0xc5, 0x99,
0x5c, 0x51, 0x09, 0x77, 0x7f, 0x68, 0x1d, 0xfd, 0x02, 0xa6, 0x47, 0x8e, 0x15, 0x96, 0x98, 0x1b,
0xa1, 0xac, 0xcd, 0x28, 0xbd, 0x39, 0x81, 0x7a, 0x1c, 0xa1, 0xbf, 0x44, 0xe9, 0x97, 0x07, 0xd3,
0xee, 0x3a, 0xb2, 0x85, 0x61, 0xb3, 0x92, 0xdc, 0xb7, 0x0c, 0xcf, 0x85, 0x0a, 0x1e, 0xfe, 0x37,
0xec, 0x52, 0x3c, 0xc3, 0xa5, 0x7b, 0x16, 0x72, 0xdd, 0x12, 0xfe, 0x3c, 0x80, 0x20, 0x38, 0xd5,
0x3a, 0x38, 0x6c, 0x06, 0xf6, 0x6a, 0x1e, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x45, 0xdb, 0x5d,
0x9f, 0x68, 0x02, 0x00, 0x00,
}

View File

@ -1,122 +1,357 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: DeleteItemAction.proto // source: DeleteItemAction.proto
package generated package generated
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import ( import (
context "golang.org/x/net/context" context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type DeleteItemActionExecuteRequest struct { type DeleteItemActionExecuteRequest struct {
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"` Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
} }
func (m *DeleteItemActionExecuteRequest) Reset() { *m = DeleteItemActionExecuteRequest{} } func (x *DeleteItemActionExecuteRequest) Reset() {
func (m *DeleteItemActionExecuteRequest) String() string { return proto.CompactTextString(m) } *x = DeleteItemActionExecuteRequest{}
func (*DeleteItemActionExecuteRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*DeleteItemActionExecuteRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } mi := &file_DeleteItemAction_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *DeleteItemActionExecuteRequest) GetPlugin() string { func (x *DeleteItemActionExecuteRequest) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.Plugin }
func (*DeleteItemActionExecuteRequest) ProtoMessage() {}
func (x *DeleteItemActionExecuteRequest) ProtoReflect() protoreflect.Message {
mi := &file_DeleteItemAction_proto_msgTypes[0]
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 DeleteItemActionExecuteRequest.ProtoReflect.Descriptor instead.
func (*DeleteItemActionExecuteRequest) Descriptor() ([]byte, []int) {
return file_DeleteItemAction_proto_rawDescGZIP(), []int{0}
}
func (x *DeleteItemActionExecuteRequest) GetPlugin() string {
if x != nil {
return x.Plugin
} }
return "" return ""
} }
func (m *DeleteItemActionExecuteRequest) GetItem() []byte { func (x *DeleteItemActionExecuteRequest) GetItem() []byte {
if m != nil { if x != nil {
return m.Item return x.Item
} }
return nil return nil
} }
func (m *DeleteItemActionExecuteRequest) GetBackup() []byte { func (x *DeleteItemActionExecuteRequest) GetBackup() []byte {
if m != nil { if x != nil {
return m.Backup return x.Backup
} }
return nil return nil
} }
type DeleteItemActionAppliesToRequest struct { type DeleteItemActionAppliesToRequest struct {
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
} }
func (m *DeleteItemActionAppliesToRequest) Reset() { *m = DeleteItemActionAppliesToRequest{} } func (x *DeleteItemActionAppliesToRequest) Reset() {
func (m *DeleteItemActionAppliesToRequest) String() string { return proto.CompactTextString(m) } *x = DeleteItemActionAppliesToRequest{}
func (*DeleteItemActionAppliesToRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_DeleteItemAction_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteItemActionAppliesToRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteItemActionAppliesToRequest) ProtoMessage() {}
func (x *DeleteItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
mi := &file_DeleteItemAction_proto_msgTypes[1]
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 DeleteItemActionAppliesToRequest.ProtoReflect.Descriptor instead.
func (*DeleteItemActionAppliesToRequest) Descriptor() ([]byte, []int) { func (*DeleteItemActionAppliesToRequest) Descriptor() ([]byte, []int) {
return fileDescriptor1, []int{1} return file_DeleteItemAction_proto_rawDescGZIP(), []int{1}
} }
func (m *DeleteItemActionAppliesToRequest) GetPlugin() string { func (x *DeleteItemActionAppliesToRequest) GetPlugin() string {
if m != nil { if x != nil {
return m.Plugin return x.Plugin
} }
return "" return ""
} }
type DeleteItemActionAppliesToResponse struct { type DeleteItemActionAppliesToResponse struct {
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector" json:"ResourceSelector,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
} }
func (m *DeleteItemActionAppliesToResponse) Reset() { *m = DeleteItemActionAppliesToResponse{} } func (x *DeleteItemActionAppliesToResponse) Reset() {
func (m *DeleteItemActionAppliesToResponse) String() string { return proto.CompactTextString(m) } *x = DeleteItemActionAppliesToResponse{}
func (*DeleteItemActionAppliesToResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_DeleteItemAction_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteItemActionAppliesToResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteItemActionAppliesToResponse) ProtoMessage() {}
func (x *DeleteItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
mi := &file_DeleteItemAction_proto_msgTypes[2]
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 DeleteItemActionAppliesToResponse.ProtoReflect.Descriptor instead.
func (*DeleteItemActionAppliesToResponse) Descriptor() ([]byte, []int) { func (*DeleteItemActionAppliesToResponse) Descriptor() ([]byte, []int) {
return fileDescriptor1, []int{2} return file_DeleteItemAction_proto_rawDescGZIP(), []int{2}
} }
func (m *DeleteItemActionAppliesToResponse) GetResourceSelector() *ResourceSelector { func (x *DeleteItemActionAppliesToResponse) GetResourceSelector() *ResourceSelector {
if m != nil { if x != nil {
return m.ResourceSelector return x.ResourceSelector
} }
return nil return nil
} }
func init() { var File_DeleteItemAction_proto protoreflect.FileDescriptor
proto.RegisterType((*DeleteItemActionExecuteRequest)(nil), "generated.DeleteItemActionExecuteRequest")
proto.RegisterType((*DeleteItemActionAppliesToRequest)(nil), "generated.DeleteItemActionAppliesToRequest") var file_DeleteItemAction_proto_rawDesc = []byte{
proto.RegisterType((*DeleteItemActionAppliesToResponse)(nil), "generated.DeleteItemActionAppliesToResponse") 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 0x64, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41,
0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 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, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 0xc2, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 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, 0x46,
0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 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_DeleteItemAction_proto_rawDescOnce sync.Once
file_DeleteItemAction_proto_rawDescData = file_DeleteItemAction_proto_rawDesc
)
func file_DeleteItemAction_proto_rawDescGZIP() []byte {
file_DeleteItemAction_proto_rawDescOnce.Do(func() {
file_DeleteItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_DeleteItemAction_proto_rawDescData)
})
return file_DeleteItemAction_proto_rawDescData
}
var file_DeleteItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_DeleteItemAction_proto_goTypes = []interface{}{
(*DeleteItemActionExecuteRequest)(nil), // 0: generated.DeleteItemActionExecuteRequest
(*DeleteItemActionAppliesToRequest)(nil), // 1: generated.DeleteItemActionAppliesToRequest
(*DeleteItemActionAppliesToResponse)(nil), // 2: generated.DeleteItemActionAppliesToResponse
(*ResourceSelector)(nil), // 3: generated.ResourceSelector
(*Empty)(nil), // 4: generated.Empty
}
var file_DeleteItemAction_proto_depIdxs = []int32{
3, // 0: generated.DeleteItemActionAppliesToResponse.ResourceSelector:type_name -> generated.ResourceSelector
1, // 1: generated.DeleteItemAction.AppliesTo:input_type -> generated.DeleteItemActionAppliesToRequest
0, // 2: generated.DeleteItemAction.Execute:input_type -> generated.DeleteItemActionExecuteRequest
2, // 3: generated.DeleteItemAction.AppliesTo:output_type -> generated.DeleteItemActionAppliesToResponse
4, // 4: generated.DeleteItemAction.Execute:output_type -> generated.Empty
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_DeleteItemAction_proto_init() }
func file_DeleteItemAction_proto_init() {
if File_DeleteItemAction_proto != nil {
return
}
file_Shared_proto_init()
if !protoimpl.UnsafeEnabled {
file_DeleteItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteItemActionExecuteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_DeleteItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteItemActionAppliesToRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_DeleteItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteItemActionAppliesToResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_DeleteItemAction_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_DeleteItemAction_proto_goTypes,
DependencyIndexes: file_DeleteItemAction_proto_depIdxs,
MessageInfos: file_DeleteItemAction_proto_msgTypes,
}.Build()
File_DeleteItemAction_proto = out.File
file_DeleteItemAction_proto_rawDesc = nil
file_DeleteItemAction_proto_goTypes = nil
file_DeleteItemAction_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// Client API for DeleteItemAction service
// DeleteItemActionClient is the client API for DeleteItemAction service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DeleteItemActionClient interface { type DeleteItemActionClient interface {
AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error) AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error)
Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error) Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error)
} }
type deleteItemActionClient struct { type deleteItemActionClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewDeleteItemActionClient(cc *grpc.ClientConn) DeleteItemActionClient { func NewDeleteItemActionClient(cc grpc.ClientConnInterface) DeleteItemActionClient {
return &deleteItemActionClient{cc} return &deleteItemActionClient{cc}
} }
func (c *deleteItemActionClient) AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error) { func (c *deleteItemActionClient) AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error) {
out := new(DeleteItemActionAppliesToResponse) out := new(DeleteItemActionAppliesToResponse)
err := grpc.Invoke(ctx, "/generated.DeleteItemAction/AppliesTo", in, out, c.cc, opts...) err := c.cc.Invoke(ctx, "/generated.DeleteItemAction/AppliesTo", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -125,20 +360,30 @@ func (c *deleteItemActionClient) AppliesTo(ctx context.Context, in *DeleteItemAc
func (c *deleteItemActionClient) Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error) { func (c *deleteItemActionClient) Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty) out := new(Empty)
err := grpc.Invoke(ctx, "/generated.DeleteItemAction/Execute", in, out, c.cc, opts...) err := c.cc.Invoke(ctx, "/generated.DeleteItemAction/Execute", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
// Server API for DeleteItemAction service // DeleteItemActionServer is the server API for DeleteItemAction service.
type DeleteItemActionServer interface { type DeleteItemActionServer interface {
AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error) AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error)
Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error) Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error)
} }
// UnimplementedDeleteItemActionServer can be embedded to have forward compatible implementations.
type UnimplementedDeleteItemActionServer struct {
}
func (*UnimplementedDeleteItemActionServer) AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
}
func (*UnimplementedDeleteItemActionServer) Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
}
func RegisterDeleteItemActionServer(s *grpc.Server, srv DeleteItemActionServer) { func RegisterDeleteItemActionServer(s *grpc.Server, srv DeleteItemActionServer) {
s.RegisterService(&_DeleteItemAction_serviceDesc, srv) s.RegisterService(&_DeleteItemAction_serviceDesc, srv)
} }
@ -195,25 +440,3 @@ var _DeleteItemAction_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "DeleteItemAction.proto", Metadata: "DeleteItemAction.proto",
} }
func init() { proto.RegisterFile("DeleteItemAction.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 253 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xc3, 0x40,
0x14, 0x84, 0x89, 0x4a, 0x25, 0xcf, 0x1e, 0xc2, 0x1e, 0x4a, 0x88, 0x20, 0x31, 0xa7, 0x8a, 0x92,
0x43, 0xbd, 0x79, 0x2b, 0x58, 0xc5, 0x6b, 0xea, 0x1f, 0x48, 0x37, 0x63, 0x0d, 0x6e, 0xb2, 0xeb,
0xee, 0x5b, 0xd0, 0xbf, 0xe7, 0x2f, 0x13, 0x63, 0x28, 0x35, 0x42, 0xdb, 0xdb, 0xbe, 0xdd, 0x99,
0xf7, 0x31, 0x3b, 0x34, 0xb9, 0x87, 0x02, 0xe3, 0x89, 0xd1, 0xcc, 0x25, 0xd7, 0xba, 0xcd, 0x8d,
0xd5, 0xac, 0x45, 0xb8, 0x46, 0x0b, 0x5b, 0x32, 0xaa, 0x64, 0xbc, 0x7c, 0x2d, 0x2d, 0xaa, 0xdf,
0x87, 0xac, 0xa2, 0x8b, 0xa1, 0x65, 0xf1, 0x01, 0xe9, 0x19, 0x05, 0xde, 0x3d, 0x1c, 0x8b, 0x09,
0x8d, 0x8c, 0xf2, 0xeb, 0xba, 0x8d, 0x83, 0x34, 0x98, 0x86, 0x45, 0x3f, 0x09, 0x41, 0x27, 0x35,
0xa3, 0x89, 0x8f, 0xd2, 0x60, 0x3a, 0x2e, 0xba, 0xf3, 0x8f, 0x76, 0x55, 0xca, 0x37, 0x6f, 0xe2,
0xe3, 0xee, 0xb6, 0x9f, 0xb2, 0x3b, 0x4a, 0x87, 0x94, 0xb9, 0x31, 0xaa, 0x86, 0x7b, 0xd6, 0x7b,
0x38, 0x99, 0xa2, 0xcb, 0x1d, 0x5e, 0x67, 0x74, 0xeb, 0x20, 0x1e, 0x29, 0x2a, 0xe0, 0xb4, 0xb7,
0x12, 0x4b, 0x28, 0x48, 0xd6, 0xb6, 0x5b, 0x73, 0x36, 0x3b, 0xcf, 0x37, 0xd1, 0xf3, 0xa1, 0xa4,
0xf8, 0x67, 0x9a, 0x7d, 0x05, 0x14, 0x0d, 0x71, 0xe2, 0x85, 0xc2, 0x0d, 0x52, 0x5c, 0x6f, 0x2d,
0xdc, 0x17, 0x2a, 0xb9, 0x39, 0x4c, 0xdc, 0xa7, 0x78, 0xa0, 0xd3, 0xfe, 0xf3, 0xc5, 0xd5, 0x0e,
0xe3, 0xdf, 0x82, 0x92, 0x68, 0x4b, 0xba, 0x68, 0x0c, 0x7f, 0xae, 0x46, 0x5d, 0xb7, 0xb7, 0xdf,
0x01, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x31, 0x0b, 0xd3, 0x0e, 0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,112 +1,298 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: PluginLister.proto // source: PluginLister.proto
package generated package generated
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import ( import (
context "golang.org/x/net/context" context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type PluginIdentifier struct { type PluginIdentifier struct {
Command string `protobuf:"bytes,1,opt,name=command" json:"command,omitempty"` state protoimpl.MessageState
Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"` sizeCache protoimpl.SizeCache
Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` unknownFields protoimpl.UnknownFields
Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
} }
func (m *PluginIdentifier) Reset() { *m = PluginIdentifier{} } func (x *PluginIdentifier) Reset() {
func (m *PluginIdentifier) String() string { return proto.CompactTextString(m) } *x = PluginIdentifier{}
func (*PluginIdentifier) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*PluginIdentifier) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } mi := &file_PluginLister_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *PluginIdentifier) GetCommand() string { func (x *PluginIdentifier) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.Command }
func (*PluginIdentifier) ProtoMessage() {}
func (x *PluginIdentifier) ProtoReflect() protoreflect.Message {
mi := &file_PluginLister_proto_msgTypes[0]
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 PluginIdentifier.ProtoReflect.Descriptor instead.
func (*PluginIdentifier) Descriptor() ([]byte, []int) {
return file_PluginLister_proto_rawDescGZIP(), []int{0}
}
func (x *PluginIdentifier) GetCommand() string {
if x != nil {
return x.Command
} }
return "" return ""
} }
func (m *PluginIdentifier) GetKind() string { func (x *PluginIdentifier) GetKind() string {
if m != nil { if x != nil {
return m.Kind return x.Kind
} }
return "" return ""
} }
func (m *PluginIdentifier) GetName() string { func (x *PluginIdentifier) GetName() string {
if m != nil { if x != nil {
return m.Name return x.Name
} }
return "" return ""
} }
type ListPluginsResponse struct { type ListPluginsResponse struct {
Plugins []*PluginIdentifier `protobuf:"bytes,1,rep,name=plugins" json:"plugins,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugins []*PluginIdentifier `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
} }
func (m *ListPluginsResponse) Reset() { *m = ListPluginsResponse{} } func (x *ListPluginsResponse) Reset() {
func (m *ListPluginsResponse) String() string { return proto.CompactTextString(m) } *x = ListPluginsResponse{}
func (*ListPluginsResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*ListPluginsResponse) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } mi := &file_PluginLister_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *ListPluginsResponse) GetPlugins() []*PluginIdentifier { func (x *ListPluginsResponse) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.Plugins }
func (*ListPluginsResponse) ProtoMessage() {}
func (x *ListPluginsResponse) ProtoReflect() protoreflect.Message {
mi := &file_PluginLister_proto_msgTypes[1]
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 ListPluginsResponse.ProtoReflect.Descriptor instead.
func (*ListPluginsResponse) Descriptor() ([]byte, []int) {
return file_PluginLister_proto_rawDescGZIP(), []int{1}
}
func (x *ListPluginsResponse) GetPlugins() []*PluginIdentifier {
if x != nil {
return x.Plugins
} }
return nil return nil
} }
func init() { var File_PluginLister_proto protoreflect.FileDescriptor
proto.RegisterType((*PluginIdentifier)(nil), "generated.PluginIdentifier")
proto.RegisterType((*ListPluginsResponse)(nil), "generated.ListPluginsResponse") var file_PluginLister_proto_rawDesc = []byte{
0x0a, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x72, 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,
0x10, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b,
0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x73, 0x32, 0x4f, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65,
0x72, 0x12, 0x3f, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73,
0x12, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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_PluginLister_proto_rawDescOnce sync.Once
file_PluginLister_proto_rawDescData = file_PluginLister_proto_rawDesc
)
func file_PluginLister_proto_rawDescGZIP() []byte {
file_PluginLister_proto_rawDescOnce.Do(func() {
file_PluginLister_proto_rawDescData = protoimpl.X.CompressGZIP(file_PluginLister_proto_rawDescData)
})
return file_PluginLister_proto_rawDescData
}
var file_PluginLister_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_PluginLister_proto_goTypes = []interface{}{
(*PluginIdentifier)(nil), // 0: generated.PluginIdentifier
(*ListPluginsResponse)(nil), // 1: generated.ListPluginsResponse
(*Empty)(nil), // 2: generated.Empty
}
var file_PluginLister_proto_depIdxs = []int32{
0, // 0: generated.ListPluginsResponse.plugins:type_name -> generated.PluginIdentifier
2, // 1: generated.PluginLister.ListPlugins:input_type -> generated.Empty
1, // 2: generated.PluginLister.ListPlugins:output_type -> generated.ListPluginsResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_PluginLister_proto_init() }
func file_PluginLister_proto_init() {
if File_PluginLister_proto != nil {
return
}
file_Shared_proto_init()
if !protoimpl.UnsafeEnabled {
file_PluginLister_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PluginIdentifier); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_PluginLister_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPluginsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_PluginLister_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_PluginLister_proto_goTypes,
DependencyIndexes: file_PluginLister_proto_depIdxs,
MessageInfos: file_PluginLister_proto_msgTypes,
}.Build()
File_PluginLister_proto = out.File
file_PluginLister_proto_rawDesc = nil
file_PluginLister_proto_goTypes = nil
file_PluginLister_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// Client API for PluginLister service
// PluginListerClient is the client API for PluginLister service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PluginListerClient interface { type PluginListerClient interface {
ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error) ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error)
} }
type pluginListerClient struct { type pluginListerClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewPluginListerClient(cc *grpc.ClientConn) PluginListerClient { func NewPluginListerClient(cc grpc.ClientConnInterface) PluginListerClient {
return &pluginListerClient{cc} return &pluginListerClient{cc}
} }
func (c *pluginListerClient) ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error) { func (c *pluginListerClient) ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error) {
out := new(ListPluginsResponse) out := new(ListPluginsResponse)
err := grpc.Invoke(ctx, "/generated.PluginLister/ListPlugins", in, out, c.cc, opts...) err := c.cc.Invoke(ctx, "/generated.PluginLister/ListPlugins", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
// Server API for PluginLister service // PluginListerServer is the server API for PluginLister service.
type PluginListerServer interface { type PluginListerServer interface {
ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error) ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error)
} }
// UnimplementedPluginListerServer can be embedded to have forward compatible implementations.
type UnimplementedPluginListerServer struct {
}
func (*UnimplementedPluginListerServer) ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPlugins not implemented")
}
func RegisterPluginListerServer(s *grpc.Server, srv PluginListerServer) { func RegisterPluginListerServer(s *grpc.Server, srv PluginListerServer) {
s.RegisterService(&_PluginLister_serviceDesc, srv) s.RegisterService(&_PluginLister_serviceDesc, srv)
} }
@ -141,22 +327,3 @@ var _PluginLister_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "PluginLister.proto", Metadata: "PluginLister.proto",
} }
func init() { proto.RegisterFile("PluginLister.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{
// 201 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x0a, 0xc8, 0x29, 0x4d,
0xcf, 0xcc, 0xf3, 0xc9, 0x2c, 0x2e, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
0x4c, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0x91, 0xe2, 0x09, 0xce, 0x48, 0x2c, 0x4a,
0x4d, 0x81, 0x48, 0x28, 0x85, 0x70, 0x09, 0x40, 0x94, 0x7b, 0xa6, 0xa4, 0xe6, 0x95, 0x64, 0xa6,
0x65, 0xa6, 0x16, 0x09, 0x49, 0x70, 0xb1, 0x27, 0xe7, 0xe7, 0xe6, 0x26, 0xe6, 0xa5, 0x48, 0x30,
0x2a, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xb8, 0x42, 0x42, 0x5c, 0x2c, 0xd9, 0x99, 0x79, 0x29, 0x12,
0x4c, 0x60, 0x61, 0x30, 0x1b, 0x24, 0x96, 0x97, 0x98, 0x9b, 0x2a, 0xc1, 0x0c, 0x11, 0x03, 0xb1,
0x95, 0x7c, 0xb8, 0x84, 0x41, 0xd6, 0x43, 0x4c, 0x2e, 0x0e, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b,
0x4e, 0x15, 0x32, 0xe5, 0x62, 0x2f, 0x80, 0x08, 0x49, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0x49,
0xeb, 0xc1, 0xdd, 0xa5, 0x87, 0xee, 0x8c, 0x20, 0x98, 0x5a, 0x23, 0x7f, 0x2e, 0x1e, 0x64, 0x2f,
0x09, 0xd9, 0x73, 0x71, 0x23, 0x99, 0x2e, 0x24, 0x80, 0x64, 0x88, 0x6b, 0x6e, 0x41, 0x49, 0xa5,
0x94, 0x1c, 0x92, 0x08, 0x16, 0x77, 0x24, 0xb1, 0x81, 0xfd, 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff,
0xff, 0x0e, 0xb5, 0xe4, 0x0c, 0x2a, 0x01, 0x00, 0x00,
}

View File

@ -1,167 +1,457 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: RestoreItemAction.proto // source: RestoreItemAction.proto
package generated package generated
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import ( import (
context "golang.org/x/net/context" context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type RestoreItemActionExecuteRequest struct { type RestoreItemActionExecuteRequest struct {
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"` Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
ItemFromBackup []byte `protobuf:"bytes,4,opt,name=itemFromBackup,proto3" json:"itemFromBackup,omitempty"` ItemFromBackup []byte `protobuf:"bytes,4,opt,name=itemFromBackup,proto3" json:"itemFromBackup,omitempty"`
} }
func (m *RestoreItemActionExecuteRequest) Reset() { *m = RestoreItemActionExecuteRequest{} } func (x *RestoreItemActionExecuteRequest) Reset() {
func (m *RestoreItemActionExecuteRequest) String() string { return proto.CompactTextString(m) } *x = RestoreItemActionExecuteRequest{}
func (*RestoreItemActionExecuteRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*RestoreItemActionExecuteRequest) Descriptor() ([]byte, []int) { mi := &file_RestoreItemAction_proto_msgTypes[0]
return fileDescriptor5, []int{0} ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
} }
func (m *RestoreItemActionExecuteRequest) GetPlugin() string { func (x *RestoreItemActionExecuteRequest) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.Plugin }
func (*RestoreItemActionExecuteRequest) ProtoMessage() {}
func (x *RestoreItemActionExecuteRequest) ProtoReflect() protoreflect.Message {
mi := &file_RestoreItemAction_proto_msgTypes[0]
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 RestoreItemActionExecuteRequest.ProtoReflect.Descriptor instead.
func (*RestoreItemActionExecuteRequest) Descriptor() ([]byte, []int) {
return file_RestoreItemAction_proto_rawDescGZIP(), []int{0}
}
func (x *RestoreItemActionExecuteRequest) GetPlugin() string {
if x != nil {
return x.Plugin
} }
return "" return ""
} }
func (m *RestoreItemActionExecuteRequest) GetItem() []byte { func (x *RestoreItemActionExecuteRequest) GetItem() []byte {
if m != nil { if x != nil {
return m.Item return x.Item
} }
return nil return nil
} }
func (m *RestoreItemActionExecuteRequest) GetRestore() []byte { func (x *RestoreItemActionExecuteRequest) GetRestore() []byte {
if m != nil { if x != nil {
return m.Restore return x.Restore
} }
return nil return nil
} }
func (m *RestoreItemActionExecuteRequest) GetItemFromBackup() []byte { func (x *RestoreItemActionExecuteRequest) GetItemFromBackup() []byte {
if m != nil { if x != nil {
return m.ItemFromBackup return x.ItemFromBackup
} }
return nil return nil
} }
type RestoreItemActionExecuteResponse struct { type RestoreItemActionExecuteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems" json:"additionalItems,omitempty"` AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
SkipRestore bool `protobuf:"varint,3,opt,name=skipRestore" json:"skipRestore,omitempty"` SkipRestore bool `protobuf:"varint,3,opt,name=skipRestore,proto3" json:"skipRestore,omitempty"`
} }
func (m *RestoreItemActionExecuteResponse) Reset() { *m = RestoreItemActionExecuteResponse{} } func (x *RestoreItemActionExecuteResponse) Reset() {
func (m *RestoreItemActionExecuteResponse) String() string { return proto.CompactTextString(m) } *x = RestoreItemActionExecuteResponse{}
func (*RestoreItemActionExecuteResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_RestoreItemAction_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RestoreItemActionExecuteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RestoreItemActionExecuteResponse) ProtoMessage() {}
func (x *RestoreItemActionExecuteResponse) ProtoReflect() protoreflect.Message {
mi := &file_RestoreItemAction_proto_msgTypes[1]
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 RestoreItemActionExecuteResponse.ProtoReflect.Descriptor instead.
func (*RestoreItemActionExecuteResponse) Descriptor() ([]byte, []int) { func (*RestoreItemActionExecuteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor5, []int{1} return file_RestoreItemAction_proto_rawDescGZIP(), []int{1}
} }
func (m *RestoreItemActionExecuteResponse) GetItem() []byte { func (x *RestoreItemActionExecuteResponse) GetItem() []byte {
if m != nil { if x != nil {
return m.Item return x.Item
} }
return nil return nil
} }
func (m *RestoreItemActionExecuteResponse) GetAdditionalItems() []*ResourceIdentifier { func (x *RestoreItemActionExecuteResponse) GetAdditionalItems() []*ResourceIdentifier {
if m != nil { if x != nil {
return m.AdditionalItems return x.AdditionalItems
} }
return nil return nil
} }
func (m *RestoreItemActionExecuteResponse) GetSkipRestore() bool { func (x *RestoreItemActionExecuteResponse) GetSkipRestore() bool {
if m != nil { if x != nil {
return m.SkipRestore return x.SkipRestore
} }
return false return false
} }
type RestoreItemActionAppliesToRequest struct { type RestoreItemActionAppliesToRequest struct {
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
} }
func (m *RestoreItemActionAppliesToRequest) Reset() { *m = RestoreItemActionAppliesToRequest{} } func (x *RestoreItemActionAppliesToRequest) Reset() {
func (m *RestoreItemActionAppliesToRequest) String() string { return proto.CompactTextString(m) } *x = RestoreItemActionAppliesToRequest{}
func (*RestoreItemActionAppliesToRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_RestoreItemAction_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RestoreItemActionAppliesToRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RestoreItemActionAppliesToRequest) ProtoMessage() {}
func (x *RestoreItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
mi := &file_RestoreItemAction_proto_msgTypes[2]
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 RestoreItemActionAppliesToRequest.ProtoReflect.Descriptor instead.
func (*RestoreItemActionAppliesToRequest) Descriptor() ([]byte, []int) { func (*RestoreItemActionAppliesToRequest) Descriptor() ([]byte, []int) {
return fileDescriptor5, []int{2} return file_RestoreItemAction_proto_rawDescGZIP(), []int{2}
} }
func (m *RestoreItemActionAppliesToRequest) GetPlugin() string { func (x *RestoreItemActionAppliesToRequest) GetPlugin() string {
if m != nil { if x != nil {
return m.Plugin return x.Plugin
} }
return "" return ""
} }
type RestoreItemActionAppliesToResponse struct { type RestoreItemActionAppliesToResponse struct {
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector" json:"ResourceSelector,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
} }
func (m *RestoreItemActionAppliesToResponse) Reset() { *m = RestoreItemActionAppliesToResponse{} } func (x *RestoreItemActionAppliesToResponse) Reset() {
func (m *RestoreItemActionAppliesToResponse) String() string { return proto.CompactTextString(m) } *x = RestoreItemActionAppliesToResponse{}
func (*RestoreItemActionAppliesToResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_RestoreItemAction_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RestoreItemActionAppliesToResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RestoreItemActionAppliesToResponse) ProtoMessage() {}
func (x *RestoreItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
mi := &file_RestoreItemAction_proto_msgTypes[3]
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 RestoreItemActionAppliesToResponse.ProtoReflect.Descriptor instead.
func (*RestoreItemActionAppliesToResponse) Descriptor() ([]byte, []int) { func (*RestoreItemActionAppliesToResponse) Descriptor() ([]byte, []int) {
return fileDescriptor5, []int{3} return file_RestoreItemAction_proto_rawDescGZIP(), []int{3}
} }
func (m *RestoreItemActionAppliesToResponse) GetResourceSelector() *ResourceSelector { func (x *RestoreItemActionAppliesToResponse) GetResourceSelector() *ResourceSelector {
if m != nil { if x != nil {
return m.ResourceSelector return x.ResourceSelector
} }
return nil return nil
} }
func init() { var File_RestoreItemAction_proto protoreflect.FileDescriptor
proto.RegisterType((*RestoreItemActionExecuteRequest)(nil), "generated.RestoreItemActionExecuteRequest")
proto.RegisterType((*RestoreItemActionExecuteResponse)(nil), "generated.RestoreItemActionExecuteResponse") var file_RestoreItemAction_proto_rawDesc = []byte{
proto.RegisterType((*RestoreItemActionAppliesToRequest)(nil), "generated.RestoreItemActionAppliesToRequest") 0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
proto.RegisterType((*RestoreItemActionAppliesToResponse)(nil), "generated.RestoreItemActionAppliesToResponse") 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, 0x8f, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74,
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e,
0x69, 0x74, 0x65, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x74, 0x65, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x22, 0xa1, 0x01, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69,
0x70, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x3b, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x74,
0x6f, 0x72, 0x65, 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, 0x6d, 0x0a, 0x22, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
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, 0xe1, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x09, 0x41, 0x70,
0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x12, 0x2c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 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, 0x2d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 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, 0x62, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12,
0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74,
0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49,
0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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_RestoreItemAction_proto_rawDescOnce sync.Once
file_RestoreItemAction_proto_rawDescData = file_RestoreItemAction_proto_rawDesc
)
func file_RestoreItemAction_proto_rawDescGZIP() []byte {
file_RestoreItemAction_proto_rawDescOnce.Do(func() {
file_RestoreItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_RestoreItemAction_proto_rawDescData)
})
return file_RestoreItemAction_proto_rawDescData
}
var file_RestoreItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_RestoreItemAction_proto_goTypes = []interface{}{
(*RestoreItemActionExecuteRequest)(nil), // 0: generated.RestoreItemActionExecuteRequest
(*RestoreItemActionExecuteResponse)(nil), // 1: generated.RestoreItemActionExecuteResponse
(*RestoreItemActionAppliesToRequest)(nil), // 2: generated.RestoreItemActionAppliesToRequest
(*RestoreItemActionAppliesToResponse)(nil), // 3: generated.RestoreItemActionAppliesToResponse
(*ResourceIdentifier)(nil), // 4: generated.ResourceIdentifier
(*ResourceSelector)(nil), // 5: generated.ResourceSelector
}
var file_RestoreItemAction_proto_depIdxs = []int32{
4, // 0: generated.RestoreItemActionExecuteResponse.additionalItems:type_name -> generated.ResourceIdentifier
5, // 1: generated.RestoreItemActionAppliesToResponse.ResourceSelector:type_name -> generated.ResourceSelector
2, // 2: generated.RestoreItemAction.AppliesTo:input_type -> generated.RestoreItemActionAppliesToRequest
0, // 3: generated.RestoreItemAction.Execute:input_type -> generated.RestoreItemActionExecuteRequest
3, // 4: generated.RestoreItemAction.AppliesTo:output_type -> generated.RestoreItemActionAppliesToResponse
1, // 5: generated.RestoreItemAction.Execute:output_type -> generated.RestoreItemActionExecuteResponse
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
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_RestoreItemAction_proto_init() }
func file_RestoreItemAction_proto_init() {
if File_RestoreItemAction_proto != nil {
return
}
file_Shared_proto_init()
if !protoimpl.UnsafeEnabled {
file_RestoreItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RestoreItemActionExecuteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_RestoreItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RestoreItemActionExecuteResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_RestoreItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RestoreItemActionAppliesToRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_RestoreItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RestoreItemActionAppliesToResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_RestoreItemAction_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_RestoreItemAction_proto_goTypes,
DependencyIndexes: file_RestoreItemAction_proto_depIdxs,
MessageInfos: file_RestoreItemAction_proto_msgTypes,
}.Build()
File_RestoreItemAction_proto = out.File
file_RestoreItemAction_proto_rawDesc = nil
file_RestoreItemAction_proto_goTypes = nil
file_RestoreItemAction_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// Client API for RestoreItemAction service
// RestoreItemActionClient is the client API for RestoreItemAction service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RestoreItemActionClient interface { type RestoreItemActionClient interface {
AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error)
Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error)
} }
type restoreItemActionClient struct { type restoreItemActionClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewRestoreItemActionClient(cc *grpc.ClientConn) RestoreItemActionClient { func NewRestoreItemActionClient(cc grpc.ClientConnInterface) RestoreItemActionClient {
return &restoreItemActionClient{cc} return &restoreItemActionClient{cc}
} }
func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) { func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) {
out := new(RestoreItemActionAppliesToResponse) out := new(RestoreItemActionAppliesToResponse)
err := grpc.Invoke(ctx, "/generated.RestoreItemAction/AppliesTo", in, out, c.cc, opts...) err := c.cc.Invoke(ctx, "/generated.RestoreItemAction/AppliesTo", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -170,20 +460,30 @@ func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItem
func (c *restoreItemActionClient) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) { func (c *restoreItemActionClient) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) {
out := new(RestoreItemActionExecuteResponse) out := new(RestoreItemActionExecuteResponse)
err := grpc.Invoke(ctx, "/generated.RestoreItemAction/Execute", in, out, c.cc, opts...) err := c.cc.Invoke(ctx, "/generated.RestoreItemAction/Execute", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
// Server API for RestoreItemAction service // RestoreItemActionServer is the server API for RestoreItemAction service.
type RestoreItemActionServer interface { type RestoreItemActionServer interface {
AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error) AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error)
Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error) Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error)
} }
// UnimplementedRestoreItemActionServer can be embedded to have forward compatible implementations.
type UnimplementedRestoreItemActionServer struct {
}
func (*UnimplementedRestoreItemActionServer) AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
}
func (*UnimplementedRestoreItemActionServer) Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
}
func RegisterRestoreItemActionServer(s *grpc.Server, srv RestoreItemActionServer) { func RegisterRestoreItemActionServer(s *grpc.Server, srv RestoreItemActionServer) {
s.RegisterService(&_RestoreItemAction_serviceDesc, srv) s.RegisterService(&_RestoreItemAction_serviceDesc, srv)
} }
@ -240,30 +540,3 @@ var _RestoreItemAction_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "RestoreItemAction.proto", Metadata: "RestoreItemAction.proto",
} }
func init() { proto.RegisterFile("RestoreItemAction.proto", fileDescriptor5) }
var fileDescriptor5 = []byte{
// 332 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xdd, 0x4e, 0xc2, 0x30,
0x14, 0x4e, 0x81, 0x80, 0x1c, 0x88, 0x3f, 0xbd, 0xd0, 0x06, 0x63, 0x9c, 0xbb, 0x30, 0xc4, 0x1f,
0x2e, 0xf0, 0xd2, 0x2b, 0x4c, 0x94, 0x70, 0x5b, 0x7c, 0x81, 0xb1, 0x1d, 0xa1, 0x61, 0x5b, 0x6b,
0xdb, 0x25, 0xbe, 0x85, 0xcf, 0xe0, 0xa3, 0xf9, 0x26, 0x86, 0x31, 0x96, 0xc1, 0x74, 0x72, 0xd7,
0x73, 0xfa, 0x7d, 0xe7, 0xfb, 0xbe, 0xf6, 0xc0, 0x19, 0x47, 0x63, 0xa5, 0xc6, 0x89, 0xc5, 0x68,
0xe4, 0x5b, 0x21, 0xe3, 0x81, 0xd2, 0xd2, 0x4a, 0xda, 0x9e, 0x63, 0x8c, 0xda, 0xb3, 0x18, 0xf4,
0xba, 0xd3, 0x85, 0xa7, 0x31, 0x58, 0x5f, 0xb8, 0x9f, 0x04, 0x2e, 0x4b, 0xa4, 0xe7, 0x0f, 0xf4,
0x13, 0x8b, 0x1c, 0xdf, 0x13, 0x34, 0x96, 0x9e, 0x42, 0x53, 0x85, 0xc9, 0x5c, 0xc4, 0x8c, 0x38,
0xa4, 0xdf, 0xe6, 0x59, 0x45, 0x29, 0x34, 0x84, 0xc5, 0x88, 0xd5, 0x1c, 0xd2, 0xef, 0xf2, 0xf4,
0x4c, 0x19, 0xb4, 0xf4, 0x7a, 0x1c, 0xab, 0xa7, 0xed, 0x4d, 0x49, 0xaf, 0xe1, 0x70, 0x85, 0x78,
0xd1, 0x32, 0x7a, 0xf2, 0xfc, 0x65, 0xa2, 0x58, 0x23, 0x05, 0xec, 0x74, 0xdd, 0x2f, 0x02, 0xce,
0xdf, 0x8e, 0x8c, 0x92, 0xb1, 0xc1, 0x5c, 0x9a, 0x14, 0xa4, 0xc7, 0x70, 0xe4, 0x05, 0x81, 0x58,
0xc1, 0xbd, 0x70, 0x45, 0x35, 0xac, 0xe6, 0xd4, 0xfb, 0x9d, 0xe1, 0xc5, 0x20, 0x4f, 0x3f, 0xe0,
0x68, 0x64, 0xa2, 0x7d, 0x9c, 0x04, 0x18, 0x5b, 0xf1, 0x26, 0x50, 0xf3, 0x5d, 0x16, 0x75, 0xa0,
0x63, 0x96, 0x42, 0xf1, 0x42, 0x8e, 0x03, 0x5e, 0x6c, 0xb9, 0x8f, 0x70, 0x55, 0xb2, 0x38, 0x52,
0x2a, 0x14, 0x68, 0x5e, 0xe5, 0x3f, 0xcf, 0xe6, 0x46, 0xe0, 0x56, 0x91, 0xb3, 0x84, 0x63, 0x38,
0xde, 0x78, 0x9d, 0x62, 0x88, 0xbe, 0x95, 0x3a, 0x9d, 0xd3, 0x19, 0x9e, 0xff, 0x12, 0x67, 0x03,
0xe1, 0x25, 0xd2, 0xf0, 0x9b, 0xc0, 0x49, 0x49, 0x8f, 0x2e, 0xa0, 0x9d, 0x6b, 0xd2, 0xbb, 0xed,
0x89, 0xd5, 0xb9, 0x7a, 0xf7, 0x7b, 0xa2, 0xb3, 0x20, 0x33, 0x68, 0x65, 0xbf, 0x47, 0x6f, 0xaa,
0x98, 0xdb, 0x4b, 0xd7, 0xbb, 0xdd, 0x0b, 0xbb, 0xd6, 0x98, 0x35, 0xd3, 0x65, 0x7e, 0xf8, 0x09,
0x00, 0x00, 0xff, 0xff, 0x1b, 0x4c, 0xdc, 0xb7, 0x00, 0x03, 0x00, 0x00,
}

View File

@ -1,190 +1,483 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: Shared.proto // source: Shared.proto
package generated package generated
import proto "github.com/golang/protobuf/proto" import (
import fmt "fmt" proto "github.com/golang/protobuf/proto"
import math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Empty struct { type Empty struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
} }
func (m *Empty) Reset() { *m = Empty{} } func (x *Empty) Reset() {
func (m *Empty) String() string { return proto.CompactTextString(m) } *x = Empty{}
func (*Empty) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } mi := &file_Shared_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Empty) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Empty) ProtoMessage() {}
func (x *Empty) ProtoReflect() protoreflect.Message {
mi := &file_Shared_proto_msgTypes[0]
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 Empty.ProtoReflect.Descriptor instead.
func (*Empty) Descriptor() ([]byte, []int) {
return file_Shared_proto_rawDescGZIP(), []int{0}
}
type Stack struct { type Stack struct {
Frames []*StackFrame `protobuf:"bytes,1,rep,name=frames" json:"frames,omitempty"` state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Frames []*StackFrame `protobuf:"bytes,1,rep,name=frames,proto3" json:"frames,omitempty"`
} }
func (m *Stack) Reset() { *m = Stack{} } func (x *Stack) Reset() {
func (m *Stack) String() string { return proto.CompactTextString(m) } *x = Stack{}
func (*Stack) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*Stack) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} } mi := &file_Shared_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *Stack) GetFrames() []*StackFrame { func (x *Stack) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.Frames }
func (*Stack) ProtoMessage() {}
func (x *Stack) ProtoReflect() protoreflect.Message {
mi := &file_Shared_proto_msgTypes[1]
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 Stack.ProtoReflect.Descriptor instead.
func (*Stack) Descriptor() ([]byte, []int) {
return file_Shared_proto_rawDescGZIP(), []int{1}
}
func (x *Stack) GetFrames() []*StackFrame {
if x != nil {
return x.Frames
} }
return nil return nil
} }
type StackFrame struct { type StackFrame struct {
File string `protobuf:"bytes,1,opt,name=file" json:"file,omitempty"` state protoimpl.MessageState
Line int32 `protobuf:"varint,2,opt,name=line" json:"line,omitempty"` sizeCache protoimpl.SizeCache
Function string `protobuf:"bytes,3,opt,name=function" json:"function,omitempty"` unknownFields protoimpl.UnknownFields
File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
Line int32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
Function string `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"`
} }
func (m *StackFrame) Reset() { *m = StackFrame{} } func (x *StackFrame) Reset() {
func (m *StackFrame) String() string { return proto.CompactTextString(m) } *x = StackFrame{}
func (*StackFrame) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*StackFrame) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} } mi := &file_Shared_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *StackFrame) GetFile() string { func (x *StackFrame) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.File }
func (*StackFrame) ProtoMessage() {}
func (x *StackFrame) ProtoReflect() protoreflect.Message {
mi := &file_Shared_proto_msgTypes[2]
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 StackFrame.ProtoReflect.Descriptor instead.
func (*StackFrame) Descriptor() ([]byte, []int) {
return file_Shared_proto_rawDescGZIP(), []int{2}
}
func (x *StackFrame) GetFile() string {
if x != nil {
return x.File
} }
return "" return ""
} }
func (m *StackFrame) GetLine() int32 { func (x *StackFrame) GetLine() int32 {
if m != nil { if x != nil {
return m.Line return x.Line
} }
return 0 return 0
} }
func (m *StackFrame) GetFunction() string { func (x *StackFrame) GetFunction() string {
if m != nil { if x != nil {
return m.Function return x.Function
} }
return "" return ""
} }
type ResourceIdentifier struct { type ResourceIdentifier struct {
Group string `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` state protoimpl.MessageState
Resource string `protobuf:"bytes,2,opt,name=resource" json:"resource,omitempty"` sizeCache protoimpl.SizeCache
Namespace string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
} }
func (m *ResourceIdentifier) Reset() { *m = ResourceIdentifier{} } func (x *ResourceIdentifier) Reset() {
func (m *ResourceIdentifier) String() string { return proto.CompactTextString(m) } *x = ResourceIdentifier{}
func (*ResourceIdentifier) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*ResourceIdentifier) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{3} } mi := &file_Shared_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *ResourceIdentifier) GetGroup() string { func (x *ResourceIdentifier) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.Group }
func (*ResourceIdentifier) ProtoMessage() {}
func (x *ResourceIdentifier) ProtoReflect() protoreflect.Message {
mi := &file_Shared_proto_msgTypes[3]
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 ResourceIdentifier.ProtoReflect.Descriptor instead.
func (*ResourceIdentifier) Descriptor() ([]byte, []int) {
return file_Shared_proto_rawDescGZIP(), []int{3}
}
func (x *ResourceIdentifier) GetGroup() string {
if x != nil {
return x.Group
} }
return "" return ""
} }
func (m *ResourceIdentifier) GetResource() string { func (x *ResourceIdentifier) GetResource() string {
if m != nil { if x != nil {
return m.Resource return x.Resource
} }
return "" return ""
} }
func (m *ResourceIdentifier) GetNamespace() string { func (x *ResourceIdentifier) GetNamespace() string {
if m != nil { if x != nil {
return m.Namespace return x.Namespace
} }
return "" return ""
} }
func (m *ResourceIdentifier) GetName() string { func (x *ResourceIdentifier) GetName() string {
if m != nil { if x != nil {
return m.Name return x.Name
} }
return "" return ""
} }
type ResourceSelector struct { type ResourceSelector struct {
IncludedNamespaces []string `protobuf:"bytes,1,rep,name=includedNamespaces" json:"includedNamespaces,omitempty"` state protoimpl.MessageState
ExcludedNamespaces []string `protobuf:"bytes,2,rep,name=excludedNamespaces" json:"excludedNamespaces,omitempty"` sizeCache protoimpl.SizeCache
IncludedResources []string `protobuf:"bytes,3,rep,name=includedResources" json:"includedResources,omitempty"` unknownFields protoimpl.UnknownFields
ExcludedResources []string `protobuf:"bytes,4,rep,name=excludedResources" json:"excludedResources,omitempty"`
Selector string `protobuf:"bytes,5,opt,name=selector" json:"selector,omitempty"` IncludedNamespaces []string `protobuf:"bytes,1,rep,name=includedNamespaces,proto3" json:"includedNamespaces,omitempty"`
ExcludedNamespaces []string `protobuf:"bytes,2,rep,name=excludedNamespaces,proto3" json:"excludedNamespaces,omitempty"`
IncludedResources []string `protobuf:"bytes,3,rep,name=includedResources,proto3" json:"includedResources,omitempty"`
ExcludedResources []string `protobuf:"bytes,4,rep,name=excludedResources,proto3" json:"excludedResources,omitempty"`
Selector string `protobuf:"bytes,5,opt,name=selector,proto3" json:"selector,omitempty"`
} }
func (m *ResourceSelector) Reset() { *m = ResourceSelector{} } func (x *ResourceSelector) Reset() {
func (m *ResourceSelector) String() string { return proto.CompactTextString(m) } *x = ResourceSelector{}
func (*ResourceSelector) ProtoMessage() {} if protoimpl.UnsafeEnabled {
func (*ResourceSelector) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{4} } mi := &file_Shared_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *ResourceSelector) GetIncludedNamespaces() []string { func (x *ResourceSelector) String() string {
if m != nil { return protoimpl.X.MessageStringOf(x)
return m.IncludedNamespaces }
func (*ResourceSelector) ProtoMessage() {}
func (x *ResourceSelector) ProtoReflect() protoreflect.Message {
mi := &file_Shared_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResourceSelector.ProtoReflect.Descriptor instead.
func (*ResourceSelector) Descriptor() ([]byte, []int) {
return file_Shared_proto_rawDescGZIP(), []int{4}
}
func (x *ResourceSelector) GetIncludedNamespaces() []string {
if x != nil {
return x.IncludedNamespaces
} }
return nil return nil
} }
func (m *ResourceSelector) GetExcludedNamespaces() []string { func (x *ResourceSelector) GetExcludedNamespaces() []string {
if m != nil { if x != nil {
return m.ExcludedNamespaces return x.ExcludedNamespaces
} }
return nil return nil
} }
func (m *ResourceSelector) GetIncludedResources() []string { func (x *ResourceSelector) GetIncludedResources() []string {
if m != nil { if x != nil {
return m.IncludedResources return x.IncludedResources
} }
return nil return nil
} }
func (m *ResourceSelector) GetExcludedResources() []string { func (x *ResourceSelector) GetExcludedResources() []string {
if m != nil { if x != nil {
return m.ExcludedResources return x.ExcludedResources
} }
return nil return nil
} }
func (m *ResourceSelector) GetSelector() string { func (x *ResourceSelector) GetSelector() string {
if m != nil { if x != nil {
return m.Selector return x.Selector
} }
return "" return ""
} }
func init() { var File_Shared_proto protoreflect.FileDescriptor
proto.RegisterType((*Empty)(nil), "generated.Empty")
proto.RegisterType((*Stack)(nil), "generated.Stack") var file_Shared_proto_rawDesc = []byte{
proto.RegisterType((*StackFrame)(nil), "generated.StackFrame") 0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
proto.RegisterType((*ResourceIdentifier)(nil), "generated.ResourceIdentifier") 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70,
proto.RegisterType((*ResourceSelector)(nil), "generated.ResourceSelector") 0x74, 0x79, 0x22, 0x36, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x06, 0x66,
0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61,
0x6d, 0x65, 0x52, 0x06, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x53, 0x74,
0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x12,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65,
0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x78, 0x63,
0x6c, 0x75, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x52, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x6f, 0x72, 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,
} }
func init() { proto.RegisterFile("Shared.proto", fileDescriptor6) } var (
file_Shared_proto_rawDescOnce sync.Once
file_Shared_proto_rawDescData = file_Shared_proto_rawDesc
)
var fileDescriptor6 = []byte{ func file_Shared_proto_rawDescGZIP() []byte {
// 294 bytes of a gzipped FileDescriptorProto file_Shared_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x4e, 0xb5, 0x30, file_Shared_proto_rawDescData = protoimpl.X.CompressGZIP(file_Shared_proto_rawDescData)
0x10, 0x85, 0xc3, 0x05, 0xee, 0xff, 0x33, 0xba, 0xd0, 0x46, 0x93, 0xc6, 0xb8, 0x20, 0xac, 0x58, })
0x28, 0x0b, 0x4d, 0x7c, 0x03, 0x4d, 0xdc, 0x18, 0x53, 0x9e, 0x00, 0xcb, 0x70, 0x6d, 0xe4, 0xb6, return file_Shared_proto_rawDescData
0xa4, 0x94, 0xe4, 0xfa, 0xca, 0x3e, 0x85, 0x69, 0x4b, 0x61, 0x81, 0xbb, 0x39, 0x73, 0x3e, 0xce, }
0x0c, 0x93, 0xc2, 0x79, 0xfd, 0xd9, 0x68, 0x6c, 0xab, 0x41, 0x2b, 0xa3, 0x48, 0x76, 0x40, 0x89,
0xba, 0x31, 0xd8, 0x16, 0xff, 0x20, 0x7d, 0x3e, 0x0e, 0xe6, 0xbb, 0x78, 0x82, 0xb4, 0x36, 0x0d, var file_Shared_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
0xff, 0x22, 0xf7, 0xb0, 0xef, 0x74, 0x73, 0xc4, 0x91, 0x46, 0x79, 0x5c, 0x9e, 0x3d, 0x5c, 0x57, var file_Shared_proto_goTypes = []interface{}{
0x0b, 0x5d, 0x39, 0xe2, 0xc5, 0xba, 0x6c, 0x86, 0x8a, 0x77, 0x80, 0xb5, 0x4b, 0x08, 0x24, 0x9d, (*Empty)(nil), // 0: generated.Empty
0xe8, 0x91, 0x46, 0x79, 0x54, 0x66, 0xcc, 0xd5, 0xb6, 0xd7, 0x0b, 0x89, 0x74, 0x97, 0x47, 0x65, (*Stack)(nil), // 1: generated.Stack
0xca, 0x5c, 0x4d, 0x6e, 0xe0, 0x7f, 0x37, 0x49, 0x6e, 0x84, 0x92, 0x34, 0x76, 0xec, 0xa2, 0x8b, (*StackFrame)(nil), // 2: generated.StackFrame
0x13, 0x10, 0x86, 0xa3, 0x9a, 0x34, 0xc7, 0xd7, 0x16, 0xa5, 0x11, 0x9d, 0x40, 0x4d, 0xae, 0x20, (*ResourceIdentifier)(nil), // 3: generated.ResourceIdentifier
0x3d, 0x68, 0x35, 0x0d, 0x73, 0xb4, 0x17, 0x36, 0x47, 0xcf, 0xac, 0xcb, 0xcf, 0xd8, 0xa2, 0xc9, (*ResourceSelector)(nil), // 4: generated.ResourceSelector
0x2d, 0x64, 0xd2, 0xae, 0x38, 0x34, 0x1c, 0xe7, 0x21, 0x6b, 0xc3, 0x6e, 0x65, 0x05, 0x4d, 0xfc, }
0xa6, 0xb6, 0x2e, 0x7e, 0x22, 0xb8, 0x08, 0xa3, 0x6b, 0xec, 0x91, 0x1b, 0xa5, 0x49, 0x05, 0x44, var file_Shared_proto_depIdxs = []int32{
0x48, 0xde, 0x4f, 0x2d, 0xb6, 0x6f, 0xe1, 0x6b, 0x7f, 0x9b, 0x8c, 0xfd, 0xe1, 0x58, 0x1e, 0x4f, 2, // 0: generated.Stack.frames:type_name -> generated.StackFrame
0x1b, 0x7e, 0xe7, 0xf9, 0xad, 0x43, 0xee, 0xe0, 0x32, 0xa4, 0x84, 0xd9, 0x23, 0x8d, 0x1d, 0xbe, 1, // [1:1] is the sub-list for method output_type
0x35, 0x2c, 0x1d, 0x32, 0x56, 0x3a, 0xf1, 0xf4, 0xc6, 0xb0, 0xe7, 0x19, 0xe7, 0xff, 0xa0, 0xa9, 1, // [1:1] is the sub-list for method input_type
0x3f, 0x4f, 0xd0, 0x1f, 0x7b, 0xf7, 0x16, 0x1e, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x83, 1, // [1:1] is the sub-list for extension type_name
0xa1, 0x97, 0x1b, 0x02, 0x00, 0x00, 1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_Shared_proto_init() }
func file_Shared_proto_init() {
if File_Shared_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_Shared_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Empty); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_Shared_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Stack); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_Shared_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StackFrame); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_Shared_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceIdentifier); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_Shared_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceSelector); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_Shared_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_Shared_proto_goTypes,
DependencyIndexes: file_Shared_proto_depIdxs,
MessageInfos: file_Shared_proto_msgTypes,
}.Build()
File_Shared_proto = out.File
file_Shared_proto_rawDesc = nil
file_Shared_proto_goTypes = nil
file_Shared_proto_depIdxs = nil
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,517 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: backupitemaction/v1/BackupItemAction.proto
package v1
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"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ExecuteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
}
func (x *ExecuteRequest) Reset() {
*x = ExecuteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExecuteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecuteRequest) ProtoMessage() {}
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[0]
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 ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{0}
}
func (x *ExecuteRequest) GetPlugin() string {
if x != nil {
return x.Plugin
}
return ""
}
func (x *ExecuteRequest) GetItem() []byte {
if x != nil {
return x.Item
}
return nil
}
func (x *ExecuteRequest) GetBackup() []byte {
if x != nil {
return x.Backup
}
return nil
}
type ExecuteResponse struct {
state protoimpl.MessageState
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"`
}
func (x *ExecuteResponse) Reset() {
*x = ExecuteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExecuteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecuteResponse) ProtoMessage() {}
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[1]
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 ExecuteResponse.ProtoReflect.Descriptor instead.
func (*ExecuteResponse) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{1}
}
func (x *ExecuteResponse) GetItem() []byte {
if x != nil {
return x.Item
}
return nil
}
func (x *ExecuteResponse) GetAdditionalItems() []*generated.ResourceIdentifier {
if x != nil {
return x.AdditionalItems
}
return nil
}
type BackupItemActionAppliesToRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
}
func (x *BackupItemActionAppliesToRequest) Reset() {
*x = BackupItemActionAppliesToRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BackupItemActionAppliesToRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BackupItemActionAppliesToRequest) ProtoMessage() {}
func (x *BackupItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[2]
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 BackupItemActionAppliesToRequest.ProtoReflect.Descriptor instead.
func (*BackupItemActionAppliesToRequest) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{2}
}
func (x *BackupItemActionAppliesToRequest) GetPlugin() string {
if x != nil {
return x.Plugin
}
return ""
}
type BackupItemActionAppliesToResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceSelector *generated.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]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BackupItemActionAppliesToResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BackupItemActionAppliesToResponse) ProtoMessage() {}
func (x *BackupItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
mi := &file_backupitemaction_v1_BackupItemAction_proto_msgTypes[3]
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 BackupItemActionAppliesToResponse.ProtoReflect.Descriptor instead.
func (*BackupItemActionAppliesToResponse) Descriptor() ([]byte, []int) {
return file_backupitemaction_v1_BackupItemAction_proto_rawDescGZIP(), []int{3}
}
func (x *BackupItemActionAppliesToResponse) GetResourceSelector() *generated.ResourceSelector {
if x != nil {
return x.ResourceSelector
}
return nil
}
var File_backupitemaction_v1_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_v1_BackupItemAction_proto_rawDescOnce sync.Once
file_backupitemaction_v1_BackupItemAction_proto_rawDescData = file_backupitemaction_v1_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)
})
return file_backupitemaction_v1_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_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
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
2, // [2:2] is the sub-list for extension extendee
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 {
return
}
if !protoimpl.UnsafeEnabled {
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExecuteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExecuteResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BackupItemActionAppliesToRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_backupitemaction_v1_BackupItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BackupItemActionAppliesToResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_backupitemaction_v1_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,
}.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
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// BackupItemActionClient is the client API for BackupItemAction service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BackupItemActionClient interface {
AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error)
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
}
type backupItemActionClient struct {
cc grpc.ClientConnInterface
}
func NewBackupItemActionClient(cc grpc.ClientConnInterface) BackupItemActionClient {
return &backupItemActionClient{cc}
}
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...)
if err != nil {
return nil, err
}
return out, nil
}
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...)
if err != nil {
return nil, err
}
return out, nil
}
// BackupItemActionServer is the server API for BackupItemAction service.
type BackupItemActionServer interface {
AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error)
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
}
// UnimplementedBackupItemActionServer can be embedded to have forward compatible implementations.
type UnimplementedBackupItemActionServer struct {
}
func (*UnimplementedBackupItemActionServer) AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
}
func (*UnimplementedBackupItemActionServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
}
func RegisterBackupItemActionServer(s *grpc.Server, srv BackupItemActionServer) {
s.RegisterService(&_BackupItemAction_serviceDesc, srv)
}
func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BackupItemActionAppliesToRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BackupItemActionServer).AppliesTo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.BackupItemAction/AppliesTo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExecuteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BackupItemActionServer).Execute(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.BackupItemAction/Execute",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
}
return interceptor(ctx, in, info, handler)
}
var _BackupItemAction_serviceDesc = grpc.ServiceDesc{
ServiceName: "v1.BackupItemAction",
HandlerType: (*BackupItemActionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AppliesTo",
Handler: _BackupItemAction_AppliesTo_Handler,
},
{
MethodName: "Execute",
Handler: _BackupItemAction_Execute_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "backupitemaction/v1/BackupItemAction.proto",
}

View File

@ -4,7 +4,9 @@ package mocks
import ( import (
mock "github.com/stretchr/testify/mock" mock "github.com/stretchr/testify/mock"
velero "github.com/vmware-tanzu/velero/pkg/plugin/velero" velero "github.com/vmware-tanzu/velero/pkg/plugin/velero"
biav1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/backupitemaction/v1"
isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1" isv1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
) )
@ -19,15 +21,15 @@ func (_m *Manager) CleanupClients() {
} }
// GetBackupItemAction provides a mock function with given fields: name // GetBackupItemAction provides a mock function with given fields: name
func (_m *Manager) GetBackupItemAction(name string) (velero.BackupItemAction, error) { func (_m *Manager) GetBackupItemAction(name string) (biav1.BackupItemAction, error) {
ret := _m.Called(name) ret := _m.Called(name)
var r0 velero.BackupItemAction var r0 biav1.BackupItemAction
if rf, ok := ret.Get(0).(func(string) velero.BackupItemAction); ok { if rf, ok := ret.Get(0).(func(string) biav1.BackupItemAction); ok {
r0 = rf(name) r0 = rf(name)
} else { } else {
if ret.Get(0) != nil { if ret.Get(0) != nil {
r0 = ret.Get(0).(velero.BackupItemAction) r0 = ret.Get(0).(biav1.BackupItemAction)
} }
} }
@ -42,15 +44,15 @@ func (_m *Manager) GetBackupItemAction(name string) (velero.BackupItemAction, er
} }
// GetBackupItemActions provides a mock function with given fields: // GetBackupItemActions provides a mock function with given fields:
func (_m *Manager) GetBackupItemActions() ([]velero.BackupItemAction, error) { func (_m *Manager) GetBackupItemActions() ([]biav1.BackupItemAction, error) {
ret := _m.Called() ret := _m.Called()
var r0 []velero.BackupItemAction var r0 []biav1.BackupItemAction
if rf, ok := ret.Get(0).(func() []velero.BackupItemAction); ok { if rf, ok := ret.Get(0).(func() []biav1.BackupItemAction); ok {
r0 = rf() r0 = rf()
} else { } else {
if ret.Get(0) != nil { if ret.Get(0) != nil {
r0 = ret.Get(0).([]velero.BackupItemAction) r0 = ret.Get(0).([]biav1.BackupItemAction)
} }
} }

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto"; import "Shared.proto";

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto"; import "Shared.proto";

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto"; import "Shared.proto";

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto"; import "Shared.proto";

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto"; import "Shared.proto";

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
message Empty {} message Empty {}

View File

@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package generated; package generated;
option go_package = "github.com/vmware-tanzu/velero/pkg/plugin/generated";
import "Shared.proto"; import "Shared.proto";

View File

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

View File

@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package velero package v1
import ( import (
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
) )
// BackupItemAction is an actor that performs an operation on an individual item being backed up. // BackupItemAction is an actor that performs an operation on an individual item being backed up.
@ -28,18 +28,11 @@ type BackupItemAction interface {
// AppliesTo returns information about which resources this action should be invoked for. // AppliesTo returns information about which resources this action should be invoked for.
// A BackupItemAction's Execute function will only be invoked on items that match the returned // A BackupItemAction's Execute function will only be invoked on items that match the returned
// selector. A zero-valued ResourceSelector matches all resources. // selector. A zero-valued ResourceSelector matches all resources.
AppliesTo() (ResourceSelector, error) AppliesTo() (velero.ResourceSelector, error)
// Execute allows the ItemAction to perform arbitrary logic with the item being backed up, // Execute allows the ItemAction to perform arbitrary logic with the item being backed up,
// including mutating the item itself prior to backup. The item (unmodified or modified) // including mutating the item itself prior to backup. The item (unmodified or modified)
// should be returned, along with an optional slice of ResourceIdentifiers specifying // should be returned, along with an optional slice of ResourceIdentifiers specifying
// additional related items that should be backed up. // additional related items that should be backed up.
Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []ResourceIdentifier, error) Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error)
}
// ResourceIdentifier describes a single item by its group, resource, namespace, and name.
type ResourceIdentifier struct {
schema.GroupResource
Namespace string
Name string
} }

View File

@ -21,11 +21,10 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
) )
type AlsoHandlesInput struct { type AlsoHandlesInput struct {

View File

@ -5,9 +5,9 @@ package mocks
import ( import (
context "context" context "context"
mock "github.com/stretchr/testify/mock" mock "github.com/stretchr/testify/mock"
v1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
velero "github.com/vmware-tanzu/velero/pkg/plugin/velero" velero "github.com/vmware-tanzu/velero/pkg/plugin/velero"
v1 "github.com/vmware-tanzu/velero/pkg/plugin/velero/item_snapshotter/v1"
) )
// ItemSnapshotter is an autogenerated mock type for the ItemSnapshotter type // ItemSnapshotter is an autogenerated mock type for the ItemSnapshotter type

View File

@ -20,6 +20,8 @@ limitations under the License.
// plugins of any type can be implemented. // plugins of any type can be implemented.
package velero package velero
import "k8s.io/apimachinery/pkg/runtime/schema"
// ResourceSelector is a collection of included/excluded namespaces, // ResourceSelector is a collection of included/excluded namespaces,
// included/excluded resources, and a label-selector that can be used // included/excluded resources, and a label-selector that can be used
// to match a set of items from a cluster. // to match a set of items from a cluster.
@ -54,3 +56,10 @@ type Applicable interface {
// AppliesTo returns information about which resources this Responder should be invoked for. // AppliesTo returns information about which resources this Responder should be invoked for.
AppliesTo() (ResourceSelector, error) AppliesTo() (ResourceSelector, error)
} }
// ResourceIdentifier describes a single item by its group, resource, namespace, and name.
type ResourceIdentifier struct {
schema.GroupResource
Namespace string
Name string
}