Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrOutsideRepo is returned when the target file is outside of the repository ErrOutsideRepo = errors.New("target file outside repository") )
Functions ¶
func EvaluateFilePath ¶
EvaluateFilePath sanitize and validate the file against the local repository
func IsInRepository ¶
IsInRepository ensures that the given file path is contained in the repository
Types ¶
type FileInfo ¶
type FileInfo struct { Path string `redis:"-"` Size int64 `redis:"size" json:",omitempty"` ModTime time.Time `redis:"modTime" json:",omitempty"` Sha1 string `redis:"sha1" json:",omitempty"` Sha256 string `redis:"sha256" json:",omitempty"` Md5 string `redis:"md5" json:",omitempty"` }
FileInfo is a struct embedding details about a file served by the redirector.
Click to show internal directories.
Click to hide internal directories.