all: encode hrefs, replace hrefs with path in public API

Closes: https://github.com/emersion/go-webdav/issues/14
Closes: https://github.com/emersion/go-webdav/issues/16
This commit is contained in:
Simon Ser
2020-01-22 11:07:30 +01:00
parent 72c96af206
commit 6eeeccb96e
11 changed files with 96 additions and 92 deletions

View File

@@ -25,8 +25,8 @@ var (
// 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"`
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:carddav addressbook-home-set"`
Href internal.Href `xml:"href"`
}
type addressbookDescription struct {
@@ -62,9 +62,9 @@ type addressbookQuery struct {
// https://tools.ietf.org/html/rfc6352#section-8.7
type addressbookMultiget struct {
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:carddav addressbook-multiget"`
Hrefs []string `xml:"DAV: href"`
Prop *internal.Prop `xml:"DAV: prop,omitempty"`
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:carddav addressbook-multiget"`
Hrefs []internal.Href `xml:"DAV: href"`
Prop *internal.Prop `xml:"DAV: prop,omitempty"`
// TODO: DAV:allprop | DAV:propname
}