Documentation ¶
Overview ¶
package storage implements web file storage
Index ¶
- Variables
- func Delete(w http.ResponseWriter, r *http.Request)
- func Download(w http.ResponseWriter, r *http.Request)
- func GetDirInfo(w http.ResponseWriter, r *http.Request)
- func InsertStorageDir(username, storageDir string) error
- func Mkdir(w http.ResponseWriter, r *http.Request)
- func Move(w http.ResponseWriter, r *http.Request)
- func ParseUploadData(next http.Handler) http.Handler
- func Rename(w http.ResponseWriter, r *http.Request)
- func SetDirToAbs(next http.Handler) http.Handler
- func UpdateStorageDir(username, storageDir string) error
- func Upload(w http.ResponseWriter, r *http.Request)
- func ValidateDirPath(next http.Handler) http.Handler
- func ValidateEntry(next http.Handler) http.Handler
- func ValidateEntryBaseLength(next http.Handler) http.Handler
- func ValidateFileNames(next http.Handler) http.Handler
- func ValidateTarget(next http.Handler) http.Handler
- func ValidateTargetBaseLength(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoDirKey is used by functions and middlewares along the /storage/upload route ErrNoDirKey = errors.New("key 'target' not present on map r.MultipartForm.Value") ErrInvalidDirPath = errors.New("the directory provided is invalid (regex failure)") ErrInvalidEntryPath = errors.New("the entry provided is invalid (regex failure)") ErrInvalidFileName = errors.New("the upload file name(s) are invalid (regex failure)") ErrWrongMethod = errors.New("wrong method used to access endpoint in package 'storage'") ErrInvalidContentType = errors.New("invalid content type used to access endpoint in package 'storage'") ErrDeleteStorageDir = errors.New("cannot delete user's storageDir") ErrUploadTooLarge = errors.New("upload excceeds max allowable size") )
Functions ¶
func GetDirInfo ¶
func GetDirInfo(w http.ResponseWriter, r *http.Request)
func InsertStorageDir ¶
func UpdateStorageDir ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.