mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
internal: remove unnecessary namespaces in structs
This commit is contained in:
parent
5748fec4d0
commit
388377dfca
@ -31,8 +31,8 @@ func (s Status) Err() error {
|
|||||||
// https://tools.ietf.org/html/rfc4918#section-14.16
|
// https://tools.ietf.org/html/rfc4918#section-14.16
|
||||||
type Multistatus struct {
|
type Multistatus struct {
|
||||||
XMLName xml.Name `xml:"DAV: multistatus"`
|
XMLName xml.Name `xml:"DAV: multistatus"`
|
||||||
Responses []Response `xml:"DAV: response"`
|
Responses []Response `xml:"response"`
|
||||||
ResponseDescription string `xml:"DAV: responsedescription,omitempty"`
|
ResponseDescription string `xml:"responsedescription,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ms *Multistatus) Get(href string) (*Response, error) {
|
func (ms *Multistatus) Get(href string) (*Response, error) {
|
||||||
@ -51,12 +51,12 @@ func (ms *Multistatus) Get(href string) (*Response, error) {
|
|||||||
// https://tools.ietf.org/html/rfc4918#section-14.24
|
// https://tools.ietf.org/html/rfc4918#section-14.24
|
||||||
type Response struct {
|
type Response struct {
|
||||||
XMLName xml.Name `xml:"DAV: response"`
|
XMLName xml.Name `xml:"DAV: response"`
|
||||||
Href []string `xml:"DAV: href"`
|
Href []string `xml:"href"`
|
||||||
Propstats []Propstat `xml:"DAV: propstat,omitempty"`
|
Propstats []Propstat `xml:"propstat,omitempty"`
|
||||||
ResponseDescription string `xml:"DAV: responsedescription,omitempty"`
|
ResponseDescription string `xml:"responsedescription,omitempty"`
|
||||||
Status Status `xml:"DAV: status,omitempty"`
|
Status Status `xml:"status,omitempty"`
|
||||||
Error *RawXMLValue `xml:"DAV: error,omitempty"`
|
Error *RawXMLValue `xml:"error,omitempty"`
|
||||||
Location *Location `xml:"DAV: location,omitempty"`
|
Location *Location `xml:"location,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (resp *Response) DecodeProp(name xml.Name, v interface{}) error {
|
func (resp *Response) DecodeProp(name xml.Name, v interface{}) error {
|
||||||
@ -81,16 +81,16 @@ func (resp *Response) DecodeProp(name xml.Name, v interface{}) error {
|
|||||||
// https://tools.ietf.org/html/rfc4918#section-14.9
|
// https://tools.ietf.org/html/rfc4918#section-14.9
|
||||||
type Location struct {
|
type Location struct {
|
||||||
XMLName xml.Name `xml:"DAV: location"`
|
XMLName xml.Name `xml:"DAV: location"`
|
||||||
Href string `xml:"DAV: href"`
|
Href string `xml:"href"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc4918#section-14.22
|
// https://tools.ietf.org/html/rfc4918#section-14.22
|
||||||
type Propstat struct {
|
type Propstat struct {
|
||||||
XMLName xml.Name `xml:"DAV: propstat"`
|
XMLName xml.Name `xml:"DAV: propstat"`
|
||||||
Prop Prop `xml:"DAV: prop"`
|
Prop Prop `xml:"prop"`
|
||||||
Status Status `xml:"DAV: status"`
|
Status Status `xml:"status"`
|
||||||
ResponseDescription string `xml:"DAV: responsedescription,omitempty"`
|
ResponseDescription string `xml:"responsedescription,omitempty"`
|
||||||
Error *RawXMLValue `xml:"DAV: error,omitempty"`
|
Error *RawXMLValue `xml:"error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc4918#section-14.18
|
// https://tools.ietf.org/html/rfc4918#section-14.18
|
||||||
@ -102,7 +102,7 @@ type Prop struct {
|
|||||||
// https://tools.ietf.org/html/rfc4918#section-14.20
|
// https://tools.ietf.org/html/rfc4918#section-14.20
|
||||||
type Propfind struct {
|
type Propfind struct {
|
||||||
XMLName xml.Name `xml:"DAV: propfind"`
|
XMLName xml.Name `xml:"DAV: propfind"`
|
||||||
Prop *Prop `xml:"DAV: prop,omitempty"`
|
Prop *Prop `xml:"prop,omitempty"`
|
||||||
// TODO: propname | (allprop, include?)
|
// TODO: propname | (allprop, include?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user