mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
caldav: add prop-filter support to client
This commit is contained in:
parent
baf63fb1b7
commit
1d93353e3d
@ -29,9 +29,19 @@ type CalendarCompRequest struct {
|
|||||||
type CompFilter struct {
|
type CompFilter struct {
|
||||||
Name string
|
Name string
|
||||||
Start, End time.Time
|
Start, End time.Time
|
||||||
|
Props []PropFilter
|
||||||
Comps []CompFilter
|
Comps []CompFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PropFilter struct {
|
||||||
|
Name string
|
||||||
|
TextMatch *TextMatch
|
||||||
|
}
|
||||||
|
|
||||||
|
type TextMatch struct {
|
||||||
|
Text string
|
||||||
|
}
|
||||||
|
|
||||||
type CalendarQuery struct {
|
type CalendarQuery struct {
|
||||||
CompRequest CalendarCompRequest
|
CompRequest CalendarCompRequest
|
||||||
CompFilter CompFilter
|
CompFilter CompFilter
|
||||||
|
@ -72,8 +72,25 @@ type compFilter struct {
|
|||||||
Name string `xml:"name,attr"`
|
Name string `xml:"name,attr"`
|
||||||
IsNotDefined *struct{} `xml:"is-not-defined,omitempty"`
|
IsNotDefined *struct{} `xml:"is-not-defined,omitempty"`
|
||||||
TimeRange *timeRange `xml:"time-range,omitempty"`
|
TimeRange *timeRange `xml:"time-range,omitempty"`
|
||||||
|
PropFilters []propFilter `xml:"prop-filter,omitempty"`
|
||||||
CompFilters []compFilter `xml:"comp-filter,omitempty"`
|
CompFilters []compFilter `xml:"comp-filter,omitempty"`
|
||||||
// TODO: prop-filter
|
}
|
||||||
|
|
||||||
|
// https://tools.ietf.org/html/rfc4791#section-9.7.2
|
||||||
|
type propFilter struct {
|
||||||
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav prop-filter"`
|
||||||
|
Name string `xml:"name,attr"`
|
||||||
|
IsNotDefined *struct{} `xml:"is-not-defined,omitempty"`
|
||||||
|
TimeRange *timeRange `xml:"time-range,omitempty"`
|
||||||
|
TextMatch *textMatch `xml:"text-match,omitempty"`
|
||||||
|
// TODO: param-filter
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://tools.ietf.org/html/rfc4791#section-9.7.5
|
||||||
|
type textMatch struct {
|
||||||
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav text-match"`
|
||||||
|
Text string `xml:",chardata"`
|
||||||
|
// TODO: collation, negate-condition
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc4791#section-9.9
|
// https://tools.ietf.org/html/rfc4791#section-9.9
|
||||||
|
Loading…
Reference in New Issue
Block a user