Documentation
¶
Index ¶
- type DefaultHandler
- func (h *DefaultHandler) Filecmd(r *sftp.Request) error
- func (h *DefaultHandler) Filelist(r *sftp.Request) (sftp.ListerAt, error)
- func (h *DefaultHandler) Fileread(r *sftp.Request) (io.ReaderAt, error)
- func (h *DefaultHandler) Filewrite(r *sftp.Request) (io.WriterAt, error)
- func (h *DefaultHandler) GetHandler() sftp.Handlers
- type ReadOnlyHandler
- func (h *ReadOnlyHandler) Filecmd(r *sftp.Request) error
- func (h *ReadOnlyHandler) Filelist(r *sftp.Request) (sftp.ListerAt, error)
- func (h *ReadOnlyHandler) Fileread(r *sftp.Request) (io.ReaderAt, error)
- func (h *ReadOnlyHandler) Filewrite(r *sftp.Request) (io.WriterAt, error)
- func (h *ReadOnlyHandler) GetHandler() sftp.Handlers
- type SFTPServer
- type UploadOnlyHandler
- func (h *UploadOnlyHandler) Filecmd(r *sftp.Request) error
- func (h *UploadOnlyHandler) Filelist(r *sftp.Request) (sftp.ListerAt, error)
- func (h *UploadOnlyHandler) Fileread(r *sftp.Request) (io.ReaderAt, error)
- func (h *UploadOnlyHandler) Filewrite(r *sftp.Request) (io.WriterAt, error)
- func (h *UploadOnlyHandler) GetHandler() sftp.Handlers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHandler ¶
type DefaultHandler struct {
Root string
ClientIP string
SFTPServer *SFTPServer
}
DefaultHandler is an SFTP handler that allows all operations
func (*DefaultHandler) GetHandler ¶
func (h *DefaultHandler) GetHandler() sftp.Handlers
type ReadOnlyHandler ¶
type ReadOnlyHandler struct {
Root string
ClientIP string
SFTPServer *SFTPServer
}
ReadOnlyHandler is an SFTP handler that only allows read operations
func (*ReadOnlyHandler) GetHandler ¶
func (h *ReadOnlyHandler) GetHandler() sftp.Handlers
type SFTPServer ¶
type SFTPServer struct {
IP string
Port int
KeyFile string
Username string
Password string
Root string
ReadOnly bool
UploadOnly bool
HostKeyFile string
Webhook webhook.Webhook
Whitelist *httpserver.Whitelist
}
SFTPServer represents an SFTP server configuration
func (*SFTPServer) HandleWebhookSend ¶ added in v1.0.8
func (*SFTPServer) Start ¶
func (s *SFTPServer) Start() error
Start initializes and starts the SFTP server
type UploadOnlyHandler ¶
type UploadOnlyHandler struct {
Root string
ClientIP string
SFTPServer *SFTPServer
}
UploadOnlyHandler is an SFTP handler that only allows upload operations
func (*UploadOnlyHandler) GetHandler ¶
func (h *UploadOnlyHandler) GetHandler() sftp.Handlers
Click to show internal directories.
Click to hide internal directories.