Documentation
¶
Overview ¶
Package webdav keeps backups in a folder on a WebDAV server, through gowebdav.
Index ¶
- Variables
- func CheckURL(raw string) (*url.URL, error)
- type Folder
- func (f *Folder) Check(ctx context.Context) error
- func (f *Folder) Delete(ctx context.Context, name string) error
- func (f *Folder) Get(ctx context.Context, name string) ([]byte, error)
- func (f *Folder) List(ctx context.Context) ([]backup.Object, error)
- func (f *Folder) Put(ctx context.Context, name string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
var ErrURL = errors.New("webdav: URL must be http or https with a host")
ErrURL reports a server URL that is not http(s) with a host, or that carries user info, a query or a fragment.
Functions ¶
Types ¶
type Folder ¶
type Folder struct {
// URL is the server's WebDAV root, as
// https://cloud.example.com/remote.php/dav/files/me/.
URL string
// Dir is the folder under URL, "" for URL itself.
Dir string
User, Password string
// HTTP gives the transport and the time limit; nil is backup.Client(nil).
HTTP *http.Client
}
Folder is a folder of a WebDAV server that keeps backups.
func (*Folder) Check ¶
Check lists the folder, or the server's root while the folder is not made yet.