sync-collection for client

This commit is contained in:
AlmogBaku
2020-03-29 15:08:48 +03:00
committed by Simon Ser
parent 25df841e2b
commit 9e23289610
4 changed files with 105 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ type Multistatus struct {
XMLName xml.Name `xml:"DAV: multistatus"`
Responses []Response `xml:"response"`
ResponseDescription string `xml:"responsedescription,omitempty"`
SyncToken string `xml:"sync-token,omitempty"`
}
func NewMultistatus(resps ...Response) *Multistatus {
@@ -396,3 +397,18 @@ type Set struct {
XMLName xml.Name `xml:"DAV: set"`
Prop Prop `xml:"prop"`
}
// https://tools.ietf.org/html/rfc6578#section-6.1
type SyncCollectionQuery struct {
XMLName xml.Name `xml:"DAV: sync-collection"`
SyncToken string `xml:"sync-token"`
Limit *Limit `xml:"limit,omitempty"`
SyncLevel string `xml:"sync-level"`
Prop *Prop `xml:"prop"`
}
// https://tools.ietf.org/html/rfc5323#section-5.17
type Limit struct {
XMLName xml.Name `xml:"DAV: limit"`
NResults uint `xml:"nresults"`
}