Documentation
¶
Index ¶
Constants ¶
const ( StatusMulti = 207 StatusUnprocessableEntity = 422 StatusLocked = 423 StatusFailedDependency = 424 StatusInsufficientStorage = 507 )
http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11
Variables ¶
var ( // ErrorNotYetImplemented is intended for use for code in progress. ErrorNotYetImplemented = Error{/* contains filtered or unexported fields */} ErrorBadPath = Error{/* contains filtered or unexported fields */} ErrorNotFound = Error{/* contains filtered or unexported fields */} ErrorConflict = Error{/* contains filtered or unexported fields */} ErrorNotAllowed = Error{/* contains filtered or unexported fields */} ErrorUnsupportedType = Error{/* contains filtered or unexported fields */} ErrorIsDir = Error{/* contains filtered or unexported fields */} ErrorIsNotDir = Error{/* contains filtered or unexported fields */} ErrorMissingParent = Error{/* contains filtered or unexported fields */} ErrorUnderrun = Error{/* contains filtered or unexported fields */} ErrorBadHost = Error{/* contains filtered or unexported fields */} ErrorBadDepth = Error{/* contains filtered or unexported fields */} ErrorBadDest = Error{/* contains filtered or unexported fields */} ErrorBadPropfind = Error{/* contains filtered or unexported fields */} ErrorDestExists = Error{/* contains filtered or unexported fields */} ErrorSameFile = Error{/* contains filtered or unexported fields */} ErrorBadProppatch = Error{/* contains filtered or unexported fields */} ErrorLocked = Error{/* contains filtered or unexported fields */} ErrorBadLock = Error{/* contains filtered or unexported fields */} )
Error codes that are reportable from the API.
Functions ¶
This section is empty.
Types ¶
type CopyOptions ¶
CopyOptions indicate options applicable to a copy operation.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is the common error type used for webdav methods.
func (Error) HTTPStatus ¶
HTTPStatus gets the HTTP status text to use for the error.
func (Error) InternalCause ¶
InternalCause gets the underlying cause of the error, should not generally be provided to the client.
type File ¶
type File interface { GetPath() string IsDirectory() bool Stat() (FileInfo, error) Open() (FileHandle, error) Truncate() (FileHandle, error) PatchProp(set, remove map[string]string) error GetProp(k string) (string, bool) }
File represents an abstract File (or directory)
type FileHandle ¶
FileHandle is an open reference to a file for writing or reading.
type FileSystem ¶
FileSystem represents and abstract filesystem that can perform operations on paths.
type Path ¶
type Path interface { String() string Parent() Path Lookup() (File, error) LookupSubtree(depth int) ([]File, error) Mkdir() (File, error) Create() (File, FileHandle, error) CopyTo(dst Path, opt CopyOptions) (bool, error) Remove() error RecursiveRemove() map[string]error }
Path is a unique path in the filesystem.
type WebDAV ¶
type WebDAV struct { Debug bool // contains filtered or unexported fields }
WebDAV is a http.Handler implementation that implements the WebDAV protocol over an abstract FileSystem. Set the Debug field to true in order to enable both serialization and logging of all requests.
func NewWebDAV ¶
func NewWebDAV(fs FileSystem) *WebDAV
NewWebDAV creates a WebDAV http.Handler wrapper around a given FileSystem.
Directories
¶
Path | Synopsis |
---|---|
Package cond is a parser for the If header expected of webdav, to produce condition objects to evaluate the header.
|
Package cond is a parser for the If header expected of webdav, to produce condition objects to evaluate the header. |
Package memfs is an in-memory implementation of webdav.FileSystem.
|
Package memfs is an in-memory implementation of webdav.FileSystem. |