Documentation
¶
Index ¶
- Variables
- func AddFilesToArchive(h SshHandler)
- func GetAccessContext(h SshHandler) *access_control.AccessContext
- func RunSftpServer(config *SshServerConfig)
- type FileLister
- type SshFileInfo
- type SshHandler
- type SshServerConfig
- type VirtualRsyncHandler
- type VirtualSftpHandler
- func (h *VirtualSftpHandler) Filecmd(r *sftp.Request) error
- func (h *VirtualSftpHandler) Filelist(r *sftp.Request) (sftp.ListerAt, error)
- func (h *VirtualSftpHandler) Fileread(r *sftp.Request) (io.ReaderAt, error)
- func (h *VirtualSftpHandler) Filewrite(r *sftp.Request) (io.WriterAt, error)
- func (h *VirtualSftpHandler) GetHandlers() sftp.Handlers
- func (h *VirtualSftpHandler) GetNewFiles() []SshFileInfo
- func (h *VirtualSftpHandler) GetUsername() string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorInvalidPathRequest = errors.New("Invalid path request")
)
Functions ¶
func AddFilesToArchive ¶
func AddFilesToArchive(h SshHandler)
AddFilesToArchive adds file to storage and creates meta-data
func GetAccessContext ¶
func GetAccessContext(h SshHandler) *access_control.AccessContext
func RunSftpServer ¶
func RunSftpServer(config *SshServerConfig)
Types ¶
type FileLister ¶
type FileLister struct {
// contains filtered or unexported fields
}
func NewFileLister ¶
func NewFileLister(path string) (*FileLister, error)
func NewStatFileLister ¶
func NewStatFileLister(path string) (*FileLister, error)
type SshFileInfo ¶
type SshHandler ¶
type SshHandler interface {
GetUsername() string
GetNewFiles() []SshFileInfo
}
type SshServerConfig ¶
type SshServerConfig struct {
ListenAddress string
HostKeyFile string
PasswordCallback func(conn ssh.ConnMetadata, password []byte) (*ssh.Permissions, error)
SftpHandlerCreator func(username string) (*VirtualSftpHandler, error)
RsyncHandlerCreator func(username string) (*VirtualRsyncHandler, error)
}
type VirtualRsyncHandler ¶
type VirtualRsyncHandler struct {
// contains filtered or unexported fields
}
func NewVirtualRsyncHandler ¶
func NewVirtualRsyncHandler(rootDirectory string, username string) *VirtualRsyncHandler
func (*VirtualRsyncHandler) GetNewFiles ¶
func (h *VirtualRsyncHandler) GetNewFiles() []SshFileInfo
func (*VirtualRsyncHandler) GetUsername ¶
func (h *VirtualRsyncHandler) GetUsername() string
type VirtualSftpHandler ¶
type VirtualSftpHandler struct {
// contains filtered or unexported fields
}
func NewVirtualSftpHandler ¶
func NewVirtualSftpHandler(rootDirectory string, username string) *VirtualSftpHandler
func (*VirtualSftpHandler) GetHandlers ¶
func (h *VirtualSftpHandler) GetHandlers() sftp.Handlers
func (*VirtualSftpHandler) GetNewFiles ¶
func (h *VirtualSftpHandler) GetNewFiles() []SshFileInfo
func (*VirtualSftpHandler) GetUsername ¶
func (h *VirtualSftpHandler) GetUsername() string
Click to show internal directories.
Click to hide internal directories.