types

package
v7.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package types provides types and interfaces for FTP operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Delete(path string) error
	GetEntry(p string) (*_ftp.Entry, error)
	List(p string) ([]*_ftp.Entry, error) // NLST for just names
	Login(user string, password string) error
	MakeDir(path string) error
	Quit() error
	Rename(from, to string) error
	RetrFrom(path string, offset uint64) (*_ftp.Response, error)
	StorFrom(path string, r io.Reader, offset uint64) error
	IsSetTimeSupported() bool
	SetTime(path string, t time.Time) error
	IsTimePreciseInList() bool
}

Client is an interface to make it easier to test

type DataConn

type DataConn interface {
	Mode() OpenType
	Delete(path string) error
	GetEntry(p string) (*_ftp.Entry, error)
	List(p string) ([]*_ftp.Entry, error) // NLST for just names
	MakeDir(path string) error
	Rename(from, to string) error
	IsSetTimeSupported() bool
	SetTime(path string, t time.Time) error
	IsTimePreciseInList() bool
	io.ReadWriteCloser
}

DataConn represents a data connection

type OpenType

type OpenType int

OpenType represents the mode(read or write) that we open a file for.

const (

	// OpenRead denotes Read mode
	OpenRead OpenType
	// OpenWrite denotes Write mode
	OpenWrite
	SingleOp
)

Jump to

Keyboard shortcuts

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