entities

package
v0.0.0-...-5d30c27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalendarData

type CalendarData struct {
	XMLName             xml.Name             `xml:"urn:ietf:params:xml:ns:caldav calendar-data"`
	Component           *Component           `xml:",omitempty"`
	RecurrenceSetLimit  *RecurrenceSetLimit  `xml:",omitempty"`
	ExpandRecurrenceSet *ExpandRecurrenceSet `xml:",omitempty"`
	Content             string               `xml:",chardata"`
}

a CalDAV calendar data object

func (*CalendarData) CalendarComponent

func (c *CalendarData) CalendarComponent() (*components.Calendar, error)

type CalendarQuery

type CalendarQuery struct {
	XMLName xml.Name          `xml:"urn:ietf:params:xml:ns:caldav calendar-query"`
	Prop    *Prop             `xml:",omitempty"`
	AllProp *entities.AllProp `xml:",omitempty"`
	Filter  *Filter           `xml:",omitempty"`
}

a CalDAV calendar query object

func NewEventRangeQuery

func NewEventRangeQuery(start, end time.Time) (*CalendarQuery, error)

creates a new CalDAV query for iCalendar events from a particular time range

type Component

type Component struct {
	XMLName    xml.Name        `xml:"urn:ietf:params:xml:ns:caldav comp"`
	Properties []*PropertyName `xml:",omitempty"`
	Components []*Component    `xml:",omitempty"`
}

an iCalendar specifier for returned calendar data

type ComponentFilter

type ComponentFilter struct {
	XMLName         xml.Name             `xml:"urn:ietf:params:xml:ns:caldav comp-filter"`
	Name            values.ComponentName `xml:"name,attr"`
	ComponentFilter *ComponentFilter     `xml:",omitempty"`
	TimeRange       *TimeRange           `xml:",omitempty"`
	PropertyFilter  *PropertyFilter      `xml:",omitempty"`
	ParameterFilter *ParameterFilter     `xml:",omitempty"`
}

used to filter down calendar components, such as VCALENDAR > VEVENT

type ExpandRecurrenceSet

type ExpandRecurrenceSet struct {
	XMLName   xml.Name         `xml:"urn:ietf:params:xml:ns:caldav expand"`
	StartTime *values.DateTime `xml:"start,attr"`
	EndTime   *values.DateTime `xml:"end,attr"`
}

used to expand recurring events into individual calendar event data

type Filter

type Filter struct {
	XMLName         xml.Name         `xml:"urn:ietf:params:xml:ns:caldav filter"`
	ComponentFilter *ComponentFilter `xml:",omitempty"`
}

a CalDAV query filter entity

type Multistatus

type Multistatus struct {
	XMLName   xml.Name    `xml:"DAV: multistatus"`
	Responses []*Response `xml:"response,omitempty"`
}

a request to find properties on an an entity or collection

type ParameterFilter

type ParameterFilter struct {
	XMLName   xml.Name                 `xml:"urn:ietf:params:xml:ns:caldav param-filter"`
	Name      properties.ParameterName `xml:"name,attr"`
	TextMatch *TextMatch               `xml:",omitempty"`
}

used to restrict component filters to a parameter value

type Prop

type Prop struct {
	XMLName        xml.Name               `xml:"DAV: prop"`
	GetContentType string                 `xml:"getcontenttype,omitempty"`
	DisplayName    string                 `xml:"displayname,omitempty"`
	CalendarData   *CalendarData          `xml:",omitempty"`
	ResourceType   *entities.ResourceType `xml:",omitempty"`
	CTag           string                 `xml:"http://calendarserver.org/ns/ getctag,omitempty"`
	ETag           string                 `xml:"http://calendarserver.org/ns/ getetag,omitempty"`
}

a CalDAV Property resource

type PropStat

type PropStat struct {
	XMLName xml.Name `xml:"propstat"`
	Status  string   `xml:"status"`
	Prop    *Prop    `xml:",omitempty"`
}

metadata about a property

type PropertyFilter

type PropertyFilter struct {
	XMLName         xml.Name                `xml:"urn:ietf:params:xml:ns:caldav prop-filter"`
	Name            properties.PropertyName `xml:"name,attr"`
	TextMatch       *TextMatch              `xml:",omitempty"`
	ParameterFilter *ParameterFilter        `xml:",omitempty"`
}

used to restrict component filters to a property value

func NewPropertyMatcher

func NewPropertyMatcher(name properties.PropertyName, content string) *PropertyFilter

creates a new CalDAV property value matcher

type PropertyName

type PropertyName struct {
	XMLName xml.Name `xml:"urn:ietf:params:xml:ns:caldav prop"`
	Name    string   `xml:"name,attr"`
}

used to restrict properties returned in calendar data

type RecurrenceSetLimit

type RecurrenceSetLimit struct {
	XMLName   xml.Name         `xml:"urn:ietf:params:xml:ns:caldav limit-recurrence-set"`
	StartTime *values.DateTime `xml:"start,attr"`
	EndTime   *values.DateTime `xml:"end,attr"`
}

used to restrict recurring event data to a particular time range

type Response

type Response struct {
	XMLName   xml.Name    `xml:"response"`
	Href      string      `xml:"href"`
	PropStats []*PropStat `xml:"propstat,omitempty"`
}

a multistatus response entity

type TextMatch

type TextMatch struct {
	XMLName         xml.Name             `xml:"urn:ietf:params:xml:ns:caldav text-match"`
	Collation       values.TextCollation `xml:"collation,attr,omitempty"`
	NegateCondition values.HumanBoolean  `xml:"attr,negate-condition,omitempty"`
	Content         string               `xml:",innerxml"`
}

used to match properties by text value

type TimeRange

type TimeRange struct {
	XMLName   xml.Name         `xml:"urn:ietf:params:xml:ns:caldav time-range"`
	StartTime *values.DateTime `xml:"start,attr"`
	EndTime   *values.DateTime `xml:"end,attr"`
}

used to restrict component filters to a particular time range

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL