Documentation ¶
Index ¶
- func FormatOverwrite(overwrite bool) string
- func IsNotFound(err error) bool
- func ParseOverwrite(s string) (bool, error)
- type Client
- func (c *Client) CopyAll(ctx context.Context, name, dest string, overwrite bool) error
- func (c *Client) Create(ctx context.Context, name string) (io.WriteCloser, error)
- func (c *Client) CreateWithModTime(ctx context.Context, name string, modTime time.Time) (io.WriteCloser, error)
- func (c *Client) FindCurrentUserPrincipal(ctx context.Context) (string, error)
- func (c *Client) Mkdir(ctx context.Context, name string) error
- func (c *Client) MoveAll(ctx context.Context, name, dest string, overwrite bool) error
- func (c *Client) Open(ctx context.Context, name string) (io.ReadCloser, error)
- func (c *Client) Readdir(ctx context.Context, name string, recursive bool) ([]FileInfo, error)
- func (c *Client) RemoveAll(ctx context.Context, name string) error
- func (c *Client) Stat(ctx context.Context, name string) (*FileInfo, error)
- func (c *Client) Touch(ctx context.Context, path string, mtime time.Time) error
- type Depth
- type FileInfo
- type HTTPClient
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatOverwrite ¶
FormatOverwrite formats an Overwrite header.
func IsNotFound ¶
func ParseOverwrite ¶
ParseOverwrite parses an Overwrite header.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to a remote WebDAV filesystem.
func (*Client) CreateWithModTime ¶
func (*Client) FindCurrentUserPrincipal ¶
type Depth ¶
type Depth int
Depth indicates whether a request applies to the resource's members. It's defined in RFC 4918 section 10.2.
const ( // DepthZero indicates that the request applies only to the resource. DepthZero Depth = 0 // DepthOne indicates that the request applies to the resource and its // internal members only. DepthOne Depth = 1 // DepthInfinity indicates that the request applies to the resource and all // of its members. DepthInfinity Depth = -1 )
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.
Click to show internal directories.
Click to hide internal directories.