2020-01-30 12:18:05 +00:00
|
|
|
// Package caldav provides a client and server CalDAV implementation.
|
|
|
|
//
|
|
|
|
// CalDAV is defined in RFC 4791.
|
|
|
|
package caldav
|
2020-01-30 12:51:02 +00:00
|
|
|
|
2020-02-03 16:26:55 +00:00
|
|
|
import (
|
|
|
|
"time"
|
2020-02-05 17:05:48 +00:00
|
|
|
|
|
|
|
"github.com/luxifer/ical"
|
2020-02-03 16:26:55 +00:00
|
|
|
)
|
|
|
|
|
2020-01-30 12:51:02 +00:00
|
|
|
type Calendar struct {
|
|
|
|
Path string
|
|
|
|
Name string
|
|
|
|
Description string
|
|
|
|
MaxResourceSize int64
|
|
|
|
}
|
2020-02-03 16:26:55 +00:00
|
|
|
|
|
|
|
type CalendarCompRequest struct {
|
|
|
|
Name string
|
|
|
|
|
|
|
|
AllProps bool
|
|
|
|
Props []string
|
|
|
|
|
|
|
|
AllComps bool
|
|
|
|
Comps []CalendarCompRequest
|
|
|
|
}
|
|
|
|
|
2020-02-05 16:36:18 +00:00
|
|
|
type CompFilter struct {
|
|
|
|
Name string
|
|
|
|
Start, End time.Time
|
2020-02-05 17:38:46 +00:00
|
|
|
Props []PropFilter
|
2020-02-05 16:36:18 +00:00
|
|
|
Comps []CompFilter
|
|
|
|
}
|
|
|
|
|
2020-02-05 17:38:46 +00:00
|
|
|
type PropFilter struct {
|
|
|
|
Name string
|
|
|
|
TextMatch *TextMatch
|
|
|
|
}
|
|
|
|
|
|
|
|
type TextMatch struct {
|
|
|
|
Text string
|
|
|
|
}
|
|
|
|
|
2020-02-03 16:26:55 +00:00
|
|
|
type CalendarQuery struct {
|
2020-02-05 16:36:18 +00:00
|
|
|
CompRequest CalendarCompRequest
|
|
|
|
CompFilter CompFilter
|
2020-02-03 16:26:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type CalendarObject struct {
|
|
|
|
Path string
|
|
|
|
ModTime time.Time
|
|
|
|
ETag string
|
2020-02-05 17:05:48 +00:00
|
|
|
Data *ical.Calendar
|
2020-02-03 16:26:55 +00:00
|
|
|
}
|