Documentation
¶
Index ¶
- type Client
- func (client *Client) Delete(fileURL string) (err error)
- func (client *Client) Get(fileURL string) (content []byte, etag string, err error)
- func (client *Client) List(collectionURL string) (resources []Resource, err error)
- func (client *Client) Mkcol(collectionURL string) (err error)
- func (client *Client) Put(fileURL string, content []byte, etag string, contentType string) (err error)
- type Config
- type Resource
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 is a WebDAV HTTP client for file-level operations.
func MakeClient ¶
MakeClient creates a WebDAV client from the given configuration.
func (*Client) Delete ¶
Delete removes the resource at the given URL.
func (*Client) Get ¶
Get retrieves the content of a file at the given URL.
func (*Client) List ¶
List performs a PROPFIND on the given collection URL and returns the contained resources.
func (*Client) Mkcol ¶
Mkcol creates a new collection (directory) at the given URL.
func (*Client) Put ¶
func (client *Client) Put(fileURL string, content []byte, etag string, contentType string) (err error)
Put creates or updates a file at the given URL. If etag is non-empty, the request uses If-Match for conditional update. The contentType parameter sets the Content-Type header; if empty, defaults to "application/octet-stream".
type Config ¶
Config holds WebDAV connection parameters.
Source Files
¶
- main.go