More status code texts.

This commit is contained in:
Julien Laffaye 2013-02-17 10:29:16 +01:00
parent d69e9326f4
commit 872a244347

View File

@ -1,12 +1,13 @@
package ftp package ftp
const ( const (
// Positive Preliminary reply
StatusInitiating = 100 StatusInitiating = 100
StatusRestartMarker = 110 StatusRestartMarker = 110
StatusReadyMinute = 120 StatusReadyMinute = 120
StatusAlreadyOpen = 125 StatusAlreadyOpen = 125
StatusAboutToSend = 150 StatusAboutToSend = 150
// Positive Completion reply
StatusCommandOK = 200 StatusCommandOK = 200
StatusCommandNotImplemented = 202 StatusCommandNotImplemented = 202
StatusSystem = 211 StatusSystem = 211
@ -26,11 +27,11 @@ const (
StatusLogoutAck = 232 StatusLogoutAck = 232
StatusRequestedFileActionOK = 250 StatusRequestedFileActionOK = 250
StatusPathCreated = 257 StatusPathCreated = 257
// Positive Intermediate reply
StatusUserOK = 331 StatusUserOK = 331
StatusLoginNeedAccount = 332 StatusLoginNeedAccount = 332
StatusRequestFilePending = 350 StatusRequestFilePending = 350
// Transient Negative Completion reply
StatusNotAvailable = 421 StatusNotAvailable = 421
StatusCanNotOpenDataConnection = 425 StatusCanNotOpenDataConnection = 425
StatusTransfertAborted = 426 StatusTransfertAborted = 426
@ -39,7 +40,7 @@ const (
StatusFileActionIgnored = 450 StatusFileActionIgnored = 450
StatusActionAborted = 451 StatusActionAborted = 451
Status452 = 452 Status452 = 452
// Permanent Negative Completion reply
StatusBadCommand = 500 StatusBadCommand = 500
StatusBadArguments = 501 StatusBadArguments = 501
StatusNotImplemented = 502 StatusNotImplemented = 502
@ -54,48 +55,49 @@ const (
) )
var statusText = map[int]string{ var statusText = map[int]string{
StatusCommandOK: "Command okay", // 200
StatusCommandNotImplemented: "Command not implemented, superfluous at this site", StatusCommandOK: "Command okay.",
StatusSystem: "System status, or system help reply", StatusCommandNotImplemented: "Command not implemented, superfluous at this site.",
StatusDirectory: "Directory status", StatusSystem: "System status, or system help reply.",
StatusFile: "File status", StatusDirectory: "Directory status.",
StatusHelp: "Help message", StatusFile: "File status.",
StatusHelp: "Help message.",
StatusName: "", StatusName: "",
StatusReady: "Service ready for new user", StatusReady: "Service ready for new user.",
StatusClosing: "Service closing control connection", StatusClosing: "Service closing control connection.",
StatusDataConnectionOpen: "Data connection open; no transfer in progress", StatusDataConnectionOpen: "Data connection open; no transfer in progress.",
StatusClosingDataConnection: "Closing data connection. Requested file action successful", StatusClosingDataConnection: "Closing data connection. Requested file action successful.",
StatusPassiveMode: "Entering Passive Mode", StatusPassiveMode: "Entering Passive Mode.",
StatusLongPassiveMode: "Entering Long Passive Mode", StatusLongPassiveMode: "Entering Long Passive Mode.",
StatusExtendedPassiveMode: "Entering Extended Passive Mode", StatusExtendedPassiveMode: "Entering Extended Passive Mode.",
StatusLoggedIn: "User logged in, proceed", StatusLoggedIn: "User logged in, proceed.",
StatusLoggedOut: "User logged out; service terminated", StatusLoggedOut: "User logged out; service terminated.",
StatusLogoutAck: "Logout command noted, will complete when transfer done", StatusLogoutAck: "Logout command noted, will complete when transfer done.",
StatusRequestedFileActionOK: "Requested file action okay, completed", StatusRequestedFileActionOK: "Requested file action okay, completed.",
StatusPathCreated: "Path created", StatusPathCreated: "Path created.",
// 300
StatusUserOK: "", StatusUserOK: "User name okay, need password.",
StatusLoginNeedAccount: "", StatusLoginNeedAccount: "Need account for login.",
StatusRequestFilePending: "", StatusRequestFilePending: "Requested file action pending further information.",
// 400
StatusNotAvailable: "", StatusNotAvailable: "Service not available, closing control connection.",
StatusCanNotOpenDataConnection: "", StatusCanNotOpenDataConnection: "Can't open data connection.",
StatusTransfertAborted: "", StatusTransfertAborted: "Connection closed; transfer aborted.",
StatusInvalidCredentials: "", StatusInvalidCredentials: "Invalid username or password.",
StatusHostUnavailable: "", StatusHostUnavailable: "Requested host unavailable.",
StatusFileActionIgnored: "", StatusFileActionIgnored: "Requested file action not taken.",
StatusActionAborted: "", StatusActionAborted: "Requested action aborted. Local error in processing.",
Status452: "", Status452: "Insufficient storage space in system.",
// 500
StatusBadCommand: "", StatusBadCommand: "Command unrecognized.",
StatusBadArguments: "", StatusBadArguments: "Syntax error in parameters or arguments.",
StatusNotImplemented: "", StatusNotImplemented: "Command not implemented.",
StatusBadSequence: "", StatusBadSequence: "Bad sequence of commands.",
StatusNotImplementedParameter: "", StatusNotImplementedParameter: "Command not implemented for that parameter.",
StatusNotLoggedIn: "", StatusNotLoggedIn: "Not logged in.",
StatusStorNeedAccount: "", StatusStorNeedAccount: "Need account for storing files.",
StatusFileUnavailable: "", StatusFileUnavailable: "File unavailable.",
StatusPageTypeUnknown: "", StatusPageTypeUnknown: "Page type unknown.",
StatusExceededStorage: "", StatusExceededStorage: "Exceeded storage allocation.",
StatusBadFileName: "", StatusBadFileName: "File name not allowed.",
} }