Documentation ¶
Overview ¶
Package webdav provides a client and server WebDAV filesystem implementation.
WebDAV is defined in RFC 4918.
Index ¶
- type Client
- func (c *Client) CopyAll(name, dest string, overwrite bool) error
- func (c *Client) Create(name string) (io.WriteCloser, error)
- func (c *Client) FindCurrentUserPrincipal() (string, error)
- func (c *Client) Mkdir(name string) error
- func (c *Client) MoveAll(name, dest string, overwrite bool) error
- func (c *Client) Open(name string) (io.ReadCloser, error)
- func (c *Client) Readdir(name string, recursive bool) ([]FileInfo, error)
- func (c *Client) RemoveAll(name string) error
- func (c *Client) Stat(name string) (*FileInfo, error)
- type FileInfo
- type FileSystem
- type HTTPClient
- type Handler
- type LocalFileSystem
- func (fs LocalFileSystem) Copy(src, dst string, recursive, overwrite bool) (created bool, err error)
- func (fs LocalFileSystem) Create(name string) (io.WriteCloser, error)
- func (fs LocalFileSystem) Mkdir(name string) error
- func (fs LocalFileSystem) MoveAll(src, dst string, overwrite bool) (created bool, err error)
- func (fs LocalFileSystem) Open(name string) (io.ReadCloser, error)
- func (fs LocalFileSystem) Readdir(name string, recursive bool) ([]FileInfo, error)
- func (fs LocalFileSystem) RemoveAll(name string) error
- func (fs LocalFileSystem) Stat(name string) (*FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to a remote WebDAV filesystem.
func (*Client) FindCurrentUserPrincipal ¶
type FileSystem ¶
type FileSystem interface { Open(name string) (io.ReadCloser, error) Stat(name string) (*FileInfo, error) Readdir(name string, recursive bool) ([]FileInfo, error) Create(name string) (io.WriteCloser, error) RemoveAll(name string) error Mkdir(name string) error Copy(name, dest string, recursive, overwrite bool) (created bool, err error) MoveAll(name, dest string, overwrite bool) (created bool, err error) }
FileSystem is a WebDAV server backend.
type HTTPClient ¶
HTTPClient performs HTTP requests. It's implemented by *http.Client.
func HTTPClientWithBasicAuth ¶
func HTTPClientWithBasicAuth(c HTTPClient, username, password string) HTTPClient
HTTPClientWithBasicAuth returns an HTTP client that adds basic authentication to all outgoing requests. If c is nil, http.DefaultClient is used.
type Handler ¶
type Handler struct {
FileSystem FileSystem
}
Handler handles WebDAV HTTP requests. It can be used to create a WebDAV server.
type LocalFileSystem ¶
type LocalFileSystem string
func (LocalFileSystem) Copy ¶
func (fs LocalFileSystem) Copy(src, dst string, recursive, overwrite bool) (created bool, err error)
func (LocalFileSystem) Create ¶
func (fs LocalFileSystem) Create(name string) (io.WriteCloser, error)
func (LocalFileSystem) Mkdir ¶
func (fs LocalFileSystem) Mkdir(name string) error
func (LocalFileSystem) MoveAll ¶
func (fs LocalFileSystem) MoveAll(src, dst string, overwrite bool) (created bool, err error)
func (LocalFileSystem) Open ¶
func (fs LocalFileSystem) Open(name string) (io.ReadCloser, error)
func (LocalFileSystem) Readdir ¶
func (fs LocalFileSystem) Readdir(name string, recursive bool) ([]FileInfo, error)
func (LocalFileSystem) RemoveAll ¶
func (fs LocalFileSystem) RemoveAll(name string) error
Directories ¶
Path | Synopsis |
---|---|
Package caldav provides a client and server CalDAV implementation.
|
Package caldav provides a client and server CalDAV implementation. |
Package carddav provides a client and server CardDAV implementation.
|
Package carddav provides a client and server CardDAV implementation. |
cmd
|
|
Package internal provides low-level helpers for WebDAV clients and servers.
|
Package internal provides low-level helpers for WebDAV clients and servers. |
Click to show internal directories.
Click to hide internal directories.