Documentation ¶
Index ¶
- func AuthenticationError(w http.ResponseWriter)
- func ChangeDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
- func CloseConnection(w http.ResponseWriter, r *http.Request, sessions []utils.Session) []utils.Session
- func DownloadFile(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session
- func EstablishConnection(w http.ResponseWriter, r *http.Request) (string, bool)
- func FileExistError(w http.ResponseWriter)
- func FileNotFoundError(w http.ResponseWriter)
- func FileTypeError(w http.ResponseWriter)
- func FolderPermissionError(w http.ResponseWriter)
- func GeneralError(w http.ResponseWriter, statusCode int, err error)
- func IllegalArgumentsError(w http.ResponseWriter)
- func ListFiles(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session
- func MakeDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
- func MoveFileDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
- func PrintWorkingDirectory(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session
- func RemoveDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
- func RemoveFile(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
- func SessionNotFoundError(w http.ResponseWriter)
- func UnknownCommandError(w http.ResponseWriter)
- func UploadFile(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationError ¶
func AuthenticationError(w http.ResponseWriter)
AuthenticationError Handles all authentication errors
func ChangeDir ¶
func ChangeDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
ChangeDir Changes to a certain directory (direct parent or child)
func CloseConnection ¶
func CloseConnection(w http.ResponseWriter, r *http.Request, sessions []utils.Session) []utils.Session
CloseConnection Handles connection terminalization
func DownloadFile ¶
DownloadFile Handles requests to download a file
func EstablishConnection ¶
EstablishConnection Handles connection establishment
func FileExistError ¶
func FileExistError(w http.ResponseWriter)
FileExistError Hanles cases where file or directory already exists
func FileNotFoundError ¶
func FileNotFoundError(w http.ResponseWriter)
FileNotFoundError Hanldes all file not found error
func FileTypeError ¶
func FileTypeError(w http.ResponseWriter)
FileTypeError Handles all file type error
func FolderPermissionError ¶
func FolderPermissionError(w http.ResponseWriter)
FolderPermissionError Handles cases where user tries to access outside "./db"
func GeneralError ¶
func GeneralError(w http.ResponseWriter, statusCode int, err error)
GeneralError Handles general type error
func IllegalArgumentsError ¶
func IllegalArgumentsError(w http.ResponseWriter)
IllegalArgumentsError Handles all bad requests
func MakeDir ¶
func MakeDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
MakeDir Creates a specific directory
func MoveFileDir ¶
func MoveFileDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
MoveFileDir Moves a specific file to a specific location
func PrintWorkingDirectory ¶
func PrintWorkingDirectory(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session
PrintWorkingDirectory Returns current working directory
func RemoveDir ¶
func RemoveDir(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
RemoveDir Removes a specific directory
func RemoveFile ¶
func RemoveFile(w http.ResponseWriter, r *http.Request, form url.Values, session utils.Session) utils.Session
RemoveFile Handles requests to remove file
func SessionNotFoundError ¶
func SessionNotFoundError(w http.ResponseWriter)
SessionNotFoundError Handles all unknown session errors
func UnknownCommandError ¶
func UnknownCommandError(w http.ResponseWriter)
UnknownCommandError Handles all unknown commands
func UploadFile ¶
UploadFile Handles requests to upload file
Types ¶
This section is empty.