status.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package ftp
  2. // FTP status codes, defined in RFC 959
  3. const (
  4. StatusInitiating = 100
  5. StatusRestartMarker = 110
  6. StatusReadyMinute = 120
  7. StatusAlreadyOpen = 125
  8. StatusAboutToSend = 150
  9. StatusCommandOK = 200
  10. StatusCommandNotImplemented = 202
  11. StatusSystem = 211
  12. StatusDirectory = 212
  13. StatusFile = 213
  14. StatusHelp = 214
  15. StatusName = 215
  16. StatusReady = 220
  17. StatusClosing = 221
  18. StatusDataConnectionOpen = 225
  19. StatusClosingDataConnection = 226
  20. StatusPassiveMode = 227
  21. StatusLongPassiveMode = 228
  22. StatusExtendedPassiveMode = 229
  23. StatusLoggedIn = 230
  24. StatusLoggedOut = 231
  25. StatusLogoutAck = 232
  26. StatusRequestedFileActionOK = 250
  27. StatusPathCreated = 257
  28. StatusUserOK = 331
  29. StatusLoginNeedAccount = 332
  30. StatusRequestFilePending = 350
  31. StatusNotAvailable = 421
  32. StatusCanNotOpenDataConnection = 425
  33. StatusTransfertAborted = 426
  34. StatusInvalidCredentials = 430
  35. StatusHostUnavailable = 434
  36. StatusFileActionIgnored = 450
  37. StatusActionAborted = 451
  38. Status452 = 452
  39. StatusBadCommand = 500
  40. StatusBadArguments = 501
  41. StatusNotImplemented = 502
  42. StatusBadSequence = 503
  43. StatusNotImplementedParameter = 504
  44. StatusNotLoggedIn = 530
  45. StatusStorNeedAccount = 532
  46. StatusFileUnavailable = 550
  47. StatusPageTypeUnknown = 551
  48. StatusExceededStorage = 552
  49. StatusBadFileName = 553
  50. )
  51. //var statusText = map[int]string{
  52. // // 200
  53. // StatusCommandOK: "Command okay.",
  54. // StatusCommandNotImplemented: "Command not implemented, superfluous at this site.",
  55. // StatusSystem: "System status, or system help reply.",
  56. // StatusDirectory: "Directory status.",
  57. // StatusFile: "File status.",
  58. // StatusHelp: "Help message.",
  59. // StatusName: "",
  60. // StatusReady: "Service ready for new user.",
  61. // StatusClosing: "Service closing control connection.",
  62. // StatusDataConnectionOpen: "Data connection open; no transfer in progress.",
  63. // StatusClosingDataConnection: "Closing data connection. Requested file action successful.",
  64. // StatusPassiveMode: "Entering Passive Mode.",
  65. // StatusLongPassiveMode: "Entering Long Passive Mode.",
  66. // StatusExtendedPassiveMode: "Entering Extended Passive Mode.",
  67. // StatusLoggedIn: "User logged in, proceed.",
  68. // StatusLoggedOut: "User logged out; service terminated.",
  69. // StatusLogoutAck: "Logout command noted, will complete when transfer done.",
  70. // StatusRequestedFileActionOK: "Requested file action okay, completed.",
  71. // StatusPathCreated: "Path created.",
  72. //
  73. // // 300
  74. // StatusUserOK: "User name okay, need password.",
  75. // StatusLoginNeedAccount: "Need account for login.",
  76. // StatusRequestFilePending: "Requested file action pending further information.",
  77. //
  78. // // 400
  79. // StatusNotAvailable: "Service not available, closing control connection.",
  80. // StatusCanNotOpenDataConnection: "Can't open data connection.",
  81. // StatusTransfertAborted: "Connection closed; transfer aborted.",
  82. // StatusInvalidCredentials: "Invalid username or password.",
  83. // StatusHostUnavailable: "Requested host unavailable.",
  84. // StatusFileActionIgnored: "Requested file action not taken.",
  85. // StatusActionAborted: "Requested action aborted. Local error in processing.",
  86. // Status452: "Insufficient storage space in system.",
  87. //
  88. // // 500
  89. // StatusBadCommand: "Command unrecognized.",
  90. // StatusBadArguments: "Syntax error in parameters or arguments.",
  91. // StatusNotImplemented: "Command not implemented.",
  92. // StatusBadSequence: "Bad sequence of commands.",
  93. // StatusNotImplementedParameter: "Command not implemented for that parameter.",
  94. // StatusNotLoggedIn: "Not logged in.",
  95. // StatusStorNeedAccount: "Need account for storing files.",
  96. // StatusFileUnavailable: "File unavailable.",
  97. // StatusPageTypeUnknown: "Page type unknown.",
  98. // StatusExceededStorage: "Exceeded storage allocation.",
  99. // StatusBadFileName: "File name not allowed.",
  100. //}