sftpd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConn

func HandleConn(conn net.Conn, config *ssh.ServerConfig, pathMapper *PathMapper)

func NewSimpleSftpServer

func NewSimpleSftpServer(homePath, listenAddress string, listenPort int, username, password string, pathMapper *PathMapper) (net.Listener, error)

func VfsHandler

func VfsHandler(mapper *PathMapper) sftp.Handlers

Types

type FileTree

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

func NewFileTree

func NewFileTree(basePath string) *FileTree

func (*FileTree) SubIntegrate

func (tree *FileTree) SubIntegrate(path string) bool

type PathMapper

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

func NewPathMapper

func NewPathMapper(files []string, basePath string) *PathMapper

func (*PathMapper) List

func (mapper *PathMapper) List(key string) ([]string, bool)

func (*PathMapper) PathTo

func (mapper *PathMapper) PathTo(reference string) (string, error)

func (*PathMapper) Stat

func (mapper *PathMapper) Stat(reference string) (os.FileInfo, error)

type SftpFsContext

type SftpFsContext struct {
	Sftpc *sftp.Client
	// contains filtered or unexported fields
}

func NewSftpFsContext

func NewSftpFsContext(user, password, host string) (*SftpFsContext, error)

func (*SftpFsContext) Disconnect

func (ctx *SftpFsContext) Disconnect() error

Jump to

Keyboard shortcuts

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