vsftp

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() *module

Types

type Command

type Command interface {
	IsExtend() bool
	RequireParam() bool
	RequireAuth() bool
	Execute(*Conn, string)
}

Command represents a Command interface to a ftp command

type Conn

type Conn struct {
	EventsAPI *events.EventsAPI
	// contains filtered or unexported fields
}

func (*Conn) Close

func (conn *Conn) Close()

Close will manually close this connection, even if the client isn't ready.

func (*Conn) IsLogin

func (conn *Conn) IsLogin() bool

IsLogin returns if user has login

func (*Conn) LoginUser

func (conn *Conn) LoginUser() string

LoginUser returns the login user name if login

func (*Conn) PassivePort

func (conn *Conn) PassivePort() int

PassivePort returns the port which could be used by passive mode.

type DataSocket

type DataSocket interface {
	Host() string

	Port() int

	// the standard io.Reader interface
	Read(p []byte) (n int, err error)

	// the standard io.ReaderFrom interface
	ReadFrom(r io.Reader) (int64, error)

	// the standard io.Writer interface
	Write(p []byte) (n int, err error)

	// the standard io.Closer interface
	Close() error
}

DataSocket describes a data socket is used to send non-control data between the client and server.

type FileInfo

type FileInfo interface {
	os.FileInfo
}

FileInfo represents an file interface

type Server

type Server struct {
	PublicIP     string
	PassivePorts string

	EventsAPI *events.EventsAPI
	// contains filtered or unexported fields
}

func (*Server) Stop

func (s *Server) Stop()

type Storage

type Storage struct {
	FilesTree sync.Map
}

type VirtualFS

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

func (VirtualFS) Clone

func (vfs VirtualFS) Clone() VirtualFS

func (VirtualFS) Exists

func (vfs VirtualFS) Exists(path string) bool

func (VirtualFS) ListDir

func (vfs VirtualFS) ListDir(path string, callback func(FileInfo) error) error

func (VirtualFS) MkDir

func (vfs VirtualFS) MkDir(path string)

func (VirtualFS) PutFile

func (vfs VirtualFS) PutFile(path string, f models.File)

func (VirtualFS) ReadFile

func (vfs VirtualFS) ReadFile(path string) []byte

func (VirtualFS) RemoveFile

func (vfs VirtualFS) RemoveFile(path string)

func (VirtualFS) Stat

func (vfs VirtualFS) Stat(path string) (*vfsNode, error)

Jump to

Keyboard shortcuts

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