Documentation ¶
Index ¶
- Variables
- func Fixed(c *Config)
- type Auth
- type Config
- func (c *Config) Init() *Config
- func (c *Config) SetAuth(auth ftpserver.Auth) *Config
- func (c *Config) SetAuthByType(storeType string) *Config
- func (c *Config) SetPerm(perm ftpserver.Perm, owner string, group string) *Config
- func (c *Config) SetPermByType(storeType string, owner string, group string) *Config
- func (c *Config) SetPort(port int) *Config
- func (c *Config) SetStore(store ftpserver.DriverFactory) *Config
- func (c *Config) SetStoreByType(storeType string, options ...map[string]string) *Config
- func (c *Config) Start()
- type FileDriver
- func (driver *FileDriver) ChangeDir(path string) error
- func (driver *FileDriver) DeleteDir(path string) error
- func (driver *FileDriver) DeleteFile(path string) error
- func (driver *FileDriver) GetFile(path string, offset int64) (int64, io.ReadCloser, error)
- func (driver *FileDriver) Init(conn *ftpserver.Conn)
- func (driver *FileDriver) ListDir(path string, callback func(ftpserver.FileInfo) error) error
- func (driver *FileDriver) MakeDir(path string) error
- func (driver *FileDriver) PutFile(destPath string, data io.Reader, appendData bool) (int64, error)
- func (driver *FileDriver) Rename(fromPath string, toPath string) error
- func (driver *FileDriver) Stat(path string) (ftpserver.FileInfo, error)
- type FileDriverFactory
- type FileInfo
- type Perm
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConfig = &Config{ PidFile: `ftp.pid`, DBType: `mysql`, FTPStoreType: `file`, ServerOpts: ftpserver.ServerOpts{ Name: `TinyFTP`, PassivePorts: `6001-7000`, Port: 25, PublicIp: `127.0.0.1`, WelcomeMessage: `Welcome to the TinyFTP`, }, } DefaultPidFile = `ftp.pid` )
Functions ¶
Types ¶
type Config ¶
type Config struct { PidFile string `json:"-"` DBType string `json:"dbType"` FTPStoreType string `json:"ftpStoreType"` FTPOptions map[string]string `json:"ftpOptions"` ftpserver.ServerOpts // contains filtered or unexported fields }
func (*Config) SetAuthByType ¶
func (*Config) SetPermByType ¶
func (*Config) SetStoreByType ¶
type FileDriver ¶
func (*FileDriver) ChangeDir ¶
func (driver *FileDriver) ChangeDir(path string) error
func (*FileDriver) DeleteDir ¶
func (driver *FileDriver) DeleteDir(path string) error
func (*FileDriver) DeleteFile ¶
func (driver *FileDriver) DeleteFile(path string) error
func (*FileDriver) GetFile ¶
func (driver *FileDriver) GetFile(path string, offset int64) (int64, io.ReadCloser, error)
func (*FileDriver) Init ¶
func (driver *FileDriver) Init(conn *ftpserver.Conn)
func (*FileDriver) MakeDir ¶
func (driver *FileDriver) MakeDir(path string) error
type FileDriverFactory ¶
Click to show internal directories.
Click to hide internal directories.