diff --git a/pkg/imported-grpc/Makefile b/pkg/imported-grpc/Makefile deleted file mode 100644 index d34cf5df..00000000 --- a/pkg/imported-grpc/Makefile +++ /dev/null @@ -1,243 +0,0 @@ -all: build - -######################################################################## -## GOLANG ## -######################################################################## - -# If GOPATH isn't defined then set its default location. -ifeq (,$(strip $(GOPATH))) -GOPATH := $(HOME)/go -else -# If GOPATH is already set then update GOPATH to be its own -# first element. -GOPATH := $(word 1,$(subst :, ,$(GOPATH))) -endif -export GOPATH - - -######################################################################## -## PROTOC ## -######################################################################## - -# Only set PROTOC_VER if it has an empty value. -ifeq (,$(strip $(PROTOC_VER))) -PROTOC_VER := 3.14.0 -endif - -PROTOC_OS := $(shell uname -s) -ifeq (Darwin,$(PROTOC_OS)) -PROTOC_OS := osx -endif - -PROTOC_ARCH := $(shell uname -m) -ifeq (i386,$(PROTOC_ARCH)) -PROTOC_ARCH := x86_32 -endif - -PROTOC := ./protoc -PROTOC_ZIP := protoc-$(PROTOC_VER)-$(PROTOC_OS)-$(PROTOC_ARCH).zip -PROTOC_URL := https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VER)/$(PROTOC_ZIP) -PROTOC_TMP_DIR := .protoc -PROTOC_TMP_BIN := $(PROTOC_TMP_DIR)/bin/protoc -PROTOC_TMP_INC := $(PROTOC_TMP_DIR)/include - -$(PROTOC): - -mkdir -p "$(PROTOC_TMP_DIR)" && \ - curl -L $(PROTOC_URL) -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" && \ - unzip -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" -d "$(PROTOC_TMP_DIR)" && \ - unzip -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" -d "$(PROTOC_TMP_INC)/*" && \ - chmod 0755 "$(PROTOC_TMP_BIN)" && \ - cp -f "$(PROTOC_TMP_BIN)" "$@" - stat "$@" > /dev/null 2>&1 - - -######################################################################## -## PROTOC-GEN-GO ## -######################################################################## - -# This is the recipe for getting and installing the go plug-in -# for protoc -PROTOC_GEN_GO_PKG := github.com/golang/protobuf/protoc-gen-go -PROTOC_GEN_GO := protoc-gen-go -$(PROTOC_GEN_GO): PROTOBUF_PKG := $(dir $(PROTOC_GEN_GO_PKG)) -$(PROTOC_GEN_GO): PROTOBUF_VERSION := v1.3.2 -$(PROTOC_GEN_GO): - mkdir -p $(dir $(GOPATH)/src/$(PROTOBUF_PKG)) - test -d $(GOPATH)/src/$(PROTOBUF_PKG)/.git || git clone https://$(PROTOBUF_PKG) $(GOPATH)/src/$(PROTOBUF_PKG) - (cd $(GOPATH)/src/$(PROTOBUF_PKG) && \ - (test "$$(git describe --tags | head -1)" = "$(PROTOBUF_VERSION)" || \ - (git fetch && git checkout tags/$(PROTOBUF_VERSION)))) - (cd $(GOPATH)/src/$(PROTOBUF_PKG) && go get -v -d $$(go list -f '{{ .ImportPath }}' ./...)) && \ - go build -o "$@" $(PROTOC_GEN_GO_PKG) - - -######################################################################## -## PROTOC-GEN-GO-JSON ## -######################################################################## - -# This is the recipe for getting and installing the json plug-in -# for protoc-gen-go -PROTOC_GEN_GO_JSON_PKG := github.com/mitchellh/protoc-gen-go-json -PROTOC_GEN_GO_JSON := protoc-gen-go-json -$(PROTOC_GEN_GO_JSON): PROTOC_GEN_GO_JSON_VERSION := v1.1.0 -$(PROTOC_GEN_GO_JSON): - mkdir -p $(dir $(GOPATH)/src/$(PROTOC_GEN_GO_JSON_PKG)) - test -d $(GOPATH)/src/$(PROTOC_GEN_GO_JSON_PKG)/.git || git clone https://$(PROTOC_GEN_GO_JSON_PKG) $(GOPATH)/src/$(PROTOC_GEN_GO_JSON_PKG) - (cd $(GOPATH)/src/$(PROTOC_GEN_GO_JSON_PKG) && \ - (test "$$(git describe --tags | head -1)" = "$(PROTOC_GEN_GO_JSON_VERSION)" || \ - (git fetch && git checkout tags/$(PROTOC_GEN_GO_JSON_VERSION)))) - (cd $(GOPATH)/src/$(PROTOC_GEN_GO_JSON_PKG) && go get -v -d $$(go list -f '{{ .ImportPath }}' ./...)) && \ - go build -o "$@" $(PROTOC_GEN_GO_JSON_PKG) - - -######################################################################## -## GEN-PROTO-GO ## -######################################################################## - -# This is the recipe for getting and installing the gen-proto pkg -# This is a dependency of grpc-go and must be installed before -# installing grpc-go. -GENPROTO_GO_SRC := github.com/googleapis/go-genproto -GENPROTO_GO_PKG := google.golang.org/genproto -GENPROTO_BUILD_GO := genproto-build-go -$(GENPROTO_BUILD_GO): GENPROTO_VERSION := 24fa4b261c55da65468f2abfdae2b024eef27dfb -$(GENPROTO_BUILD_GO): - mkdir -p $(dir $(GOPATH)/src/$(GENPROTO_GO_PKG)) - test -d $(GOPATH)/src/$(GENPROTO_GO_PKG)/.git || git clone https://$(GENPROTO_GO_SRC) $(GOPATH)/src/$(GENPROTO_GO_PKG) - (cd $(GOPATH)/src/$(GENPROTO_GO_PKG) && \ - (git fetch && git checkout $(GENPROTO_VERSION))) - (cd $(GOPATH)/src/$(GENPROTO_GO_PKG) && go get -v -d $$(go list -f '{{ .ImportPath }}' ./...)) - - -######################################################################## -## GRPC-GO ## -######################################################################## - -# This is the recipe for getting and installing the grpc go -GRPC_GO_SRC := github.com/grpc/grpc-go -GRPC_GO_PKG := google.golang.org/grpc -GRPC_BUILD_GO := grpc-build-go -$(GRPC_BUILD_GO): GRPC_VERSION := v1.26.0 -$(GRPC_BUILD_GO): - mkdir -p $(dir $(GOPATH)/src/$(GRPC_GO_PKG)) - test -d $(GOPATH)/src/$(GRPC_GO_PKG)/.git || git clone https://$(GRPC_GO_SRC) $(GOPATH)/src/$(GRPC_GO_PKG) - (cd $(GOPATH)/src/$(GRPC_GO_PKG) && \ - (test "$$(git describe --tags | head -1)" = "$(GRPC_VERSION)" || \ - (git fetch && git checkout tags/$(GRPC_VERSION)))) - (cd $(GOPATH)/src/$(GRPC_GO_PKG) && go get -v -d $$(go list -f '{{ .ImportPath }}' ./...) && \ - go build -o "$@" $(GRPC_GO_PKG)) - - -######################################################################## -## PROTOC-GEN-GO-FAKE ## -######################################################################## - -# This is the recipe for getting and installing the grpc go -PROTOC_GEN_GO_FAKE_SRC := ./hack/fake-gen -PROTOC_GEN_GO_FAKE := protoc-gen-gofake -$(PROTOC_GEN_GO_FAKE): - go build -o $(PROTOC_GEN_GO_FAKE) $(PROTOC_GEN_GO_FAKE_SRC) - - -######################################################################## -## PATH ## -######################################################################## - -# Update PATH with the current directory. This enables the protoc -# binary to discover the protoc-gen-go binary, built inside this -# directory. -export PATH := $(shell pwd):$(PATH) - - -######################################################################## -## BUILD ## -######################################################################## -COSI_PROTO := ./cosi.proto -COSI_SPEC := spec.md -COSI_PKG_ROOT := sigs.k8s.io/container-object-storage-interface-spec -COSI_PKG_SUB := . -COSI_BUILD := $(COSI_PKG_SUB)/.build -COSI_GO := $(COSI_PKG_SUB)/cosi.pb.go -COSI_GO_JSON := $(COSI_PKG_SUB)/cosi.pb.json.go -COSI_GO_FAKE := $(COSI_PKG_SUB)/fake/cosi.pb.fake.go -COSI_A := cosi.a -COSI_GO_TMP := $(COSI_BUILD)/$(COSI_PKG_ROOT)/cosi.pb.go -COSI_GO_JSON_TMP := $(COSI_BUILD)/$(COSI_PKG_ROOT)/cosi.pb.json.go -COSI_GO_FAKE_TMP := $(COSI_BUILD)/fake/$(COSI_PKG_ROOT)/cosi.pb.fake.go - -# This recipe generates the go language bindings to a temp area. -$(COSI_GO_TMP): HERE := $(shell pwd) -$(COSI_GO_TMP): PTYPES_PKG := github.com/golang/protobuf/ptypes -$(COSI_GO_TMP): GO_OUT := plugins=grpc -$(COSI_GO_TMP): GO_OUT := $(GO_OUT),Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor -$(COSI_GO_TMP): GO_OUT := $(GO_OUT),Mgoogle/protobuf/wrappers.proto=$(PTYPES_PKG)/wrappers -$(COSI_GO_TMP): GO_OUT := $(GO_OUT):"$(HERE)/$(COSI_BUILD)" -$(COSI_GO_TMP): GO_JSON_OUT := emit_defaults=true -$(COSI_GO_TMP): GO_JSON_OUT := $(GO_JSON_OUT):"$(HERE)/$(COSI_BUILD)" -$(COSI_GO_TMP): GO_FAKE_OUT := emit_defaults -$(COSI_GO_TMP): GO_FAKE_OUT := $(GO_FAKE_OUT),packagePath=sigs.k8s.io/container-object-storage-interface-spec -$(COSI_GO_TMP): GO_FAKE_OUT := $(GO_FAKE_OUT):"$(HERE)/$(COSI_BUILD)"/fake -$(COSI_GO_TMP): INCLUDE := -I$(GOPATH)/src -I$(HERE)/$(PROTOC_TMP_DIR)/include -$(COSI_GO_TMP): $(COSI_PROTO) | $(PROTOC) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_JSON) $(PROTOC_GEN_GO_FAKE) - @mkdir -p "$(@D)" - @mkdir -p "$(COSI_BUILD)/fake" - (cd "$(GOPATH)/src" && \ - $(HERE)/$(PROTOC) $(INCLUDE) --go_out=$(GO_OUT) --go-json_out=$(GO_JSON_OUT) --gofake_out=$(GO_FAKE_OUT) "$(COSI_PKG_ROOT)/$( /dev/null 2>&1 || cp -f "$?" "$@" -endif - -# The temp language bindings are compared to the ones that are -# versioned. If they are different then it means the language -# bindings were not updated prior to being committed. -$(COSI_GO_JSON): $(COSI_GO_JSON_TMP) -ifeq (true,$(TRAVIS)) - diff "$@" "$?" -else - @mkdir -p "$(@D)" - diff "$@" "$?" > /dev/null 2>&1 || cp -f "$?" "$@" -endif - -# The temp language bindings are compared to the ones that are -# versioned. If they are different then it means the language -# bindings were not updated prior to being committed. -$(COSI_GO_FAKE): $(COSI_GO_FAKE_TMP) -ifeq (true,$(TRAVIS)) - diff "$@" "$?" -else - @mkdir -p "$(@D)" - diff "$@" "$?" > /dev/null 2>&1 || cp -f "$?" "$@" -endif - -# This recipe builds the Go archive from the sources in three steps: -# -# 1. Go get any missing dependencies. -# 2. Cache the packages. -# 3. Build the archive file. -$(COSI_A): $(COSI_GO) $(COSI_GO_JSON) $(COSI_GO_FAKE) $(GENPROTO_BUILD_GO) $(GRPC_BUILD_GO) - go get -v -d ./... - go install ./$(COSI_PKG_SUB) - go build -o "$@" ./$(COSI_PKG_SUB) - -generate: - echo "// Code generated by make; DO NOT EDIT." > "$(COSI_PROTO)" - cat $(COSI_SPEC) | sed -n -e '/```protobuf$$/,/^```$$/ p' | sed '/^```/d' >> "$(COSI_PROTO)" - -build: generate $(COSI_A) - -clean: - go clean -i ./... - rm -rf "$(COSI_PROTO)" "$(COSI_A)" "$(COSI_GO)" "$(COSI_GO_JSON)" "$(COSI_BUILD)" - -clobber: clean - rm -fr "$(PROTOC)" "$(PROTOC_TMP_DIR)" "$(PROTOC_GEN_GO)" "$(PROTOC_GEN_GO_JSON)" "$(PROTOC_GEN_GO_FAKE)" - -.PHONY: clean clobber $(GRPC_BUILD_GO) $(GENPROTO_BUILD_GO) diff --git a/pkg/imported-grpc/cosi.pb.go b/pkg/imported-grpc/cosi.pb.go deleted file mode 100644 index 6e1aaa7e..00000000 --- a/pkg/imported-grpc/cosi.pb.go +++ /dev/null @@ -1,2009 +0,0 @@ -// Code generated by make; DO NOT EDIT. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: sigs.k8s.io/container-object-storage-interface-spec/cosi.proto - -package cosi - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - 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 - -// S3SignatureVersion is the version of the signing algorithm for all s3 requests -type S3SignatureVersion int32 - -const ( - S3SignatureVersion_UnknownSignature S3SignatureVersion = 0 - // S3V2, Signature version v2 - S3SignatureVersion_S3V2 S3SignatureVersion = 1 - // S3V4, Signature version v4 - S3SignatureVersion_S3V4 S3SignatureVersion = 2 -) - -// Enum value maps for S3SignatureVersion. -var ( - S3SignatureVersion_name = map[int32]string{ - 0: "UnknownSignature", - 1: "S3V2", - 2: "S3V4", - } - S3SignatureVersion_value = map[string]int32{ - "UnknownSignature": 0, - "S3V2": 1, - "S3V4": 2, - } -) - -func (x S3SignatureVersion) Enum() *S3SignatureVersion { - p := new(S3SignatureVersion) - *p = x - return p -} - -func (x S3SignatureVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (S3SignatureVersion) Descriptor() protoreflect.EnumDescriptor { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes[0].Descriptor() -} - -func (S3SignatureVersion) Type() protoreflect.EnumType { - return &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes[0] -} - -func (x S3SignatureVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use S3SignatureVersion.Descriptor instead. -func (S3SignatureVersion) EnumDescriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{0} -} - -type AnonymousBucketAccessMode int32 - -const ( - AnonymousBucketAccessMode_UnknownBucketAccessMode AnonymousBucketAccessMode = 0 - // Default, disallow uncredentialed access to the backend storage. - AnonymousBucketAccessMode_Private AnonymousBucketAccessMode = 1 - // Read only, uncredentialed users can call ListBucket and GetObject. - AnonymousBucketAccessMode_ReadOnly AnonymousBucketAccessMode = 2 - // Write only, uncredentialed users can only call PutObject. - AnonymousBucketAccessMode_WriteOnly AnonymousBucketAccessMode = 3 - // Read/Write, uncredentialed users can read objects as well as PutObject. - AnonymousBucketAccessMode_ReadWrite AnonymousBucketAccessMode = 4 -) - -// Enum value maps for AnonymousBucketAccessMode. -var ( - AnonymousBucketAccessMode_name = map[int32]string{ - 0: "UnknownBucketAccessMode", - 1: "Private", - 2: "ReadOnly", - 3: "WriteOnly", - 4: "ReadWrite", - } - AnonymousBucketAccessMode_value = map[string]int32{ - "UnknownBucketAccessMode": 0, - "Private": 1, - "ReadOnly": 2, - "WriteOnly": 3, - "ReadWrite": 4, - } -) - -func (x AnonymousBucketAccessMode) Enum() *AnonymousBucketAccessMode { - p := new(AnonymousBucketAccessMode) - *p = x - return p -} - -func (x AnonymousBucketAccessMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AnonymousBucketAccessMode) Descriptor() protoreflect.EnumDescriptor { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes[1].Descriptor() -} - -func (AnonymousBucketAccessMode) Type() protoreflect.EnumType { - return &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes[1] -} - -func (x AnonymousBucketAccessMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AnonymousBucketAccessMode.Descriptor instead. -func (AnonymousBucketAccessMode) EnumDescriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{1} -} - -type AuthenticationType int32 - -const ( - AuthenticationType_UnknownAuthenticationType AuthenticationType = 0 - // Default, KEY based authentication. - AuthenticationType_Key AuthenticationType = 1 - // Storageaccount based authentication. - AuthenticationType_IAM AuthenticationType = 2 -) - -// Enum value maps for AuthenticationType. -var ( - AuthenticationType_name = map[int32]string{ - 0: "UnknownAuthenticationType", - 1: "Key", - 2: "IAM", - } - AuthenticationType_value = map[string]int32{ - "UnknownAuthenticationType": 0, - "Key": 1, - "IAM": 2, - } -) - -func (x AuthenticationType) Enum() *AuthenticationType { - p := new(AuthenticationType) - *p = x - return p -} - -func (x AuthenticationType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AuthenticationType) Descriptor() protoreflect.EnumDescriptor { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes[2].Descriptor() -} - -func (AuthenticationType) Type() protoreflect.EnumType { - return &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes[2] -} - -func (x AuthenticationType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AuthenticationType.Descriptor instead. -func (AuthenticationType) EnumDescriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{2} -} - -type S3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // region denotes the geographical region where the S3 server is running - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` - // signature_version denotes the signature version for signing all s3 requests - SignatureVersion S3SignatureVersion `protobuf:"varint,2,opt,name=signature_version,json=signatureVersion,proto3,enum=cosi.v1alpha1.S3SignatureVersion" json:"signature_version,omitempty"` -} - -func (x *S3) Reset() { - *x = S3{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *S3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*S3) ProtoMessage() {} - -func (x *S3) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 S3.ProtoReflect.Descriptor instead. -func (*S3) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{0} -} - -func (x *S3) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *S3) GetSignatureVersion() S3SignatureVersion { - if x != nil { - return x.SignatureVersion - } - return S3SignatureVersion_UnknownSignature -} - -type AzureBlob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // storage_account is the id of the azure storage account - StorageAccount string `protobuf:"bytes,1,opt,name=storage_account,json=storageAccount,proto3" json:"storage_account,omitempty"` -} - -func (x *AzureBlob) Reset() { - *x = AzureBlob{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AzureBlob) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AzureBlob) ProtoMessage() {} - -func (x *AzureBlob) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 AzureBlob.ProtoReflect.Descriptor instead. -func (*AzureBlob) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{1} -} - -func (x *AzureBlob) GetStorageAccount() string { - if x != nil { - return x.StorageAccount - } - return "" -} - -type GCS struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // private_key_name denotes the name of the private key in the storage backend - PrivateKeyName string `protobuf:"bytes,1,opt,name=private_key_name,json=privateKeyName,proto3" json:"private_key_name,omitempty"` - // project_id denotes the name of the project id in the storage backend - ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // service_account denotes the name of the service account in the storage backend - ServiceAccount string `protobuf:"bytes,3,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` -} - -func (x *GCS) Reset() { - *x = GCS{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GCS) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GCS) ProtoMessage() {} - -func (x *GCS) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 GCS.ProtoReflect.Descriptor instead. -func (*GCS) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{2} -} - -func (x *GCS) GetPrivateKeyName() string { - if x != nil { - return x.PrivateKeyName - } - return "" -} - -func (x *GCS) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -func (x *GCS) GetServiceAccount() string { - if x != nil { - return x.ServiceAccount - } - return "" -} - -type Protocol struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // - // *Protocol_S3 - // *Protocol_AzureBlob - // *Protocol_Gcs - Type isProtocol_Type `protobuf_oneof:"type"` -} - -func (x *Protocol) Reset() { - *x = Protocol{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Protocol) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Protocol) ProtoMessage() {} - -func (x *Protocol) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 Protocol.ProtoReflect.Descriptor instead. -func (*Protocol) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{3} -} - -func (m *Protocol) GetType() isProtocol_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Protocol) GetS3() *S3 { - if x, ok := x.GetType().(*Protocol_S3); ok { - return x.S3 - } - return nil -} - -func (x *Protocol) GetAzureBlob() *AzureBlob { - if x, ok := x.GetType().(*Protocol_AzureBlob); ok { - return x.AzureBlob - } - return nil -} - -func (x *Protocol) GetGcs() *GCS { - if x, ok := x.GetType().(*Protocol_Gcs); ok { - return x.Gcs - } - return nil -} - -type isProtocol_Type interface { - isProtocol_Type() -} - -type Protocol_S3 struct { - S3 *S3 `protobuf:"bytes,1,opt,name=s3,proto3,oneof"` -} - -type Protocol_AzureBlob struct { - AzureBlob *AzureBlob `protobuf:"bytes,2,opt,name=azureBlob,proto3,oneof"` -} - -type Protocol_Gcs struct { - Gcs *GCS `protobuf:"bytes,3,opt,name=gcs,proto3,oneof"` -} - -func (*Protocol_S3) isProtocol_Type() {} - -func (*Protocol_AzureBlob) isProtocol_Type() {} - -func (*Protocol_Gcs) isProtocol_Type() {} - -type CredentialDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // map of the details in the secrets for the protocol string - Secrets map[string]string `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *CredentialDetails) Reset() { - *x = CredentialDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CredentialDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CredentialDetails) ProtoMessage() {} - -func (x *CredentialDetails) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 CredentialDetails.ProtoReflect.Descriptor instead. -func (*CredentialDetails) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{4} -} - -func (x *CredentialDetails) GetSecrets() map[string]string { - if x != nil { - return x.Secrets - } - return nil -} - -type DriverGetInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DriverGetInfoRequest) Reset() { - *x = DriverGetInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverGetInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverGetInfoRequest) ProtoMessage() {} - -func (x *DriverGetInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverGetInfoRequest.ProtoReflect.Descriptor instead. -func (*DriverGetInfoRequest) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{5} -} - -type DriverGetInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is REQUIRED - // The name MUST follow domain name notation format - // (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD - // include the plugin's host company name and the plugin name, - // to minimize the possibility of collisions. It MUST be 63 - // characters or less, beginning and ending with an alphanumeric - // character ([a-z0-9A-Z]) with dashes (-), dots (.), and - // alphanumerics between. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *DriverGetInfoResponse) Reset() { - *x = DriverGetInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverGetInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverGetInfoResponse) ProtoMessage() {} - -func (x *DriverGetInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverGetInfoResponse.ProtoReflect.Descriptor instead. -func (*DriverGetInfoResponse) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{6} -} - -func (x *DriverGetInfoResponse) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type DriverCreateBucketRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is REQUIRED - // name specifies the name of the bucket that should be created. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // This field is OPTIONAL - // The caller should treat the values in parameters as opaque. - // The receiver is responsible for parsing and validating the values. - Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DriverCreateBucketRequest) Reset() { - *x = DriverCreateBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverCreateBucketRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverCreateBucketRequest) ProtoMessage() {} - -func (x *DriverCreateBucketRequest) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverCreateBucketRequest.ProtoReflect.Descriptor instead. -func (*DriverCreateBucketRequest) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{7} -} - -func (x *DriverCreateBucketRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DriverCreateBucketRequest) GetParameters() map[string]string { - if x != nil { - return x.Parameters - } - return nil -} - -type DriverCreateBucketResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bucket_id returned here is expected to be the globally unique - // identifier for the bucket in the object storage provider. - BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` - // bucket_info returned here stores the data specific to the - // bucket required by the object storage provider to connect to the bucket. - BucketInfo *Protocol `protobuf:"bytes,2,opt,name=bucket_info,json=bucketInfo,proto3" json:"bucket_info,omitempty"` -} - -func (x *DriverCreateBucketResponse) Reset() { - *x = DriverCreateBucketResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverCreateBucketResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverCreateBucketResponse) ProtoMessage() {} - -func (x *DriverCreateBucketResponse) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverCreateBucketResponse.ProtoReflect.Descriptor instead. -func (*DriverCreateBucketResponse) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{8} -} - -func (x *DriverCreateBucketResponse) GetBucketId() string { - if x != nil { - return x.BucketId - } - return "" -} - -func (x *DriverCreateBucketResponse) GetBucketInfo() *Protocol { - if x != nil { - return x.BucketInfo - } - return nil -} - -type DriverDeleteBucketRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is REQUIRED - // bucket_id is a globally unique identifier for the bucket - // in the object storage provider - BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` - // This field is OPTIONAL - // The caller should treat the values in delete_context as opaque. - // The receiver is responsible for parsing and validating the values. - DeleteContext map[string]string `protobuf:"bytes,2,rep,name=delete_context,json=deleteContext,proto3" json:"delete_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DriverDeleteBucketRequest) Reset() { - *x = DriverDeleteBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverDeleteBucketRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverDeleteBucketRequest) ProtoMessage() {} - -func (x *DriverDeleteBucketRequest) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverDeleteBucketRequest.ProtoReflect.Descriptor instead. -func (*DriverDeleteBucketRequest) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{9} -} - -func (x *DriverDeleteBucketRequest) GetBucketId() string { - if x != nil { - return x.BucketId - } - return "" -} - -func (x *DriverDeleteBucketRequest) GetDeleteContext() map[string]string { - if x != nil { - return x.DeleteContext - } - return nil -} - -type DriverDeleteBucketResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DriverDeleteBucketResponse) Reset() { - *x = DriverDeleteBucketResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverDeleteBucketResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverDeleteBucketResponse) ProtoMessage() {} - -func (x *DriverDeleteBucketResponse) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverDeleteBucketResponse.ProtoReflect.Descriptor instead. -func (*DriverDeleteBucketResponse) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{10} -} - -type DriverGrantBucketAccessRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is REQUIRED - // bucket_id is a globally unique identifier for the bucket - // in the object storage provider - BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` - // This field is REQUIRED - // name field is used to define the name of the bucket access object. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // This field is REQUIRED - // Requested authentication type for the bucket access. - // Supported authentication types are KEY or IAM. - AuthenticationType AuthenticationType `protobuf:"varint,3,opt,name=authentication_type,json=authenticationType,proto3,enum=cosi.v1alpha1.AuthenticationType" json:"authentication_type,omitempty"` - // This field is OPTIONAL - // The caller should treat the values in parameters as opaque. - // The receiver is responsible for parsing and validating the values. - Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DriverGrantBucketAccessRequest) Reset() { - *x = DriverGrantBucketAccessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverGrantBucketAccessRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverGrantBucketAccessRequest) ProtoMessage() {} - -func (x *DriverGrantBucketAccessRequest) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 DriverGrantBucketAccessRequest.ProtoReflect.Descriptor instead. -func (*DriverGrantBucketAccessRequest) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{11} -} - -func (x *DriverGrantBucketAccessRequest) GetBucketId() string { - if x != nil { - return x.BucketId - } - return "" -} - -func (x *DriverGrantBucketAccessRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DriverGrantBucketAccessRequest) GetAuthenticationType() AuthenticationType { - if x != nil { - return x.AuthenticationType - } - return AuthenticationType_UnknownAuthenticationType -} - -func (x *DriverGrantBucketAccessRequest) GetParameters() map[string]string { - if x != nil { - return x.Parameters - } - return nil -} - -type DriverGrantBucketAccessResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is REQUIRED - // This is the account_id that is being provided access. This will - // be required later to revoke access. - AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` - // This field is REQUIRED - // Credentials supplied for accessing the bucket ex: aws access key id and secret, etc. - Credentials map[string]*CredentialDetails `protobuf:"bytes,2,rep,name=credentials,proto3" json:"credentials,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DriverGrantBucketAccessResponse) Reset() { - *x = DriverGrantBucketAccessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverGrantBucketAccessResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverGrantBucketAccessResponse) ProtoMessage() {} - -func (x *DriverGrantBucketAccessResponse) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[12] - 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 DriverGrantBucketAccessResponse.ProtoReflect.Descriptor instead. -func (*DriverGrantBucketAccessResponse) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{12} -} - -func (x *DriverGrantBucketAccessResponse) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - -func (x *DriverGrantBucketAccessResponse) GetCredentials() map[string]*CredentialDetails { - if x != nil { - return x.Credentials - } - return nil -} - -type DriverRevokeBucketAccessRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is REQUIRED - // bucket_id is a globally unique identifier for the bucket - // in the object storage provider. - BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` - // This field is REQUIRED - // This is the account_id that is having its access revoked. - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` - // This field is OPTIONAL - // The caller should treat the values in revoke_access_context as opaque. - // The receiver is responsible for parsing and validating the values. - RevokeAccessContext map[string]string `protobuf:"bytes,3,rep,name=revoke_access_context,json=revokeAccessContext,proto3" json:"revoke_access_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DriverRevokeBucketAccessRequest) Reset() { - *x = DriverRevokeBucketAccessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverRevokeBucketAccessRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverRevokeBucketAccessRequest) ProtoMessage() {} - -func (x *DriverRevokeBucketAccessRequest) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DriverRevokeBucketAccessRequest.ProtoReflect.Descriptor instead. -func (*DriverRevokeBucketAccessRequest) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{13} -} - -func (x *DriverRevokeBucketAccessRequest) GetBucketId() string { - if x != nil { - return x.BucketId - } - return "" -} - -func (x *DriverRevokeBucketAccessRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - -func (x *DriverRevokeBucketAccessRequest) GetRevokeAccessContext() map[string]string { - if x != nil { - return x.RevokeAccessContext - } - return nil -} - -type DriverRevokeBucketAccessResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DriverRevokeBucketAccessResponse) Reset() { - *x = DriverRevokeBucketAccessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DriverRevokeBucketAccessResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DriverRevokeBucketAccessResponse) ProtoMessage() {} - -func (x *DriverRevokeBucketAccessResponse) ProtoReflect() protoreflect.Message { - mi := &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[14] - 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 DriverRevokeBucketAccessResponse.ProtoReflect.Descriptor instead. -func (*DriverRevokeBucketAccessResponse) Descriptor() ([]byte, []int) { - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP(), []int{14} -} - -var file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1116, - Name: "cosi.v1alpha1.alpha_enum", - Tag: "varint,1116,opt,name=alpha_enum", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, - { - ExtendedType: (*descriptor.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1116, - Name: "cosi.v1alpha1.alpha_enum_value", - Tag: "varint,1116,opt,name=alpha_enum_value", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, - { - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1115, - Name: "cosi.v1alpha1.cosi_secret", - Tag: "varint,1115,opt,name=cosi_secret", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, - { - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1116, - Name: "cosi.v1alpha1.alpha_field", - Tag: "varint,1116,opt,name=alpha_field", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, - { - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1116, - Name: "cosi.v1alpha1.alpha_message", - Tag: "varint,1116,opt,name=alpha_message", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, - { - ExtendedType: (*descriptor.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1116, - Name: "cosi.v1alpha1.alpha_method", - Tag: "varint,1116,opt,name=alpha_method", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, - { - ExtendedType: (*descriptor.ServiceOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1116, - Name: "cosi.v1alpha1.alpha_service", - Tag: "varint,1116,opt,name=alpha_service", - Filename: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", - }, -} - -// Extension fields to descriptor.EnumOptions. -var ( - // Indicates that this enum is OPTIONAL and part of an experimental - // API that may be deprecated and eventually removed between minor - // releases. - // - // optional bool alpha_enum = 1116; - E_AlphaEnum = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[0] -) - -// Extension fields to descriptor.EnumValueOptions. -var ( - // Indicates that this enum value is OPTIONAL and part of an - // experimental API that may be deprecated and eventually removed - // between minor releases. - // - // optional bool alpha_enum_value = 1116; - E_AlphaEnumValue = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[1] -) - -// Extension fields to descriptor.FieldOptions. -var ( - // Indicates that a field MAY contain information that is sensitive - // and MUST be treated as such (e.g. not logged). - // - // optional bool cosi_secret = 1115; - E_CosiSecret = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[2] - // Indicates that this field is OPTIONAL and part of an experimental - // API that may be deprecated and eventually removed between minor - // releases. - // - // optional bool alpha_field = 1116; - E_AlphaField = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[3] -) - -// Extension fields to descriptor.MessageOptions. -var ( - // Indicates that this message is OPTIONAL and part of an experimental - // API that may be deprecated and eventually removed between minor - // releases. - // - // optional bool alpha_message = 1116; - E_AlphaMessage = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[4] -) - -// Extension fields to descriptor.MethodOptions. -var ( - // Indicates that this method is OPTIONAL and part of an experimental - // API that may be deprecated and eventually removed between minor - // releases. - // - // optional bool alpha_method = 1116; - E_AlphaMethod = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[5] -) - -// Extension fields to descriptor.ServiceOptions. -var ( - // Indicates that this service is OPTIONAL and part of an experimental - // API that may be deprecated and eventually removed between minor - // releases. - // - // optional bool alpha_service = 1116; - E_AlphaService = &file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes[6] -) - -var File_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto protoreflect.FileDescriptor - -var file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDesc = []byte{ - 0x0a, 0x3e, 0x73, 0x69, 0x67, 0x73, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x2d, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, - 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x6c, 0x0a, 0x02, 0x53, 0x33, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, - 0x4e, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, - 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x33, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x34, 0x0a, 0x09, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x27, 0x0a, 0x0f, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x77, 0x0a, 0x03, 0x47, 0x43, 0x53, 0x12, 0x28, 0x0a, 0x10, - 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, - 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x02, 0x73, - 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x33, 0x48, 0x00, 0x52, 0x02, 0x73, 0x33, - 0x12, 0x38, 0x0a, 0x09, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x00, 0x52, - 0x09, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x26, 0x0a, 0x03, 0x67, 0x63, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x43, 0x53, 0x48, 0x00, 0x52, 0x03, 0x67, - 0x63, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x11, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x12, 0x47, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, - 0x15, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x19, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x73, 0x0a, 0x1a, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x38, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0a, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x19, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x62, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, - 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, - 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x40, 0x0a, 0x12, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1c, 0x0a, 0x1a, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x02, 0x0a, 0x1e, 0x44, 0x72, - 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, - 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, - 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x61, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x5d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x85, 0x02, 0x0a, 0x1f, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x61, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x60, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, - 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa2, 0x02, 0x0a, 0x1f, 0x44, 0x72, 0x69, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x7b, 0x0a, 0x15, 0x72, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x13, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x22, 0x0a, 0x20, - 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2a, 0x3e, 0x0a, 0x12, 0x53, 0x33, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x53, 0x33, 0x56, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x33, 0x56, 0x34, 0x10, 0x02, - 0x2a, 0x71, 0x0a, 0x19, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, - 0x17, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x6e, 0x6c, 0x79, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x6e, - 0x6c, 0x79, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x10, 0x04, 0x2a, 0x45, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x55, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x10, - 0x01, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x41, 0x4d, 0x10, 0x02, 0x32, 0x68, 0x0a, 0x08, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x5c, 0x0a, 0x0d, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, - 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, - 0x76, 0x65, 0x72, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x32, 0xde, 0x03, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x12, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, - 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, - 0x0a, 0x17, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x69, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x18, 0x44, 0x72, 0x69, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x3c, 0x0a, 0x0a, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x5f, 0x65, - 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x45, - 0x6e, 0x75, 0x6d, 0x3a, 0x4c, 0x0a, 0x10, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x5f, 0x65, 0x6e, 0x75, - 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x3f, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x69, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xdb, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x6f, 0x73, 0x69, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x3a, 0x3f, 0x0a, 0x0b, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x3a, 0x45, 0x0a, 0x0d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x5f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x42, 0x0a, 0x0c, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x45, - 0x0a, 0x0d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x73, 0x69, 0x67, 0x73, 0x2e, 0x6b, 0x38, - 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2d, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2d, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x3b, 0x63, 0x6f, 0x73, - 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescOnce sync.Once - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescData = file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDesc -) - -func file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescGZIP() []byte { - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescOnce.Do(func() { - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescData = protoimpl.X.CompressGZIP(file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescData) - }) - return file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDescData -} - -var file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_goTypes = []interface{}{ - (S3SignatureVersion)(0), // 0: cosi.v1alpha1.S3SignatureVersion - (AnonymousBucketAccessMode)(0), // 1: cosi.v1alpha1.AnonymousBucketAccessMode - (AuthenticationType)(0), // 2: cosi.v1alpha1.AuthenticationType - (*S3)(nil), // 3: cosi.v1alpha1.S3 - (*AzureBlob)(nil), // 4: cosi.v1alpha1.AzureBlob - (*GCS)(nil), // 5: cosi.v1alpha1.GCS - (*Protocol)(nil), // 6: cosi.v1alpha1.Protocol - (*CredentialDetails)(nil), // 7: cosi.v1alpha1.CredentialDetails - (*DriverGetInfoRequest)(nil), // 8: cosi.v1alpha1.DriverGetInfoRequest - (*DriverGetInfoResponse)(nil), // 9: cosi.v1alpha1.DriverGetInfoResponse - (*DriverCreateBucketRequest)(nil), // 10: cosi.v1alpha1.DriverCreateBucketRequest - (*DriverCreateBucketResponse)(nil), // 11: cosi.v1alpha1.DriverCreateBucketResponse - (*DriverDeleteBucketRequest)(nil), // 12: cosi.v1alpha1.DriverDeleteBucketRequest - (*DriverDeleteBucketResponse)(nil), // 13: cosi.v1alpha1.DriverDeleteBucketResponse - (*DriverGrantBucketAccessRequest)(nil), // 14: cosi.v1alpha1.DriverGrantBucketAccessRequest - (*DriverGrantBucketAccessResponse)(nil), // 15: cosi.v1alpha1.DriverGrantBucketAccessResponse - (*DriverRevokeBucketAccessRequest)(nil), // 16: cosi.v1alpha1.DriverRevokeBucketAccessRequest - (*DriverRevokeBucketAccessResponse)(nil), // 17: cosi.v1alpha1.DriverRevokeBucketAccessResponse - nil, // 18: cosi.v1alpha1.CredentialDetails.SecretsEntry - nil, // 19: cosi.v1alpha1.DriverCreateBucketRequest.ParametersEntry - nil, // 20: cosi.v1alpha1.DriverDeleteBucketRequest.DeleteContextEntry - nil, // 21: cosi.v1alpha1.DriverGrantBucketAccessRequest.ParametersEntry - nil, // 22: cosi.v1alpha1.DriverGrantBucketAccessResponse.CredentialsEntry - nil, // 23: cosi.v1alpha1.DriverRevokeBucketAccessRequest.RevokeAccessContextEntry - (*descriptor.EnumOptions)(nil), // 24: google.protobuf.EnumOptions - (*descriptor.EnumValueOptions)(nil), // 25: google.protobuf.EnumValueOptions - (*descriptor.FieldOptions)(nil), // 26: google.protobuf.FieldOptions - (*descriptor.MessageOptions)(nil), // 27: google.protobuf.MessageOptions - (*descriptor.MethodOptions)(nil), // 28: google.protobuf.MethodOptions - (*descriptor.ServiceOptions)(nil), // 29: google.protobuf.ServiceOptions -} -var file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_depIdxs = []int32{ - 0, // 0: cosi.v1alpha1.S3.signature_version:type_name -> cosi.v1alpha1.S3SignatureVersion - 3, // 1: cosi.v1alpha1.Protocol.s3:type_name -> cosi.v1alpha1.S3 - 4, // 2: cosi.v1alpha1.Protocol.azureBlob:type_name -> cosi.v1alpha1.AzureBlob - 5, // 3: cosi.v1alpha1.Protocol.gcs:type_name -> cosi.v1alpha1.GCS - 18, // 4: cosi.v1alpha1.CredentialDetails.secrets:type_name -> cosi.v1alpha1.CredentialDetails.SecretsEntry - 19, // 5: cosi.v1alpha1.DriverCreateBucketRequest.parameters:type_name -> cosi.v1alpha1.DriverCreateBucketRequest.ParametersEntry - 6, // 6: cosi.v1alpha1.DriverCreateBucketResponse.bucket_info:type_name -> cosi.v1alpha1.Protocol - 20, // 7: cosi.v1alpha1.DriverDeleteBucketRequest.delete_context:type_name -> cosi.v1alpha1.DriverDeleteBucketRequest.DeleteContextEntry - 2, // 8: cosi.v1alpha1.DriverGrantBucketAccessRequest.authentication_type:type_name -> cosi.v1alpha1.AuthenticationType - 21, // 9: cosi.v1alpha1.DriverGrantBucketAccessRequest.parameters:type_name -> cosi.v1alpha1.DriverGrantBucketAccessRequest.ParametersEntry - 22, // 10: cosi.v1alpha1.DriverGrantBucketAccessResponse.credentials:type_name -> cosi.v1alpha1.DriverGrantBucketAccessResponse.CredentialsEntry - 23, // 11: cosi.v1alpha1.DriverRevokeBucketAccessRequest.revoke_access_context:type_name -> cosi.v1alpha1.DriverRevokeBucketAccessRequest.RevokeAccessContextEntry - 7, // 12: cosi.v1alpha1.DriverGrantBucketAccessResponse.CredentialsEntry.value:type_name -> cosi.v1alpha1.CredentialDetails - 24, // 13: cosi.v1alpha1.alpha_enum:extendee -> google.protobuf.EnumOptions - 25, // 14: cosi.v1alpha1.alpha_enum_value:extendee -> google.protobuf.EnumValueOptions - 26, // 15: cosi.v1alpha1.cosi_secret:extendee -> google.protobuf.FieldOptions - 26, // 16: cosi.v1alpha1.alpha_field:extendee -> google.protobuf.FieldOptions - 27, // 17: cosi.v1alpha1.alpha_message:extendee -> google.protobuf.MessageOptions - 28, // 18: cosi.v1alpha1.alpha_method:extendee -> google.protobuf.MethodOptions - 29, // 19: cosi.v1alpha1.alpha_service:extendee -> google.protobuf.ServiceOptions - 8, // 20: cosi.v1alpha1.Identity.DriverGetInfo:input_type -> cosi.v1alpha1.DriverGetInfoRequest - 10, // 21: cosi.v1alpha1.Provisioner.DriverCreateBucket:input_type -> cosi.v1alpha1.DriverCreateBucketRequest - 12, // 22: cosi.v1alpha1.Provisioner.DriverDeleteBucket:input_type -> cosi.v1alpha1.DriverDeleteBucketRequest - 14, // 23: cosi.v1alpha1.Provisioner.DriverGrantBucketAccess:input_type -> cosi.v1alpha1.DriverGrantBucketAccessRequest - 16, // 24: cosi.v1alpha1.Provisioner.DriverRevokeBucketAccess:input_type -> cosi.v1alpha1.DriverRevokeBucketAccessRequest - 9, // 25: cosi.v1alpha1.Identity.DriverGetInfo:output_type -> cosi.v1alpha1.DriverGetInfoResponse - 11, // 26: cosi.v1alpha1.Provisioner.DriverCreateBucket:output_type -> cosi.v1alpha1.DriverCreateBucketResponse - 13, // 27: cosi.v1alpha1.Provisioner.DriverDeleteBucket:output_type -> cosi.v1alpha1.DriverDeleteBucketResponse - 15, // 28: cosi.v1alpha1.Provisioner.DriverGrantBucketAccess:output_type -> cosi.v1alpha1.DriverGrantBucketAccessResponse - 17, // 29: cosi.v1alpha1.Provisioner.DriverRevokeBucketAccess:output_type -> cosi.v1alpha1.DriverRevokeBucketAccessResponse - 25, // [25:30] is the sub-list for method output_type - 20, // [20:25] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 13, // [13:20] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_init() } -func file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_init() { - if File_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*S3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AzureBlob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Protocol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CredentialDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverGetInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverGetInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverCreateBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverCreateBucketResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverDeleteBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverDeleteBucketResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverGrantBucketAccessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverGrantBucketAccessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverRevokeBucketAccessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriverRevokeBucketAccessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Protocol_S3)(nil), - (*Protocol_AzureBlob)(nil), - (*Protocol_Gcs)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDesc, - NumEnums: 3, - NumMessages: 21, - NumExtensions: 7, - NumServices: 2, - }, - GoTypes: file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_goTypes, - DependencyIndexes: file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_depIdxs, - EnumInfos: file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_enumTypes, - MessageInfos: file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_msgTypes, - ExtensionInfos: file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_extTypes, - }.Build() - File_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto = out.File - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_rawDesc = nil - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_proto_goTypes = nil - file_sigs_k8s_io_container_object_storage_interface_spec_cosi_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 - -// IdentityClient is the client API for Identity service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type IdentityClient interface { - // This call is meant to retrieve the unique provisioner Identity. - // This identity will have to be set in BucketClaim.DriverName field in order to invoke this specific provisioner. - DriverGetInfo(ctx context.Context, in *DriverGetInfoRequest, opts ...grpc.CallOption) (*DriverGetInfoResponse, error) -} - -type identityClient struct { - cc grpc.ClientConnInterface -} - -func NewIdentityClient(cc grpc.ClientConnInterface) IdentityClient { - return &identityClient{cc} -} - -func (c *identityClient) DriverGetInfo(ctx context.Context, in *DriverGetInfoRequest, opts ...grpc.CallOption) (*DriverGetInfoResponse, error) { - out := new(DriverGetInfoResponse) - err := c.cc.Invoke(ctx, "/cosi.v1alpha1.Identity/DriverGetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// IdentityServer is the server API for Identity service. -type IdentityServer interface { - // This call is meant to retrieve the unique provisioner Identity. - // This identity will have to be set in BucketClaim.DriverName field in order to invoke this specific provisioner. - DriverGetInfo(context.Context, *DriverGetInfoRequest) (*DriverGetInfoResponse, error) -} - -// UnimplementedIdentityServer can be embedded to have forward compatible implementations. -type UnimplementedIdentityServer struct { -} - -func (*UnimplementedIdentityServer) DriverGetInfo(context.Context, *DriverGetInfoRequest) (*DriverGetInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DriverGetInfo not implemented") -} - -func RegisterIdentityServer(s *grpc.Server, srv IdentityServer) { - s.RegisterService(&_Identity_serviceDesc, srv) -} - -func _Identity_DriverGetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DriverGetInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IdentityServer).DriverGetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosi.v1alpha1.Identity/DriverGetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IdentityServer).DriverGetInfo(ctx, req.(*DriverGetInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Identity_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosi.v1alpha1.Identity", - HandlerType: (*IdentityServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DriverGetInfo", - Handler: _Identity_DriverGetInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", -} - -// ProvisionerClient is the client API for Provisioner service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProvisionerClient interface { - // This call is made to create the bucket in the backend. - // This call is idempotent - // 1. If a bucket that matches both name and parameters already exists, then OK (success) must be returned. - // 2. If a bucket by same name, but different parameters is provided, then the appropriate error code ALREADY_EXISTS must be returned. - DriverCreateBucket(ctx context.Context, in *DriverCreateBucketRequest, opts ...grpc.CallOption) (*DriverCreateBucketResponse, error) - // This call is made to delete the bucket in the backend. - // If the bucket has already been deleted, then no error should be returned. - DriverDeleteBucket(ctx context.Context, in *DriverDeleteBucketRequest, opts ...grpc.CallOption) (*DriverDeleteBucketResponse, error) - // This call grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials. - // The account_id returned in the response will be used as the unique identifier for deleting this access when calling DriverRevokeBucketAccess. - DriverGrantBucketAccess(ctx context.Context, in *DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*DriverGrantBucketAccessResponse, error) - // This call revokes all access to a particular bucket from a principal. - DriverRevokeBucketAccess(ctx context.Context, in *DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*DriverRevokeBucketAccessResponse, error) -} - -type provisionerClient struct { - cc grpc.ClientConnInterface -} - -func NewProvisionerClient(cc grpc.ClientConnInterface) ProvisionerClient { - return &provisionerClient{cc} -} - -func (c *provisionerClient) DriverCreateBucket(ctx context.Context, in *DriverCreateBucketRequest, opts ...grpc.CallOption) (*DriverCreateBucketResponse, error) { - out := new(DriverCreateBucketResponse) - err := c.cc.Invoke(ctx, "/cosi.v1alpha1.Provisioner/DriverCreateBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *provisionerClient) DriverDeleteBucket(ctx context.Context, in *DriverDeleteBucketRequest, opts ...grpc.CallOption) (*DriverDeleteBucketResponse, error) { - out := new(DriverDeleteBucketResponse) - err := c.cc.Invoke(ctx, "/cosi.v1alpha1.Provisioner/DriverDeleteBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *provisionerClient) DriverGrantBucketAccess(ctx context.Context, in *DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*DriverGrantBucketAccessResponse, error) { - out := new(DriverGrantBucketAccessResponse) - err := c.cc.Invoke(ctx, "/cosi.v1alpha1.Provisioner/DriverGrantBucketAccess", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *provisionerClient) DriverRevokeBucketAccess(ctx context.Context, in *DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*DriverRevokeBucketAccessResponse, error) { - out := new(DriverRevokeBucketAccessResponse) - err := c.cc.Invoke(ctx, "/cosi.v1alpha1.Provisioner/DriverRevokeBucketAccess", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProvisionerServer is the server API for Provisioner service. -type ProvisionerServer interface { - // This call is made to create the bucket in the backend. - // This call is idempotent - // 1. If a bucket that matches both name and parameters already exists, then OK (success) must be returned. - // 2. If a bucket by same name, but different parameters is provided, then the appropriate error code ALREADY_EXISTS must be returned. - DriverCreateBucket(context.Context, *DriverCreateBucketRequest) (*DriverCreateBucketResponse, error) - // This call is made to delete the bucket in the backend. - // If the bucket has already been deleted, then no error should be returned. - DriverDeleteBucket(context.Context, *DriverDeleteBucketRequest) (*DriverDeleteBucketResponse, error) - // This call grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials. - // The account_id returned in the response will be used as the unique identifier for deleting this access when calling DriverRevokeBucketAccess. - DriverGrantBucketAccess(context.Context, *DriverGrantBucketAccessRequest) (*DriverGrantBucketAccessResponse, error) - // This call revokes all access to a particular bucket from a principal. - DriverRevokeBucketAccess(context.Context, *DriverRevokeBucketAccessRequest) (*DriverRevokeBucketAccessResponse, error) -} - -// UnimplementedProvisionerServer can be embedded to have forward compatible implementations. -type UnimplementedProvisionerServer struct { -} - -func (*UnimplementedProvisionerServer) DriverCreateBucket(context.Context, *DriverCreateBucketRequest) (*DriverCreateBucketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DriverCreateBucket not implemented") -} -func (*UnimplementedProvisionerServer) DriverDeleteBucket(context.Context, *DriverDeleteBucketRequest) (*DriverDeleteBucketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DriverDeleteBucket not implemented") -} -func (*UnimplementedProvisionerServer) DriverGrantBucketAccess(context.Context, *DriverGrantBucketAccessRequest) (*DriverGrantBucketAccessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DriverGrantBucketAccess not implemented") -} -func (*UnimplementedProvisionerServer) DriverRevokeBucketAccess(context.Context, *DriverRevokeBucketAccessRequest) (*DriverRevokeBucketAccessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DriverRevokeBucketAccess not implemented") -} - -func RegisterProvisionerServer(s *grpc.Server, srv ProvisionerServer) { - s.RegisterService(&_Provisioner_serviceDesc, srv) -} - -func _Provisioner_DriverCreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DriverCreateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProvisionerServer).DriverCreateBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosi.v1alpha1.Provisioner/DriverCreateBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProvisionerServer).DriverCreateBucket(ctx, req.(*DriverCreateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provisioner_DriverDeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DriverDeleteBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProvisionerServer).DriverDeleteBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosi.v1alpha1.Provisioner/DriverDeleteBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProvisionerServer).DriverDeleteBucket(ctx, req.(*DriverDeleteBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provisioner_DriverGrantBucketAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DriverGrantBucketAccessRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProvisionerServer).DriverGrantBucketAccess(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosi.v1alpha1.Provisioner/DriverGrantBucketAccess", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProvisionerServer).DriverGrantBucketAccess(ctx, req.(*DriverGrantBucketAccessRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provisioner_DriverRevokeBucketAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DriverRevokeBucketAccessRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProvisionerServer).DriverRevokeBucketAccess(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosi.v1alpha1.Provisioner/DriverRevokeBucketAccess", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProvisionerServer).DriverRevokeBucketAccess(ctx, req.(*DriverRevokeBucketAccessRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Provisioner_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosi.v1alpha1.Provisioner", - HandlerType: (*ProvisionerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DriverCreateBucket", - Handler: _Provisioner_DriverCreateBucket_Handler, - }, - { - MethodName: "DriverDeleteBucket", - Handler: _Provisioner_DriverDeleteBucket_Handler, - }, - { - MethodName: "DriverGrantBucketAccess", - Handler: _Provisioner_DriverGrantBucketAccess_Handler, - }, - { - MethodName: "DriverRevokeBucketAccess", - Handler: _Provisioner_DriverRevokeBucketAccess_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "sigs.k8s.io/container-object-storage-interface-spec/cosi.proto", -} diff --git a/pkg/imported-grpc/fake/cosi.pb.fake.go b/pkg/imported-grpc/fake/cosi.pb.fake.go deleted file mode 100644 index 170bedbb..00000000 --- a/pkg/imported-grpc/fake/cosi.pb.fake.go +++ /dev/null @@ -1,35 +0,0 @@ -package fake - -import ( - "context" - grpc "google.golang.org/grpc" - containerobjectstorageinterfacespec "sigs.k8s.io/container-object-storage-interface-spec" -) - -type FakeIdentityClient struct { - FakeDriverGetInfo func(ctx context.Context, in *containerobjectstorageinterfacespec.DriverGetInfoRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverGetInfoResponse, error) -} - -func (f *FakeIdentityClient) DriverGetInfo(ctx context.Context, in *containerobjectstorageinterfacespec.DriverGetInfoRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverGetInfoResponse, error) { - return f.FakeDriverGetInfo(ctx, in, opts...) -} - -type FakeProvisionerClient struct { - FakeDriverCreateBucket func(ctx context.Context, in *containerobjectstorageinterfacespec.DriverCreateBucketRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverCreateBucketResponse, error) - FakeDriverDeleteBucket func(ctx context.Context, in *containerobjectstorageinterfacespec.DriverDeleteBucketRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverDeleteBucketResponse, error) - FakeDriverGrantBucketAccess func(ctx context.Context, in *containerobjectstorageinterfacespec.DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverGrantBucketAccessResponse, error) - FakeDriverRevokeBucketAccess func(ctx context.Context, in *containerobjectstorageinterfacespec.DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverRevokeBucketAccessResponse, error) -} - -func (f *FakeProvisionerClient) DriverCreateBucket(ctx context.Context, in *containerobjectstorageinterfacespec.DriverCreateBucketRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverCreateBucketResponse, error) { - return f.FakeDriverCreateBucket(ctx, in, opts...) -} -func (f *FakeProvisionerClient) DriverDeleteBucket(ctx context.Context, in *containerobjectstorageinterfacespec.DriverDeleteBucketRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverDeleteBucketResponse, error) { - return f.FakeDriverDeleteBucket(ctx, in, opts...) -} -func (f *FakeProvisionerClient) DriverGrantBucketAccess(ctx context.Context, in *containerobjectstorageinterfacespec.DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverGrantBucketAccessResponse, error) { - return f.FakeDriverGrantBucketAccess(ctx, in, opts...) -} -func (f *FakeProvisionerClient) DriverRevokeBucketAccess(ctx context.Context, in *containerobjectstorageinterfacespec.DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*containerobjectstorageinterfacespec.DriverRevokeBucketAccessResponse, error) { - return f.FakeDriverRevokeBucketAccess(ctx, in, opts...) -} diff --git a/pkg/imported-grpc/.gitignore b/proto/.gitignore similarity index 63% rename from pkg/imported-grpc/.gitignore rename to proto/.gitignore index c105ac95..4dd2a6fb 100644 --- a/pkg/imported-grpc/.gitignore +++ b/proto/.gitignore @@ -2,9 +2,6 @@ .DS_Store .build *.swp -cosi.proto.tmp -protoc* -cosi.a .protoc .idea .project diff --git a/proto/Makefile b/proto/Makefile new file mode 100644 index 00000000..b9673e6e --- /dev/null +++ b/proto/Makefile @@ -0,0 +1,135 @@ +all: build + +######################################################################## +## GOLANG ## +######################################################################## + +# If GOPATH isn't defined then set its default location. +ifeq (,$(strip $(GOPATH))) +GOPATH := $(HOME)/go +else +# If GOPATH is already set then update GOPATH to be its own +# first element. +GOPATH := $(word 1,$(subst :, ,$(GOPATH))) +endif +export GOPATH + + +######################################################################## +## PROTOC ## +######################################################################## + +# Only set PROTOC_VER if it has an empty value. +ifeq (,$(strip $(PROTOC_VER))) +PROTOC_VER := 27.2 +endif + +PROTOC_OS := $(shell uname -s) +ifeq (Darwin,$(PROTOC_OS)) +PROTOC_OS := osx +endif + +PROTOC_ARCH := $(shell uname -m) +ifeq (i386,$(PROTOC_ARCH)) +PROTOC_ARCH := x86_32 +else ifeq (arm64,$(PROTOC_ARCH)) +PROTOC_ARCH := aarch_64 +endif + +PROTOC_ZIP := protoc-$(PROTOC_VER)-$(PROTOC_OS)-$(PROTOC_ARCH).zip +PROTOC_URL := https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VER)/$(PROTOC_ZIP) +PROTOC_TMP_DIR := .protoc +PROTOC := $(PROTOC_TMP_DIR)/bin/protoc +PROTOC_TMP_INC := $(PROTOC_TMP_DIR)/include + +$(PROTOC): + -mkdir -p "$(PROTOC_TMP_DIR)" && \ + curl -L $(PROTOC_URL) -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" && \ + unzip -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" -d "$(PROTOC_TMP_DIR)" && \ + unzip -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" -d "$(PROTOC_TMP_INC)/*" && \ + chmod 0755 "$@" + stat "$@" > /dev/null 2>&1 + +$(GOBIN)/protoc-gen-go: go.mod + go install google.golang.org/protobuf/cmd/protoc-gen-go + +$(GOBIN)/protoc-gen-go-grpc: + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 + +$(GOBIN)/protoc-gen-go-json: + go install github.com/mitchellh/protoc-gen-go-json@v1.1.0 + +PROTOC_ALL := $(GOBIN)/protoc-gen-go $(GOBIN)/protoc-gen-go-grpc $(GOBIN)/protoc-gen-go-json $(PROTOC) + + +######################################################################## +## PROTOC-GEN-GO-FAKE ## +######################################################################## + +# This is the recipe for getting and installing the grpc go +PROTOC_GEN_GO_FAKE_SRC := ./hack/fake-gen +PROTOC_GEN_GO_FAKE := $(PROTOC_TMP_DIR)/bin/protoc-gen-gofake +$(PROTOC_GEN_GO_FAKE): + go build -o $(PROTOC_GEN_GO_FAKE) $(PROTOC_GEN_GO_FAKE_SRC) + +# Update PATH to discover the protoc-gen-gofake binary +export PATH := $(PROTOC_TMP_DIR)/bin:$(PATH) + + +######################################################################## +## BUILD ## +######################################################################## +COSI_SPEC := spec.md + +COSI_PROTO := ./cosi.proto +COSI_GO := ./cosi.pb.go +COSI_GO_GRPC := ./cosi_grpc.pb.go +COSI_GO_JSON := ./cosi.pb.json.go +COSI_GO_FAKE := ./fake/cosi.pb.fake.go + +BUILD_TMP_DIR := ./.build +BUILD_TMP_COSI_A := $(BUILD_TMP_DIR)/cosi.a +BUILD_PROTO_PATH := sigs.k8s.io/container-object-storage-interface-api/proto +BUILD_COSI_GO_TMP := $(BUILD_TMP_DIR)/$(BUILD_PROTO_PATH)/cosi.pb.go +BUILD_COSI_GO_GRPC_TMP := $(BUILD_TMP_DIR)/$(BUILD_PROTO_PATH)/cosi_grpc.pb.go +BUILD_COSI_GO_JSON_TMP := $(BUILD_TMP_DIR)/$(BUILD_PROTO_PATH)/cosi.pb.json.go +BUILD_COSI_GO_FAKE_TMP := $(BUILD_TMP_DIR)/fake/cosi.pb.fake.go + +GO_JSON_OPTS := emit_defaults=true + +GO_FAKE_OPTS := emit_defaults +GO_FAKE_OPTS := $(GO_FAKE_OPTS),packagePath=sigs.k8s.io/container-object-storage-interface-api/proto + +$(COSI_PROTO): $(COSI_SPEC) + echo "// Code generated by make; DO NOT EDIT." > "$(COSI_PROTO)" + cat $(COSI_SPEC) | sed -n -e '/```protobuf$$/,/^```$$/ p' | sed '/^```/d' >> "$(COSI_PROTO)" + +$(COSI_GO) $(COSI_GO_GRPC) $(COSI_GO_JSON) $(COSI_GO_FAKE): $(COSI_PROTO) $(PROTOC_ALL) $(PROTOC_GEN_GO_FAKE) + mkdir -p "$(BUILD_TMP_DIR)" + mkdir -p "$(BUILD_TMP_DIR)/fake" + $(PROTOC) -I. -I$(PROTOC_TMP_INC) \ + --go_out=$(BUILD_TMP_DIR) \ + --go-grpc_out=$(BUILD_TMP_DIR) \ + --go-json_out=$(GO_JSON_OPTS):$(BUILD_TMP_DIR) \ + --gofake_out=$(GO_FAKE_OPTS):$(BUILD_TMP_DIR)/fake \ + "$( cosi.v1alpha1.S3SignatureVersion + 3, // 1: cosi.v1alpha1.Protocol.s3:type_name -> cosi.v1alpha1.S3 + 4, // 2: cosi.v1alpha1.Protocol.azureBlob:type_name -> cosi.v1alpha1.AzureBlob + 5, // 3: cosi.v1alpha1.Protocol.gcs:type_name -> cosi.v1alpha1.GCS + 18, // 4: cosi.v1alpha1.CredentialDetails.secrets:type_name -> cosi.v1alpha1.CredentialDetails.SecretsEntry + 19, // 5: cosi.v1alpha1.DriverCreateBucketRequest.parameters:type_name -> cosi.v1alpha1.DriverCreateBucketRequest.ParametersEntry + 6, // 6: cosi.v1alpha1.DriverCreateBucketResponse.bucket_info:type_name -> cosi.v1alpha1.Protocol + 20, // 7: cosi.v1alpha1.DriverDeleteBucketRequest.delete_context:type_name -> cosi.v1alpha1.DriverDeleteBucketRequest.DeleteContextEntry + 2, // 8: cosi.v1alpha1.DriverGrantBucketAccessRequest.authentication_type:type_name -> cosi.v1alpha1.AuthenticationType + 21, // 9: cosi.v1alpha1.DriverGrantBucketAccessRequest.parameters:type_name -> cosi.v1alpha1.DriverGrantBucketAccessRequest.ParametersEntry + 22, // 10: cosi.v1alpha1.DriverGrantBucketAccessResponse.credentials:type_name -> cosi.v1alpha1.DriverGrantBucketAccessResponse.CredentialsEntry + 23, // 11: cosi.v1alpha1.DriverRevokeBucketAccessRequest.revoke_access_context:type_name -> cosi.v1alpha1.DriverRevokeBucketAccessRequest.RevokeAccessContextEntry + 7, // 12: cosi.v1alpha1.DriverGrantBucketAccessResponse.CredentialsEntry.value:type_name -> cosi.v1alpha1.CredentialDetails + 24, // 13: cosi.v1alpha1.alpha_enum:extendee -> google.protobuf.EnumOptions + 25, // 14: cosi.v1alpha1.alpha_enum_value:extendee -> google.protobuf.EnumValueOptions + 26, // 15: cosi.v1alpha1.cosi_secret:extendee -> google.protobuf.FieldOptions + 26, // 16: cosi.v1alpha1.alpha_field:extendee -> google.protobuf.FieldOptions + 27, // 17: cosi.v1alpha1.alpha_message:extendee -> google.protobuf.MessageOptions + 28, // 18: cosi.v1alpha1.alpha_method:extendee -> google.protobuf.MethodOptions + 29, // 19: cosi.v1alpha1.alpha_service:extendee -> google.protobuf.ServiceOptions + 8, // 20: cosi.v1alpha1.Identity.DriverGetInfo:input_type -> cosi.v1alpha1.DriverGetInfoRequest + 10, // 21: cosi.v1alpha1.Provisioner.DriverCreateBucket:input_type -> cosi.v1alpha1.DriverCreateBucketRequest + 12, // 22: cosi.v1alpha1.Provisioner.DriverDeleteBucket:input_type -> cosi.v1alpha1.DriverDeleteBucketRequest + 14, // 23: cosi.v1alpha1.Provisioner.DriverGrantBucketAccess:input_type -> cosi.v1alpha1.DriverGrantBucketAccessRequest + 16, // 24: cosi.v1alpha1.Provisioner.DriverRevokeBucketAccess:input_type -> cosi.v1alpha1.DriverRevokeBucketAccessRequest + 9, // 25: cosi.v1alpha1.Identity.DriverGetInfo:output_type -> cosi.v1alpha1.DriverGetInfoResponse + 11, // 26: cosi.v1alpha1.Provisioner.DriverCreateBucket:output_type -> cosi.v1alpha1.DriverCreateBucketResponse + 13, // 27: cosi.v1alpha1.Provisioner.DriverDeleteBucket:output_type -> cosi.v1alpha1.DriverDeleteBucketResponse + 15, // 28: cosi.v1alpha1.Provisioner.DriverGrantBucketAccess:output_type -> cosi.v1alpha1.DriverGrantBucketAccessResponse + 17, // 29: cosi.v1alpha1.Provisioner.DriverRevokeBucketAccess:output_type -> cosi.v1alpha1.DriverRevokeBucketAccessResponse + 25, // [25:30] is the sub-list for method output_type + 20, // [20:25] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 13, // [13:20] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_cosi_proto_init() } +func file_cosi_proto_init() { + if File_cosi_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosi_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*S3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*AzureBlob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GCS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Protocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CredentialDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DriverGetInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DriverGetInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*DriverCreateBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*DriverCreateBucketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*DriverDeleteBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*DriverDeleteBucketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*DriverGrantBucketAccessRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*DriverGrantBucketAccessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*DriverRevokeBucketAccessRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosi_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*DriverRevokeBucketAccessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_cosi_proto_msgTypes[3].OneofWrappers = []any{ + (*Protocol_S3)(nil), + (*Protocol_AzureBlob)(nil), + (*Protocol_Gcs)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosi_proto_rawDesc, + NumEnums: 3, + NumMessages: 21, + NumExtensions: 7, + NumServices: 2, + }, + GoTypes: file_cosi_proto_goTypes, + DependencyIndexes: file_cosi_proto_depIdxs, + EnumInfos: file_cosi_proto_enumTypes, + MessageInfos: file_cosi_proto_msgTypes, + ExtensionInfos: file_cosi_proto_extTypes, + }.Build() + File_cosi_proto = out.File + file_cosi_proto_rawDesc = nil + file_cosi_proto_goTypes = nil + file_cosi_proto_depIdxs = nil +} diff --git a/pkg/imported-grpc/cosi.pb.json.go b/proto/cosi.pb.json.go similarity index 98% rename from pkg/imported-grpc/cosi.pb.json.go rename to proto/cosi.pb.json.go index 8d30f4fc..e786f8e9 100644 --- a/pkg/imported-grpc/cosi.pb.json.go +++ b/proto/cosi.pb.json.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-json. DO NOT EDIT. -// source: sigs.k8s.io/container-object-storage-interface-spec/cosi.proto +// source: cosi.proto package cosi diff --git a/pkg/imported-grpc/cosi.proto b/proto/cosi.proto similarity index 98% rename from pkg/imported-grpc/cosi.proto rename to proto/cosi.proto index ca55a5ff..4c446b34 100644 --- a/pkg/imported-grpc/cosi.proto +++ b/proto/cosi.proto @@ -4,7 +4,7 @@ package cosi.v1alpha1; import "google/protobuf/descriptor.proto"; -option go_package = "sigs.k8s.io/container-object-storage-interface-spec;cosi"; +option go_package = "sigs.k8s.io/container-object-storage-interface-api/proto;cosi"; extend google.protobuf.EnumOptions { // Indicates that this enum is OPTIONAL and part of an experimental @@ -166,7 +166,7 @@ message DriverCreateBucketRequest { } message DriverCreateBucketResponse { - // bucket_id returned here is expected to be the globally unique + // bucket_id returned here is expected to be the globally unique // identifier for the bucket in the object storage provider. string bucket_id = 1; @@ -178,7 +178,7 @@ message DriverCreateBucketResponse { message DriverDeleteBucketRequest { // This field is REQUIRED // bucket_id is a globally unique identifier for the bucket - // in the object storage provider + // in the object storage provider string bucket_id = 1; // This field is OPTIONAL @@ -194,7 +194,7 @@ message DriverDeleteBucketResponse { message DriverGrantBucketAccessRequest { // This field is REQUIRED // bucket_id is a globally unique identifier for the bucket - // in the object storage provider + // in the object storage provider string bucket_id = 1; // This field is REQUIRED @@ -215,7 +215,7 @@ message DriverGrantBucketAccessRequest { message DriverGrantBucketAccessResponse { // This field is REQUIRED // This is the account_id that is being provided access. This will - // be required later to revoke access. + // be required later to revoke access. string account_id = 1; // This field is REQUIRED diff --git a/proto/cosi_grpc.pb.go b/proto/cosi_grpc.pb.go new file mode 100644 index 00000000..63437eca --- /dev/null +++ b/proto/cosi_grpc.pb.go @@ -0,0 +1,334 @@ +// Code generated by make; DO NOT EDIT. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v5.27.2 +// source: cosi.proto + +package cosi + +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 + +const ( + Identity_DriverGetInfo_FullMethodName = "/cosi.v1alpha1.Identity/DriverGetInfo" +) + +// IdentityClient is the client API for Identity 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 IdentityClient interface { + // This call is meant to retrieve the unique provisioner Identity. + // This identity will have to be set in BucketClaim.DriverName field in order to invoke this specific provisioner. + DriverGetInfo(ctx context.Context, in *DriverGetInfoRequest, opts ...grpc.CallOption) (*DriverGetInfoResponse, error) +} + +type identityClient struct { + cc grpc.ClientConnInterface +} + +func NewIdentityClient(cc grpc.ClientConnInterface) IdentityClient { + return &identityClient{cc} +} + +func (c *identityClient) DriverGetInfo(ctx context.Context, in *DriverGetInfoRequest, opts ...grpc.CallOption) (*DriverGetInfoResponse, error) { + out := new(DriverGetInfoResponse) + err := c.cc.Invoke(ctx, Identity_DriverGetInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IdentityServer is the server API for Identity service. +// All implementations must embed UnimplementedIdentityServer +// for forward compatibility +type IdentityServer interface { + // This call is meant to retrieve the unique provisioner Identity. + // This identity will have to be set in BucketClaim.DriverName field in order to invoke this specific provisioner. + DriverGetInfo(context.Context, *DriverGetInfoRequest) (*DriverGetInfoResponse, error) + mustEmbedUnimplementedIdentityServer() +} + +// UnimplementedIdentityServer must be embedded to have forward compatible implementations. +type UnimplementedIdentityServer struct { +} + +func (UnimplementedIdentityServer) DriverGetInfo(context.Context, *DriverGetInfoRequest) (*DriverGetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DriverGetInfo not implemented") +} +func (UnimplementedIdentityServer) mustEmbedUnimplementedIdentityServer() {} + +// UnsafeIdentityServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IdentityServer will +// result in compilation errors. +type UnsafeIdentityServer interface { + mustEmbedUnimplementedIdentityServer() +} + +func RegisterIdentityServer(s grpc.ServiceRegistrar, srv IdentityServer) { + s.RegisterService(&Identity_ServiceDesc, srv) +} + +func _Identity_DriverGetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverGetInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServer).DriverGetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Identity_DriverGetInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServer).DriverGetInfo(ctx, req.(*DriverGetInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Identity_ServiceDesc is the grpc.ServiceDesc for Identity service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Identity_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosi.v1alpha1.Identity", + HandlerType: (*IdentityServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DriverGetInfo", + Handler: _Identity_DriverGetInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosi.proto", +} + +const ( + Provisioner_DriverCreateBucket_FullMethodName = "/cosi.v1alpha1.Provisioner/DriverCreateBucket" + Provisioner_DriverDeleteBucket_FullMethodName = "/cosi.v1alpha1.Provisioner/DriverDeleteBucket" + Provisioner_DriverGrantBucketAccess_FullMethodName = "/cosi.v1alpha1.Provisioner/DriverGrantBucketAccess" + Provisioner_DriverRevokeBucketAccess_FullMethodName = "/cosi.v1alpha1.Provisioner/DriverRevokeBucketAccess" +) + +// ProvisionerClient is the client API for Provisioner 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 ProvisionerClient interface { + // This call is made to create the bucket in the backend. + // This call is idempotent + // 1. If a bucket that matches both name and parameters already exists, then OK (success) must be returned. + // 2. If a bucket by same name, but different parameters is provided, then the appropriate error code ALREADY_EXISTS must be returned. + DriverCreateBucket(ctx context.Context, in *DriverCreateBucketRequest, opts ...grpc.CallOption) (*DriverCreateBucketResponse, error) + // This call is made to delete the bucket in the backend. + // If the bucket has already been deleted, then no error should be returned. + DriverDeleteBucket(ctx context.Context, in *DriverDeleteBucketRequest, opts ...grpc.CallOption) (*DriverDeleteBucketResponse, error) + // This call grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials. + // The account_id returned in the response will be used as the unique identifier for deleting this access when calling DriverRevokeBucketAccess. + DriverGrantBucketAccess(ctx context.Context, in *DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*DriverGrantBucketAccessResponse, error) + // This call revokes all access to a particular bucket from a principal. + DriverRevokeBucketAccess(ctx context.Context, in *DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*DriverRevokeBucketAccessResponse, error) +} + +type provisionerClient struct { + cc grpc.ClientConnInterface +} + +func NewProvisionerClient(cc grpc.ClientConnInterface) ProvisionerClient { + return &provisionerClient{cc} +} + +func (c *provisionerClient) DriverCreateBucket(ctx context.Context, in *DriverCreateBucketRequest, opts ...grpc.CallOption) (*DriverCreateBucketResponse, error) { + out := new(DriverCreateBucketResponse) + err := c.cc.Invoke(ctx, Provisioner_DriverCreateBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *provisionerClient) DriverDeleteBucket(ctx context.Context, in *DriverDeleteBucketRequest, opts ...grpc.CallOption) (*DriverDeleteBucketResponse, error) { + out := new(DriverDeleteBucketResponse) + err := c.cc.Invoke(ctx, Provisioner_DriverDeleteBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *provisionerClient) DriverGrantBucketAccess(ctx context.Context, in *DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*DriverGrantBucketAccessResponse, error) { + out := new(DriverGrantBucketAccessResponse) + err := c.cc.Invoke(ctx, Provisioner_DriverGrantBucketAccess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *provisionerClient) DriverRevokeBucketAccess(ctx context.Context, in *DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*DriverRevokeBucketAccessResponse, error) { + out := new(DriverRevokeBucketAccessResponse) + err := c.cc.Invoke(ctx, Provisioner_DriverRevokeBucketAccess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProvisionerServer is the server API for Provisioner service. +// All implementations must embed UnimplementedProvisionerServer +// for forward compatibility +type ProvisionerServer interface { + // This call is made to create the bucket in the backend. + // This call is idempotent + // 1. If a bucket that matches both name and parameters already exists, then OK (success) must be returned. + // 2. If a bucket by same name, but different parameters is provided, then the appropriate error code ALREADY_EXISTS must be returned. + DriverCreateBucket(context.Context, *DriverCreateBucketRequest) (*DriverCreateBucketResponse, error) + // This call is made to delete the bucket in the backend. + // If the bucket has already been deleted, then no error should be returned. + DriverDeleteBucket(context.Context, *DriverDeleteBucketRequest) (*DriverDeleteBucketResponse, error) + // This call grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials. + // The account_id returned in the response will be used as the unique identifier for deleting this access when calling DriverRevokeBucketAccess. + DriverGrantBucketAccess(context.Context, *DriverGrantBucketAccessRequest) (*DriverGrantBucketAccessResponse, error) + // This call revokes all access to a particular bucket from a principal. + DriverRevokeBucketAccess(context.Context, *DriverRevokeBucketAccessRequest) (*DriverRevokeBucketAccessResponse, error) + mustEmbedUnimplementedProvisionerServer() +} + +// UnimplementedProvisionerServer must be embedded to have forward compatible implementations. +type UnimplementedProvisionerServer struct { +} + +func (UnimplementedProvisionerServer) DriverCreateBucket(context.Context, *DriverCreateBucketRequest) (*DriverCreateBucketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DriverCreateBucket not implemented") +} +func (UnimplementedProvisionerServer) DriverDeleteBucket(context.Context, *DriverDeleteBucketRequest) (*DriverDeleteBucketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DriverDeleteBucket not implemented") +} +func (UnimplementedProvisionerServer) DriverGrantBucketAccess(context.Context, *DriverGrantBucketAccessRequest) (*DriverGrantBucketAccessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DriverGrantBucketAccess not implemented") +} +func (UnimplementedProvisionerServer) DriverRevokeBucketAccess(context.Context, *DriverRevokeBucketAccessRequest) (*DriverRevokeBucketAccessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DriverRevokeBucketAccess not implemented") +} +func (UnimplementedProvisionerServer) mustEmbedUnimplementedProvisionerServer() {} + +// UnsafeProvisionerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProvisionerServer will +// result in compilation errors. +type UnsafeProvisionerServer interface { + mustEmbedUnimplementedProvisionerServer() +} + +func RegisterProvisionerServer(s grpc.ServiceRegistrar, srv ProvisionerServer) { + s.RegisterService(&Provisioner_ServiceDesc, srv) +} + +func _Provisioner_DriverCreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverCreateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisionerServer).DriverCreateBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Provisioner_DriverCreateBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisionerServer).DriverCreateBucket(ctx, req.(*DriverCreateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provisioner_DriverDeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverDeleteBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisionerServer).DriverDeleteBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Provisioner_DriverDeleteBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisionerServer).DriverDeleteBucket(ctx, req.(*DriverDeleteBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provisioner_DriverGrantBucketAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverGrantBucketAccessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisionerServer).DriverGrantBucketAccess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Provisioner_DriverGrantBucketAccess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisionerServer).DriverGrantBucketAccess(ctx, req.(*DriverGrantBucketAccessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provisioner_DriverRevokeBucketAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverRevokeBucketAccessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisionerServer).DriverRevokeBucketAccess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Provisioner_DriverRevokeBucketAccess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisionerServer).DriverRevokeBucketAccess(ctx, req.(*DriverRevokeBucketAccessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Provisioner_ServiceDesc is the grpc.ServiceDesc for Provisioner service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Provisioner_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosi.v1alpha1.Provisioner", + HandlerType: (*ProvisionerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DriverCreateBucket", + Handler: _Provisioner_DriverCreateBucket_Handler, + }, + { + MethodName: "DriverDeleteBucket", + Handler: _Provisioner_DriverDeleteBucket_Handler, + }, + { + MethodName: "DriverGrantBucketAccess", + Handler: _Provisioner_DriverGrantBucketAccess_Handler, + }, + { + MethodName: "DriverRevokeBucketAccess", + Handler: _Provisioner_DriverRevokeBucketAccess_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosi.proto", +} diff --git a/pkg/imported-grpc/cosicomponents.png b/proto/cosicomponents.png similarity index 100% rename from pkg/imported-grpc/cosicomponents.png rename to proto/cosicomponents.png diff --git a/proto/fake/cosi.pb.fake.go b/proto/fake/cosi.pb.fake.go new file mode 100644 index 00000000..f74a39d7 --- /dev/null +++ b/proto/fake/cosi.pb.fake.go @@ -0,0 +1,35 @@ +package fake + +import ( + "context" + grpc "google.golang.org/grpc" + proto "sigs.k8s.io/container-object-storage-interface-api/proto" +) + +type FakeIdentityClient struct { + FakeDriverGetInfo func(ctx context.Context, in *proto.DriverGetInfoRequest, opts ...grpc.CallOption) (*proto.DriverGetInfoResponse, error) +} + +func (f *FakeIdentityClient) DriverGetInfo(ctx context.Context, in *proto.DriverGetInfoRequest, opts ...grpc.CallOption) (*proto.DriverGetInfoResponse, error) { + return f.FakeDriverGetInfo(ctx, in, opts...) +} + +type FakeProvisionerClient struct { + FakeDriverCreateBucket func(ctx context.Context, in *proto.DriverCreateBucketRequest, opts ...grpc.CallOption) (*proto.DriverCreateBucketResponse, error) + FakeDriverDeleteBucket func(ctx context.Context, in *proto.DriverDeleteBucketRequest, opts ...grpc.CallOption) (*proto.DriverDeleteBucketResponse, error) + FakeDriverGrantBucketAccess func(ctx context.Context, in *proto.DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*proto.DriverGrantBucketAccessResponse, error) + FakeDriverRevokeBucketAccess func(ctx context.Context, in *proto.DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*proto.DriverRevokeBucketAccessResponse, error) +} + +func (f *FakeProvisionerClient) DriverCreateBucket(ctx context.Context, in *proto.DriverCreateBucketRequest, opts ...grpc.CallOption) (*proto.DriverCreateBucketResponse, error) { + return f.FakeDriverCreateBucket(ctx, in, opts...) +} +func (f *FakeProvisionerClient) DriverDeleteBucket(ctx context.Context, in *proto.DriverDeleteBucketRequest, opts ...grpc.CallOption) (*proto.DriverDeleteBucketResponse, error) { + return f.FakeDriverDeleteBucket(ctx, in, opts...) +} +func (f *FakeProvisionerClient) DriverGrantBucketAccess(ctx context.Context, in *proto.DriverGrantBucketAccessRequest, opts ...grpc.CallOption) (*proto.DriverGrantBucketAccessResponse, error) { + return f.FakeDriverGrantBucketAccess(ctx, in, opts...) +} +func (f *FakeProvisionerClient) DriverRevokeBucketAccess(ctx context.Context, in *proto.DriverRevokeBucketAccessRequest, opts ...grpc.CallOption) (*proto.DriverRevokeBucketAccessResponse, error) { + return f.FakeDriverRevokeBucketAccess(ctx, in, opts...) +} diff --git a/pkg/imported-grpc/go.mod b/proto/go.mod similarity index 55% rename from pkg/imported-grpc/go.mod rename to proto/go.mod index ad3d5439..b599c4bd 100644 --- a/pkg/imported-grpc/go.mod +++ b/proto/go.mod @@ -1,17 +1,15 @@ -module sigs.k8s.io/container-object-storage-interface-spec +module sigs.k8s.io/container-object-storage-interface-api/proto -go 1.18 +go 1.22.4 require ( github.com/dave/jennifer v1.4.1 - github.com/golang/protobuf v1.4.3 + github.com/golang/protobuf v1.5.4 google.golang.org/grpc v1.35.0 - google.golang.org/protobuf v1.25.0 + google.golang.org/protobuf v1.34.2 ) require ( - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect - github.com/mitchellh/protoc-gen-go-json v1.1.0 // indirect golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a // indirect golang.org/x/text v0.3.0 // indirect diff --git a/pkg/imported-grpc/go.sum b/proto/go.sum similarity index 92% rename from pkg/imported-grpc/go.sum rename to proto/go.sum index 7d412c5a..29a5f400 100644 --- a/pkg/imported-grpc/go.sum +++ b/proto/go.sum @@ -10,7 +10,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -22,21 +21,19 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/mitchellh/protoc-gen-go-json v1.1.0 h1:lEi1xtXyYKDwA8EB5u27+UUZOTznC4JpqVOKZwCGJUo= -github.com/mitchellh/protoc-gen-go-json v1.1.0/go.mod h1:pACAKlMtBf4SMFbVswcjwNwWwlci6Vn841H5jPRcE9I= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -84,8 +81,9 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/imported-grpc/hack/fake-gen/main.go b/proto/hack/fake-gen/main.go similarity index 96% rename from pkg/imported-grpc/hack/fake-gen/main.go rename to proto/hack/fake-gen/main.go index 942d7717..c78fa62a 100644 --- a/pkg/imported-grpc/hack/fake-gen/main.go +++ b/proto/hack/fake-gen/main.go @@ -9,13 +9,13 @@ package main import ( "fmt" - "io/ioutil" + "io" "os" "strings" . "github.com/dave/jennifer/jen" - "github.com/golang/protobuf/proto" plugin "github.com/golang/protobuf/protoc-gen-go/plugin" + "google.golang.org/protobuf/proto" ) type GoFake struct { @@ -25,13 +25,13 @@ type GoFake struct { } type FakeService struct { - Name string + Name string Methods []Method } type Method struct { - Name string - Input string + Name string + Input string Output string } @@ -50,7 +50,7 @@ func (runner *GoFake) getLocationMessage() map[string][]*FakeService { for _, svc := range svcs { _, _ = fmt.Fprintf(os.Stderr, "service: %+v\n", svc) current := &FakeService{ - Name: fmt.Sprintf("%sClient", *svc.Name), + Name: fmt.Sprintf("%sClient", *svc.Name), } methods := make([]Method, 0) for _, mtd := range svc.Method { @@ -145,7 +145,7 @@ func main() { req := &plugin.CodeGeneratorRequest{} resp := &plugin.CodeGeneratorResponse{} - data, err := ioutil.ReadAll(os.Stdin) + data, err := io.ReadAll(os.Stdin) if err != nil { panic(err) } diff --git a/pkg/imported-grpc/spec.md b/proto/spec.md similarity index 97% rename from pkg/imported-grpc/spec.md rename to proto/spec.md index bbb1e47a..303b7cc3 100644 --- a/pkg/imported-grpc/spec.md +++ b/proto/spec.md @@ -49,7 +49,7 @@ The Container Object Storage Interface (COSI) will: * Consumption of both existing and new buckets created on SP. * Define plugin protocol recommendations. * Describe a process by which an admin configures a Plugin. - * COSI deployments and templates. + * COSI deployments and templates. ### Non-Goals in MVP @@ -86,31 +86,31 @@ Interaction of these components is illustrated in the figure below. +-------------------------------------------+ ``` -Figure 1: Plugin deployment, all of the COSI system Node hosts run Plugins. +Figure 1: Plugin deployment, all of the COSI system Node hosts run Plugins. ![Cosi Components](cosicomponents.png) -Figure 2: Kubernetes implementation - Interaction of COSI components +Figure 2: Kubernetes implementation - Interaction of COSI components ### Bucket Lifecycle ``` - CreateBucket +-------------+ DeleteBucket - +------------->| CREATED +--------------+ - | +---+----^---+ | - | Grant | | Revoke v - +++ Bucket | | Bucket +++ - |X| Access | | Access | | - +-+ +---v----+---+ +-+ - | BOUND | - +---+----^---+ + CreateBucket +-------------+ DeleteBucket + +------------->| CREATED +--------------+ + | +---+----^---+ | + | Grant | | Revoke v + +++ Bucket | | Bucket +++ + |X| Access | | Access | | + +-+ +---v----+---+ +-+ + | BOUND | + +---+----^---+ ``` Figure 3: The lifecycle of a dynamically provisioned bucket, from creation to deletion. -The above diagrams illustrate a general expectation with respect to how a COSI system MAY manage the lifecycle of a bucket via the API presented in this specification. +The above diagrams illustrate a general expectation with respect to how a COSI system MAY manage the lifecycle of a bucket via the API presented in this specification. Plugins SHOULD expose all RPCs for an interface: Controller plugins SHOULD implement all RPCs for the service. Unsupported RPCs SHOULD return an appropriate error code that indicates such (e.g. `UNIMPLEMENTED`). @@ -131,7 +131,7 @@ package cosi.v1alpha1; import "google/protobuf/descriptor.proto"; -option go_package = "sigs.k8s.io/container-object-storage-interface-spec;cosi"; +option go_package = "sigs.k8s.io/container-object-storage-interface-api/proto;cosi"; extend google.protobuf.EnumOptions { // Indicates that this enum is OPTIONAL and part of an experimental @@ -293,7 +293,7 @@ message DriverCreateBucketRequest { } message DriverCreateBucketResponse { - // bucket_id returned here is expected to be the globally unique + // bucket_id returned here is expected to be the globally unique // identifier for the bucket in the object storage provider. string bucket_id = 1; @@ -305,7 +305,7 @@ message DriverCreateBucketResponse { message DriverDeleteBucketRequest { // This field is REQUIRED // bucket_id is a globally unique identifier for the bucket - // in the object storage provider + // in the object storage provider string bucket_id = 1; // This field is OPTIONAL @@ -321,7 +321,7 @@ message DriverDeleteBucketResponse { message DriverGrantBucketAccessRequest { // This field is REQUIRED // bucket_id is a globally unique identifier for the bucket - // in the object storage provider + // in the object storage provider string bucket_id = 1; // This field is REQUIRED @@ -342,7 +342,7 @@ message DriverGrantBucketAccessRequest { message DriverGrantBucketAccessResponse { // This field is REQUIRED // This is the account_id that is being provided access. This will - // be required later to revoke access. + // be required later to revoke access. string account_id = 1; // This field is REQUIRED @@ -465,9 +465,9 @@ This operation MUST be idempotent. If a volume corresponding to the specified bucket `name` already exists, is accessible from `accessibility_requirements, and is compatible with the specified attributes of the bucket in the `DriverCreateBucket`, the Plugin MUST reply `0 OK` with the corresponding `DriverCreateBucketResponse`. ``` -message DriverCreateBucketRequest { +message DriverCreateBucketRequest { // Idempotency - This name is generated by the COSI system to achieve - // idempotency. + // idempotency. // This field is REQUIRED. string bucket_name = 1; @@ -612,7 +612,7 @@ Supervised plugins MAY be isolated and/or resource-bounded. ##### Linux Capabilities -* Provisioner Sidecar SHALL guarantee that plugins will have necessary permission to connect to their backend Object Storage System +* Provisioner Sidecar SHALL guarantee that plugins will have necessary permission to connect to their backend Object Storage System * Plugins SHOULD clearly document any additionally required capabilities and/or security context. ##### Namespaces