ftpclient

package
v0.0.0-...-2b5ea0c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFormat = "Mon, 02 Jan 15:04"
)

Variables

This section is empty.

Functions

func EntryTypeToStr

func EntryTypeToStr(entryType entities.EntryType) (string, error)

func FormatSizeInBytes

func FormatSizeInBytes(bytes uint64) string

func NewConnector

func NewConnector() *connector

Types

type CallbackWriter

type CallbackWriter struct {
	Callback func(bytesRead int64)
}

func (*CallbackWriter) Write

func (cw *CallbackWriter) Write(p []byte) (n int, err error)

type Connector

type Connector interface {
	Connect(ctx context.Context, config ConnectorConfig) (connection.Connection, error)
}

type ConnectorConfig

type ConnectorConfig struct {
	Address         string
	User            string
	Password        string
	Verbose         bool
	Timeout         time.Duration
	TLSCertFilePath string
	TLSKeyFilePath  string
	TLSInsecure     bool
}

func (*ConnectorConfig) ServerName

func (c *ConnectorConfig) ServerName() string

type SizePostfix

type SizePostfix string
const (
	B  SizePostfix = "B"
	KB SizePostfix = "KB"
	MB SizePostfix = "MB"
	GB SizePostfix = "GB"
	TB SizePostfix = "TB"
)

type SizeType

type SizeType uint
const (
	KiB SizeType = 1 << 10
	MiB SizeType = 1 << 20
	GiB SizeType = 1 << 30
	TiB SizeType = 1 << 40
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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