pb

package
v0.0.0-...-5eba11c Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var (
	FileshareErrorCode_name = map[int32]string{
		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",
	}
	FileshareErrorCode_value = map[string]int32{
		"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.

View Source
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.

View Source
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.

View Source
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.

View Source
var File_fileshare_proto protoreflect.FileDescriptor
View Source
var File_transfer_proto protoreflect.FileDescriptor
View Source
var Fileshare_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "filesharepb.Fileshare",
	HandlerType: (*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",
}

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
const (
	Direction_UNKNOWN_DIRECTION Direction = 0
	Direction_INCOMING          Direction = 1
	Direction_OUTGOING          Direction = 2
)

func (Direction) Descriptor

func (Direction) Descriptor() protoreflect.EnumDescriptor

func (Direction) Enum

func (x Direction) Enum() *Direction

func (Direction) EnumDescriptor deprecated

func (Direction) EnumDescriptor() ([]byte, []int)

Deprecated: Use Direction.Descriptor instead.

func (Direction) Number

func (x Direction) Number() protoreflect.EnumNumber

func (Direction) String

func (x Direction) String() string

func (Direction) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetEmpty

func (x *Error) GetEmpty() *Empty

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Error_Empty

type Error_Empty struct {
	Empty *Empty `protobuf:"bytes,1,opt,name=empty,proto3,oneof"`
}

type Error_FileshareError

type Error_FileshareError struct {
	FileshareError FileshareErrorCode `protobuf:"varint,3,opt,name=fileshare_error,json=fileshareError,proto3,enum=filesharepb.FileshareErrorCode,oneof"`
}

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) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetChildren

func (x *File) GetChildren() map[string]*File

func (*File) GetFullPath

func (x *File) GetFullPath() string

func (*File) GetId

func (x *File) GetId() string

func (*File) GetPath

func (x *File) GetPath() string

func (*File) GetSize

func (x *File) GetSize() uint64

func (*File) GetStatus

func (x *File) GetStatus() Status

func (*File) GetTransferred

func (x *File) GetTransferred() uint64

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type FileshareClient

type FileshareClient interface {
	// Ping to test connection between CLI and Fileshare daemon
	Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// Stop
	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// Send a file to a peer
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (Fileshare_SendClient, error)
	// Accept a request from another peer to send you a file
	Accept(ctx context.Context, in *AcceptRequest, opts ...grpc.CallOption) (Fileshare_AcceptClient, error)
	// Reject a request from another peer to send you a file
	Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*Error, error)
	// List all transfers
	List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Fileshare_ListClient, error)
	// Cancel file transfer to another peer
	CancelFile(ctx context.Context, in *CancelFileRequest, opts ...grpc.CallOption) (*Error, error)
	// SetNotifications about transfer status changes
	SetNotifications(ctx context.Context, in *SetNotificationsRequest, opts ...grpc.CallOption) (*SetNotificationsResponse, error)
	// PurgeTransfersUntil provided time from fileshare implementation storage
	PurgeTransfersUntil(ctx context.Context, in *PurgeTransfersUntilRequest, opts ...grpc.CallOption) (*Error, error)
}

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 (
	FileshareErrorCode_LIB_FAILURE                   FileshareErrorCode = 0
	FileshareErrorCode_TRANSFER_NOT_FOUND            FileshareErrorCode = 1
	FileshareErrorCode_INVALID_PEER                  FileshareErrorCode = 2
	FileshareErrorCode_FILE_NOT_FOUND                FileshareErrorCode = 3
	FileshareErrorCode_ACCEPT_ALL_FILES_FAILED       FileshareErrorCode = 5 // Accept failed for all files
	FileshareErrorCode_ACCEPT_OUTGOING               FileshareErrorCode = 6 // Can't accept outgoing transfers
	FileshareErrorCode_ALREADY_ACCEPTED              FileshareErrorCode = 7
	FileshareErrorCode_FILE_INVALIDATED              FileshareErrorCode = 8
	FileshareErrorCode_TRANSFER_INVALIDATED          FileshareErrorCode = 9
	FileshareErrorCode_TOO_MANY_FILES                FileshareErrorCode = 10
	FileshareErrorCode_DIRECTORY_TOO_DEEP            FileshareErrorCode = 11
	FileshareErrorCode_SENDING_NOT_ALLOWED           FileshareErrorCode = 12
	FileshareErrorCode_PEER_DISCONNECTED             FileshareErrorCode = 13
	FileshareErrorCode_FILE_NOT_IN_PROGRESS          FileshareErrorCode = 14 // Returned when user tries to cancel a file that is not in flight
	FileshareErrorCode_TRANSFER_NOT_CREATED          FileshareErrorCode = 15 // When libdrop doesn't return transfer ID, most likely permission issue
	FileshareErrorCode_NOT_ENOUGH_SPACE              FileshareErrorCode = 16 // Transfer larger than available hard drive space
	FileshareErrorCode_ACCEPT_DIR_NOT_FOUND          FileshareErrorCode = 17
	FileshareErrorCode_ACCEPT_DIR_IS_A_SYMLINK       FileshareErrorCode = 18
	FileshareErrorCode_ACCEPT_DIR_IS_NOT_A_DIRECTORY FileshareErrorCode = 19
	FileshareErrorCode_NO_FILES                      FileshareErrorCode = 20
	FileshareErrorCode_ACCEPT_DIR_NO_PERMISSIONS     FileshareErrorCode = 21
	FileshareErrorCode_PURGE_FAILURE                 FileshareErrorCode = 22
)

func (FileshareErrorCode) Descriptor

func (FileshareErrorCode) Enum

func (FileshareErrorCode) EnumDescriptor deprecated

func (FileshareErrorCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use FileshareErrorCode.Descriptor instead.

func (FileshareErrorCode) Number

func (FileshareErrorCode) String

func (x FileshareErrorCode) String() string

func (FileshareErrorCode) Type

type FileshareServer

type FileshareServer interface {
	// Ping to test connection between CLI and Fileshare daemon
	Ping(context.Context, *Empty) (*Empty, error)
	// Stop
	Stop(context.Context, *Empty) (*Empty, error)
	// Send a file to a peer
	Send(*SendRequest, Fileshare_SendServer) error
	// Accept a request from another peer to send you a file
	Accept(*AcceptRequest, Fileshare_AcceptServer) error
	// Reject a request from another peer to send you a file
	Cancel(context.Context, *CancelRequest) (*Error, error)
	// List all transfers
	List(*Empty, Fileshare_ListServer) error
	// Cancel file transfer to another peer
	CancelFile(context.Context, *CancelFileRequest) (*Error, error)
	// SetNotifications about transfer status changes
	SetNotifications(context.Context, *SetNotificationsRequest) (*SetNotificationsResponse, error)
	// PurgeTransfersUntil provided time from fileshare implementation storage
	PurgeTransfersUntil(context.Context, *PurgeTransfersUntilRequest) (*Error, error)
	// contains filtered or unexported methods
}

FileshareServer is the server API for Fileshare service. All implementations must embed UnimplementedFileshareServer for forward compatibility

type Fileshare_AcceptClient

type Fileshare_AcceptClient interface {
	Recv() (*StatusResponse, error)
	grpc.ClientStream
}

type Fileshare_AcceptServer

type Fileshare_AcceptServer interface {
	Send(*StatusResponse) error
	grpc.ServerStream
}

type Fileshare_ListClient

type Fileshare_ListClient interface {
	Recv() (*ListResponse, error)
	grpc.ClientStream
}

type Fileshare_ListServer

type Fileshare_ListServer interface {
	Send(*ListResponse) error
	grpc.ServerStream
}

type Fileshare_SendClient

type Fileshare_SendClient interface {
	Recv() (*StatusResponse, error)
	grpc.ClientStream
}

type Fileshare_SendServer

type Fileshare_SendServer interface {
	Send(*StatusResponse) error
	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 (*PurgeTransfersUntilRequest) ProtoMessage

func (*PurgeTransfersUntilRequest) ProtoMessage()

func (*PurgeTransfersUntilRequest) ProtoReflect

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) Enum

func (ServiceErrorCode) EnumDescriptor deprecated

func (ServiceErrorCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServiceErrorCode.Descriptor instead.

func (ServiceErrorCode) Number

func (ServiceErrorCode) String

func (x ServiceErrorCode) String() string

func (ServiceErrorCode) Type

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 (*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) Enum

func (SetNotificationsStatus) EnumDescriptor deprecated

func (SetNotificationsStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use SetNotificationsStatus.Descriptor instead.

func (SetNotificationsStatus) Number

func (SetNotificationsStatus) String

func (x SetNotificationsStatus) String() string

func (SetNotificationsStatus) Type

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) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Transfer.ProtoReflect.Descriptor instead.

func (*Transfer) GetCreated

func (x *Transfer) GetCreated() *timestamppb.Timestamp

func (*Transfer) GetDirection

func (x *Transfer) GetDirection() Direction

func (*Transfer) GetFiles

func (x *Transfer) GetFiles() []*File

func (*Transfer) GetId

func (x *Transfer) GetId() string

func (*Transfer) GetPath

func (x *Transfer) GetPath() string

func (*Transfer) GetPeer

func (x *Transfer) GetPeer() string

func (*Transfer) GetStatus

func (x *Transfer) GetStatus() Status

func (*Transfer) GetTotalSize

func (x *Transfer) GetTotalSize() uint64

func (*Transfer) GetTotalTransferred

func (x *Transfer) GetTotalTransferred() uint64

func (*Transfer) ProtoMessage

func (*Transfer) ProtoMessage()

func (*Transfer) ProtoReflect

func (x *Transfer) ProtoReflect() protoreflect.Message

func (*Transfer) Reset

func (x *Transfer) Reset()

func (*Transfer) String

func (x *Transfer) String() string

type UnimplementedFileshareServer

type UnimplementedFileshareServer struct {
}

UnimplementedFileshareServer must be embedded to have forward compatible implementations.

func (UnimplementedFileshareServer) Accept

func (UnimplementedFileshareServer) Cancel

func (UnimplementedFileshareServer) CancelFile

func (UnimplementedFileshareServer) List

func (UnimplementedFileshareServer) Ping

func (UnimplementedFileshareServer) PurgeTransfersUntil

func (UnimplementedFileshareServer) Send

func (UnimplementedFileshareServer) SetNotifications

func (UnimplementedFileshareServer) Stop

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.

Jump to

Keyboard shortcuts

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