Closed bitfehler closed 7 months ago
Yeah, in general this looks like a good approach to me!
Cool, thanks. I added another commit (will squash at the end). It does two things, both of which look slightly ugly to me, so again I'd appreciate your opinion!
<mkcol>
element now checks that the <resourcetype>
element contains exactly <cDAV: ollection/>
and <CAL: calendar>
, but it's ugly AF. Is there any better way to do it? I couldn't find one...I think this is a good start now. Let me know what you think.
FYI, I've made a small adjustment: https://github.com/emersion/go-webdav/commit/fbcd08d64ad28a3f902d9409551237af6f4decf7
Now that the handling for multiple address books is in place, this commit adds initial support for creation and deletion of address books.
These operations obviously require support from the backend, so the interface gains two new methods. All properties of the address book passed to
CreateAddressBook()
may be unset, except for the path (e.g. when a client sends a MKCOL request without a body. It is up to the backend to put any desired default values in place. As is, the parsing of the request body still needs some improvements, but correctly handles the most common properties.Using this as is (in tokidoki), I can successfully create and delete address books using DavX5. The validation is not great yet, but since this touches the interface again, I wanted to make sure early on that this looks like the right approach to you.