Documentation
¶
Index ¶
Constants ¶
View Source
const ( NeedAccount = "332 Need account for login.\r\n" PasswordPlease = "331 password please - version check\r\n" PasswordError = "331 please specify the password\r\n" UserLogged = "230 User logged in\r\n" NoSuchFile = "550 %s: No such file or directory.\r\n" CommandNotFound = "500 '%s': command not understood.\r\n" EnteringPassiveMode = "227 Entering Passive Mode (%s,%v,%d)\r\n" OpeningBinaryMode = "150 Opening BINARY mode data connection for '%s' (%d bytes).\r\n" OpeningBinaryModeUpload = "150 Opening BINARY mode data connection for '%s'.\r\n" TransferComplete = "226 Transfer complete.\r\n" Goodbye = "221 Goodbye.\r\n" DirectoryChanged = "250 Directory successfully changed.\r\n" CurrentDirectory = "257 \"%s\" is the current directory\r\n" )
Variables ¶
This section is empty.
Functions ¶
func UpsertRules ¶
UpsertRules creates or updates ftp rule from user submit
Types ¶
type Record ¶
type Record struct {
record.BaseRecord
User string `form:"user" json:"user"`
Password string `form:"password" json:"password"`
Path string `form:"path" json:"path"`
Method Method `form:"method" json:"method"`
Status Status `form:"status" json:"status"`
File *file.FTPFile `gorm:"foreignKey:RecordID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" form:"file" json:"file" notice:"-"`
Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"`
}
type Rule ¶
type Rule struct {
rule.BaseRule `yaml:",inline"`
PasvAddress string `gorm:"pasv_address" json:"pasv_address" form:"pasv_address" yaml:"pasv_address"`
Data []byte `json:"data" form:"data"`
}
Rule FTP rule struct
func (*Rule) CreateOrUpdate ¶
CreateOrUpdate creates or updates the ftp rule in database and ruleSet
type Server ¶
type Server struct {
Config
// contains filtered or unexported fields
}
func (*Server) UpdateRules ¶
Click to show internal directories.
Click to hide internal directories.