Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFileManagerServiceServer(s grpc.ServiceRegistrar, srv FileManagerServiceServer)
- type EndRequest
- func (*EndRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EndRequest) GetAuthorId() uint64
- func (x *EndRequest) GetDescription() string
- func (x *EndRequest) GetTitle() string
- func (x *EndRequest) GetUuid() uint64
- func (*EndRequest) ProtoMessage()
- func (x *EndRequest) ProtoReflect() protoreflect.Message
- func (x *EndRequest) Reset()
- func (x *EndRequest) String() string
- type EndResponse
- type FileManagerServiceClient
- type FileManagerServiceServer
- type FileType
- type GetChunk
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetChunkNumber() uint64
- func (x *ReadRequest) GetUuid() uint64
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type StartReadRequest
- func (*StartReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartReadRequest) GetChunkSize() uint64
- func (x *StartReadRequest) GetFilePath() string
- func (x *StartReadRequest) GetFileType() FileType
- func (*StartReadRequest) ProtoMessage()
- func (x *StartReadRequest) ProtoReflect() protoreflect.Message
- func (x *StartReadRequest) Reset()
- func (x *StartReadRequest) String() string
- type StartResponse
- type StartWriteRequest
- func (*StartWriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartWriteRequest) GetChunkSize() uint64
- func (x *StartWriteRequest) GetFilePath() string
- func (x *StartWriteRequest) GetFileSize() uint64
- func (x *StartWriteRequest) GetFileType() FileType
- func (*StartWriteRequest) ProtoMessage()
- func (x *StartWriteRequest) ProtoReflect() protoreflect.Message
- func (x *StartWriteRequest) Reset()
- func (x *StartWriteRequest) String() string
- type UnimplementedFileManagerServiceServer
- func (UnimplementedFileManagerServiceServer) CloseSending(context.Context, *EndRequest) (*EndResponse, error)
- func (UnimplementedFileManagerServiceServer) ReadChunk(context.Context, *ReadRequest) (*GetChunk, error)
- func (UnimplementedFileManagerServiceServer) SendChunk(context.Context, *WriteChunk) (*WriteResponse, error)
- func (UnimplementedFileManagerServiceServer) StartReading(context.Context, *StartReadRequest) (*StartResponse, error)
- func (UnimplementedFileManagerServiceServer) StartSending(context.Context, *StartWriteRequest) (*StartResponse, error)
- type UnsafeFileManagerServiceServer
- type WriteChunk
- type WriteResponse
Constants ¶
const ( FileManagerService_StartSending_FullMethodName = "/filager.FileManagerService/StartSending" FileManagerService_SendChunk_FullMethodName = "/filager.FileManagerService/SendChunk" FileManagerService_ReadChunk_FullMethodName = "/filager.FileManagerService/ReadChunk" FileManagerService_CloseSending_FullMethodName = "/filager.FileManagerService/CloseSending" FileManagerService_StartReading_FullMethodName = "/filager.FileManagerService/StartReading" )
Variables ¶
var ( FileType_name = map[int32]string{ 0: "UNDEFIGNED", 1: "DOCUMENT", 2: "IMAGE", } FileType_value = map[string]int32{ "UNDEFIGNED": 0, "DOCUMENT": 1, "IMAGE": 2, } )
Enum value maps for FileType.
var FileManagerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "filager.FileManagerService", HandlerType: (*FileManagerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "StartSending", Handler: _FileManagerService_StartSending_Handler, }, { MethodName: "SendChunk", Handler: _FileManagerService_SendChunk_Handler, }, { MethodName: "ReadChunk", Handler: _FileManagerService_ReadChunk_Handler, }, { MethodName: "CloseSending", Handler: _FileManagerService_CloseSending_Handler, }, { MethodName: "StartReading", Handler: _FileManagerService_StartReading_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "filager/file_manager.proto", }
FileManagerService_ServiceDesc is the grpc.ServiceDesc for FileManagerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_filager_file_manager_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFileManagerServiceServer ¶
func RegisterFileManagerServiceServer(s grpc.ServiceRegistrar, srv FileManagerServiceServer)
Types ¶
type EndRequest ¶
type EndRequest struct {
Uuid uint64 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
AuthorId uint64 `protobuf:"varint,4,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"`
// contains filtered or unexported fields
}
func (*EndRequest) Descriptor
deprecated
func (*EndRequest) Descriptor() ([]byte, []int)
Deprecated: Use EndRequest.ProtoReflect.Descriptor instead.
func (*EndRequest) GetAuthorId ¶
func (x *EndRequest) GetAuthorId() uint64
func (*EndRequest) GetDescription ¶
func (x *EndRequest) GetDescription() string
func (*EndRequest) GetTitle ¶
func (x *EndRequest) GetTitle() string
func (*EndRequest) GetUuid ¶
func (x *EndRequest) GetUuid() uint64
func (*EndRequest) ProtoMessage ¶
func (*EndRequest) ProtoMessage()
func (*EndRequest) ProtoReflect ¶
func (x *EndRequest) ProtoReflect() protoreflect.Message
func (*EndRequest) Reset ¶
func (x *EndRequest) Reset()
func (*EndRequest) String ¶
func (x *EndRequest) String() string
type EndResponse ¶
type EndResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// contains filtered or unexported fields
}
func (*EndResponse) Descriptor
deprecated
func (*EndResponse) Descriptor() ([]byte, []int)
Deprecated: Use EndResponse.ProtoReflect.Descriptor instead.
func (*EndResponse) GetCode ¶
func (x *EndResponse) GetCode() int32
func (*EndResponse) ProtoMessage ¶
func (*EndResponse) ProtoMessage()
func (*EndResponse) ProtoReflect ¶
func (x *EndResponse) ProtoReflect() protoreflect.Message
func (*EndResponse) Reset ¶
func (x *EndResponse) Reset()
func (*EndResponse) String ¶
func (x *EndResponse) String() string
type FileManagerServiceClient ¶
type FileManagerServiceClient interface {
StartSending(ctx context.Context, in *StartWriteRequest, opts ...grpc.CallOption) (*StartResponse, error)
SendChunk(ctx context.Context, in *WriteChunk, opts ...grpc.CallOption) (*WriteResponse, error)
ReadChunk(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*GetChunk, error)
CloseSending(ctx context.Context, in *EndRequest, opts ...grpc.CallOption) (*EndResponse, error)
StartReading(ctx context.Context, in *StartReadRequest, opts ...grpc.CallOption) (*StartResponse, error)
}
FileManagerServiceClient is the client API for FileManagerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFileManagerServiceClient ¶
func NewFileManagerServiceClient(cc grpc.ClientConnInterface) FileManagerServiceClient
type FileManagerServiceServer ¶
type FileManagerServiceServer interface {
StartSending(context.Context, *StartWriteRequest) (*StartResponse, error)
SendChunk(context.Context, *WriteChunk) (*WriteResponse, error)
ReadChunk(context.Context, *ReadRequest) (*GetChunk, error)
CloseSending(context.Context, *EndRequest) (*EndResponse, error)
StartReading(context.Context, *StartReadRequest) (*StartResponse, error)
// contains filtered or unexported methods
}
FileManagerServiceServer is the server API for FileManagerService service. All implementations must embed UnimplementedFileManagerServiceServer for forward compatibility
type FileType ¶
type FileType int32
func (FileType) Descriptor ¶
func (FileType) Descriptor() protoreflect.EnumDescriptor
func (FileType) EnumDescriptor
deprecated
func (FileType) Number ¶
func (x FileType) Number() protoreflect.EnumNumber
func (FileType) Type ¶
func (FileType) Type() protoreflect.EnumType
type GetChunk ¶
type GetChunk struct {
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*GetChunk) Descriptor
deprecated
func (*GetChunk) GetContent ¶
func (*GetChunk) ProtoMessage ¶
func (*GetChunk) ProtoMessage()
func (*GetChunk) ProtoReflect ¶
func (x *GetChunk) ProtoReflect() protoreflect.Message
type ReadRequest ¶
type ReadRequest struct {
Uuid uint64 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
ChunkNumber uint64 `protobuf:"varint,2,opt,name=chunk_number,json=chunkNumber,proto3" json:"chunk_number,omitempty"`
// contains filtered or unexported fields
}
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetChunkNumber ¶
func (x *ReadRequest) GetChunkNumber() uint64
func (*ReadRequest) GetUuid ¶
func (x *ReadRequest) GetUuid() uint64
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type StartReadRequest ¶
type StartReadRequest struct {
FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
ChunkSize uint64 `protobuf:"varint,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"`
FileType FileType `protobuf:"varint,3,opt,name=file_type,json=fileType,proto3,enum=filager.FileType" json:"file_type,omitempty"`
// contains filtered or unexported fields
}
func (*StartReadRequest) Descriptor
deprecated
func (*StartReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartReadRequest.ProtoReflect.Descriptor instead.
func (*StartReadRequest) GetChunkSize ¶
func (x *StartReadRequest) GetChunkSize() uint64
func (*StartReadRequest) GetFilePath ¶
func (x *StartReadRequest) GetFilePath() string
func (*StartReadRequest) GetFileType ¶
func (x *StartReadRequest) GetFileType() FileType
func (*StartReadRequest) ProtoMessage ¶
func (*StartReadRequest) ProtoMessage()
func (*StartReadRequest) ProtoReflect ¶
func (x *StartReadRequest) ProtoReflect() protoreflect.Message
func (*StartReadRequest) Reset ¶
func (x *StartReadRequest) Reset()
func (*StartReadRequest) String ¶
func (x *StartReadRequest) String() string
type StartResponse ¶
type StartResponse struct {
Uuid uint64 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*StartResponse) Descriptor
deprecated
func (*StartResponse) Descriptor() ([]byte, []int)
Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.
func (*StartResponse) GetUuid ¶
func (x *StartResponse) GetUuid() uint64
func (*StartResponse) ProtoMessage ¶
func (*StartResponse) ProtoMessage()
func (*StartResponse) ProtoReflect ¶
func (x *StartResponse) ProtoReflect() protoreflect.Message
func (*StartResponse) Reset ¶
func (x *StartResponse) Reset()
func (*StartResponse) String ¶
func (x *StartResponse) String() string
type StartWriteRequest ¶
type StartWriteRequest struct {
FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
ChunkSize uint64 `protobuf:"varint,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"`
FileSize uint64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
FileType FileType `protobuf:"varint,4,opt,name=file_type,json=fileType,proto3,enum=filager.FileType" json:"file_type,omitempty"`
// contains filtered or unexported fields
}
func (*StartWriteRequest) Descriptor
deprecated
func (*StartWriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartWriteRequest.ProtoReflect.Descriptor instead.
func (*StartWriteRequest) GetChunkSize ¶
func (x *StartWriteRequest) GetChunkSize() uint64
func (*StartWriteRequest) GetFilePath ¶
func (x *StartWriteRequest) GetFilePath() string
func (*StartWriteRequest) GetFileSize ¶
func (x *StartWriteRequest) GetFileSize() uint64
func (*StartWriteRequest) GetFileType ¶
func (x *StartWriteRequest) GetFileType() FileType
func (*StartWriteRequest) ProtoMessage ¶
func (*StartWriteRequest) ProtoMessage()
func (*StartWriteRequest) ProtoReflect ¶
func (x *StartWriteRequest) ProtoReflect() protoreflect.Message
func (*StartWriteRequest) Reset ¶
func (x *StartWriteRequest) Reset()
func (*StartWriteRequest) String ¶
func (x *StartWriteRequest) String() string
type UnimplementedFileManagerServiceServer ¶
type UnimplementedFileManagerServiceServer struct {
}
UnimplementedFileManagerServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFileManagerServiceServer) CloseSending ¶
func (UnimplementedFileManagerServiceServer) CloseSending(context.Context, *EndRequest) (*EndResponse, error)
func (UnimplementedFileManagerServiceServer) ReadChunk ¶
func (UnimplementedFileManagerServiceServer) ReadChunk(context.Context, *ReadRequest) (*GetChunk, error)
func (UnimplementedFileManagerServiceServer) SendChunk ¶
func (UnimplementedFileManagerServiceServer) SendChunk(context.Context, *WriteChunk) (*WriteResponse, error)
func (UnimplementedFileManagerServiceServer) StartReading ¶
func (UnimplementedFileManagerServiceServer) StartReading(context.Context, *StartReadRequest) (*StartResponse, error)
func (UnimplementedFileManagerServiceServer) StartSending ¶
func (UnimplementedFileManagerServiceServer) StartSending(context.Context, *StartWriteRequest) (*StartResponse, error)
type UnsafeFileManagerServiceServer ¶
type UnsafeFileManagerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFileManagerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileManagerServiceServer will result in compilation errors.
type WriteChunk ¶
type WriteChunk struct {
Uuid uint64 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*WriteChunk) Descriptor
deprecated
func (*WriteChunk) Descriptor() ([]byte, []int)
Deprecated: Use WriteChunk.ProtoReflect.Descriptor instead.
func (*WriteChunk) GetContent ¶
func (x *WriteChunk) GetContent() []byte
func (*WriteChunk) GetUuid ¶
func (x *WriteChunk) GetUuid() uint64
func (*WriteChunk) ProtoMessage ¶
func (*WriteChunk) ProtoMessage()
func (*WriteChunk) ProtoReflect ¶
func (x *WriteChunk) ProtoReflect() protoreflect.Message
func (*WriteChunk) Reset ¶
func (x *WriteChunk) Reset()
func (*WriteChunk) String ¶
func (x *WriteChunk) String() string
type WriteResponse ¶
type WriteResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// contains filtered or unexported fields
}
func (*WriteResponse) Descriptor
deprecated
func (*WriteResponse) Descriptor() ([]byte, []int)
Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.
func (*WriteResponse) GetCode ¶
func (x *WriteResponse) GetCode() int32
func (*WriteResponse) ProtoMessage ¶
func (*WriteResponse) ProtoMessage()
func (*WriteResponse) ProtoReflect ¶
func (x *WriteResponse) ProtoReflect() protoreflect.Message
func (*WriteResponse) Reset ¶
func (x *WriteResponse) Reset()
func (*WriteResponse) String ¶
func (x *WriteResponse) String() string