Initial commit 🌈
This commit is contained in:
28
pkg/dav/response.go
Normal file
28
pkg/dav/response.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package dav
|
||||
|
||||
func Directory(path string) Response {
|
||||
return Response{
|
||||
Href: customPathEscape(path),
|
||||
Propstat: PropStat{
|
||||
Prop: Prop{
|
||||
ResourceType: ResourceType{Collection: &struct{}{}},
|
||||
},
|
||||
Status: "HTTP/1.1 200 OK",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func File(path string, fileSize int, added string) Response {
|
||||
return Response{
|
||||
Href: customPathEscape(path),
|
||||
Propstat: PropStat{
|
||||
Prop: Prop{
|
||||
ContentLength: fileSize,
|
||||
IsHidden: 0,
|
||||
CreationDate: added,
|
||||
LastModified: added,
|
||||
},
|
||||
Status: "HTTP/1.1 200 OK",
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user