mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
caldav: add part of calendar-query XML element
This commit is contained in:
parent
bae7dcce43
commit
6df8d2d892
@ -48,3 +48,44 @@ type maxResourceSize struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav max-resource-size"`
|
||||
Size int64 `xml:",chardata"`
|
||||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc4791#section-9.5
|
||||
type calendarQuery struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav calendar-query"`
|
||||
Prop *internal.Prop `xml:"DAV: prop,omitempty"`
|
||||
AllProp *struct{} `xml:"DAV: allprop,omitempty"`
|
||||
PropName *struct{} `xml:"DAV: propname,omitempty"`
|
||||
// TODO: filter, timezone
|
||||
}
|
||||
|
||||
// Request variant of https://tools.ietf.org/html/rfc4791#section-9.6
|
||||
type calendarDataReq struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav calendar-data"`
|
||||
Comp *comp `xml:"comp,omitempty"`
|
||||
// TODO: expand, limit-recurrence-set, limit-freebusy-set
|
||||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc4791#section-9.6.1
|
||||
type comp struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav comp"`
|
||||
Name string `xml:"name,attr"`
|
||||
|
||||
Allprop *struct{} `xml:"allprop,omitempty"`
|
||||
Prop []prop `xml:"prop,omitempty"`
|
||||
|
||||
Allcomp *struct{} `xml:"allcomp,omitempty"`
|
||||
Comp []comp `xml:"comp,omitempty"`
|
||||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc4791#section-9.6.4
|
||||
type prop struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav prop"`
|
||||
Name string `xml:"name,attr"`
|
||||
// TODO: novalue
|
||||
}
|
||||
|
||||
// Response variant of https://tools.ietf.org/html/rfc4791#section-9.6
|
||||
type calendarData struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav calendar-data"`
|
||||
Data []byte `xml:",chardata"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user