Documentation
¶
Overview ¶
Package context provides user state for a handler.
Index ¶
Constants ¶
const (
// PathDelimiter is the delimiter to use between file path components.
PathDelimiter = "/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents the metadata of the current handler session.
func (*Context) CalculatePath ¶
CalculatePath determines the context's path based on the string provided.
For instance, provding "directory/another" will append "directory" and "another" to the path. Providing "../directory" will move up a level in the path and then append "directory".
CalculatePath differs from UpdatePath in that the underlying path of the context is not actually updated, the result is simply returned.
func (*Context) PathWithoutBucket ¶
PathWithoutBucket returns the current path without the Bucket, as a string.
func (*Context) UpdatePath ¶
UpdatePath modifies the context's path based on the string provided.
UpdatePath differs from CalculatePath in that the underlying path of the context is updated.