Description

Dav support for vibe.d

Package Information

Version0.4.8 (2016-Sep-24)
Repository https://github.com/gedaiu/vibe.dav
LicenseMIT
CopyrightCopyright © 2015, Szabo Bogdan
AuthorsSzabo Bogdan
Registered bySzabo Bogdan
Dependencies

vibe-d

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

Vibe.Dav

A library that adds DAV support to vibe.d

Support

FileDav with locking CalDav with basic support CardDav no support

How to use

FileDav

Use

IDav serveFileDav(URLRouter router, string rootUrl, string rootPath);

to bind the fileDav handlers to a vibe router.

The next exemple will map every resource from http://localhost/files to public/files

import vibedav.filedav;

...

auto router = new URLRouter;
router.serveFileDav("", "public");

...

listenHTTP(settings, router);

CalDav

Example of maping a simple cal dav folder structure:

auto router = new URLRouter;

// Do some basic auth
router.any("/calendar/*", performBasicAuth("Site Realm", toDelegate(&checkPassword)));

// Bind the public folder to a vibe router.
auto dav = router.serveFileDav("", "public");

new ACLDavPlugin(dav); // add ACL support to the DAV instance
new CalDavPlugin(dav); // create and bind the CalDav plugin to the DAV instance
new SyncDavPlugin(dav); // create and bind the sync plugin to the DAV instance

...

listenHTTP(settings, router);



Future development

  • CardDav support
  • Move the logic from the DAV class to other plugins
  • Improve XML support (eg: change xml node format from "name:DAV:" to "{DAV:}name")
  • Add DB support
  • Add migration tools from https://github.com/Kozea/Radicale
  • Maybe update the @ResourceProperty... Structs to something more general like @ResourceProperty!"<tag>%value</tag>"()

Available versions

0.4.8 0.4.7 0.4.6 0.4.5 0.4.4 0.4.3 0.4.2 0.4.1 0.4.0 0.3.0 0.2.0 0.1.0 0.0.1 ~master