feat: implement caldav search
This commit is contained in:
8
vendor/github.com/dolanor/caldav-go/caldav/values/component_name.go
generated
vendored
Normal file
8
vendor/github.com/dolanor/caldav-go/caldav/values/component_name.go
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
package values
|
||||
|
||||
type ComponentName string
|
||||
|
||||
const (
|
||||
CalendarComponentName ComponentName = "VCALENDAR"
|
||||
EventComponentName = "VEVENT"
|
||||
)
|
31
vendor/github.com/dolanor/caldav-go/caldav/values/datetime.go
generated
vendored
Normal file
31
vendor/github.com/dolanor/caldav-go/caldav/values/datetime.go
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
package values
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"github.com/dolanor/caldav-go/icalendar/values"
|
||||
"time"
|
||||
)
|
||||
|
||||
// a representation of a date and time for iCalendar
|
||||
type DateTime struct {
|
||||
name string
|
||||
t time.Time
|
||||
}
|
||||
|
||||
// creates a new caldav datetime representation, must be in UTC
|
||||
func NewDateTime(name string, t time.Time) (*DateTime, error) {
|
||||
if t.Location() != time.UTC {
|
||||
return nil, errors.New("CalDAV datetime must be in UTC")
|
||||
} else {
|
||||
return &DateTime{name: name, t: t.Truncate(time.Second)}, nil
|
||||
}
|
||||
}
|
||||
|
||||
// encodes the datetime value for the iCalendar specification
|
||||
func (d *DateTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
|
||||
layout := values.UTCDateTimeFormatString
|
||||
value := d.t.Format(layout)
|
||||
attr := xml.Attr{Name: name, Value: value}
|
||||
return attr, nil
|
||||
}
|
8
vendor/github.com/dolanor/caldav-go/caldav/values/human_boolean.go
generated
vendored
Normal file
8
vendor/github.com/dolanor/caldav-go/caldav/values/human_boolean.go
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
package values
|
||||
|
||||
type HumanBoolean string
|
||||
|
||||
const (
|
||||
YesHumanBoolean HumanBoolean = "yes"
|
||||
NoHumanBoolean = "no"
|
||||
)
|
8
vendor/github.com/dolanor/caldav-go/caldav/values/text_collation.go
generated
vendored
Normal file
8
vendor/github.com/dolanor/caldav-go/caldav/values/text_collation.go
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
package values
|
||||
|
||||
type TextCollation string
|
||||
|
||||
const (
|
||||
OctetTextCollation TextCollation = "i;octet"
|
||||
ASCIICaseMapCollation = "i;ascii-casemap"
|
||||
)
|
Reference in New Issue
Block a user