From 79eea06dd76ee072660257045c0e6d85484ca57c Mon Sep 17 00:00:00 2001 From: Damian Debkowski Date: Thu, 2 Mar 2023 09:12:39 -0800 Subject: [PATCH] feat(proto): storage bucket plugin grpc definitions (#252) --- .../storagebuckets/v1/storage_bucket.proto | 29 + .../plugin/v1/storage_plugin_service.proto | 122 ++ .../storagebuckets/storage_bucket.pb.go | 207 ++++ sdk/pbs/plugin/storage_plugin_service.pb.go | 1053 +++++++++++++++++ .../plugin/storage_plugin_service_grpc.pb.go | 325 +++++ 5 files changed, 1736 insertions(+) create mode 100644 internal/proto/controller/api/resources/storagebuckets/v1/storage_bucket.proto create mode 100644 internal/proto/plugin/v1/storage_plugin_service.proto create mode 100644 sdk/pbs/controller/api/resources/storagebuckets/storage_bucket.pb.go create mode 100644 sdk/pbs/plugin/storage_plugin_service.pb.go create mode 100644 sdk/pbs/plugin/storage_plugin_service_grpc.pb.go diff --git a/internal/proto/controller/api/resources/storagebuckets/v1/storage_bucket.proto b/internal/proto/controller/api/resources/storagebuckets/v1/storage_bucket.proto new file mode 100644 index 0000000000..1d67d5a0d8 --- /dev/null +++ b/internal/proto/controller/api/resources/storagebuckets/v1/storage_bucket.proto @@ -0,0 +1,29 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package controller.api.resources.storagebuckets.v1; + +import "controller/custom_options/v1/options.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/storagebuckets;storagebuckets"; + +// TODO: this definition is not complete and +// is empty because the message is being used in +// plugin/v1/storage_plugin_service.proto +// StorageBucket manages external object stores +message StorageBucket { + // The name of the resource that is managed by an external object store service. + string bucket_name = 10; // @gotags: `class:"public"` + + // The prefix used to organize the data held within the external object store. + string bucket_prefix = 20; // @gotags: `class:"public"` + + // Attributes specific to the storage bucket type. + google.protobuf.Struct attributes = 30 [(custom_options.v1.generate_sdk_option) = true]; // @gotags: `class:"public"` + + // Secrets specific to the storage bucket type. These are never output. + google.protobuf.Struct secrets = 40 [(custom_options.v1.generate_sdk_option) = true]; +} diff --git a/internal/proto/plugin/v1/storage_plugin_service.proto b/internal/proto/plugin/v1/storage_plugin_service.proto new file mode 100644 index 0000000000..81cd308617 --- /dev/null +++ b/internal/proto/plugin/v1/storage_plugin_service.proto @@ -0,0 +1,122 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package plugin.v1; + +import "controller/api/resources/storagebuckets/v1/storage_bucket.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "github.com/hashicorp/boundary/sdk/pbs/plugin;plugin"; + +// StoragePluginService describes the service for storage bucket plugins. +service StoragePluginService { + // OnCreateStorageBucket is a hook that runs when a + // storage bucket is created. + rpc OnCreateStorageBucket(OnCreateStorageBucketRequest) returns (OnCreateStorageBucketResponse); + + // OnUpdateStorageBucket is a hook that runs when a storage bucket is + // updated. + rpc OnUpdateStorageBucket(OnUpdateStorageBucketRequest) returns (OnUpdateStorageBucketResponse); + + // OnDeleteStorageBucket is a hook that runs when a storage bucket is + // deleted. + rpc OnDeleteStorageBucket(OnDeleteStorageBucketRequest) returns (OnDeleteStorageBucketResponse); + + // GetObject is a hook that retrieves objects. + rpc GetObject(GetObjectRequest) returns (stream GetObjectResponse); + + // PutObject is a hook that streams chunks of a file to be stored + // in an external object store. + rpc PutObject(stream PutObjectRequest) returns (PutObjectResponse); +} + +message OnCreateStorageBucketRequest { + // Required. The storage bucket to create. The request may contain optional + // secret data to help authenticate the request against a cloud + // API. + controller.api.resources.storagebuckets.v1.StorageBucket bucket = 10; +} + +message OnCreateStorageBucketResponse { + // The persisted data represents state persisted between storage bucket calls. + StorageBucketPersisted persisted = 10; +} + +message OnUpdateStorageBucketRequest { + // Required. The existing state of the storage bucket. + controller.api.resources.storagebuckets.v1.StorageBucket current_bucket = 10; + + // Required. The requested new state of the storage bucket. + // This field may contain optional secret data that has been + // updated from the last returned persisted state. + controller.api.resources.storagebuckets.v1.StorageBucket new_bucket = 20; + + // Required. The existing persisted secret data. + StorageBucketPersisted persisted = 30; +} + +message OnUpdateStorageBucketResponse { + // The persisted data represents state persisted between storage bucket calls. + StorageBucketPersisted persisted = 10; +} + +message OnDeleteStorageBucketRequest { + // Required. The existing state of the storage bucket to delete. + controller.api.resources.storagebuckets.v1.StorageBucket bucket = 10; + + // Required. The existing persisted secret data. + StorageBucketPersisted persisted = 20; +} + +message OnDeleteStorageBucketResponse {} + +message GetObjectRequest { + // Required. The existing state of the storage bucket. + controller.api.resources.storagebuckets.v1.StorageBucket bucket = 10; + + // Required. The path of the object. + string key = 20; +} + +message GetObjectResponse { + // Object data. + bytes file_chunk = 10; +} + +message PutObjectMetadata { + // Required. The existing state of the storage bucket. + controller.api.resources.storagebuckets.v1.StorageBucket bucket = 10; + + // Required. The path of the object. + string key = 20; +} + +message PutObjectRequest { + oneof data { + // Object data. + // Recommended chunk size should be between 16KiB to 64KiB. + bytes file_chunk = 10; + + PutObjectMetadata request = 20; + } +} + +message PutObjectResponse { + // 256-bit SHA-256 digest of the object. + bytes checksum_sha_256 = 10; +} + +// StorageBucketPersisted is data that the plugin can read from and write +// to that will always be provided by the host. +message StorageBucketPersisted { + // Data has no explicit structure other than valid json. + // Data may contain sensitive information, such as + // credentials, rotated secrets, or configuration data. + // Data can be anything that may need to be provided to + // a series of different method calls. + // Data is encrypted at-rest by Boundary. + // Data is never returned to the end user. + google.protobuf.Struct data = 10; +} diff --git a/sdk/pbs/controller/api/resources/storagebuckets/storage_bucket.pb.go b/sdk/pbs/controller/api/resources/storagebuckets/storage_bucket.pb.go new file mode 100644 index 0000000000..b709e9d220 --- /dev/null +++ b/sdk/pbs/controller/api/resources/storagebuckets/storage_bucket.pb.go @@ -0,0 +1,207 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: controller/api/resources/storagebuckets/v1/storage_bucket.proto + +package storagebuckets + +import ( + _ "github.com/hashicorp/boundary/sdk/pbs/controller/protooptions" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + 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) +) + +// TODO: this definition is not complete and +// is empty because the message is being used in +// plugin/v1/storage_plugin_service.proto +// StorageBucket manages external object stores +type StorageBucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the resource that is managed by an external object store service. + BucketName string `protobuf:"bytes,10,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"` // @gotags: `class:"public"` + // The prefix used to organize the data held within the external object store. + BucketPrefix string `protobuf:"bytes,20,opt,name=bucket_prefix,json=bucketPrefix,proto3" json:"bucket_prefix,omitempty"` // @gotags: `class:"public"` + // Attributes specific to the storage bucket type. + Attributes *structpb.Struct `protobuf:"bytes,30,opt,name=attributes,proto3" json:"attributes,omitempty"` // @gotags: `class:"public"` + // Secrets specific to the storage bucket type. These are never output. + Secrets *structpb.Struct `protobuf:"bytes,40,opt,name=secrets,proto3" json:"secrets,omitempty"` +} + +func (x *StorageBucket) Reset() { + *x = StorageBucket{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageBucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageBucket) ProtoMessage() {} + +func (x *StorageBucket) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_resources_storagebuckets_v1_storage_bucket_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 StorageBucket.ProtoReflect.Descriptor instead. +func (*StorageBucket) Descriptor() ([]byte, []int) { + return file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescGZIP(), []int{0} +} + +func (x *StorageBucket) GetBucketName() string { + if x != nil { + return x.BucketName + } + return "" +} + +func (x *StorageBucket) GetBucketPrefix() string { + if x != nil { + return x.BucketPrefix + } + return "" +} + +func (x *StorageBucket) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *StorageBucket) GetSecrets() *structpb.Struct { + if x != nil { + return x.Secrets + } + return nil +} + +var File_controller_api_resources_storagebuckets_v1_storage_bucket_proto protoreflect.FileDescriptor + +var file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x2a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x3d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x1e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x04, 0xa0, 0xda, + 0x29, 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, + 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x04, 0xa0, 0xda, 0x29, 0x01, 0x52, 0x07, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x42, 0x5e, 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescOnce sync.Once + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescData = file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDesc +) + +func file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescGZIP() []byte { + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescOnce.Do(func() { + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescData) + }) + return file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDescData +} + +var file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_goTypes = []interface{}{ + (*StorageBucket)(nil), // 0: controller.api.resources.storagebuckets.v1.StorageBucket + (*structpb.Struct)(nil), // 1: google.protobuf.Struct +} +var file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_depIdxs = []int32{ + 1, // 0: controller.api.resources.storagebuckets.v1.StorageBucket.attributes:type_name -> google.protobuf.Struct + 1, // 1: controller.api.resources.storagebuckets.v1.StorageBucket.secrets:type_name -> google.protobuf.Struct + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] 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_controller_api_resources_storagebuckets_v1_storage_bucket_proto_init() } +func file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_init() { + if File_controller_api_resources_storagebuckets_v1_storage_bucket_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageBucket); 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_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_goTypes, + DependencyIndexes: file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_depIdxs, + MessageInfos: file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_msgTypes, + }.Build() + File_controller_api_resources_storagebuckets_v1_storage_bucket_proto = out.File + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_rawDesc = nil + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_goTypes = nil + file_controller_api_resources_storagebuckets_v1_storage_bucket_proto_depIdxs = nil +} diff --git a/sdk/pbs/plugin/storage_plugin_service.pb.go b/sdk/pbs/plugin/storage_plugin_service.pb.go new file mode 100644 index 0000000000..0e2f51ce59 --- /dev/null +++ b/sdk/pbs/plugin/storage_plugin_service.pb.go @@ -0,0 +1,1053 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: plugin/v1/storage_plugin_service.proto + +package plugin + +import ( + storagebuckets "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/storagebuckets" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + 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) +) + +type OnCreateStorageBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The storage bucket to create. The request may contain optional + // secret data to help authenticate the request against a cloud + // API. + Bucket *storagebuckets.StorageBucket `protobuf:"bytes,10,opt,name=bucket,proto3" json:"bucket,omitempty"` +} + +func (x *OnCreateStorageBucketRequest) Reset() { + *x = OnCreateStorageBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateStorageBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateStorageBucketRequest) ProtoMessage() {} + +func (x *OnCreateStorageBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_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 OnCreateStorageBucketRequest.ProtoReflect.Descriptor instead. +func (*OnCreateStorageBucketRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{0} +} + +func (x *OnCreateStorageBucketRequest) GetBucket() *storagebuckets.StorageBucket { + if x != nil { + return x.Bucket + } + return nil +} + +type OnCreateStorageBucketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The persisted data represents state persisted between storage bucket calls. + Persisted *StorageBucketPersisted `protobuf:"bytes,10,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnCreateStorageBucketResponse) Reset() { + *x = OnCreateStorageBucketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateStorageBucketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateStorageBucketResponse) ProtoMessage() {} + +func (x *OnCreateStorageBucketResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_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 OnCreateStorageBucketResponse.ProtoReflect.Descriptor instead. +func (*OnCreateStorageBucketResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{1} +} + +func (x *OnCreateStorageBucketResponse) GetPersisted() *StorageBucketPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnUpdateStorageBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The existing state of the storage bucket. + CurrentBucket *storagebuckets.StorageBucket `protobuf:"bytes,10,opt,name=current_bucket,json=currentBucket,proto3" json:"current_bucket,omitempty"` + // Required. The requested new state of the storage bucket. + // This field may contain optional secret data that has been + // updated from the last returned persisted state. + NewBucket *storagebuckets.StorageBucket `protobuf:"bytes,20,opt,name=new_bucket,json=newBucket,proto3" json:"new_bucket,omitempty"` + // Required. The existing persisted secret data. + Persisted *StorageBucketPersisted `protobuf:"bytes,30,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnUpdateStorageBucketRequest) Reset() { + *x = OnUpdateStorageBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateStorageBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateStorageBucketRequest) ProtoMessage() {} + +func (x *OnUpdateStorageBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_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 OnUpdateStorageBucketRequest.ProtoReflect.Descriptor instead. +func (*OnUpdateStorageBucketRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{2} +} + +func (x *OnUpdateStorageBucketRequest) GetCurrentBucket() *storagebuckets.StorageBucket { + if x != nil { + return x.CurrentBucket + } + return nil +} + +func (x *OnUpdateStorageBucketRequest) GetNewBucket() *storagebuckets.StorageBucket { + if x != nil { + return x.NewBucket + } + return nil +} + +func (x *OnUpdateStorageBucketRequest) GetPersisted() *StorageBucketPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnUpdateStorageBucketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The persisted data represents state persisted between storage bucket calls. + Persisted *StorageBucketPersisted `protobuf:"bytes,10,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnUpdateStorageBucketResponse) Reset() { + *x = OnUpdateStorageBucketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateStorageBucketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateStorageBucketResponse) ProtoMessage() {} + +func (x *OnUpdateStorageBucketResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_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 OnUpdateStorageBucketResponse.ProtoReflect.Descriptor instead. +func (*OnUpdateStorageBucketResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{3} +} + +func (x *OnUpdateStorageBucketResponse) GetPersisted() *StorageBucketPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnDeleteStorageBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The existing state of the storage bucket to delete. + Bucket *storagebuckets.StorageBucket `protobuf:"bytes,10,opt,name=bucket,proto3" json:"bucket,omitempty"` + // Required. The existing persisted secret data. + Persisted *StorageBucketPersisted `protobuf:"bytes,20,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnDeleteStorageBucketRequest) Reset() { + *x = OnDeleteStorageBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteStorageBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteStorageBucketRequest) ProtoMessage() {} + +func (x *OnDeleteStorageBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_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 OnDeleteStorageBucketRequest.ProtoReflect.Descriptor instead. +func (*OnDeleteStorageBucketRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{4} +} + +func (x *OnDeleteStorageBucketRequest) GetBucket() *storagebuckets.StorageBucket { + if x != nil { + return x.Bucket + } + return nil +} + +func (x *OnDeleteStorageBucketRequest) GetPersisted() *StorageBucketPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnDeleteStorageBucketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OnDeleteStorageBucketResponse) Reset() { + *x = OnDeleteStorageBucketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteStorageBucketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteStorageBucketResponse) ProtoMessage() {} + +func (x *OnDeleteStorageBucketResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDeleteStorageBucketResponse.ProtoReflect.Descriptor instead. +func (*OnDeleteStorageBucketResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{5} +} + +type GetObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The existing state of the storage bucket. + Bucket *storagebuckets.StorageBucket `protobuf:"bytes,10,opt,name=bucket,proto3" json:"bucket,omitempty"` + // Required. The path of the object. + Key string `protobuf:"bytes,20,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *GetObjectRequest) Reset() { + *x = GetObjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetObjectRequest) ProtoMessage() {} + +func (x *GetObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetObjectRequest.ProtoReflect.Descriptor instead. +func (*GetObjectRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{6} +} + +func (x *GetObjectRequest) GetBucket() *storagebuckets.StorageBucket { + if x != nil { + return x.Bucket + } + return nil +} + +func (x *GetObjectRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type GetObjectResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Object data. + FileChunk []byte `protobuf:"bytes,10,opt,name=file_chunk,json=fileChunk,proto3" json:"file_chunk,omitempty"` +} + +func (x *GetObjectResponse) Reset() { + *x = GetObjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetObjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetObjectResponse) ProtoMessage() {} + +func (x *GetObjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetObjectResponse.ProtoReflect.Descriptor instead. +func (*GetObjectResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GetObjectResponse) GetFileChunk() []byte { + if x != nil { + return x.FileChunk + } + return nil +} + +type PutObjectMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The existing state of the storage bucket. + Bucket *storagebuckets.StorageBucket `protobuf:"bytes,10,opt,name=bucket,proto3" json:"bucket,omitempty"` + // Required. The path of the object. + Key string `protobuf:"bytes,20,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *PutObjectMetadata) Reset() { + *x = PutObjectMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutObjectMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutObjectMetadata) ProtoMessage() {} + +func (x *PutObjectMetadata) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutObjectMetadata.ProtoReflect.Descriptor instead. +func (*PutObjectMetadata) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{8} +} + +func (x *PutObjectMetadata) GetBucket() *storagebuckets.StorageBucket { + if x != nil { + return x.Bucket + } + return nil +} + +func (x *PutObjectMetadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type PutObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Data: + // + // *PutObjectRequest_FileChunk + // *PutObjectRequest_Request + Data isPutObjectRequest_Data `protobuf_oneof:"data"` +} + +func (x *PutObjectRequest) Reset() { + *x = PutObjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutObjectRequest) ProtoMessage() {} + +func (x *PutObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[9] + 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 PutObjectRequest.ProtoReflect.Descriptor instead. +func (*PutObjectRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{9} +} + +func (m *PutObjectRequest) GetData() isPutObjectRequest_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *PutObjectRequest) GetFileChunk() []byte { + if x, ok := x.GetData().(*PutObjectRequest_FileChunk); ok { + return x.FileChunk + } + return nil +} + +func (x *PutObjectRequest) GetRequest() *PutObjectMetadata { + if x, ok := x.GetData().(*PutObjectRequest_Request); ok { + return x.Request + } + return nil +} + +type isPutObjectRequest_Data interface { + isPutObjectRequest_Data() +} + +type PutObjectRequest_FileChunk struct { + // Object data. + // Recommended chunk size should be between 16KiB to 64KiB. + FileChunk []byte `protobuf:"bytes,10,opt,name=file_chunk,json=fileChunk,proto3,oneof"` +} + +type PutObjectRequest_Request struct { + Request *PutObjectMetadata `protobuf:"bytes,20,opt,name=request,proto3,oneof"` +} + +func (*PutObjectRequest_FileChunk) isPutObjectRequest_Data() {} + +func (*PutObjectRequest_Request) isPutObjectRequest_Data() {} + +type PutObjectResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 256-bit SHA-256 digest of the object. + ChecksumSha_256 []byte `protobuf:"bytes,10,opt,name=checksum_sha_256,json=checksumSha256,proto3" json:"checksum_sha_256,omitempty"` +} + +func (x *PutObjectResponse) Reset() { + *x = PutObjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutObjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutObjectResponse) ProtoMessage() {} + +func (x *PutObjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutObjectResponse.ProtoReflect.Descriptor instead. +func (*PutObjectResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{10} +} + +func (x *PutObjectResponse) GetChecksumSha_256() []byte { + if x != nil { + return x.ChecksumSha_256 + } + return nil +} + +// StorageBucketPersisted is data that the plugin can read from and write +// to that will always be provided by the host. +type StorageBucketPersisted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Data has no explicit structure other than valid json. + // Data may contain sensitive information, such as + // credentials, rotated secrets, or configuration data. + // Data can be anything that may need to be provided to + // a series of different method calls. + // Data is encrypted at-rest by Boundary. + // Data is never returned to the end user. + Data *structpb.Struct `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *StorageBucketPersisted) Reset() { + *x = StorageBucketPersisted{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageBucketPersisted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageBucketPersisted) ProtoMessage() {} + +func (x *StorageBucketPersisted) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_storage_plugin_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageBucketPersisted.ProtoReflect.Descriptor instead. +func (*StorageBucketPersisted) Descriptor() ([]byte, []int) { + return file_plugin_v1_storage_plugin_service_proto_rawDescGZIP(), []int{11} +} + +func (x *StorageBucketPersisted) GetData() *structpb.Struct { + if x != nil { + return x.Data + } + return nil +} + +var File_plugin_v1_storage_plugin_service_proto protoreflect.FileDescriptor + +var file_plugin_v1_storage_plugin_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x1a, 0x3f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x71, 0x0a, 0x1c, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x51, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x60, 0x0a, 0x1d, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x9b, 0x02, 0x0a, 0x1c, 0x4f, 0x6e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x60, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x58, 0x0a, 0x0a, 0x6e, 0x65, + 0x77, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x60, 0x0a, 0x1d, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x1c, 0x4f, 0x6e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x1f, 0x0a, 0x1d, + 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x51, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x32, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x78, 0x0a, 0x11, 0x50, 0x75, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x51, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x22, 0x75, 0x0a, 0x10, 0x50, 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, + 0x66, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a, 0x11, 0x50, + 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x61, + 0x5f, 0x32, 0x35, 0x36, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x22, 0x45, 0x0a, 0x16, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x32, 0xee, 0x03, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x4f, 0x6e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x48, 0x0a, 0x09, 0x50, 0x75, 0x74, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x28, 0x01, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x61, 0x72, 0x79, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_plugin_v1_storage_plugin_service_proto_rawDescOnce sync.Once + file_plugin_v1_storage_plugin_service_proto_rawDescData = file_plugin_v1_storage_plugin_service_proto_rawDesc +) + +func file_plugin_v1_storage_plugin_service_proto_rawDescGZIP() []byte { + file_plugin_v1_storage_plugin_service_proto_rawDescOnce.Do(func() { + file_plugin_v1_storage_plugin_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_plugin_v1_storage_plugin_service_proto_rawDescData) + }) + return file_plugin_v1_storage_plugin_service_proto_rawDescData +} + +var file_plugin_v1_storage_plugin_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_plugin_v1_storage_plugin_service_proto_goTypes = []interface{}{ + (*OnCreateStorageBucketRequest)(nil), // 0: plugin.v1.OnCreateStorageBucketRequest + (*OnCreateStorageBucketResponse)(nil), // 1: plugin.v1.OnCreateStorageBucketResponse + (*OnUpdateStorageBucketRequest)(nil), // 2: plugin.v1.OnUpdateStorageBucketRequest + (*OnUpdateStorageBucketResponse)(nil), // 3: plugin.v1.OnUpdateStorageBucketResponse + (*OnDeleteStorageBucketRequest)(nil), // 4: plugin.v1.OnDeleteStorageBucketRequest + (*OnDeleteStorageBucketResponse)(nil), // 5: plugin.v1.OnDeleteStorageBucketResponse + (*GetObjectRequest)(nil), // 6: plugin.v1.GetObjectRequest + (*GetObjectResponse)(nil), // 7: plugin.v1.GetObjectResponse + (*PutObjectMetadata)(nil), // 8: plugin.v1.PutObjectMetadata + (*PutObjectRequest)(nil), // 9: plugin.v1.PutObjectRequest + (*PutObjectResponse)(nil), // 10: plugin.v1.PutObjectResponse + (*StorageBucketPersisted)(nil), // 11: plugin.v1.StorageBucketPersisted + (*storagebuckets.StorageBucket)(nil), // 12: controller.api.resources.storagebuckets.v1.StorageBucket + (*structpb.Struct)(nil), // 13: google.protobuf.Struct +} +var file_plugin_v1_storage_plugin_service_proto_depIdxs = []int32{ + 12, // 0: plugin.v1.OnCreateStorageBucketRequest.bucket:type_name -> controller.api.resources.storagebuckets.v1.StorageBucket + 11, // 1: plugin.v1.OnCreateStorageBucketResponse.persisted:type_name -> plugin.v1.StorageBucketPersisted + 12, // 2: plugin.v1.OnUpdateStorageBucketRequest.current_bucket:type_name -> controller.api.resources.storagebuckets.v1.StorageBucket + 12, // 3: plugin.v1.OnUpdateStorageBucketRequest.new_bucket:type_name -> controller.api.resources.storagebuckets.v1.StorageBucket + 11, // 4: plugin.v1.OnUpdateStorageBucketRequest.persisted:type_name -> plugin.v1.StorageBucketPersisted + 11, // 5: plugin.v1.OnUpdateStorageBucketResponse.persisted:type_name -> plugin.v1.StorageBucketPersisted + 12, // 6: plugin.v1.OnDeleteStorageBucketRequest.bucket:type_name -> controller.api.resources.storagebuckets.v1.StorageBucket + 11, // 7: plugin.v1.OnDeleteStorageBucketRequest.persisted:type_name -> plugin.v1.StorageBucketPersisted + 12, // 8: plugin.v1.GetObjectRequest.bucket:type_name -> controller.api.resources.storagebuckets.v1.StorageBucket + 12, // 9: plugin.v1.PutObjectMetadata.bucket:type_name -> controller.api.resources.storagebuckets.v1.StorageBucket + 8, // 10: plugin.v1.PutObjectRequest.request:type_name -> plugin.v1.PutObjectMetadata + 13, // 11: plugin.v1.StorageBucketPersisted.data:type_name -> google.protobuf.Struct + 0, // 12: plugin.v1.StoragePluginService.OnCreateStorageBucket:input_type -> plugin.v1.OnCreateStorageBucketRequest + 2, // 13: plugin.v1.StoragePluginService.OnUpdateStorageBucket:input_type -> plugin.v1.OnUpdateStorageBucketRequest + 4, // 14: plugin.v1.StoragePluginService.OnDeleteStorageBucket:input_type -> plugin.v1.OnDeleteStorageBucketRequest + 6, // 15: plugin.v1.StoragePluginService.GetObject:input_type -> plugin.v1.GetObjectRequest + 9, // 16: plugin.v1.StoragePluginService.PutObject:input_type -> plugin.v1.PutObjectRequest + 1, // 17: plugin.v1.StoragePluginService.OnCreateStorageBucket:output_type -> plugin.v1.OnCreateStorageBucketResponse + 3, // 18: plugin.v1.StoragePluginService.OnUpdateStorageBucket:output_type -> plugin.v1.OnUpdateStorageBucketResponse + 5, // 19: plugin.v1.StoragePluginService.OnDeleteStorageBucket:output_type -> plugin.v1.OnDeleteStorageBucketResponse + 7, // 20: plugin.v1.StoragePluginService.GetObject:output_type -> plugin.v1.GetObjectResponse + 10, // 21: plugin.v1.StoragePluginService.PutObject:output_type -> plugin.v1.PutObjectResponse + 17, // [17:22] is the sub-list for method output_type + 12, // [12:17] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_plugin_v1_storage_plugin_service_proto_init() } +func file_plugin_v1_storage_plugin_service_proto_init() { + if File_plugin_v1_storage_plugin_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_plugin_v1_storage_plugin_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnCreateStorageBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnCreateStorageBucketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnUpdateStorageBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnUpdateStorageBucketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnDeleteStorageBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnDeleteStorageBucketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetObjectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetObjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutObjectMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutObjectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutObjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageBucketPersisted); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_plugin_v1_storage_plugin_service_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*PutObjectRequest_FileChunk)(nil), + (*PutObjectRequest_Request)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_plugin_v1_storage_plugin_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_plugin_v1_storage_plugin_service_proto_goTypes, + DependencyIndexes: file_plugin_v1_storage_plugin_service_proto_depIdxs, + MessageInfos: file_plugin_v1_storage_plugin_service_proto_msgTypes, + }.Build() + File_plugin_v1_storage_plugin_service_proto = out.File + file_plugin_v1_storage_plugin_service_proto_rawDesc = nil + file_plugin_v1_storage_plugin_service_proto_goTypes = nil + file_plugin_v1_storage_plugin_service_proto_depIdxs = nil +} diff --git a/sdk/pbs/plugin/storage_plugin_service_grpc.pb.go b/sdk/pbs/plugin/storage_plugin_service_grpc.pb.go new file mode 100644 index 0000000000..4618744b63 --- /dev/null +++ b/sdk/pbs/plugin/storage_plugin_service_grpc.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package plugin + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// StoragePluginServiceClient is the client API for StoragePluginService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StoragePluginServiceClient interface { + // OnCreateStorageBucket is a hook that runs when a + // storage bucket is created. + OnCreateStorageBucket(ctx context.Context, in *OnCreateStorageBucketRequest, opts ...grpc.CallOption) (*OnCreateStorageBucketResponse, error) + // OnUpdateStorageBucket is a hook that runs when a storage bucket is + // updated. + OnUpdateStorageBucket(ctx context.Context, in *OnUpdateStorageBucketRequest, opts ...grpc.CallOption) (*OnUpdateStorageBucketResponse, error) + // OnDeleteStorageBucket is a hook that runs when a storage bucket is + // deleted. + OnDeleteStorageBucket(ctx context.Context, in *OnDeleteStorageBucketRequest, opts ...grpc.CallOption) (*OnDeleteStorageBucketResponse, error) + // GetObject is a hook that retrieves objects. + GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (StoragePluginService_GetObjectClient, error) + // PutObject is a hook that streams chunks of a file to be stored + // in an external object store. + PutObject(ctx context.Context, opts ...grpc.CallOption) (StoragePluginService_PutObjectClient, error) +} + +type storagePluginServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStoragePluginServiceClient(cc grpc.ClientConnInterface) StoragePluginServiceClient { + return &storagePluginServiceClient{cc} +} + +func (c *storagePluginServiceClient) OnCreateStorageBucket(ctx context.Context, in *OnCreateStorageBucketRequest, opts ...grpc.CallOption) (*OnCreateStorageBucketResponse, error) { + out := new(OnCreateStorageBucketResponse) + err := c.cc.Invoke(ctx, "/plugin.v1.StoragePluginService/OnCreateStorageBucket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginServiceClient) OnUpdateStorageBucket(ctx context.Context, in *OnUpdateStorageBucketRequest, opts ...grpc.CallOption) (*OnUpdateStorageBucketResponse, error) { + out := new(OnUpdateStorageBucketResponse) + err := c.cc.Invoke(ctx, "/plugin.v1.StoragePluginService/OnUpdateStorageBucket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginServiceClient) OnDeleteStorageBucket(ctx context.Context, in *OnDeleteStorageBucketRequest, opts ...grpc.CallOption) (*OnDeleteStorageBucketResponse, error) { + out := new(OnDeleteStorageBucketResponse) + err := c.cc.Invoke(ctx, "/plugin.v1.StoragePluginService/OnDeleteStorageBucket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginServiceClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (StoragePluginService_GetObjectClient, error) { + stream, err := c.cc.NewStream(ctx, &StoragePluginService_ServiceDesc.Streams[0], "/plugin.v1.StoragePluginService/GetObject", opts...) + if err != nil { + return nil, err + } + x := &storagePluginServiceGetObjectClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type StoragePluginService_GetObjectClient interface { + Recv() (*GetObjectResponse, error) + grpc.ClientStream +} + +type storagePluginServiceGetObjectClient struct { + grpc.ClientStream +} + +func (x *storagePluginServiceGetObjectClient) Recv() (*GetObjectResponse, error) { + m := new(GetObjectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storagePluginServiceClient) PutObject(ctx context.Context, opts ...grpc.CallOption) (StoragePluginService_PutObjectClient, error) { + stream, err := c.cc.NewStream(ctx, &StoragePluginService_ServiceDesc.Streams[1], "/plugin.v1.StoragePluginService/PutObject", opts...) + if err != nil { + return nil, err + } + x := &storagePluginServicePutObjectClient{stream} + return x, nil +} + +type StoragePluginService_PutObjectClient interface { + Send(*PutObjectRequest) error + CloseAndRecv() (*PutObjectResponse, error) + grpc.ClientStream +} + +type storagePluginServicePutObjectClient struct { + grpc.ClientStream +} + +func (x *storagePluginServicePutObjectClient) Send(m *PutObjectRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *storagePluginServicePutObjectClient) CloseAndRecv() (*PutObjectResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(PutObjectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// StoragePluginServiceServer is the server API for StoragePluginService service. +// All implementations must embed UnimplementedStoragePluginServiceServer +// for forward compatibility +type StoragePluginServiceServer interface { + // OnCreateStorageBucket is a hook that runs when a + // storage bucket is created. + OnCreateStorageBucket(context.Context, *OnCreateStorageBucketRequest) (*OnCreateStorageBucketResponse, error) + // OnUpdateStorageBucket is a hook that runs when a storage bucket is + // updated. + OnUpdateStorageBucket(context.Context, *OnUpdateStorageBucketRequest) (*OnUpdateStorageBucketResponse, error) + // OnDeleteStorageBucket is a hook that runs when a storage bucket is + // deleted. + OnDeleteStorageBucket(context.Context, *OnDeleteStorageBucketRequest) (*OnDeleteStorageBucketResponse, error) + // GetObject is a hook that retrieves objects. + GetObject(*GetObjectRequest, StoragePluginService_GetObjectServer) error + // PutObject is a hook that streams chunks of a file to be stored + // in an external object store. + PutObject(StoragePluginService_PutObjectServer) error + mustEmbedUnimplementedStoragePluginServiceServer() +} + +// UnimplementedStoragePluginServiceServer must be embedded to have forward compatible implementations. +type UnimplementedStoragePluginServiceServer struct { +} + +func (UnimplementedStoragePluginServiceServer) OnCreateStorageBucket(context.Context, *OnCreateStorageBucketRequest) (*OnCreateStorageBucketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnCreateStorageBucket not implemented") +} +func (UnimplementedStoragePluginServiceServer) OnUpdateStorageBucket(context.Context, *OnUpdateStorageBucketRequest) (*OnUpdateStorageBucketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnUpdateStorageBucket not implemented") +} +func (UnimplementedStoragePluginServiceServer) OnDeleteStorageBucket(context.Context, *OnDeleteStorageBucketRequest) (*OnDeleteStorageBucketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnDeleteStorageBucket not implemented") +} +func (UnimplementedStoragePluginServiceServer) GetObject(*GetObjectRequest, StoragePluginService_GetObjectServer) error { + return status.Errorf(codes.Unimplemented, "method GetObject not implemented") +} +func (UnimplementedStoragePluginServiceServer) PutObject(StoragePluginService_PutObjectServer) error { + return status.Errorf(codes.Unimplemented, "method PutObject not implemented") +} +func (UnimplementedStoragePluginServiceServer) mustEmbedUnimplementedStoragePluginServiceServer() {} + +// UnsafeStoragePluginServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StoragePluginServiceServer will +// result in compilation errors. +type UnsafeStoragePluginServiceServer interface { + mustEmbedUnimplementedStoragePluginServiceServer() +} + +func RegisterStoragePluginServiceServer(s grpc.ServiceRegistrar, srv StoragePluginServiceServer) { + s.RegisterService(&StoragePluginService_ServiceDesc, srv) +} + +func _StoragePluginService_OnCreateStorageBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnCreateStorageBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServiceServer).OnCreateStorageBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plugin.v1.StoragePluginService/OnCreateStorageBucket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServiceServer).OnCreateStorageBucket(ctx, req.(*OnCreateStorageBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePluginService_OnUpdateStorageBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnUpdateStorageBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServiceServer).OnUpdateStorageBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plugin.v1.StoragePluginService/OnUpdateStorageBucket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServiceServer).OnUpdateStorageBucket(ctx, req.(*OnUpdateStorageBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePluginService_OnDeleteStorageBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnDeleteStorageBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServiceServer).OnDeleteStorageBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plugin.v1.StoragePluginService/OnDeleteStorageBucket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServiceServer).OnDeleteStorageBucket(ctx, req.(*OnDeleteStorageBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePluginService_GetObject_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetObjectRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StoragePluginServiceServer).GetObject(m, &storagePluginServiceGetObjectServer{stream}) +} + +type StoragePluginService_GetObjectServer interface { + Send(*GetObjectResponse) error + grpc.ServerStream +} + +type storagePluginServiceGetObjectServer struct { + grpc.ServerStream +} + +func (x *storagePluginServiceGetObjectServer) Send(m *GetObjectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _StoragePluginService_PutObject_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(StoragePluginServiceServer).PutObject(&storagePluginServicePutObjectServer{stream}) +} + +type StoragePluginService_PutObjectServer interface { + SendAndClose(*PutObjectResponse) error + Recv() (*PutObjectRequest, error) + grpc.ServerStream +} + +type storagePluginServicePutObjectServer struct { + grpc.ServerStream +} + +func (x *storagePluginServicePutObjectServer) SendAndClose(m *PutObjectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *storagePluginServicePutObjectServer) Recv() (*PutObjectRequest, error) { + m := new(PutObjectRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// StoragePluginService_ServiceDesc is the grpc.ServiceDesc for StoragePluginService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StoragePluginService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "plugin.v1.StoragePluginService", + HandlerType: (*StoragePluginServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "OnCreateStorageBucket", + Handler: _StoragePluginService_OnCreateStorageBucket_Handler, + }, + { + MethodName: "OnUpdateStorageBucket", + Handler: _StoragePluginService_OnUpdateStorageBucket_Handler, + }, + { + MethodName: "OnDeleteStorageBucket", + Handler: _StoragePluginService_OnDeleteStorageBucket_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetObject", + Handler: _StoragePluginService_GetObject_Handler, + ServerStreams: true, + }, + { + StreamName: "PutObject", + Handler: _StoragePluginService_PutObject_Handler, + ClientStreams: true, + }, + }, + Metadata: "plugin/v1/storage_plugin_service.proto", +}