vendoring and caldav
This commit is contained in:
parent
a06aa900b7
commit
fd9092e5ab
96 changed files with 14832 additions and 5 deletions
27
vendor/github.com/samedi/caldav-go/handlers/headers.go
generated
vendored
Normal file
27
vendor/github.com/samedi/caldav-go/handlers/headers.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const (
|
||||
HD_DEPTH = "Depth"
|
||||
HD_DEPTH_DEEP = "1"
|
||||
HD_PREFER = "Prefer"
|
||||
HD_PREFER_MINIMAL = "return=minimal"
|
||||
HD_PREFERENCE_APPLIED = "Preference-Applied"
|
||||
)
|
||||
|
||||
type headers struct {
|
||||
http.Header
|
||||
}
|
||||
|
||||
func (this headers) IsDeep() bool {
|
||||
depth := this.Get(HD_DEPTH)
|
||||
return (depth == HD_DEPTH_DEEP)
|
||||
}
|
||||
|
||||
func (this headers) IsMinimal() bool {
|
||||
prefer := this.Get(HD_PREFER)
|
||||
return (prefer == HD_PREFER_MINIMAL)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue