Documentation ¶
Index ¶
Constants ¶
const ( CommandQuit = "QUIT" CommandAuthTLS = "AUTH TLS" CommandUser = "USER %s" CommandPass = "PASS %s" CommandFeat = "FEAT" CommandProtectionBufferSize = "PBSZ 0" CommandProtocol = "PROT P" CommandType = "TYPE I" CommandOptions = "OPTS %s %s" CommandStatus = "STAT" CommandSystem = "SYST" CommandList = "LIST %s" CommandListHidden = "LIST -a %s" CommandPreTransfer = "PRET %s" CommandPassive = "PASV" CommandExtendedPassiveMode = "EPSV" CommandRestartTransfer = "REST %d" CommandListMachineReadable = "MLSD %s" CommandStore = "STOR %s" CommandMakeDir = "MKD %s" CommandChangeWorkDir = "CWD %s" CommandSize = "SIZE %s" CommandRemoveFile = "DELE %s" CommandRemoveDir = "RMD %s" CommandRenameFrom = "RNFR %s" CommandRenameTo = "RNTO %s" CommandRetrieve = "RETR %s" )
Command formats that are used to instruct FTP server to perform a certain task.
const ( FeatureMLST = "MLST" FeatureMDTM = "MDTM" FeatureMFMT = "MFMT" FeaturePRET = "PRET" FeatureUTF8 = "UTF8" FeatureEPSV = "EPSV" FeatureAUTH = "AUTH" )
const ( StatusAlreadyOpen = 125 StatusAboutToSend = 150 )
Positive Preliminary reply.
The requested action is being initiated; expect another reply before proceeding with a new command. (The user-process sending another command before the completion reply would be in violation of protocol; but server-FTP processes should queue any commands that arrive while a preceding command is in progress.) This type of reply can be used to indicate that the command was accepted and the user-process may now pay attention to the data connections, for implementations where simultaneous monitoring is difficult. The server-FTP process may send at most, one 1xx reply per command.
const ( StatusCommandOK = 200 StatusCommandNotImplemented = 202 StatusSystem = 211 StatusFile = 213 StatusName = 215 StatusReady = 220 StatusClosingDataConnection = 226 StatusPassiveMode = 227 StatusExtendedPassiveMode = 229 StatusLoggedIn = 230 StatusAuthOK = 234 StatusRequestedFileActionOK = 250 StatusPathCreated = 257 )
Positive Completion reply
The requested action has been successfully completed. A new request may be initiated.
const ( StatusUserOK = 331 StatusRequestFilePending = 350 )
Positive Intermediate reply
The command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. The user should send another command specifying this information. This reply is used in command sequence groups.
const ( StatusBadCommand = 500 StatusBadArguments = 501 StatusNotImplementedParameter = 504 )
Permanent Negative Completion reply
The command was not accepted and the requested action did not take place. The User-process is discouraged from repeating the exact request (in the same sequence). Even some "permanent" error conditions can be corrected, so the human user may want to direct his User-process to re-initiate the command sequence by direct action at some point in the future (e.g., after the spelling has been changed, or the user has altered his directory status.)
const StatusNoCheck = -1
StatusNoCheck ignores status code validation upon command execution.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerFeatures ¶
type ServerFeatures struct { SupportMLST bool SupportMDTM bool SupportMFMT bool SupportPRET bool SupportEPSV bool SupportUTF8 bool AuthTLS bool }
func NewServerFeatures ¶
func NewServerFeatures(featureMap map[string]string) *ServerFeatures