Documentation ¶
Index ¶
- Variables
- func RegisterFileshareServer(s grpc.ServiceRegistrar, srv FileshareServer)
- type AcceptRequest
- func (*AcceptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AcceptRequest) GetDstPath() string
- func (x *AcceptRequest) GetFiles() []string
- func (x *AcceptRequest) GetSilent() bool
- func (x *AcceptRequest) GetTransferId() string
- func (*AcceptRequest) ProtoMessage()
- func (x *AcceptRequest) ProtoReflect() protoreflect.Message
- func (x *AcceptRequest) Reset()
- func (x *AcceptRequest) String() string
- type CancelFileRequest
- func (*CancelFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelFileRequest) GetFilePath() string
- func (x *CancelFileRequest) GetTransferId() string
- func (*CancelFileRequest) ProtoMessage()
- func (x *CancelFileRequest) ProtoReflect() protoreflect.Message
- func (x *CancelFileRequest) Reset()
- func (x *CancelFileRequest) String() string
- type CancelRequest
- type Direction
- type Empty
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetEmpty() *Empty
- func (x *Error) GetFileshareError() FileshareErrorCode
- func (m *Error) GetResponse() isError_Response
- func (x *Error) GetServiceError() ServiceErrorCode
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type Error_Empty
- type Error_FileshareError
- type Error_ServiceError
- type File
- func (*File) Descriptor() ([]byte, []int)deprecated
- func (x *File) GetChildren() map[string]*File
- func (x *File) GetFullPath() string
- func (x *File) GetId() string
- func (x *File) GetPath() string
- func (x *File) GetSize() uint64
- func (x *File) GetStatus() Status
- func (x *File) GetTransferred() uint64
- func (*File) ProtoMessage()
- func (x *File) ProtoReflect() protoreflect.Message
- func (x *File) Reset()
- func (x *File) String() string
- type FileshareClient
- type FileshareErrorCode
- func (FileshareErrorCode) Descriptor() protoreflect.EnumDescriptor
- func (x FileshareErrorCode) Enum() *FileshareErrorCode
- func (FileshareErrorCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x FileshareErrorCode) Number() protoreflect.EnumNumber
- func (x FileshareErrorCode) String() string
- func (FileshareErrorCode) Type() protoreflect.EnumType
- type FileshareServer
- type Fileshare_AcceptClient
- type Fileshare_AcceptServer
- type Fileshare_ListClient
- type Fileshare_ListServer
- type Fileshare_SendClient
- type Fileshare_SendServer
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetError() *Error
- func (x *ListResponse) GetTransfers() []*Transfer
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- type PurgeTransfersUntilRequest
- func (*PurgeTransfersUntilRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PurgeTransfersUntilRequest) GetUntil() *timestamppb.Timestamp
- func (*PurgeTransfersUntilRequest) ProtoMessage()
- func (x *PurgeTransfersUntilRequest) ProtoReflect() protoreflect.Message
- func (x *PurgeTransfersUntilRequest) Reset()
- func (x *PurgeTransfersUntilRequest) String() string
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetPaths() []string
- func (x *SendRequest) GetPeer() string
- func (x *SendRequest) GetSilent() bool
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type ServiceErrorCode
- func (ServiceErrorCode) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceErrorCode) Enum() *ServiceErrorCode
- func (ServiceErrorCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceErrorCode) Number() protoreflect.EnumNumber
- func (x ServiceErrorCode) String() string
- func (ServiceErrorCode) Type() protoreflect.EnumType
- type SetNotificationsRequest
- func (*SetNotificationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetNotificationsRequest) GetEnable() bool
- func (*SetNotificationsRequest) ProtoMessage()
- func (x *SetNotificationsRequest) ProtoReflect() protoreflect.Message
- func (x *SetNotificationsRequest) Reset()
- func (x *SetNotificationsRequest) String() string
- type SetNotificationsResponse
- func (*SetNotificationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetNotificationsResponse) GetStatus() SetNotificationsStatus
- func (*SetNotificationsResponse) ProtoMessage()
- func (x *SetNotificationsResponse) ProtoReflect() protoreflect.Message
- func (x *SetNotificationsResponse) Reset()
- func (x *SetNotificationsResponse) String() string
- type SetNotificationsStatus
- func (SetNotificationsStatus) Descriptor() protoreflect.EnumDescriptor
- func (x SetNotificationsStatus) Enum() *SetNotificationsStatus
- func (SetNotificationsStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x SetNotificationsStatus) Number() protoreflect.EnumNumber
- func (x SetNotificationsStatus) String() string
- func (SetNotificationsStatus) Type() protoreflect.EnumType
- type Status
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatusResponse) GetError() *Error
- func (x *StatusResponse) GetProgress() uint32
- func (x *StatusResponse) GetStatus() Status
- func (x *StatusResponse) GetTransferId() string
- func (*StatusResponse) ProtoMessage()
- func (x *StatusResponse) ProtoReflect() protoreflect.Message
- func (x *StatusResponse) Reset()
- func (x *StatusResponse) String() string
- type Transfer
- func (*Transfer) Descriptor() ([]byte, []int)deprecated
- func (x *Transfer) GetCreated() *timestamppb.Timestamp
- func (x *Transfer) GetDirection() Direction
- func (x *Transfer) GetFiles() []*File
- func (x *Transfer) GetId() string
- func (x *Transfer) GetPath() string
- func (x *Transfer) GetPeer() string
- func (x *Transfer) GetStatus() Status
- func (x *Transfer) GetTotalSize() uint64
- func (x *Transfer) GetTotalTransferred() uint64
- func (*Transfer) ProtoMessage()
- func (x *Transfer) ProtoReflect() protoreflect.Message
- func (x *Transfer) Reset()
- func (x *Transfer) String() string
- type UnimplementedFileshareServer
- func (UnimplementedFileshareServer) Accept(*AcceptRequest, Fileshare_AcceptServer) error
- func (UnimplementedFileshareServer) Cancel(context.Context, *CancelRequest) (*Error, error)
- func (UnimplementedFileshareServer) CancelFile(context.Context, *CancelFileRequest) (*Error, error)
- func (UnimplementedFileshareServer) List(*Empty, Fileshare_ListServer) error
- func (UnimplementedFileshareServer) Ping(context.Context, *Empty) (*Empty, error)
- func (UnimplementedFileshareServer) PurgeTransfersUntil(context.Context, *PurgeTransfersUntilRequest) (*Error, error)
- func (UnimplementedFileshareServer) Send(*SendRequest, Fileshare_SendServer) error
- func (UnimplementedFileshareServer) SetNotifications(context.Context, *SetNotificationsRequest) (*SetNotificationsResponse, error)
- func (UnimplementedFileshareServer) Stop(context.Context, *Empty) (*Empty, error)
- type UnsafeFileshareServer
Constants ¶
This section is empty.
Variables ¶
var ( ServiceErrorCode_name = map[int32]string{ 0: "MESH_NOT_ENABLED", 1: "INTERNAL_FAILURE", } ServiceErrorCode_value = map[string]int32{ "MESH_NOT_ENABLED": 0, "INTERNAL_FAILURE": 1, } )
Enum value maps for ServiceErrorCode.
var (0: "LIB_FAILURE", 1: "TRANSFER_NOT_FOUND", 2: "INVALID_PEER", 3: "FILE_NOT_FOUND", 5: "ACCEPT_ALL_FILES_FAILED", 6: "ACCEPT_OUTGOING", 7: "ALREADY_ACCEPTED", 8: "FILE_INVALIDATED", 9: "TRANSFER_INVALIDATED", 10: "TOO_MANY_FILES", 11: "DIRECTORY_TOO_DEEP", 12: "SENDING_NOT_ALLOWED", 13: "PEER_DISCONNECTED", 14: "FILE_NOT_IN_PROGRESS", 15: "TRANSFER_NOT_CREATED", 16: "NOT_ENOUGH_SPACE", 17: "ACCEPT_DIR_NOT_FOUND", 18: "ACCEPT_DIR_IS_A_SYMLINK", 19: "ACCEPT_DIR_IS_NOT_A_DIRECTORY", 20: "NO_FILES", 21: "ACCEPT_DIR_NO_PERMISSIONS", 22: "PURGE_FAILURE", } "LIB_FAILURE": 0, "TRANSFER_NOT_FOUND": 1, "INVALID_PEER": 2, "FILE_NOT_FOUND": 3, "ACCEPT_ALL_FILES_FAILED": 5, "ACCEPT_OUTGOING": 6, "ALREADY_ACCEPTED": 7, "FILE_INVALIDATED": 8, "TRANSFER_INVALIDATED": 9, "TOO_MANY_FILES": 10, "DIRECTORY_TOO_DEEP": 11, "SENDING_NOT_ALLOWED": 12, "PEER_DISCONNECTED": 13, "FILE_NOT_IN_PROGRESS": 14, "TRANSFER_NOT_CREATED": 15, "NOT_ENOUGH_SPACE": 16, "ACCEPT_DIR_NOT_FOUND": 17, "ACCEPT_DIR_IS_A_SYMLINK": 18, "ACCEPT_DIR_IS_NOT_A_DIRECTORY": 19, "NO_FILES": 20, "ACCEPT_DIR_NO_PERMISSIONS": 21, "PURGE_FAILURE": 22, } )
Enum value maps for FileshareErrorCode.
var ( SetNotificationsStatus_name = map[int32]string{ 0: "SET_SUCCESS", 1: "NOTHING_TO_DO", 2: "SET_FAILURE", } SetNotificationsStatus_value = map[string]int32{ "SET_SUCCESS": 0, "NOTHING_TO_DO": 1, "SET_FAILURE": 2, } )
Enum value maps for SetNotificationsStatus.
var ( Direction_name = map[int32]string{ 0: "UNKNOWN_DIRECTION", 1: "INCOMING", 2: "OUTGOING", } Direction_value = map[string]int32{ "UNKNOWN_DIRECTION": 0, "INCOMING": 1, "OUTGOING": 2, } )
Enum value maps for Direction.
var ( Status_name = map[int32]string{ 0: "SUCCESS", 1: "CANCELED", 2: "BAD_PATH", 3: "BAD_FILE", 4: "TRANSPORT", 5: "BAD_STATUS", 6: "SERVICE_STOP", 7: "BAD_TRANSFER", 8: "BAD_TRANSFER_STATE", 9: "BAD_FILE_ID", 10: "BAD_SYSTEM_TIME", 11: "TRUNCATED_FILE", 12: "EVENT_SEND", 13: "BAD_UUID", 14: "CHANNEL_CLOSED", 15: "IO", 16: "DATA_SEND", 17: "DIRECTORY_NOT_EXPECTED", 18: "EMPTY_TRANSFER", 19: "TRANSFER_CLOSED_BY_PEER", 20: "TRANSFER_LIMITS_EXCEEDED", 21: "MISMATCHED_SIZE", 22: "UNEXPECTED_DATA", 23: "INVALID_ARGUMENT", 24: "TRANSFER_TIMEOUT", 25: "WS_SERVER", 26: "WS_CLIENT", 28: "FILE_MODIFIED", 29: "FILENAME_TOO_LONG", 30: "AUTHENTICATION_FAILED", 33: "FILE_CHECKSUM_MISMATCH", 34: "FILE_REJECTED", 100: "REQUESTED", 101: "ONGOING", 102: "FINISHED_WITH_ERRORS", 103: "ACCEPT_FAILURE", 104: "CANCELED_BY_PEER", 105: "INTERRUPTED", 106: "PAUSED", 107: "PENDING", } Status_value = map[string]int32{ "SUCCESS": 0, "CANCELED": 1, "BAD_PATH": 2, "BAD_FILE": 3, "TRANSPORT": 4, "BAD_STATUS": 5, "SERVICE_STOP": 6, "BAD_TRANSFER": 7, "BAD_TRANSFER_STATE": 8, "BAD_FILE_ID": 9, "BAD_SYSTEM_TIME": 10, "TRUNCATED_FILE": 11, "EVENT_SEND": 12, "BAD_UUID": 13, "CHANNEL_CLOSED": 14, "IO": 15, "DATA_SEND": 16, "DIRECTORY_NOT_EXPECTED": 17, "EMPTY_TRANSFER": 18, "TRANSFER_CLOSED_BY_PEER": 19, "TRANSFER_LIMITS_EXCEEDED": 20, "MISMATCHED_SIZE": 21, "UNEXPECTED_DATA": 22, "INVALID_ARGUMENT": 23, "TRANSFER_TIMEOUT": 24, "WS_SERVER": 25, "WS_CLIENT": 26, "FILE_MODIFIED": 28, "FILENAME_TOO_LONG": 29, "AUTHENTICATION_FAILED": 30, "FILE_CHECKSUM_MISMATCH": 33, "FILE_REJECTED": 34, "REQUESTED": 100, "ONGOING": 101, "FINISHED_WITH_ERRORS": 102, "ACCEPT_FAILURE": 103, "CANCELED_BY_PEER": 104, "INTERRUPTED": 105, "PAUSED": 106, "PENDING": 107, } )
Enum value maps for Status.
var File_transfer_proto protoreflect.FileDescriptor
FileshareServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Fileshare_Ping_Handler, }, { MethodName: "Stop", Handler: _Fileshare_Stop_Handler, }, { MethodName: "Cancel", Handler: _Fileshare_Cancel_Handler, }, { MethodName: "CancelFile", Handler: _Fileshare_CancelFile_Handler, }, { MethodName: "SetNotifications", Handler: _Fileshare_SetNotifications_Handler, }, { MethodName: "PurgeTransfersUntil", Handler: _Fileshare_PurgeTransfersUntil_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Send", Handler: _Fileshare_Send_Handler, ServerStreams: true, }, { StreamName: "Accept", Handler: _Fileshare_Accept_Handler, ServerStreams: true, }, { StreamName: "List", Handler: _Fileshare_List_Handler, ServerStreams: true, }, }, Metadata: "service.proto", }ServiceName: "filesharepb.Fileshare", HandlerType: (*
Fileshare_ServiceDesc is the grpc.ServiceDesc for Fileshare service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFileshareServer ¶
func RegisterFileshareServer(s grpc.ServiceRegistrar, srv FileshareServer)
Types ¶
type AcceptRequest ¶
type AcceptRequest struct { TransferId string `protobuf:"bytes,1,opt,name=transfer_id,json=transferId,proto3" json:"transfer_id,omitempty"` // ID taken from TransferRequested libdrop event DstPath string `protobuf:"bytes,2,opt,name=dst_path,json=dstPath,proto3" json:"dst_path,omitempty"` // Directory to store the received files Silent bool `protobuf:"varint,3,opt,name=silent,proto3" json:"silent,omitempty"` // Do transfer in background (true) or Report progress info back (false) Files []string `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"` // A list of specific files to be accepted // contains filtered or unexported fields }
func (*AcceptRequest) Descriptor
deprecated
func (*AcceptRequest) Descriptor() ([]byte, []int)
Deprecated: Use AcceptRequest.ProtoReflect.Descriptor instead.
func (*AcceptRequest) GetDstPath ¶
func (x *AcceptRequest) GetDstPath() string
func (*AcceptRequest) GetFiles ¶
func (x *AcceptRequest) GetFiles() []string
func (*AcceptRequest) GetSilent ¶
func (x *AcceptRequest) GetSilent() bool
func (*AcceptRequest) GetTransferId ¶
func (x *AcceptRequest) GetTransferId() string
func (*AcceptRequest) ProtoMessage ¶
func (*AcceptRequest) ProtoMessage()
func (*AcceptRequest) ProtoReflect ¶
func (x *AcceptRequest) ProtoReflect() protoreflect.Message
func (*AcceptRequest) Reset ¶
func (x *AcceptRequest) Reset()
func (*AcceptRequest) String ¶
func (x *AcceptRequest) String() string
type CancelFileRequest ¶
type CancelFileRequest struct { TransferId string `protobuf:"bytes,1,opt,name=transfer_id,json=transferId,proto3" json:"transfer_id,omitempty"` // ID taken from TransferRequested libdrop event FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` // Relative path, must match path in TransferRequested event // contains filtered or unexported fields }
func (*CancelFileRequest) Descriptor
deprecated
func (*CancelFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelFileRequest.ProtoReflect.Descriptor instead.
func (*CancelFileRequest) GetFilePath ¶
func (x *CancelFileRequest) GetFilePath() string
func (*CancelFileRequest) GetTransferId ¶
func (x *CancelFileRequest) GetTransferId() string
func (*CancelFileRequest) ProtoMessage ¶
func (*CancelFileRequest) ProtoMessage()
func (*CancelFileRequest) ProtoReflect ¶
func (x *CancelFileRequest) ProtoReflect() protoreflect.Message
func (*CancelFileRequest) Reset ¶
func (x *CancelFileRequest) Reset()
func (*CancelFileRequest) String ¶
func (x *CancelFileRequest) String() string
type CancelRequest ¶
type CancelRequest struct { TransferId string `protobuf:"bytes,1,opt,name=transfer_id,json=transferId,proto3" json:"transfer_id,omitempty"` // ID taken from TransferRequested libdrop event // contains filtered or unexported fields }
func (*CancelRequest) Descriptor
deprecated
func (*CancelRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead.
func (*CancelRequest) GetTransferId ¶
func (x *CancelRequest) GetTransferId() string
func (*CancelRequest) ProtoMessage ¶
func (*CancelRequest) ProtoMessage()
func (*CancelRequest) ProtoReflect ¶
func (x *CancelRequest) ProtoReflect() protoreflect.Message
func (*CancelRequest) Reset ¶
func (x *CancelRequest) Reset()
func (*CancelRequest) String ¶
func (x *CancelRequest) String() string
type Direction ¶
type Direction int32
func (Direction) Descriptor ¶
func (Direction) Descriptor() protoreflect.EnumDescriptor
func (Direction) EnumDescriptor
deprecated
func (Direction) Number ¶
func (x Direction) Number() protoreflect.EnumNumber
func (Direction) Type ¶
func (Direction) Type() protoreflect.EnumType
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Used when there is no error or there is no data to be sent
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct { // Types that are assignable to Response: // // *Error_Empty // *Error_ServiceError // *Error_FileshareError Response isError_Response `protobuf_oneof:"response"` // contains filtered or unexported fields }
Generic error to be used through all responses. If empty then no error occurred. If there's no data to be returned then this can be used as a response type, otherwise it should be included as a field in the response. Response handlers should always firstly check whether error is Empty (like Go err != nil check)
Previously (in meshnet) we have used oneof to either return data or an error. But the problem with oneof is that when it is used the same messages are returned as different types (SendResponse_FileshareResponse and ReceiveResponse_FileshareResponse for example). Because of that we couldn't DRY their handling and that resulted in lots of almost duplicate code.
func (*Error) Descriptor
deprecated
func (*Error) GetFileshareError ¶
func (x *Error) GetFileshareError() FileshareErrorCode
func (*Error) GetResponse ¶
func (m *Error) GetResponse() isError_Response
func (*Error) GetServiceError ¶
func (x *Error) GetServiceError() ServiceErrorCode
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Error_Empty ¶
type Error_Empty struct {
Empty *Empty `protobuf:"bytes,1,opt,name=empty,proto3,oneof"`
}
type Error_FileshareError ¶
type Error_FileshareError struct {
}type Error_ServiceError ¶
type Error_ServiceError struct {
ServiceError ServiceErrorCode `protobuf:"varint,2,opt,name=service_error,json=serviceError,proto3,enum=filesharepb.ServiceErrorCode,oneof"`
}
type File ¶
type File struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"` // Used for display and user input. Can be just file name, or relative to a dir that is sent. FullPath string `protobuf:"bytes,7,opt,name=fullPath,proto3" json:"fullPath,omitempty"` // Absolute path Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Transferred uint64 `protobuf:"varint,3,opt,name=transferred,proto3" json:"transferred,omitempty"` Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=filesharepb.Status" json:"status,omitempty"` // Received from the events for specific set of files // Not used anymore, file lists should always be flat, kept for history file compatibility Children map[string]*File `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) GetChildren ¶
func (*File) GetFullPath ¶
func (*File) GetTransferred ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileshareClient ¶
type FileshareClient interface { context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (Fileshare_SendClient, error) Accept(ctx context.Context, in *AcceptRequest, opts ...grpc.CallOption) (Fileshare_AcceptClient, error) Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*Error, error) List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Fileshare_ListClient, error) CancelFile(ctx context.Context, in *CancelFileRequest, opts ...grpc.CallOption) (*Error, error) SetNotifications(ctx context.Context, in *SetNotificationsRequest, opts ...grpc.CallOption) (*SetNotificationsResponse, error) PurgeTransfersUntil(ctx context.Context, in *PurgeTransfersUntilRequest, opts ...grpc.CallOption) (*Error, error) }Ping(ctx
FileshareClient is the client API for Fileshare 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 NewFileshareClient ¶
func NewFileshareClient(cc grpc.ClientConnInterface) FileshareClient
type FileshareErrorCode ¶
type FileshareErrorCode int32
FileshareErrorCode defines a set of fileshare specific error codes.
const ()
func (FileshareErrorCode) Descriptor ¶
func (FileshareErrorCode) Descriptor() protoreflect.EnumDescriptor
func (FileshareErrorCode) Enum ¶
func (x FileshareErrorCode) Enum() *FileshareErrorCode
func (FileshareErrorCode) EnumDescriptor
deprecated
func (FileshareErrorCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use FileshareErrorCode.Descriptor instead.
func (FileshareErrorCode) Number ¶
func (x FileshareErrorCode) Number() protoreflect.EnumNumber
func (FileshareErrorCode) String ¶
func (x FileshareErrorCode) String() string
func (FileshareErrorCode) Type ¶
func (FileshareErrorCode) Type() protoreflect.EnumType
type FileshareServer ¶
type FileshareServer interface { context.Context, *Empty) (*Empty, error) Stop(context.Context, *Empty) (*Empty, error) Send(*SendRequest, Fileshare_SendServer) error Accept(*AcceptRequest, Fileshare_AcceptServer) error Cancel(context.Context, *CancelRequest) (*Error, error) List(*Empty, Fileshare_ListServer) error CancelFile(context.Context, *CancelFileRequest) (*Error, error) SetNotifications(context.Context, *SetNotificationsRequest) (*SetNotificationsResponse, error) PurgeTransfersUntil(context.Context, *PurgeTransfersUntilRequest) (*Error, error) // contains filtered or unexported methods }Ping(
FileshareServer is the server API for Fileshare service. All implementations must embed UnimplementedFileshareServer for forward compatibility
type Fileshare_AcceptClient ¶
type Fileshare_AcceptClient interface { grpc.ClientStream }
type Fileshare_AcceptServer ¶
type Fileshare_AcceptServer interface { grpc.ServerStream }
type Fileshare_ListClient ¶
type Fileshare_ListClient interface { grpc.ClientStream }
type Fileshare_ListServer ¶
type Fileshare_ListServer interface { grpc.ServerStream }
type Fileshare_SendClient ¶
type Fileshare_SendClient interface { grpc.ClientStream }
type Fileshare_SendServer ¶
type Fileshare_SendServer interface { grpc.ServerStream }
type ListResponse ¶
type ListResponse struct { Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // Transfers are sorted by creation date from oldest to newest Transfers []*Transfer `protobuf:"bytes,2,rep,name=transfers,proto3" json:"transfers,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetError ¶
func (x *ListResponse) GetError() *Error
func (*ListResponse) GetTransfers ¶
func (x *ListResponse) GetTransfers() []*Transfer
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type PurgeTransfersUntilRequest ¶
type PurgeTransfersUntilRequest struct { Until *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=until,proto3" json:"until,omitempty"` // contains filtered or unexported fields }
func (*PurgeTransfersUntilRequest) Descriptor
deprecated
func (*PurgeTransfersUntilRequest) Descriptor() ([]byte, []int)
Deprecated: Use PurgeTransfersUntilRequest.ProtoReflect.Descriptor instead.
func (*PurgeTransfersUntilRequest) GetUntil ¶
func (x *PurgeTransfersUntilRequest) GetUntil() *timestamppb.Timestamp
func (*PurgeTransfersUntilRequest) ProtoMessage ¶
func (*PurgeTransfersUntilRequest) ProtoMessage()
func (*PurgeTransfersUntilRequest) ProtoReflect ¶
func (x *PurgeTransfersUntilRequest) ProtoReflect() protoreflect.Message
func (*PurgeTransfersUntilRequest) Reset ¶
func (x *PurgeTransfersUntilRequest) Reset()
func (*PurgeTransfersUntilRequest) String ¶
func (x *PurgeTransfersUntilRequest) String() string
type SendRequest ¶
type SendRequest struct { Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` // IP to which the request will be sent Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` // Absolute path of the file or dir to be sent Silent bool `protobuf:"varint,3,opt,name=silent,proto3" json:"silent,omitempty"` // Do transfer in background (true) or Report progress info back (false) // contains filtered or unexported fields }
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetPaths ¶
func (x *SendRequest) GetPaths() []string
func (*SendRequest) GetPeer ¶
func (x *SendRequest) GetPeer() string
func (*SendRequest) GetSilent ¶
func (x *SendRequest) GetSilent() bool
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type ServiceErrorCode ¶
type ServiceErrorCode int32
ServiceErrorCode defines a set of error codes whose handling does not depend on any specific command used.
const ( ServiceErrorCode_MESH_NOT_ENABLED ServiceErrorCode = 0 ServiceErrorCode_INTERNAL_FAILURE ServiceErrorCode = 1 )
func (ServiceErrorCode) Descriptor ¶
func (ServiceErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ServiceErrorCode) Enum ¶
func (x ServiceErrorCode) Enum() *ServiceErrorCode
func (ServiceErrorCode) EnumDescriptor
deprecated
func (ServiceErrorCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceErrorCode.Descriptor instead.
func (ServiceErrorCode) Number ¶
func (x ServiceErrorCode) Number() protoreflect.EnumNumber
func (ServiceErrorCode) String ¶
func (x ServiceErrorCode) String() string
func (ServiceErrorCode) Type ¶
func (ServiceErrorCode) Type() protoreflect.EnumType
type SetNotificationsRequest ¶
type SetNotificationsRequest struct { Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` // contains filtered or unexported fields }
func (*SetNotificationsRequest) Descriptor
deprecated
func (*SetNotificationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetNotificationsRequest.ProtoReflect.Descriptor instead.
func (*SetNotificationsRequest) GetEnable ¶
func (x *SetNotificationsRequest) GetEnable() bool
func (*SetNotificationsRequest) ProtoMessage ¶
func (*SetNotificationsRequest) ProtoMessage()
func (*SetNotificationsRequest) ProtoReflect ¶
func (x *SetNotificationsRequest) ProtoReflect() protoreflect.Message
func (*SetNotificationsRequest) Reset ¶
func (x *SetNotificationsRequest) Reset()
func (*SetNotificationsRequest) String ¶
func (x *SetNotificationsRequest) String() string
type SetNotificationsResponse ¶
type SetNotificationsResponse struct { Status SetNotificationsStatus `protobuf:"varint,1,opt,name=status,proto3,enum=filesharepb.SetNotificationsStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*SetNotificationsResponse) Descriptor
deprecated
func (*SetNotificationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetNotificationsResponse.ProtoReflect.Descriptor instead.
func (*SetNotificationsResponse) GetStatus ¶
func (x *SetNotificationsResponse) GetStatus() SetNotificationsStatus
func (*SetNotificationsResponse) ProtoMessage ¶
func (*SetNotificationsResponse) ProtoMessage()
func (*SetNotificationsResponse) ProtoReflect ¶
func (x *SetNotificationsResponse) ProtoReflect() protoreflect.Message
func (*SetNotificationsResponse) Reset ¶
func (x *SetNotificationsResponse) Reset()
func (*SetNotificationsResponse) String ¶
func (x *SetNotificationsResponse) String() string
type SetNotificationsStatus ¶
type SetNotificationsStatus int32
const ( SetNotificationsStatus_SET_SUCCESS SetNotificationsStatus = 0 SetNotificationsStatus_NOTHING_TO_DO SetNotificationsStatus = 1 SetNotificationsStatus_SET_FAILURE SetNotificationsStatus = 2 )
func (SetNotificationsStatus) Descriptor ¶
func (SetNotificationsStatus) Descriptor() protoreflect.EnumDescriptor
func (SetNotificationsStatus) Enum ¶
func (x SetNotificationsStatus) Enum() *SetNotificationsStatus
func (SetNotificationsStatus) EnumDescriptor
deprecated
func (SetNotificationsStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use SetNotificationsStatus.Descriptor instead.
func (SetNotificationsStatus) Number ¶
func (x SetNotificationsStatus) Number() protoreflect.EnumNumber
func (SetNotificationsStatus) String ¶
func (x SetNotificationsStatus) String() string
func (SetNotificationsStatus) Type ¶
func (SetNotificationsStatus) Type() protoreflect.EnumType
type Status ¶
type Status int32
const ( // Libdrop statuses for finished transfers Status_SUCCESS Status = 0 Status_CANCELED Status = 1 Status_BAD_PATH Status = 2 Status_BAD_FILE Status = 3 Status_TRANSPORT Status = 4 // unused Status_BAD_STATUS Status = 5 // unused Status_SERVICE_STOP Status = 6 Status_BAD_TRANSFER Status = 7 Status_BAD_TRANSFER_STATE Status = 8 Status_BAD_FILE_ID Status = 9 Status_BAD_SYSTEM_TIME Status = 10 // unused Status_TRUNCATED_FILE Status = 11 // unused Status_EVENT_SEND Status = 12 // unused Status_BAD_UUID Status = 13 // unused Status_CHANNEL_CLOSED Status = 14 // unused Status_IO Status = 15 Status_DATA_SEND Status = 16 // unused Status_DIRECTORY_NOT_EXPECTED Status = 17 Status_EMPTY_TRANSFER Status = 18 // unused Status_TRANSFER_CLOSED_BY_PEER Status = 19 // unused Status_TRANSFER_LIMITS_EXCEEDED Status = 20 Status_MISMATCHED_SIZE Status = 21 Status_UNEXPECTED_DATA Status = 22 Status_INVALID_ARGUMENT Status = 23 // unused Status_TRANSFER_TIMEOUT Status = 24 Status_WS_SERVER Status = 25 Status_WS_CLIENT Status = 26 // UNUSED = 27; Status_FILE_MODIFIED Status = 28 Status_FILENAME_TOO_LONG Status = 29 Status_AUTHENTICATION_FAILED Status = 30 Status_FILE_CHECKSUM_MISMATCH Status = 33 Status_FILE_REJECTED Status = 34 // Internally defined statuses for unfinished transfers Status_REQUESTED Status = 100 Status_ONGOING Status = 101 Status_FINISHED_WITH_ERRORS Status = 102 Status_ACCEPT_FAILURE Status = 103 Status_CANCELED_BY_PEER Status = 104 Status_INTERRUPTED Status = 105 Status_PAUSED Status = 106 Status_PENDING Status = 107 )
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type StatusResponse ¶
type StatusResponse struct { Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` TransferId string `protobuf:"bytes,2,opt,name=transfer_id,json=transferId,proto3" json:"transfer_id,omitempty"` // Newly created transfer's ID Progress uint32 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` // Transfer progress percent Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=filesharepb.Status" json:"status,omitempty"` // Transfer status // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetError ¶
func (x *StatusResponse) GetError() *Error
func (*StatusResponse) GetProgress ¶
func (x *StatusResponse) GetProgress() uint32
func (*StatusResponse) GetStatus ¶
func (x *StatusResponse) GetStatus() Status
func (*StatusResponse) GetTransferId ¶
func (x *StatusResponse) GetTransferId() string
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type Transfer ¶
type Transfer struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Direction Direction `protobuf:"varint,2,opt,name=direction,proto3,enum=filesharepb.Direction" json:"direction,omitempty"` Peer string `protobuf:"bytes,3,opt,name=peer,proto3" json:"peer,omitempty"` Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=filesharepb.Status" json:"status,omitempty"` // Calculated from status of all files in the transfer Created *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"` Files []*File `protobuf:"bytes,6,rep,name=files,proto3" json:"files,omitempty"` // For outgoing transfers the user provided path to be sent // For incoming transfers path where the files will be downloaded to Path string `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"` TotalSize uint64 `protobuf:"varint,8,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` TotalTransferred uint64 `protobuf:"varint,9,opt,name=total_transferred,json=totalTransferred,proto3" json:"total_transferred,omitempty"` // contains filtered or unexported fields }
func (*Transfer) Descriptor
deprecated
func (*Transfer) GetCreated ¶
func (x *Transfer) GetCreated() *timestamppb.Timestamp
func (*Transfer) GetDirection ¶
func (*Transfer) GetTotalSize ¶
func (*Transfer) GetTotalTransferred ¶
func (*Transfer) ProtoMessage ¶
func (*Transfer) ProtoMessage()
func (*Transfer) ProtoReflect ¶
func (x *Transfer) ProtoReflect() protoreflect.Message
type UnimplementedFileshareServer ¶
type UnimplementedFileshareServer struct { }
UnimplementedFileshareServer must be embedded to have forward compatible implementations.
func (UnimplementedFileshareServer) Accept ¶
func (UnimplementedFileshareServer) Accept(*AcceptRequest, Fileshare_AcceptServer) error
func (UnimplementedFileshareServer) Cancel ¶
func (UnimplementedFileshareServer) Cancel(context.Context, *CancelRequest) (*Error, error)
func (UnimplementedFileshareServer) CancelFile ¶
func (UnimplementedFileshareServer) CancelFile(context.Context, *CancelFileRequest) (*Error, error)
func (UnimplementedFileshareServer) List ¶
func (UnimplementedFileshareServer) List(*Empty, Fileshare_ListServer) error
func (UnimplementedFileshareServer) PurgeTransfersUntil ¶
func (UnimplementedFileshareServer) PurgeTransfersUntil(context.Context, *PurgeTransfersUntilRequest) (*Error, error)
func (UnimplementedFileshareServer) Send ¶
func (UnimplementedFileshareServer) Send(*SendRequest, Fileshare_SendServer) error
func (UnimplementedFileshareServer) SetNotifications ¶
func (UnimplementedFileshareServer) SetNotifications(context.Context, *SetNotificationsRequest) (*SetNotificationsResponse, error)
type UnsafeFileshareServer ¶
type UnsafeFileshareServer interface {
// contains filtered or unexported methods
}
UnsafeFileshareServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileshareServer will result in compilation errors.