From 88cadeb591477d34309573587bdfb13da63687d6 Mon Sep 17 00:00:00 2001 From: Mauricio Poppe Date: Fri, 7 Jan 2022 19:03:27 +0000 Subject: [PATCH] Bump Filesystem API from v1 to v2alpha1 --- client/api/filesystem/v2alpha1/api.pb.go | 1046 +++++++++++++++++ client/api/filesystem/v2alpha1/api.proto | 136 +++ .../filesystem/v2alpha1/client_generated.go | 86 ++ integrationtests/filesystem_test.go | 3 + integrationtests/filesystem_v2alpha1_test.go | 150 +++ pkg/server/filesystem/api_group_generated.go | 7 + .../filesystem/impl/v2alpha1/conversion.go | 3 + .../impl/v2alpha1/conversion_generated.go | 206 ++++ .../impl/v2alpha1/server_generated.go | 123 ++ .../client/api/filesystem/v2alpha1/api.pb.go | 1046 +++++++++++++++++ .../client/api/filesystem/v2alpha1/api.proto | 136 +++ .../filesystem/v2alpha1/client_generated.go | 86 ++ vendor/modules.txt | 2 + 13 files changed, 3030 insertions(+) create mode 100644 client/api/filesystem/v2alpha1/api.pb.go create mode 100644 client/api/filesystem/v2alpha1/api.proto create mode 100644 client/groups/filesystem/v2alpha1/client_generated.go create mode 100644 integrationtests/filesystem_v2alpha1_test.go create mode 100644 pkg/server/filesystem/impl/v2alpha1/conversion.go create mode 100644 pkg/server/filesystem/impl/v2alpha1/conversion_generated.go create mode 100644 pkg/server/filesystem/impl/v2alpha1/server_generated.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.pb.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v2alpha1/client_generated.go diff --git a/client/api/filesystem/v2alpha1/api.pb.go b/client/api/filesystem/v2alpha1/api.pb.go new file mode 100644 index 00000000..95b2ffb4 --- /dev/null +++ b/client/api/filesystem/v2alpha1/api.pb.go @@ -0,0 +1,1046 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto + +package v2alpha1 + +import ( + context "context" + 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) +) + +type PathExistsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence we want to check in the host's filesystem + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *PathExistsRequest) Reset() { + *x = PathExistsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsRequest) ProtoMessage() {} + +func (x *PathExistsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 PathExistsRequest.ProtoReflect.Descriptor instead. +func (*PathExistsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *PathExistsRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type PathExistsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *PathExistsResponse) Reset() { + *x = PathExistsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsResponse) ProtoMessage() {} + +func (x *PathExistsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 PathExistsResponse.ProtoReflect.Descriptor instead. +func (*PathExistsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *PathExistsResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type MkdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *MkdirRequest) Reset() { + *x = MkdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirRequest) ProtoMessage() {} + +func (x *MkdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 MkdirRequest.ProtoReflect.Descriptor instead. +func (*MkdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *MkdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type MkdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MkdirResponse) Reset() { + *x = MkdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirResponse) ProtoMessage() {} + +func (x *MkdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 MkdirResponse.ProtoReflect.Descriptor instead. +func (*MkdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{3} +} + +type RmdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Force remove all contents under path (if any). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *RmdirRequest) Reset() { + *x = RmdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirRequest) ProtoMessage() {} + +func (x *RmdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 RmdirRequest.ProtoReflect.Descriptor instead. +func (*RmdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{4} +} + +func (x *RmdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *RmdirRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type RmdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RmdirResponse) Reset() { + *x = RmdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirResponse) ProtoMessage() {} + +func (x *RmdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 RmdirResponse.ProtoReflect.Descriptor instead. +func (*RmdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{5} +} + +type CreateSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + SourcePath string `protobuf:"bytes,1,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *CreateSymlinkRequest) Reset() { + *x = CreateSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkRequest) ProtoMessage() {} + +func (x *CreateSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 CreateSymlinkRequest.ProtoReflect.Descriptor instead. +func (*CreateSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateSymlinkRequest) GetSourcePath() string { + if x != nil { + return x.SourcePath + } + return "" +} + +func (x *CreateSymlinkRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type CreateSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateSymlinkResponse) Reset() { + *x = CreateSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkResponse) ProtoMessage() {} + +func (x *CreateSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 CreateSymlinkResponse.ProtoReflect.Descriptor instead. +func (*CreateSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{7} +} + +type IsSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence as a symlink we want to check in the host's filesystem. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *IsSymlinkRequest) Reset() { + *x = IsSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkRequest) ProtoMessage() {} + +func (x *IsSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 IsSymlinkRequest.ProtoReflect.Descriptor instead. +func (*IsSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *IsSymlinkRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type IsSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in IsSymlinkRequest is a symlink. + IsSymlink bool `protobuf:"varint,1,opt,name=is_symlink,json=isSymlink,proto3" json:"is_symlink,omitempty"` +} + +func (x *IsSymlinkResponse) Reset() { + *x = IsSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkResponse) ProtoMessage() {} + +func (x *IsSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 IsSymlinkResponse.ProtoReflect.Descriptor instead. +func (*IsSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *IsSymlinkResponse) GetIsSymlink() bool { + if x != nil { + return x.IsSymlink + } + return false +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x68, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, + 0x22, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x0f, + 0x0a, 0x0d, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x32, 0x0a, 0x11, 0x49, 0x73, + 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x32, 0xeb, + 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x49, 0x0a, + 0x0a, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, + 0x72, 0x12, 0x16, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6b, 0x64, + 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x16, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x52, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x1e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x09, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x1a, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x53, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, + 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x44, 0x5a, 0x42, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_goTypes = []interface{}{ + (*PathExistsRequest)(nil), // 0: v2alpha1.PathExistsRequest + (*PathExistsResponse)(nil), // 1: v2alpha1.PathExistsResponse + (*MkdirRequest)(nil), // 2: v2alpha1.MkdirRequest + (*MkdirResponse)(nil), // 3: v2alpha1.MkdirResponse + (*RmdirRequest)(nil), // 4: v2alpha1.RmdirRequest + (*RmdirResponse)(nil), // 5: v2alpha1.RmdirResponse + (*CreateSymlinkRequest)(nil), // 6: v2alpha1.CreateSymlinkRequest + (*CreateSymlinkResponse)(nil), // 7: v2alpha1.CreateSymlinkResponse + (*IsSymlinkRequest)(nil), // 8: v2alpha1.IsSymlinkRequest + (*IsSymlinkResponse)(nil), // 9: v2alpha1.IsSymlinkResponse +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_depIdxs = []int32{ + 0, // 0: v2alpha1.Filesystem.PathExists:input_type -> v2alpha1.PathExistsRequest + 2, // 1: v2alpha1.Filesystem.Mkdir:input_type -> v2alpha1.MkdirRequest + 4, // 2: v2alpha1.Filesystem.Rmdir:input_type -> v2alpha1.RmdirRequest + 6, // 3: v2alpha1.Filesystem.CreateSymlink:input_type -> v2alpha1.CreateSymlinkRequest + 8, // 4: v2alpha1.Filesystem.IsSymlink:input_type -> v2alpha1.IsSymlinkRequest + 1, // 5: v2alpha1.Filesystem.PathExists:output_type -> v2alpha1.PathExistsResponse + 3, // 6: v2alpha1.Filesystem.Mkdir:output_type -> v2alpha1.MkdirResponse + 5, // 7: v2alpha1.Filesystem.Rmdir:output_type -> v2alpha1.RmdirResponse + 7, // 8: v2alpha1.Filesystem.CreateSymlink:output_type -> v2alpha1.CreateSymlinkResponse + 9, // 9: v2alpha1.Filesystem.IsSymlink:output_type -> v2alpha1.IsSymlinkResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 + +// FilesystemClient is the client API for Filesystem service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FilesystemClient interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) +} + +type filesystemClient struct { + cc grpc.ClientConnInterface +} + +func NewFilesystemClient(cc grpc.ClientConnInterface) FilesystemClient { + return &filesystemClient{cc} +} + +func (c *filesystemClient) PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) { + out := new(PathExistsResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/PathExists", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) { + out := new(MkdirResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/Mkdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) { + out := new(RmdirResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/Rmdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) { + out := new(CreateSymlinkResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/CreateSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) { + out := new(IsSymlinkResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/IsSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilesystemServer is the server API for Filesystem service. +type FilesystemServer interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) +} + +// UnimplementedFilesystemServer can be embedded to have forward compatible implementations. +type UnimplementedFilesystemServer struct { +} + +func (*UnimplementedFilesystemServer) PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PathExists not implemented") +} +func (*UnimplementedFilesystemServer) Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mkdir not implemented") +} +func (*UnimplementedFilesystemServer) Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rmdir not implemented") +} +func (*UnimplementedFilesystemServer) CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSymlink not implemented") +} +func (*UnimplementedFilesystemServer) IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsSymlink not implemented") +} + +func RegisterFilesystemServer(s *grpc.Server, srv FilesystemServer) { + s.RegisterService(&_Filesystem_serviceDesc, srv) +} + +func _Filesystem_PathExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PathExistsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).PathExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/PathExists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).PathExists(ctx, req.(*PathExistsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Mkdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MkdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Mkdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/Mkdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Mkdir(ctx, req.(*MkdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Rmdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RmdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Rmdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/Rmdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Rmdir(ctx, req.(*RmdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_CreateSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).CreateSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/CreateSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).CreateSymlink(ctx, req.(*CreateSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_IsSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).IsSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/IsSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).IsSymlink(ctx, req.(*IsSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Filesystem_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v2alpha1.Filesystem", + HandlerType: (*FilesystemServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PathExists", + Handler: _Filesystem_PathExists_Handler, + }, + { + MethodName: "Mkdir", + Handler: _Filesystem_Mkdir_Handler, + }, + { + MethodName: "Rmdir", + Handler: _Filesystem_Rmdir_Handler, + }, + { + MethodName: "CreateSymlink", + Handler: _Filesystem_CreateSymlink_Handler, + }, + { + MethodName: "IsSymlink", + Handler: _Filesystem_IsSymlink_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto", +} diff --git a/client/api/filesystem/v2alpha1/api.proto b/client/api/filesystem/v2alpha1/api.proto new file mode 100644 index 00000000..24f0301d --- /dev/null +++ b/client/api/filesystem/v2alpha1/api.proto @@ -0,0 +1,136 @@ +syntax = "proto3"; + +package v2alpha1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1"; + +service Filesystem { + // PathExists checks if the requested path exists in the host filesystem. + rpc PathExists(PathExistsRequest) returns (PathExistsResponse) {} + + // Mkdir creates a directory at the requested path in the host filesystem. + rpc Mkdir(MkdirRequest) returns (MkdirResponse) {} + + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + rpc Rmdir(RmdirRequest) returns (RmdirResponse) {} + + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + rpc CreateSymlink(CreateSymlinkRequest) returns (CreateSymlinkResponse) {} + + // IsSymlink checks if a given path is a symlink. + rpc IsSymlink(IsSymlinkRequest) returns (IsSymlinkResponse) {} +} + +message PathExistsRequest { + // The path whose existence we want to check in the host's filesystem + string path = 1; +} + +message PathExistsResponse { + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + bool exists = 1; +} + +message MkdirRequest { + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + string path = 1; +} + +message MkdirResponse { + // Intentionally empty. +} + +message RmdirRequest { + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + string path = 1; + + // Force remove all contents under path (if any). + bool force = 2; +} + +message RmdirResponse { + // Intentionally empty. +} + +message CreateSymlinkRequest { + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + string source_path = 1; + + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + string target_path = 2; +} + +message CreateSymlinkResponse { + // Intentionally empty. +} + +message IsSymlinkRequest { + // The path whose existence as a symlink we want to check in the host's filesystem. + string path = 1; +} + +message IsSymlinkResponse { + // Indicates whether the path in IsSymlinkRequest is a symlink. + bool is_symlink = 1; +} diff --git a/client/groups/filesystem/v2alpha1/client_generated.go b/client/groups/filesystem/v2alpha1/client_generated.go new file mode 100644 index 00000000..8100dd78 --- /dev/null +++ b/client/groups/filesystem/v2alpha1/client_generated.go @@ -0,0 +1,86 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v2alpha1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "filesystem" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v2alpha1") + +type Client struct { + client v2alpha1.FilesystemClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the filesystem API group version v2alpha1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v2alpha1.NewFilesystemClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v2alpha1.FilesystemClient = &Client{} + +func (w *Client) CreateSymlink(context context.Context, request *v2alpha1.CreateSymlinkRequest, opts ...grpc.CallOption) (*v2alpha1.CreateSymlinkResponse, error) { + return w.client.CreateSymlink(context, request, opts...) +} + +func (w *Client) IsSymlink(context context.Context, request *v2alpha1.IsSymlinkRequest, opts ...grpc.CallOption) (*v2alpha1.IsSymlinkResponse, error) { + return w.client.IsSymlink(context, request, opts...) +} + +func (w *Client) Mkdir(context context.Context, request *v2alpha1.MkdirRequest, opts ...grpc.CallOption) (*v2alpha1.MkdirResponse, error) { + return w.client.Mkdir(context, request, opts...) +} + +func (w *Client) PathExists(context context.Context, request *v2alpha1.PathExistsRequest, opts ...grpc.CallOption) (*v2alpha1.PathExistsResponse, error) { + return w.client.PathExists(context, request, opts...) +} + +func (w *Client) Rmdir(context context.Context, request *v2alpha1.RmdirRequest, opts ...grpc.CallOption) (*v2alpha1.RmdirResponse, error) { + return w.client.Rmdir(context, request, opts...) +} diff --git a/integrationtests/filesystem_test.go b/integrationtests/filesystem_test.go index 466bd73c..62bf30e2 100644 --- a/integrationtests/filesystem_test.go +++ b/integrationtests/filesystem_test.go @@ -17,6 +17,9 @@ func pathExists(path string) (bool, error) { } func TestFilesystemAPIGroup(t *testing.T) { + t.Run("v2alpha1FilesystemTests", func(t *testing.T) { + v2alpha1FilesystemTests(t) + }) t.Run("v1FilesystemTests", func(t *testing.T) { v1FilesystemTests(t) }) diff --git a/integrationtests/filesystem_v2alpha1_test.go b/integrationtests/filesystem_v2alpha1_test.go new file mode 100644 index 00000000..950d3db4 --- /dev/null +++ b/integrationtests/filesystem_v2alpha1_test.go @@ -0,0 +1,150 @@ +package integrationtests + +import ( + "context" + "fmt" + "math/rand" + "os" + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1" + v2alpha1client "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v2alpha1" +) + +func v2alpha1FilesystemTests(t *testing.T) { + t.Run("PathExists positive", func(t *testing.T) { + client, err := v2alpha1client.NewClient() + require.Nil(t, err) + defer client.Close() + + s1 := rand.NewSource(time.Now().UnixNano()) + r1 := rand.New(s1) + + // simulate FS operations around staging a volume on a node + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) + mkdirReq := &v2alpha1.MkdirRequest{ + Path: stagepath, + } + _, err = client.Mkdir(context.Background(), mkdirReq) + require.NoError(t, err) + + exists, err := pathExists(stagepath) + assert.True(t, exists, err) + + // simulate operations around publishing a volume to a pod + podpath := getKubeletPathForTest(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) + mkdirReq = &v2alpha1.MkdirRequest{ + Path: podpath, + } + _, err = client.Mkdir(context.Background(), mkdirReq) + require.NoError(t, err) + + exists, err = pathExists(podpath) + assert.True(t, exists, err) + + sourcePath := stagepath + targetPath := filepath.Join(podpath, "rootvol") + // source <- target + linkReq := &v2alpha1.CreateSymlinkRequest{ + SourcePath: sourcePath, + TargetPath: targetPath, + } + _, err = client.CreateSymlink(context.Background(), linkReq) + require.NoError(t, err) + + exists, err = pathExists(podpath + "\\rootvol") + assert.True(t, exists, err) + + // cleanup pvpath + rmdirReq := &v2alpha1.RmdirRequest{ + Path: podpath, + Force: true, + } + _, err = client.Rmdir(context.Background(), rmdirReq) + require.NoError(t, err) + + exists, err = pathExists(podpath) + assert.False(t, exists, err) + + // cleanup plugin path + rmdirReq = &v2alpha1.RmdirRequest{ + Path: stagepath, + Force: true, + } + _, err = client.Rmdir(context.Background(), rmdirReq) + require.NoError(t, err) + + exists, err = pathExists(stagepath) + assert.False(t, exists, err) + }) + t.Run("IsMount", func(t *testing.T) { + client, err := v2alpha1client.NewClient() + require.Nil(t, err) + defer client.Close() + + s1 := rand.NewSource(time.Now().UnixNano()) + r1 := rand.New(s1) + rand1 := r1.Intn(100) + rand2 := r1.Intn(100) + + testDir := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) + err = os.MkdirAll(testDir, os.ModeDir) + require.Nil(t, err) + defer os.RemoveAll(testDir) + + // 1. Check the isMount on a path which does not exist. Failure scenario. + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) + IsSymlinkRequest := &v2alpha1.IsSymlinkRequest{ + Path: stagepath, + } + isSymlink, err := client.IsSymlink(context.Background(), IsSymlinkRequest) + require.NotNil(t, err) + + // 2. Create the directory. This time its not a mount point. Failure scenario. + err = os.Mkdir(stagepath, os.ModeDir) + require.Nil(t, err) + defer os.Remove(stagepath) + IsSymlinkRequest = &v2alpha1.IsSymlinkRequest{ + Path: stagepath, + } + isSymlink, err = client.IsSymlink(context.Background(), IsSymlinkRequest) + require.Nil(t, err) + require.Equal(t, isSymlink.IsSymlink, false) + + err = os.Remove(stagepath) + require.Nil(t, err) + targetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) + lnTargetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) + + // 3. Create soft link to the directory and make sure target exists. Success scenario. + err = os.Mkdir(targetStagePath, os.ModeDir) + require.Nil(t, err) + defer os.Remove(targetStagePath) + // Create a sym link + err = os.Symlink(targetStagePath, lnTargetStagePath) + require.Nil(t, err) + defer os.Remove(lnTargetStagePath) + + IsSymlinkRequest = &v2alpha1.IsSymlinkRequest{ + Path: lnTargetStagePath, + } + isSymlink, err = client.IsSymlink(context.Background(), IsSymlinkRequest) + require.Nil(t, err) + require.Equal(t, isSymlink.IsSymlink, true) + + // 4. Remove the path. Failure scenario. + err = os.Remove(targetStagePath) + require.Nil(t, err) + IsSymlinkRequest = &v2alpha1.IsSymlinkRequest{ + Path: lnTargetStagePath, + } + isSymlink, err = client.IsSymlink(context.Background(), IsSymlinkRequest) + require.Nil(t, err) + require.Equal(t, isSymlink.IsSymlink, false) + }) +} diff --git a/pkg/server/filesystem/api_group_generated.go b/pkg/server/filesystem/api_group_generated.go index 5c8aceeb..47b9ed8b 100644 --- a/pkg/server/filesystem/api_group_generated.go +++ b/pkg/server/filesystem/api_group_generated.go @@ -9,6 +9,7 @@ import ( "github.com/kubernetes-csi/csi-proxy/pkg/server/filesystem/impl/v1alpha1" "github.com/kubernetes-csi/csi-proxy/pkg/server/filesystem/impl/v1beta1" "github.com/kubernetes-csi/csi-proxy/pkg/server/filesystem/impl/v1beta2" + "github.com/kubernetes-csi/csi-proxy/pkg/server/filesystem/impl/v2alpha1" srvtypes "github.com/kubernetes-csi/csi-proxy/pkg/server/types" ) @@ -22,6 +23,7 @@ func (s *Server) VersionedAPIs() []*srvtypes.VersionedAPI { v1beta1Server := v1beta1.NewVersionedServer(s) v1beta2Server := v1beta2.NewVersionedServer(s) v1Server := v1.NewVersionedServer(s) + v2alpha1Server := v2alpha1.NewVersionedServer(s) return []*srvtypes.VersionedAPI{ { @@ -44,5 +46,10 @@ func (s *Server) VersionedAPIs() []*srvtypes.VersionedAPI { Version: apiversion.NewVersionOrPanic("v1"), Registrant: v1Server.Register, }, + { + Group: name, + Version: apiversion.NewVersionOrPanic("v2alpha1"), + Registrant: v2alpha1Server.Register, + }, } } diff --git a/pkg/server/filesystem/impl/v2alpha1/conversion.go b/pkg/server/filesystem/impl/v2alpha1/conversion.go new file mode 100644 index 00000000..f4cd0c84 --- /dev/null +++ b/pkg/server/filesystem/impl/v2alpha1/conversion.go @@ -0,0 +1,3 @@ +package v2alpha1 + +// Add manual conversion functions here to override automatic conversion functions diff --git a/pkg/server/filesystem/impl/v2alpha1/conversion_generated.go b/pkg/server/filesystem/impl/v2alpha1/conversion_generated.go new file mode 100644 index 00000000..ceb7469a --- /dev/null +++ b/pkg/server/filesystem/impl/v2alpha1/conversion_generated.go @@ -0,0 +1,206 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v2alpha1 + +import ( + v2alpha1 "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1" + impl "github.com/kubernetes-csi/csi-proxy/pkg/server/filesystem/impl" +) + +func autoConvert_v2alpha1_CreateSymlinkRequest_To_impl_CreateSymlinkRequest(in *v2alpha1.CreateSymlinkRequest, out *impl.CreateSymlinkRequest) error { + out.SourcePath = in.SourcePath + out.TargetPath = in.TargetPath + return nil +} + +// Convert_v2alpha1_CreateSymlinkRequest_To_impl_CreateSymlinkRequest is an autogenerated conversion function. +func Convert_v2alpha1_CreateSymlinkRequest_To_impl_CreateSymlinkRequest(in *v2alpha1.CreateSymlinkRequest, out *impl.CreateSymlinkRequest) error { + return autoConvert_v2alpha1_CreateSymlinkRequest_To_impl_CreateSymlinkRequest(in, out) +} + +func autoConvert_impl_CreateSymlinkRequest_To_v2alpha1_CreateSymlinkRequest(in *impl.CreateSymlinkRequest, out *v2alpha1.CreateSymlinkRequest) error { + out.SourcePath = in.SourcePath + out.TargetPath = in.TargetPath + return nil +} + +// Convert_impl_CreateSymlinkRequest_To_v2alpha1_CreateSymlinkRequest is an autogenerated conversion function. +func Convert_impl_CreateSymlinkRequest_To_v2alpha1_CreateSymlinkRequest(in *impl.CreateSymlinkRequest, out *v2alpha1.CreateSymlinkRequest) error { + return autoConvert_impl_CreateSymlinkRequest_To_v2alpha1_CreateSymlinkRequest(in, out) +} + +func autoConvert_v2alpha1_CreateSymlinkResponse_To_impl_CreateSymlinkResponse(in *v2alpha1.CreateSymlinkResponse, out *impl.CreateSymlinkResponse) error { + return nil +} + +// Convert_v2alpha1_CreateSymlinkResponse_To_impl_CreateSymlinkResponse is an autogenerated conversion function. +func Convert_v2alpha1_CreateSymlinkResponse_To_impl_CreateSymlinkResponse(in *v2alpha1.CreateSymlinkResponse, out *impl.CreateSymlinkResponse) error { + return autoConvert_v2alpha1_CreateSymlinkResponse_To_impl_CreateSymlinkResponse(in, out) +} + +func autoConvert_impl_CreateSymlinkResponse_To_v2alpha1_CreateSymlinkResponse(in *impl.CreateSymlinkResponse, out *v2alpha1.CreateSymlinkResponse) error { + return nil +} + +// Convert_impl_CreateSymlinkResponse_To_v2alpha1_CreateSymlinkResponse is an autogenerated conversion function. +func Convert_impl_CreateSymlinkResponse_To_v2alpha1_CreateSymlinkResponse(in *impl.CreateSymlinkResponse, out *v2alpha1.CreateSymlinkResponse) error { + return autoConvert_impl_CreateSymlinkResponse_To_v2alpha1_CreateSymlinkResponse(in, out) +} + +func autoConvert_v2alpha1_IsSymlinkRequest_To_impl_IsSymlinkRequest(in *v2alpha1.IsSymlinkRequest, out *impl.IsSymlinkRequest) error { + out.Path = in.Path + return nil +} + +// Convert_v2alpha1_IsSymlinkRequest_To_impl_IsSymlinkRequest is an autogenerated conversion function. +func Convert_v2alpha1_IsSymlinkRequest_To_impl_IsSymlinkRequest(in *v2alpha1.IsSymlinkRequest, out *impl.IsSymlinkRequest) error { + return autoConvert_v2alpha1_IsSymlinkRequest_To_impl_IsSymlinkRequest(in, out) +} + +func autoConvert_impl_IsSymlinkRequest_To_v2alpha1_IsSymlinkRequest(in *impl.IsSymlinkRequest, out *v2alpha1.IsSymlinkRequest) error { + out.Path = in.Path + return nil +} + +// Convert_impl_IsSymlinkRequest_To_v2alpha1_IsSymlinkRequest is an autogenerated conversion function. +func Convert_impl_IsSymlinkRequest_To_v2alpha1_IsSymlinkRequest(in *impl.IsSymlinkRequest, out *v2alpha1.IsSymlinkRequest) error { + return autoConvert_impl_IsSymlinkRequest_To_v2alpha1_IsSymlinkRequest(in, out) +} + +func autoConvert_v2alpha1_IsSymlinkResponse_To_impl_IsSymlinkResponse(in *v2alpha1.IsSymlinkResponse, out *impl.IsSymlinkResponse) error { + out.IsSymlink = in.IsSymlink + return nil +} + +// Convert_v2alpha1_IsSymlinkResponse_To_impl_IsSymlinkResponse is an autogenerated conversion function. +func Convert_v2alpha1_IsSymlinkResponse_To_impl_IsSymlinkResponse(in *v2alpha1.IsSymlinkResponse, out *impl.IsSymlinkResponse) error { + return autoConvert_v2alpha1_IsSymlinkResponse_To_impl_IsSymlinkResponse(in, out) +} + +func autoConvert_impl_IsSymlinkResponse_To_v2alpha1_IsSymlinkResponse(in *impl.IsSymlinkResponse, out *v2alpha1.IsSymlinkResponse) error { + out.IsSymlink = in.IsSymlink + return nil +} + +// Convert_impl_IsSymlinkResponse_To_v2alpha1_IsSymlinkResponse is an autogenerated conversion function. +func Convert_impl_IsSymlinkResponse_To_v2alpha1_IsSymlinkResponse(in *impl.IsSymlinkResponse, out *v2alpha1.IsSymlinkResponse) error { + return autoConvert_impl_IsSymlinkResponse_To_v2alpha1_IsSymlinkResponse(in, out) +} + +func autoConvert_v2alpha1_MkdirRequest_To_impl_MkdirRequest(in *v2alpha1.MkdirRequest, out *impl.MkdirRequest) error { + out.Path = in.Path + return nil +} + +// Convert_v2alpha1_MkdirRequest_To_impl_MkdirRequest is an autogenerated conversion function. +func Convert_v2alpha1_MkdirRequest_To_impl_MkdirRequest(in *v2alpha1.MkdirRequest, out *impl.MkdirRequest) error { + return autoConvert_v2alpha1_MkdirRequest_To_impl_MkdirRequest(in, out) +} + +func autoConvert_impl_MkdirRequest_To_v2alpha1_MkdirRequest(in *impl.MkdirRequest, out *v2alpha1.MkdirRequest) error { + out.Path = in.Path + return nil +} + +// Convert_impl_MkdirRequest_To_v2alpha1_MkdirRequest is an autogenerated conversion function. +func Convert_impl_MkdirRequest_To_v2alpha1_MkdirRequest(in *impl.MkdirRequest, out *v2alpha1.MkdirRequest) error { + return autoConvert_impl_MkdirRequest_To_v2alpha1_MkdirRequest(in, out) +} + +func autoConvert_v2alpha1_MkdirResponse_To_impl_MkdirResponse(in *v2alpha1.MkdirResponse, out *impl.MkdirResponse) error { + return nil +} + +// Convert_v2alpha1_MkdirResponse_To_impl_MkdirResponse is an autogenerated conversion function. +func Convert_v2alpha1_MkdirResponse_To_impl_MkdirResponse(in *v2alpha1.MkdirResponse, out *impl.MkdirResponse) error { + return autoConvert_v2alpha1_MkdirResponse_To_impl_MkdirResponse(in, out) +} + +func autoConvert_impl_MkdirResponse_To_v2alpha1_MkdirResponse(in *impl.MkdirResponse, out *v2alpha1.MkdirResponse) error { + return nil +} + +// Convert_impl_MkdirResponse_To_v2alpha1_MkdirResponse is an autogenerated conversion function. +func Convert_impl_MkdirResponse_To_v2alpha1_MkdirResponse(in *impl.MkdirResponse, out *v2alpha1.MkdirResponse) error { + return autoConvert_impl_MkdirResponse_To_v2alpha1_MkdirResponse(in, out) +} + +func autoConvert_v2alpha1_PathExistsRequest_To_impl_PathExistsRequest(in *v2alpha1.PathExistsRequest, out *impl.PathExistsRequest) error { + out.Path = in.Path + return nil +} + +// Convert_v2alpha1_PathExistsRequest_To_impl_PathExistsRequest is an autogenerated conversion function. +func Convert_v2alpha1_PathExistsRequest_To_impl_PathExistsRequest(in *v2alpha1.PathExistsRequest, out *impl.PathExistsRequest) error { + return autoConvert_v2alpha1_PathExistsRequest_To_impl_PathExistsRequest(in, out) +} + +func autoConvert_impl_PathExistsRequest_To_v2alpha1_PathExistsRequest(in *impl.PathExistsRequest, out *v2alpha1.PathExistsRequest) error { + out.Path = in.Path + return nil +} + +// Convert_impl_PathExistsRequest_To_v2alpha1_PathExistsRequest is an autogenerated conversion function. +func Convert_impl_PathExistsRequest_To_v2alpha1_PathExistsRequest(in *impl.PathExistsRequest, out *v2alpha1.PathExistsRequest) error { + return autoConvert_impl_PathExistsRequest_To_v2alpha1_PathExistsRequest(in, out) +} + +func autoConvert_v2alpha1_PathExistsResponse_To_impl_PathExistsResponse(in *v2alpha1.PathExistsResponse, out *impl.PathExistsResponse) error { + out.Exists = in.Exists + return nil +} + +// Convert_v2alpha1_PathExistsResponse_To_impl_PathExistsResponse is an autogenerated conversion function. +func Convert_v2alpha1_PathExistsResponse_To_impl_PathExistsResponse(in *v2alpha1.PathExistsResponse, out *impl.PathExistsResponse) error { + return autoConvert_v2alpha1_PathExistsResponse_To_impl_PathExistsResponse(in, out) +} + +func autoConvert_impl_PathExistsResponse_To_v2alpha1_PathExistsResponse(in *impl.PathExistsResponse, out *v2alpha1.PathExistsResponse) error { + out.Exists = in.Exists + return nil +} + +// Convert_impl_PathExistsResponse_To_v2alpha1_PathExistsResponse is an autogenerated conversion function. +func Convert_impl_PathExistsResponse_To_v2alpha1_PathExistsResponse(in *impl.PathExistsResponse, out *v2alpha1.PathExistsResponse) error { + return autoConvert_impl_PathExistsResponse_To_v2alpha1_PathExistsResponse(in, out) +} + +func autoConvert_v2alpha1_RmdirRequest_To_impl_RmdirRequest(in *v2alpha1.RmdirRequest, out *impl.RmdirRequest) error { + out.Path = in.Path + out.Force = in.Force + return nil +} + +// Convert_v2alpha1_RmdirRequest_To_impl_RmdirRequest is an autogenerated conversion function. +func Convert_v2alpha1_RmdirRequest_To_impl_RmdirRequest(in *v2alpha1.RmdirRequest, out *impl.RmdirRequest) error { + return autoConvert_v2alpha1_RmdirRequest_To_impl_RmdirRequest(in, out) +} + +func autoConvert_impl_RmdirRequest_To_v2alpha1_RmdirRequest(in *impl.RmdirRequest, out *v2alpha1.RmdirRequest) error { + out.Path = in.Path + out.Force = in.Force + return nil +} + +// Convert_impl_RmdirRequest_To_v2alpha1_RmdirRequest is an autogenerated conversion function. +func Convert_impl_RmdirRequest_To_v2alpha1_RmdirRequest(in *impl.RmdirRequest, out *v2alpha1.RmdirRequest) error { + return autoConvert_impl_RmdirRequest_To_v2alpha1_RmdirRequest(in, out) +} + +func autoConvert_v2alpha1_RmdirResponse_To_impl_RmdirResponse(in *v2alpha1.RmdirResponse, out *impl.RmdirResponse) error { + return nil +} + +// Convert_v2alpha1_RmdirResponse_To_impl_RmdirResponse is an autogenerated conversion function. +func Convert_v2alpha1_RmdirResponse_To_impl_RmdirResponse(in *v2alpha1.RmdirResponse, out *impl.RmdirResponse) error { + return autoConvert_v2alpha1_RmdirResponse_To_impl_RmdirResponse(in, out) +} + +func autoConvert_impl_RmdirResponse_To_v2alpha1_RmdirResponse(in *impl.RmdirResponse, out *v2alpha1.RmdirResponse) error { + return nil +} + +// Convert_impl_RmdirResponse_To_v2alpha1_RmdirResponse is an autogenerated conversion function. +func Convert_impl_RmdirResponse_To_v2alpha1_RmdirResponse(in *impl.RmdirResponse, out *v2alpha1.RmdirResponse) error { + return autoConvert_impl_RmdirResponse_To_v2alpha1_RmdirResponse(in, out) +} diff --git a/pkg/server/filesystem/impl/v2alpha1/server_generated.go b/pkg/server/filesystem/impl/v2alpha1/server_generated.go new file mode 100644 index 00000000..4f2b4d21 --- /dev/null +++ b/pkg/server/filesystem/impl/v2alpha1/server_generated.go @@ -0,0 +1,123 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v2alpha1 + +import ( + "context" + + "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "github.com/kubernetes-csi/csi-proxy/pkg/server/filesystem/impl" + "google.golang.org/grpc" +) + +var version = apiversion.NewVersionOrPanic("v2alpha1") + +type versionedAPI struct { + apiGroupServer impl.ServerInterface +} + +func NewVersionedServer(apiGroupServer impl.ServerInterface) impl.VersionedAPI { + return &versionedAPI{ + apiGroupServer: apiGroupServer, + } +} + +func (s *versionedAPI) Register(grpcServer *grpc.Server) { + v2alpha1.RegisterFilesystemServer(grpcServer, s) +} + +func (s *versionedAPI) CreateSymlink(context context.Context, versionedRequest *v2alpha1.CreateSymlinkRequest) (*v2alpha1.CreateSymlinkResponse, error) { + request := &impl.CreateSymlinkRequest{} + if err := Convert_v2alpha1_CreateSymlinkRequest_To_impl_CreateSymlinkRequest(versionedRequest, request); err != nil { + return nil, err + } + + response, err := s.apiGroupServer.CreateSymlink(context, request, version) + if err != nil { + return nil, err + } + + versionedResponse := &v2alpha1.CreateSymlinkResponse{} + if err := Convert_impl_CreateSymlinkResponse_To_v2alpha1_CreateSymlinkResponse(response, versionedResponse); err != nil { + return nil, err + } + + return versionedResponse, err +} + +func (s *versionedAPI) IsSymlink(context context.Context, versionedRequest *v2alpha1.IsSymlinkRequest) (*v2alpha1.IsSymlinkResponse, error) { + request := &impl.IsSymlinkRequest{} + if err := Convert_v2alpha1_IsSymlinkRequest_To_impl_IsSymlinkRequest(versionedRequest, request); err != nil { + return nil, err + } + + response, err := s.apiGroupServer.IsSymlink(context, request, version) + if err != nil { + return nil, err + } + + versionedResponse := &v2alpha1.IsSymlinkResponse{} + if err := Convert_impl_IsSymlinkResponse_To_v2alpha1_IsSymlinkResponse(response, versionedResponse); err != nil { + return nil, err + } + + return versionedResponse, err +} + +func (s *versionedAPI) Mkdir(context context.Context, versionedRequest *v2alpha1.MkdirRequest) (*v2alpha1.MkdirResponse, error) { + request := &impl.MkdirRequest{} + if err := Convert_v2alpha1_MkdirRequest_To_impl_MkdirRequest(versionedRequest, request); err != nil { + return nil, err + } + + response, err := s.apiGroupServer.Mkdir(context, request, version) + if err != nil { + return nil, err + } + + versionedResponse := &v2alpha1.MkdirResponse{} + if err := Convert_impl_MkdirResponse_To_v2alpha1_MkdirResponse(response, versionedResponse); err != nil { + return nil, err + } + + return versionedResponse, err +} + +func (s *versionedAPI) PathExists(context context.Context, versionedRequest *v2alpha1.PathExistsRequest) (*v2alpha1.PathExistsResponse, error) { + request := &impl.PathExistsRequest{} + if err := Convert_v2alpha1_PathExistsRequest_To_impl_PathExistsRequest(versionedRequest, request); err != nil { + return nil, err + } + + response, err := s.apiGroupServer.PathExists(context, request, version) + if err != nil { + return nil, err + } + + versionedResponse := &v2alpha1.PathExistsResponse{} + if err := Convert_impl_PathExistsResponse_To_v2alpha1_PathExistsResponse(response, versionedResponse); err != nil { + return nil, err + } + + return versionedResponse, err +} + +func (s *versionedAPI) Rmdir(context context.Context, versionedRequest *v2alpha1.RmdirRequest) (*v2alpha1.RmdirResponse, error) { + request := &impl.RmdirRequest{} + if err := Convert_v2alpha1_RmdirRequest_To_impl_RmdirRequest(versionedRequest, request); err != nil { + return nil, err + } + + response, err := s.apiGroupServer.Rmdir(context, request, version) + if err != nil { + return nil, err + } + + versionedResponse := &v2alpha1.RmdirResponse{} + if err := Convert_impl_RmdirResponse_To_v2alpha1_RmdirResponse(response, versionedResponse); err != nil { + return nil, err + } + + return versionedResponse, err +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.pb.go new file mode 100644 index 00000000..95b2ffb4 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.pb.go @@ -0,0 +1,1046 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto + +package v2alpha1 + +import ( + context "context" + 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) +) + +type PathExistsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence we want to check in the host's filesystem + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *PathExistsRequest) Reset() { + *x = PathExistsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsRequest) ProtoMessage() {} + +func (x *PathExistsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 PathExistsRequest.ProtoReflect.Descriptor instead. +func (*PathExistsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *PathExistsRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type PathExistsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *PathExistsResponse) Reset() { + *x = PathExistsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsResponse) ProtoMessage() {} + +func (x *PathExistsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 PathExistsResponse.ProtoReflect.Descriptor instead. +func (*PathExistsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *PathExistsResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type MkdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *MkdirRequest) Reset() { + *x = MkdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirRequest) ProtoMessage() {} + +func (x *MkdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 MkdirRequest.ProtoReflect.Descriptor instead. +func (*MkdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *MkdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type MkdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MkdirResponse) Reset() { + *x = MkdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirResponse) ProtoMessage() {} + +func (x *MkdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 MkdirResponse.ProtoReflect.Descriptor instead. +func (*MkdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{3} +} + +type RmdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Force remove all contents under path (if any). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *RmdirRequest) Reset() { + *x = RmdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirRequest) ProtoMessage() {} + +func (x *RmdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 RmdirRequest.ProtoReflect.Descriptor instead. +func (*RmdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{4} +} + +func (x *RmdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *RmdirRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type RmdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RmdirResponse) Reset() { + *x = RmdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirResponse) ProtoMessage() {} + +func (x *RmdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 RmdirResponse.ProtoReflect.Descriptor instead. +func (*RmdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{5} +} + +type CreateSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + SourcePath string `protobuf:"bytes,1,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *CreateSymlinkRequest) Reset() { + *x = CreateSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkRequest) ProtoMessage() {} + +func (x *CreateSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 CreateSymlinkRequest.ProtoReflect.Descriptor instead. +func (*CreateSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateSymlinkRequest) GetSourcePath() string { + if x != nil { + return x.SourcePath + } + return "" +} + +func (x *CreateSymlinkRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type CreateSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateSymlinkResponse) Reset() { + *x = CreateSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkResponse) ProtoMessage() {} + +func (x *CreateSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 CreateSymlinkResponse.ProtoReflect.Descriptor instead. +func (*CreateSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{7} +} + +type IsSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence as a symlink we want to check in the host's filesystem. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *IsSymlinkRequest) Reset() { + *x = IsSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkRequest) ProtoMessage() {} + +func (x *IsSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 IsSymlinkRequest.ProtoReflect.Descriptor instead. +func (*IsSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *IsSymlinkRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type IsSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in IsSymlinkRequest is a symlink. + IsSymlink bool `protobuf:"varint,1,opt,name=is_symlink,json=isSymlink,proto3" json:"is_symlink,omitempty"` +} + +func (x *IsSymlinkResponse) Reset() { + *x = IsSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkResponse) ProtoMessage() {} + +func (x *IsSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 IsSymlinkResponse.ProtoReflect.Descriptor instead. +func (*IsSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *IsSymlinkResponse) GetIsSymlink() bool { + if x != nil { + return x.IsSymlink + } + return false +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x68, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, + 0x22, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x0f, + 0x0a, 0x0d, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x32, 0x0a, 0x11, 0x49, 0x73, + 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x32, 0xeb, + 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x49, 0x0a, + 0x0a, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, + 0x72, 0x12, 0x16, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6b, 0x64, + 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x16, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x52, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x1e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x09, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x1a, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x53, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, + 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x44, 0x5a, 0x42, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_goTypes = []interface{}{ + (*PathExistsRequest)(nil), // 0: v2alpha1.PathExistsRequest + (*PathExistsResponse)(nil), // 1: v2alpha1.PathExistsResponse + (*MkdirRequest)(nil), // 2: v2alpha1.MkdirRequest + (*MkdirResponse)(nil), // 3: v2alpha1.MkdirResponse + (*RmdirRequest)(nil), // 4: v2alpha1.RmdirRequest + (*RmdirResponse)(nil), // 5: v2alpha1.RmdirResponse + (*CreateSymlinkRequest)(nil), // 6: v2alpha1.CreateSymlinkRequest + (*CreateSymlinkResponse)(nil), // 7: v2alpha1.CreateSymlinkResponse + (*IsSymlinkRequest)(nil), // 8: v2alpha1.IsSymlinkRequest + (*IsSymlinkResponse)(nil), // 9: v2alpha1.IsSymlinkResponse +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_depIdxs = []int32{ + 0, // 0: v2alpha1.Filesystem.PathExists:input_type -> v2alpha1.PathExistsRequest + 2, // 1: v2alpha1.Filesystem.Mkdir:input_type -> v2alpha1.MkdirRequest + 4, // 2: v2alpha1.Filesystem.Rmdir:input_type -> v2alpha1.RmdirRequest + 6, // 3: v2alpha1.Filesystem.CreateSymlink:input_type -> v2alpha1.CreateSymlinkRequest + 8, // 4: v2alpha1.Filesystem.IsSymlink:input_type -> v2alpha1.IsSymlinkRequest + 1, // 5: v2alpha1.Filesystem.PathExists:output_type -> v2alpha1.PathExistsResponse + 3, // 6: v2alpha1.Filesystem.Mkdir:output_type -> v2alpha1.MkdirResponse + 5, // 7: v2alpha1.Filesystem.Rmdir:output_type -> v2alpha1.RmdirResponse + 7, // 8: v2alpha1.Filesystem.CreateSymlink:output_type -> v2alpha1.CreateSymlinkResponse + 9, // 9: v2alpha1.Filesystem.IsSymlink:output_type -> v2alpha1.IsSymlinkResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v2alpha1_api_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 + +// FilesystemClient is the client API for Filesystem service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FilesystemClient interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) +} + +type filesystemClient struct { + cc grpc.ClientConnInterface +} + +func NewFilesystemClient(cc grpc.ClientConnInterface) FilesystemClient { + return &filesystemClient{cc} +} + +func (c *filesystemClient) PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) { + out := new(PathExistsResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/PathExists", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) { + out := new(MkdirResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/Mkdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) { + out := new(RmdirResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/Rmdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) { + out := new(CreateSymlinkResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/CreateSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) { + out := new(IsSymlinkResponse) + err := c.cc.Invoke(ctx, "/v2alpha1.Filesystem/IsSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilesystemServer is the server API for Filesystem service. +type FilesystemServer interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) +} + +// UnimplementedFilesystemServer can be embedded to have forward compatible implementations. +type UnimplementedFilesystemServer struct { +} + +func (*UnimplementedFilesystemServer) PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PathExists not implemented") +} +func (*UnimplementedFilesystemServer) Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mkdir not implemented") +} +func (*UnimplementedFilesystemServer) Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rmdir not implemented") +} +func (*UnimplementedFilesystemServer) CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSymlink not implemented") +} +func (*UnimplementedFilesystemServer) IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsSymlink not implemented") +} + +func RegisterFilesystemServer(s *grpc.Server, srv FilesystemServer) { + s.RegisterService(&_Filesystem_serviceDesc, srv) +} + +func _Filesystem_PathExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PathExistsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).PathExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/PathExists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).PathExists(ctx, req.(*PathExistsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Mkdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MkdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Mkdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/Mkdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Mkdir(ctx, req.(*MkdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Rmdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RmdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Rmdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/Rmdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Rmdir(ctx, req.(*RmdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_CreateSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).CreateSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/CreateSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).CreateSymlink(ctx, req.(*CreateSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_IsSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).IsSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2alpha1.Filesystem/IsSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).IsSymlink(ctx, req.(*IsSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Filesystem_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v2alpha1.Filesystem", + HandlerType: (*FilesystemServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PathExists", + Handler: _Filesystem_PathExists_Handler, + }, + { + MethodName: "Mkdir", + Handler: _Filesystem_Mkdir_Handler, + }, + { + MethodName: "Rmdir", + Handler: _Filesystem_Rmdir_Handler, + }, + { + MethodName: "CreateSymlink", + Handler: _Filesystem_CreateSymlink_Handler, + }, + { + MethodName: "IsSymlink", + Handler: _Filesystem_IsSymlink_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto new file mode 100644 index 00000000..24f0301d --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1/api.proto @@ -0,0 +1,136 @@ +syntax = "proto3"; + +package v2alpha1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1"; + +service Filesystem { + // PathExists checks if the requested path exists in the host filesystem. + rpc PathExists(PathExistsRequest) returns (PathExistsResponse) {} + + // Mkdir creates a directory at the requested path in the host filesystem. + rpc Mkdir(MkdirRequest) returns (MkdirResponse) {} + + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + rpc Rmdir(RmdirRequest) returns (RmdirResponse) {} + + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + rpc CreateSymlink(CreateSymlinkRequest) returns (CreateSymlinkResponse) {} + + // IsSymlink checks if a given path is a symlink. + rpc IsSymlink(IsSymlinkRequest) returns (IsSymlinkResponse) {} +} + +message PathExistsRequest { + // The path whose existence we want to check in the host's filesystem + string path = 1; +} + +message PathExistsResponse { + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + bool exists = 1; +} + +message MkdirRequest { + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + string path = 1; +} + +message MkdirResponse { + // Intentionally empty. +} + +message RmdirRequest { + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + string path = 1; + + // Force remove all contents under path (if any). + bool force = 2; +} + +message RmdirResponse { + // Intentionally empty. +} + +message CreateSymlinkRequest { + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + string source_path = 1; + + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + string target_path = 2; +} + +message CreateSymlinkResponse { + // Intentionally empty. +} + +message IsSymlinkRequest { + // The path whose existence as a symlink we want to check in the host's filesystem. + string path = 1; +} + +message IsSymlinkResponse { + // Indicates whether the path in IsSymlinkRequest is a symlink. + bool is_symlink = 1; +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v2alpha1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v2alpha1/client_generated.go new file mode 100644 index 00000000..8100dd78 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v2alpha1/client_generated.go @@ -0,0 +1,86 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v2alpha1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "filesystem" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v2alpha1") + +type Client struct { + client v2alpha1.FilesystemClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the filesystem API group version v2alpha1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v2alpha1.NewFilesystemClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v2alpha1.FilesystemClient = &Client{} + +func (w *Client) CreateSymlink(context context.Context, request *v2alpha1.CreateSymlinkRequest, opts ...grpc.CallOption) (*v2alpha1.CreateSymlinkResponse, error) { + return w.client.CreateSymlink(context, request, opts...) +} + +func (w *Client) IsSymlink(context context.Context, request *v2alpha1.IsSymlinkRequest, opts ...grpc.CallOption) (*v2alpha1.IsSymlinkResponse, error) { + return w.client.IsSymlink(context, request, opts...) +} + +func (w *Client) Mkdir(context context.Context, request *v2alpha1.MkdirRequest, opts ...grpc.CallOption) (*v2alpha1.MkdirResponse, error) { + return w.client.Mkdir(context, request, opts...) +} + +func (w *Client) PathExists(context context.Context, request *v2alpha1.PathExistsRequest, opts ...grpc.CallOption) (*v2alpha1.PathExistsResponse, error) { + return w.client.PathExists(context, request, opts...) +} + +func (w *Client) Rmdir(context context.Context, request *v2alpha1.RmdirRequest, opts ...grpc.CallOption) (*v2alpha1.RmdirResponse, error) { + return w.client.Rmdir(context, request, opts...) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index cfb0f2c8..04c5fb26 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -35,6 +35,7 @@ github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1 github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1alpha1 github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1 github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2 +github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v2alpha1 github.com/kubernetes-csi/csi-proxy/client/api/iscsi/v1alpha1 github.com/kubernetes-csi/csi-proxy/client/api/iscsi/v1alpha2 github.com/kubernetes-csi/csi-proxy/client/api/smb/v1 @@ -57,6 +58,7 @@ github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1 github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1alpha1 github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1 github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta2 +github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v2alpha1 github.com/kubernetes-csi/csi-proxy/client/groups/iscsi/v1alpha2 github.com/kubernetes-csi/csi-proxy/client/groups/smb/v1 github.com/kubernetes-csi/csi-proxy/client/groups/smb/v1alpha1