transfer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntryPoint

func EntryPoint(parent *cli.Command)

Types

type Action

type Action int // enum
const (
	Action_invalid Action = iota
	Action_file
	Action_data
	Action_end_data
	Action_receive
	Action_send
	Action_cancel
	Action_status
	Action_finish
)

type Compression

type Compression int // enum
const (
	Compression_none Compression = iota
	Compression_zlib
)

type Compressor

type Compressor interface {
	Compress(data []byte) []byte
	Flush() []byte
}

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(opts *Options, local_path, expanded_local_path string, file_id int, stat_result fs.FileInfo, remote_base string, file_type FileType) *File

type FileHash

type FileHash struct {
	// contains filtered or unexported fields
}

type FileState

type FileState int
const (
	WAITING_FOR_START FileState = iota
	WAITING_FOR_DATA
	TRANSMITTING
	FINISHED
	ACKNOWLEDGED
)

type FileTransmissionCommand

type FileTransmissionCommand struct {
	Action      Action           `json:"ac,omitempty"`
	Compression Compression      `json:"zip,omitempty"`
	Ftype       FileType         `json:"ft,omitempty"`
	Ttype       TransmissionType `json:"tt,omitempty"`
	Quiet       QuietLevel       `json:"q,omitempty"`

	Id          string        `json:"id,omitempty"`
	File_id     string        `json:"fid,omitempty"`
	Bypass      string        `json:"pw,omitempty" encoding:"base64"`
	Name        string        `json:"n,omitempty" encoding:"base64"`
	Status      string        `json:"st,omitempty" encoding:"base64"`
	Parent      string        `json:"pr,omitempty"`
	Mtime       time.Duration `json:"mod,omitempty"`
	Permissions fs.FileMode   `json:"prm,omitempty"`
	Size        int64         `json:"sz,omitempty" default:"-1"`

	Data []byte `json:"d,omitempty"`
}

func NewFileTransmissionCommand

func NewFileTransmissionCommand(serialized string) (ans *FileTransmissionCommand, err error)

func (FileTransmissionCommand) Serialize

func (self FileTransmissionCommand) Serialize(prefix_with_osc_code ...bool) string

func (FileTransmissionCommand) String

func (self FileTransmissionCommand) String() string

type FileType

type FileType int // enum
const (
	FileType_regular FileType = iota
	FileType_symlink
	FileType_directory
	FileType_link
)

func (FileType) Color

func (self FileType) Color() string

func (FileType) ShortText

func (self FileType) ShortText() string

type IdentityCompressor

type IdentityCompressor struct{}

func (*IdentityCompressor) Compress

func (self *IdentityCompressor) Compress(data []byte) []byte

func (*IdentityCompressor) Flush

func (self *IdentityCompressor) Flush() []byte

type Progress

type Progress struct {
	// contains filtered or unexported fields
}

type ProgressTracker

type ProgressTracker struct {
	// contains filtered or unexported fields
}

type QuietLevel

type QuietLevel int // enum
const (
	Quiet_none             QuietLevel = iota // 0
	Quiet_acknowledgements                   // 1
	Quiet_errors                             // 2
)

type SendHandler

type SendHandler struct {
	// contains filtered or unexported fields
}

type SendManager

type SendManager struct {
	// contains filtered or unexported fields
}

type SendState

type SendState int
const (
	SEND_WAITING_FOR_PERMISSION SendState = iota
	SEND_PERMISSION_GRANTED
	SEND_PERMISSION_DENIED
	SEND_CANCELED
)

type Serializable

type Serializable interface {
	String() string
	MarshalJSON() ([]byte, error)
}

type Transfer

type Transfer struct {
	// contains filtered or unexported fields
}

type TransmissionType

type TransmissionType int // enum
const (
	TransmissionType_simple TransmissionType = iota
	TransmissionType_rsync
)

type Unserializable

type Unserializable interface {
	SetString(string) error
}

type ZlibCompressor

type ZlibCompressor struct {
	// contains filtered or unexported fields
}

func NewZlibCompressor

func NewZlibCompressor() *ZlibCompressor

func (*ZlibCompressor) Compress

func (self *ZlibCompressor) Compress(data []byte) []byte

func (*ZlibCompressor) Flush

func (self *ZlibCompressor) Flush() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳