webdav

package
v0.0.0-...-6217932 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrs

type Attrs struct {
	Name  string
	IsDir bool
	Size  int64
	Ctime int64
	Mtime int64
}

type Fs

type Fs interface {
	Get(w http.ResponseWriter, r *http.Request)
	Stat(path string) (Attrs, error)
	Ls(path string) ([]Attrs, error)
}

type MultiStatusResponse

type MultiStatusResponse struct {
	XMLName   xml.Name         `xml:"DAV: multistatus"`
	Responses []StatusResponse `xml:"DAV: response"`
}

type Prop

type Prop struct {
	Props []PropSet `xml:",any"`
}

type PropSet

type PropSet struct {
	XMLName xml.Name
}

type PropStat

type PropStat struct {
	Prop   PropValue `xml:"DAV: prop"`
	Status string    `xml:"DAV: status"`
}

type PropValue

type PropValue struct {
	CreationDate  string `xml:"DAV: creationdate,omitempty"`
	LastModified  string `xml:"DAV: getlastmodified,omitempty"`
	ContentLength int64  `xml:"DAV: getcontentlength,omitempty"`
	ResourceType  struct {
		Collection *struct{} `xml:"DAV: collection,omitempty"`
	} `xml:"DAV: resourcetype"`
}

type PropfindRequest

type PropfindRequest struct {
	XMLName xml.Name `xml:"DAV: propfind"`
	Prop    Prop     `xml:"DAV: prop"`
	AllProp xml.Name `xml:"DAV: allprop"`
}

type StatusResponse

type StatusResponse struct {
	Href  string   `xml:"DAV: href"`
	Stats PropStat `xml:"DAV: propstat"`
}

type WebDAV

type WebDAV struct {
	// contains filtered or unexported fields
}

func NewWebDAV

func NewWebDAV(prefix string, fs Fs) *WebDAV

func (*WebDAV) ServeHTTP

func (wd *WebDAV) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL