mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
carddav: add addressbook-home-set to server
This commit is contained in:
parent
6bac674701
commit
c4718a3a49
@ -10,8 +10,9 @@ import (
|
||||
const namespace = "urn:ietf:params:xml:ns:carddav"
|
||||
|
||||
var (
|
||||
addressBookName = xml.Name{namespace, "addressbook"}
|
||||
addressBookHomeSetName = xml.Name{namespace, "addressbook-home-set"}
|
||||
|
||||
addressBookName = xml.Name{namespace, "addressbook"}
|
||||
addressBookDescriptionName = xml.Name{namespace, "addressbook-description"}
|
||||
addressBookQueryName = xml.Name{namespace, "addressbook-query"}
|
||||
addressBookMultigetName = xml.Name{namespace, "addressbook-multiget"}
|
||||
@ -22,6 +23,7 @@ var (
|
||||
maxResourceSizeName = xml.Name{namespace, "max-resource-size"}
|
||||
)
|
||||
|
||||
// https://tools.ietf.org/html/rfc6352#section-6.2.3
|
||||
type addressbookHomeSet struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:carddav addressbook-home-set"`
|
||||
Href string `xml:"href"`
|
||||
|
@ -219,7 +219,10 @@ func (b *backend) propfindAddressBook(propfind *internal.Propfind, ab *AddressBo
|
||||
},
|
||||
}, nil
|
||||
},
|
||||
// TODO: addressbook-home-set
|
||||
// TODO: this is a principal property
|
||||
addressBookHomeSetName: func(*internal.RawXMLValue) (interface{}, error) {
|
||||
return &addressbookHomeSet{Href: "/"}, nil
|
||||
},
|
||||
}
|
||||
|
||||
if ab.MaxResourceSize > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user