fe

package
v0.0.0-...-1550609 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeout = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type FileExplorer

type FileExplorer interface {
	Init() error
	ListDir(path string) ([]models.ListDirEntry, error)
	Rename(path string, newPath string) error
	Move(path []string, newPath string) (err error)
	Copy(path []string, newPath string, singleFilename string) (err error)
	Delete(path []string) (err error)
	Chmod(path []string, code string, recursive bool) (err error)
	Mkdir(path string) error
	UploadFile(destination string, part *multipart.Part) (err error)
	Close() error
}

type SSHFileExplorer

type SSHFileExplorer struct {
	FileExplorer
	Host     string
	User     string
	Password string
	// contains filtered or unexported fields
}

func NewSSHFileExplorer

func NewSSHFileExplorer(host string, user string, password string) *SSHFileExplorer

func (*SSHFileExplorer) Chmod

func (fe *SSHFileExplorer) Chmod(path []string, code string, recursive bool) (err error)

func (*SSHFileExplorer) Close

func (fe *SSHFileExplorer) Close() error

func (*SSHFileExplorer) Copy

func (fe *SSHFileExplorer) Copy(path []string, newPath string, singleFilename string) (err error)

func (*SSHFileExplorer) Delete

func (fe *SSHFileExplorer) Delete(path []string) (err error)

func (*SSHFileExplorer) Exec

func (fe *SSHFileExplorer) Exec(cmd string) ([]byte, error)

Execute cmd on the remote host and return stderr and stdout

func (*SSHFileExplorer) ExecOnly

func (fe *SSHFileExplorer) ExecOnly(cmd string) error

func (*SSHFileExplorer) Init

func (fe *SSHFileExplorer) Init() error

func (*SSHFileExplorer) ListDir

func (fe *SSHFileExplorer) ListDir(path string) ([]models.ListDirEntry, error)

func (*SSHFileExplorer) Mkdir

func (fe *SSHFileExplorer) Mkdir(path string) error

func (*SSHFileExplorer) Move

func (fe *SSHFileExplorer) Move(path []string, newPath string) (err error)

func (*SSHFileExplorer) Rename

func (fe *SSHFileExplorer) Rename(path string, newPath string) error

func (*SSHFileExplorer) UploadFile

func (fe *SSHFileExplorer) UploadFile(destination string, part *multipart.Part) (err error)

Jump to

Keyboard shortcuts

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