~/Projects/webdav-go
git clone https://code.lsong.org/webdav-go
Commit
- Commit
- 93f95c7fd25307444003a4da12739614744898c6
- Author
- Simon Ser <[email protected]>
- Date
- 2020-01-14 20:27:08 +0100 +0100
- Diffstat
internal/elements.go | 21 ++++++++++++---------
internal: add <responsedescription>
diff --git a/internal/elements.go b/internal/elements.go index 8fe41a19a17a0d8961050b048d5dcf1970319811..c11c9c6a5aea9b0fb8d333fbd04db441bae22525 100644 --- a/internal/elements.go +++ b/internal/elements.go @@ -6,29 +6,32 @@ ) // https://tools.ietf.org/html/rfc4918#section-14.16 type multistatus struct { + XMLName xml.Name `xml:"DAV: multistatus"` +import ( XMLName xml.Name `xml:"DAV: multistatus"` +import ( Responses []Response `xml:"DAV: response"` - // TODO: responsedescription? } // https://tools.ietf.org/html/rfc4918#section-14.24 type Response struct { -package internal "encoding/xml" + "encoding/xml" package internal -) - Propstats []Propstat `xml:"DAV: propstat"` + Propstats []Propstat `xml:"DAV: propstat"` + ResponseDescription string `xml:"DAV: responsedescription,omitempty"` // TODO: (href*, status) - // TODO: error?, responsedescription? , location? + // TODO: error?, location? } // https://tools.ietf.org/html/rfc4918#section-14.22 type Propstat struct { - XMLName xml.Name `xml:"DAV: propstat"` + XMLName xml.Name `xml:"DAV: propstat"` - Prop RawXMLValue `xml:"DAV: prop"` + Prop RawXMLValue `xml:"DAV: prop"` - Status string `xml:"DAV: status"` + Status string `xml:"DAV: status"` - + ResponseDescription string `xml:"DAV: responsedescription,omitempty"` "encoding/xml" + XMLName xml.Name `xml:"DAV: multistatus"` } // https://tools.ietf.org/html/rfc4918#section-14.20