filetransfer

package
v2.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileService_UploadFile_FullMethodName = "/filetransfer.FileService/UploadFile"
)

Variables

View Source
var FileService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "filetransfer.FileService",
	HandlerType: (*FileServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UploadFile",
			Handler:    _FileService_UploadFile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "filetransfer.proto",
}

FileService_ServiceDesc is the grpc.ServiceDesc for FileService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_filetransfer_proto protoreflect.FileDescriptor

Functions

func RegisterFileServiceServer

func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)

Types

type FileServiceClient

type FileServiceClient interface {
	// RPC to upload a file
	UploadFile(ctx context.Context, in *UploadFileRequest, opts ...grpc.CallOption) (*UploadFileResponse, error)
}

FileServiceClient is the client API for FileService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type FileServiceServer

type FileServiceServer interface {
	// RPC to upload a file
	UploadFile(context.Context, *UploadFileRequest) (*UploadFileResponse, error)
	// contains filtered or unexported methods
}

FileServiceServer is the server API for FileService service. All implementations must embed UnimplementedFileServiceServer for forward compatibility

type UnimplementedFileServiceServer

type UnimplementedFileServiceServer struct {
}

UnimplementedFileServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFileServiceServer) UploadFile

type UnsafeFileServiceServer

type UnsafeFileServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileServiceServer will result in compilation errors.

type UploadFileRequest

type UploadFileRequest struct {
	FileName    string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`          // Name of the file being uploaded
	FileContent []byte `protobuf:"bytes,2,opt,name=file_content,json=fileContent,proto3" json:"file_content,omitempty"` // Contents of the file as bytes
	// contains filtered or unexported fields
}

The request message containing the file bytes

func (*UploadFileRequest) Descriptor deprecated

func (*UploadFileRequest) Descriptor() ([]byte, []int)

Deprecated: Use UploadFileRequest.ProtoReflect.Descriptor instead.

func (*UploadFileRequest) GetFileContent

func (x *UploadFileRequest) GetFileContent() []byte

func (*UploadFileRequest) GetFileName

func (x *UploadFileRequest) GetFileName() string

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 UploadFileResponse

type UploadFileResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Indicates if the upload was successful
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`  // Additional message (e.g., error message)
	// contains filtered or unexported fields
}

The response message confirming the upload

func (*UploadFileResponse) Descriptor deprecated

func (*UploadFileResponse) Descriptor() ([]byte, []int)

Deprecated: Use UploadFileResponse.ProtoReflect.Descriptor instead.

func (*UploadFileResponse) GetMessage

func (x *UploadFileResponse) GetMessage() string

func (*UploadFileResponse) GetSuccess

func (x *UploadFileResponse) GetSuccess() bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL