Documentation ¶
Overview ¶
Package webdav etc etc TODO.
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 ¶
Functions ¶
func StatusText ¶
Types ¶
type Condition ¶
Condition can match a WebDAV resource, based on a token or ETag. Exactly one of Token and ETag should be non-empty.
type Dir ¶
type Dir string
A Dir implements FileSystem using the native file system restricted to a specific directory tree.
While the FileSystem.OpenFile method takes '/'-separated paths, a Dir's string value is a filename on the native file system, not a URL, so it is separated by filepath.Separator, which isn't necessarily '/'.
An empty Dir is treated as ".".
type FileSystem ¶
type FileSystem interface { Mkdir(name string, perm os.FileMode) error OpenFile(name string, flag int, perm os.FileMode) (File, error) RemoveAll(name string) error Stat(name string) (os.FileInfo, error) }
A FileSystem implements access to a collection of named files. The elements in a file path are separated by slash ('/', U+002F) characters, regardless of host operating system convention.
Each method has the same semantics as the os package's function of the same name.
type Handler ¶
type Handler struct { // FileSystem is the virtual file system. FileSystem FileSystem // LockSystem is the lock management system. LockSystem LockSystem // PropSystem is an optional property management system. If non-nil, TODO. PropSystem PropSystem // Logger is an optional error logger. If non-nil, it will be called // whenever handling a http.Request results in an error. Logger func(*http.Request, error) }
type LockDetails ¶
type LockSystem ¶
type LockSystem interface { // TODO: comment that the conditions should be ANDed together. Confirm(path string, conditions ...Condition) (c io.Closer, err error) // TODO: comment that token should be an absolute URI as defined by RFC 3986, // Section 4.3. In particular, it should not contain whitespace. Create(path string, now time.Time, ld LockDetails) (token string, c io.Closer, err error) Refresh(token string, now time.Time, duration time.Duration) (ld LockDetails, c io.Closer, err error) Unlock(token string) error }