Documentation ¶
Index ¶
- type FtpServerOption
- type SftpServer
- func (s *SftpServer) AuthUser(cc ftpserver.ClientContext, username, password string) (ftpserver.ClientDriver, error)
- func (s *SftpServer) ClientConnected(cc ftpserver.ClientContext) (string, error)
- func (s *SftpServer) ClientDisconnected(cc ftpserver.ClientContext)
- func (s *SftpServer) GetSettings() (*ftpserver.Settings, error)
- func (s *SftpServer) GetTLSConfig() (*tls.Config, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FtpServerOption ¶
type SftpServer ¶
type SftpServer struct {
// contains filtered or unexported fields
}
func NewFtpServer ¶
func NewFtpServer(ftpListener net.Listener, option *FtpServerOption) (*SftpServer, error)
NewServer returns a new FTP server driver
func (*SftpServer) AuthUser ¶
func (s *SftpServer) AuthUser(cc ftpserver.ClientContext, username, password string) (ftpserver.ClientDriver, error)
AuthUser authenticates the user and selects an handling driver
func (*SftpServer) ClientConnected ¶
func (s *SftpServer) ClientConnected(cc ftpserver.ClientContext) (string, error)
ClientConnected is called to send the very first welcome message
func (*SftpServer) ClientDisconnected ¶
func (s *SftpServer) ClientDisconnected(cc ftpserver.ClientContext)
ClientDisconnected is called when the user disconnects, even if he never authenticated
func (*SftpServer) GetSettings ¶
func (s *SftpServer) GetSettings() (*ftpserver.Settings, error)
GetSettings returns some general settings around the server setup
func (*SftpServer) GetTLSConfig ¶
func (s *SftpServer) GetTLSConfig() (*tls.Config, error)
GetTLSConfig returns a TLS Certificate to use The certificate could frequently change if we use something like "let's encrypt"
Click to show internal directories.
Click to hide internal directories.