go-webdav/caldav/caldav.go
2022-04-12 09:38:26 +02:00

73 lines
1.2 KiB
Go

// Package caldav provides a client and server CalDAV implementation.
//
// CalDAV is defined in RFC 4791.
package caldav
import (
"time"
"github.com/emersion/go-ical"
)
type Calendar struct {
Path string
Name string
Description string
MaxResourceSize int64
SupportedComponentSet []string
}
type CalendarCompRequest struct {
Name string
AllProps bool
Props []string
AllComps bool
Comps []CalendarCompRequest
}
type CompFilter struct {
Name string
IsNotDefined bool
Start, End time.Time
Props []PropFilter
Comps []CompFilter
}
type ParamFilter struct {
Name string
IsNotDefined bool
TextMatch *TextMatch
}
type PropFilter struct {
Name string
IsNotDefined bool
Start, End time.Time
TextMatch *TextMatch
ParamFilter []ParamFilter
}
type TextMatch struct {
Text string
NegateCondition bool
}
type CalendarQuery struct {
CompRequest CalendarCompRequest
CompFilter CompFilter
}
type CalendarMultiGet struct {
Paths []string
CompRequest CalendarCompRequest
}
type CalendarObject struct {
Path string
ModTime time.Time
ETag string
Data *ical.Calendar
}