Documentation ¶
Index ¶
- Variables
- func RegisterStorageServer(s *grpc.Server, srv StorageServer)
- type DeleteFileRequest
- type DeleteFileResponse
- type DeleteFilesRequest
- func (*DeleteFilesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteFilesRequest) GetPrefix() string
- func (*DeleteFilesRequest) ProtoMessage()
- func (x *DeleteFilesRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteFilesRequest) Reset()
- func (x *DeleteFilesRequest) String() string
- type DeleteFilesResponse
- type FileInfo
- type GetFileRequest
- type GetFileResponse
- type GetFilesRequest
- type GetFilesResponse
- type StorageClient
- type StorageObject
- func (*StorageObject) Descriptor() ([]byte, []int)deprecated
- func (x *StorageObject) GetKey() string
- func (x *StorageObject) GetLastModified() string
- func (x *StorageObject) GetSize() uint64
- func (x *StorageObject) GetStorageClass() string
- func (*StorageObject) ProtoMessage()
- func (x *StorageObject) ProtoReflect() protoreflect.Message
- func (x *StorageObject) Reset()
- func (x *StorageObject) String() string
- type StorageServer
- type Storage_GetFileClient
- type Storage_GetFileServer
- type Storage_GetFilesClient
- type Storage_GetFilesServer
- type Storage_UploadFileClient
- type Storage_UploadFileServer
- type UnimplementedStorageServer
- func (*UnimplementedStorageServer) DeleteFile(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error)
- func (*UnimplementedStorageServer) DeleteFiles(context.Context, *DeleteFilesRequest) (*DeleteFilesResponse, error)
- func (*UnimplementedStorageServer) GetFile(*GetFileRequest, Storage_GetFileServer) error
- func (*UnimplementedStorageServer) GetFiles(*GetFilesRequest, Storage_GetFilesServer) error
- func (*UnimplementedStorageServer) UploadFile(Storage_UploadFileServer) error
- type UploadFileRequest
- func (*UploadFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadFileRequest) GetChunkData() []byte
- func (m *UploadFileRequest) GetData() isUploadFileRequest_Data
- func (x *UploadFileRequest) GetInfo() *FileInfo
- func (*UploadFileRequest) ProtoMessage()
- func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
- func (x *UploadFileRequest) Reset()
- func (x *UploadFileRequest) String() string
- type UploadFileRequest_ChunkData
- type UploadFileRequest_Info
- type UploadFileResponse
Constants ¶
This section is empty.
Variables ¶
var File_storage_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterStorageServer ¶
func RegisterStorageServer(s *grpc.Server, srv StorageServer)
Types ¶
type DeleteFileRequest ¶
type DeleteFileRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*DeleteFileRequest) Descriptor
deprecated
func (*DeleteFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFileRequest.ProtoReflect.Descriptor instead.
func (*DeleteFileRequest) GetKey ¶
func (x *DeleteFileRequest) GetKey() string
func (*DeleteFileRequest) ProtoMessage ¶
func (*DeleteFileRequest) ProtoMessage()
func (*DeleteFileRequest) ProtoReflect ¶
func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message
func (*DeleteFileRequest) Reset ¶
func (x *DeleteFileRequest) Reset()
func (*DeleteFileRequest) String ¶
func (x *DeleteFileRequest) String() string
type DeleteFileResponse ¶
type DeleteFileResponse struct {
// contains filtered or unexported fields
}
func (*DeleteFileResponse) Descriptor
deprecated
func (*DeleteFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFileResponse.ProtoReflect.Descriptor instead.
func (*DeleteFileResponse) ProtoMessage ¶
func (*DeleteFileResponse) ProtoMessage()
func (*DeleteFileResponse) ProtoReflect ¶
func (x *DeleteFileResponse) ProtoReflect() protoreflect.Message
func (*DeleteFileResponse) Reset ¶
func (x *DeleteFileResponse) Reset()
func (*DeleteFileResponse) String ¶
func (x *DeleteFileResponse) String() string
type DeleteFilesRequest ¶
type DeleteFilesRequest struct { Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // contains filtered or unexported fields }
func (*DeleteFilesRequest) Descriptor
deprecated
func (*DeleteFilesRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFilesRequest.ProtoReflect.Descriptor instead.
func (*DeleteFilesRequest) GetPrefix ¶
func (x *DeleteFilesRequest) GetPrefix() string
func (*DeleteFilesRequest) ProtoMessage ¶
func (*DeleteFilesRequest) ProtoMessage()
func (*DeleteFilesRequest) ProtoReflect ¶
func (x *DeleteFilesRequest) ProtoReflect() protoreflect.Message
func (*DeleteFilesRequest) Reset ¶
func (x *DeleteFilesRequest) Reset()
func (*DeleteFilesRequest) String ¶
func (x *DeleteFilesRequest) String() string
type DeleteFilesResponse ¶
type DeleteFilesResponse struct {
// contains filtered or unexported fields
}
func (*DeleteFilesResponse) Descriptor
deprecated
func (*DeleteFilesResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFilesResponse.ProtoReflect.Descriptor instead.
func (*DeleteFilesResponse) ProtoMessage ¶
func (*DeleteFilesResponse) ProtoMessage()
func (*DeleteFilesResponse) ProtoReflect ¶
func (x *DeleteFilesResponse) ProtoReflect() protoreflect.Message
func (*DeleteFilesResponse) Reset ¶
func (x *DeleteFilesResponse) Reset()
func (*DeleteFilesResponse) String ¶
func (x *DeleteFilesResponse) String() string
type FileInfo ¶
type FileInfo struct { FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*FileInfo) Descriptor
deprecated
func (*FileInfo) GetFileName ¶
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
func (*FileInfo) ProtoReflect ¶
func (x *FileInfo) ProtoReflect() protoreflect.Message
type GetFileRequest ¶
type GetFileRequest struct { FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` // contains filtered or unexported fields }
func (*GetFileRequest) Descriptor
deprecated
func (*GetFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead.
func (*GetFileRequest) GetFileName ¶
func (x *GetFileRequest) GetFileName() string
func (*GetFileRequest) ProtoMessage ¶
func (*GetFileRequest) ProtoMessage()
func (*GetFileRequest) ProtoReflect ¶
func (x *GetFileRequest) ProtoReflect() protoreflect.Message
func (*GetFileRequest) Reset ¶
func (x *GetFileRequest) Reset()
func (*GetFileRequest) String ¶
func (x *GetFileRequest) String() string
type GetFileResponse ¶
type GetFileResponse struct { ChunkData []byte `protobuf:"bytes,2,opt,name=chunk_data,json=chunkData,proto3" json:"chunk_data,omitempty"` // contains filtered or unexported fields }
func (*GetFileResponse) Descriptor
deprecated
func (*GetFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFileResponse.ProtoReflect.Descriptor instead.
func (*GetFileResponse) GetChunkData ¶
func (x *GetFileResponse) GetChunkData() []byte
func (*GetFileResponse) ProtoMessage ¶
func (*GetFileResponse) ProtoMessage()
func (*GetFileResponse) ProtoReflect ¶
func (x *GetFileResponse) ProtoReflect() protoreflect.Message
func (*GetFileResponse) Reset ¶
func (x *GetFileResponse) Reset()
func (*GetFileResponse) String ¶
func (x *GetFileResponse) String() string
type GetFilesRequest ¶
type GetFilesRequest struct {
// contains filtered or unexported fields
}
func (*GetFilesRequest) Descriptor
deprecated
func (*GetFilesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetFilesRequest.ProtoReflect.Descriptor instead.
func (*GetFilesRequest) ProtoMessage ¶
func (*GetFilesRequest) ProtoMessage()
func (*GetFilesRequest) ProtoReflect ¶
func (x *GetFilesRequest) ProtoReflect() protoreflect.Message
func (*GetFilesRequest) Reset ¶
func (x *GetFilesRequest) Reset()
func (*GetFilesRequest) String ¶
func (x *GetFilesRequest) String() string
type GetFilesResponse ¶
type GetFilesResponse struct { Object *StorageObject `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` // contains filtered or unexported fields }
func (*GetFilesResponse) Descriptor
deprecated
func (*GetFilesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFilesResponse.ProtoReflect.Descriptor instead.
func (*GetFilesResponse) GetObject ¶
func (x *GetFilesResponse) GetObject() *StorageObject
func (*GetFilesResponse) ProtoMessage ¶
func (*GetFilesResponse) ProtoMessage()
func (*GetFilesResponse) ProtoReflect ¶
func (x *GetFilesResponse) ProtoReflect() protoreflect.Message
func (*GetFilesResponse) Reset ¶
func (x *GetFilesResponse) Reset()
func (*GetFilesResponse) String ¶
func (x *GetFilesResponse) String() string
type StorageClient ¶
type StorageClient interface { // Uploads a file in chunks UploadFile(ctx context.Context, opts ...grpc.CallOption) (Storage_UploadFileClient, error) // Downloads a file in chunks GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (Storage_GetFileClient, error) // Returns a list of all files GetFiles(ctx context.Context, in *GetFilesRequest, opts ...grpc.CallOption) (Storage_GetFilesClient, error) // Deletes a file DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*DeleteFileResponse, error) // Deletes all files DeleteFiles(ctx context.Context, in *DeleteFilesRequest, opts ...grpc.CallOption) (*DeleteFilesResponse, error) }
StorageClient is the client API for Storage service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageObject ¶
type StorageObject struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` LastModified string `protobuf:"bytes,2,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"` Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` StorageClass string `protobuf:"bytes,4,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` // contains filtered or unexported fields }
func (*StorageObject) Descriptor
deprecated
func (*StorageObject) Descriptor() ([]byte, []int)
Deprecated: Use StorageObject.ProtoReflect.Descriptor instead.
func (*StorageObject) GetKey ¶
func (x *StorageObject) GetKey() string
func (*StorageObject) GetLastModified ¶
func (x *StorageObject) GetLastModified() string
func (*StorageObject) GetSize ¶
func (x *StorageObject) GetSize() uint64
func (*StorageObject) GetStorageClass ¶
func (x *StorageObject) GetStorageClass() string
func (*StorageObject) ProtoMessage ¶
func (*StorageObject) ProtoMessage()
func (*StorageObject) ProtoReflect ¶
func (x *StorageObject) ProtoReflect() protoreflect.Message
func (*StorageObject) Reset ¶
func (x *StorageObject) Reset()
func (*StorageObject) String ¶
func (x *StorageObject) String() string
type StorageServer ¶
type StorageServer interface { // Uploads a file in chunks UploadFile(Storage_UploadFileServer) error // Downloads a file in chunks GetFile(*GetFileRequest, Storage_GetFileServer) error // Returns a list of all files GetFiles(*GetFilesRequest, Storage_GetFilesServer) error // Deletes a file DeleteFile(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error) // Deletes all files DeleteFiles(context.Context, *DeleteFilesRequest) (*DeleteFilesResponse, error) }
StorageServer is the server API for Storage service.
type Storage_GetFileClient ¶
type Storage_GetFileClient interface { Recv() (*GetFileResponse, error) grpc.ClientStream }
type Storage_GetFileServer ¶
type Storage_GetFileServer interface { Send(*GetFileResponse) error grpc.ServerStream }
type Storage_GetFilesClient ¶
type Storage_GetFilesClient interface { Recv() (*GetFilesResponse, error) grpc.ClientStream }
type Storage_GetFilesServer ¶
type Storage_GetFilesServer interface { Send(*GetFilesResponse) error grpc.ServerStream }
type Storage_UploadFileClient ¶
type Storage_UploadFileClient interface { Send(*UploadFileRequest) error CloseAndRecv() (*UploadFileResponse, error) grpc.ClientStream }
type Storage_UploadFileServer ¶
type Storage_UploadFileServer interface { SendAndClose(*UploadFileResponse) error Recv() (*UploadFileRequest, error) grpc.ServerStream }
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct { }
UnimplementedStorageServer can be embedded to have forward compatible implementations.
func (*UnimplementedStorageServer) DeleteFile ¶
func (*UnimplementedStorageServer) DeleteFile(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error)
func (*UnimplementedStorageServer) DeleteFiles ¶
func (*UnimplementedStorageServer) DeleteFiles(context.Context, *DeleteFilesRequest) (*DeleteFilesResponse, error)
func (*UnimplementedStorageServer) GetFile ¶
func (*UnimplementedStorageServer) GetFile(*GetFileRequest, Storage_GetFileServer) error
func (*UnimplementedStorageServer) GetFiles ¶
func (*UnimplementedStorageServer) GetFiles(*GetFilesRequest, Storage_GetFilesServer) error
func (*UnimplementedStorageServer) UploadFile ¶
func (*UnimplementedStorageServer) UploadFile(Storage_UploadFileServer) error
type UploadFileRequest ¶
type UploadFileRequest struct { // Types that are assignable to Data: // *UploadFileRequest_Info // *UploadFileRequest_ChunkData Data isUploadFileRequest_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
The file is divided into multiple chunks which are sent on by one to the server in each request message. oneof: specify that only one of a range of fields can be set in any message: the first request will only contain the metadata (file info)
func (*UploadFileRequest) Descriptor
deprecated
func (*UploadFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileRequest.ProtoReflect.Descriptor instead.
func (*UploadFileRequest) GetChunkData ¶
func (x *UploadFileRequest) GetChunkData() []byte
func (*UploadFileRequest) GetData ¶
func (m *UploadFileRequest) GetData() isUploadFileRequest_Data
func (*UploadFileRequest) GetInfo ¶
func (x *UploadFileRequest) GetInfo() *FileInfo
func (*UploadFileRequest) ProtoMessage ¶
func (*UploadFileRequest) ProtoMessage()
func (*UploadFileRequest) ProtoReflect ¶
func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
func (*UploadFileRequest) Reset ¶
func (x *UploadFileRequest) Reset()
func (*UploadFileRequest) String ¶
func (x *UploadFileRequest) String() string
type UploadFileRequest_ChunkData ¶
type UploadFileRequest_ChunkData struct {
ChunkData []byte `protobuf:"bytes,2,opt,name=chunk_data,json=chunkData,proto3,oneof"`
}
type UploadFileRequest_Info ¶
type UploadFileRequest_Info struct {
Info *FileInfo `protobuf:"bytes,1,opt,name=info,proto3,oneof"`
}
type UploadFileResponse ¶
type UploadFileResponse struct {
// contains filtered or unexported fields
}
func (*UploadFileResponse) Descriptor
deprecated
func (*UploadFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileResponse.ProtoReflect.Descriptor instead.
func (*UploadFileResponse) ProtoMessage ¶
func (*UploadFileResponse) ProtoMessage()
func (*UploadFileResponse) ProtoReflect ¶
func (x *UploadFileResponse) ProtoReflect() protoreflect.Message
func (*UploadFileResponse) Reset ¶
func (x *UploadFileResponse) Reset()
func (*UploadFileResponse) String ¶
func (x *UploadFileResponse) String() string