handlers

package
v0.0.0-...-97a9045 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func DownloadFile(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session

DownloadFile Handles requests to download a file

func EstablishConnection

func EstablishConnection(w http.ResponseWriter, r *http.Request) (string, bool)

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 ListFiles

func ListFiles(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session

ListFiles Returns a list containing all files in current directory of the session

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

func UploadFile(w http.ResponseWriter, r *http.Request, session utils.Session) utils.Session

UploadFile Handles requests to upload file

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL