values

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PublicEventAccessClassification       EventAccessClassification = "PUBLIC"
	PrivateEventAccessClassification                                = "PRIVATE"
	ConfidentialEventAccessClassification                           = "CONFIDENTIAL"
)
View Source
const (
	TentativeEventStatus EventStatus = "TENTATIVE" // Indicates event is tentative.
	ConfirmedEventStatus             = "CONFIRMED" // Indicates event is definite.
	CancelledEventStatus             = "CANCELLED" // Indicates event is cancelled.
)
View Source
const (
	SecondRecurrenceFrequency RecurrenceFrequency = "SECONDLY"
	MinuteRecurrenceFrequency                     = "MINUTELY"
	HourRecurrenceFrequency                       = "HOURLY"
	DayRecurrenceFrequency                        = "DAILY"
	WeekRecurrenceFrequency                       = "WEEKLY"
	MonthRecurrenceFrequency                      = "MONTHLY"
	YearRecurrenceFrequency                       = "YEARLY"
)
View Source
const (
	MondayRecurrenceWeekday    RecurrenceWeekday = "MO"
	TuesdayRecurrenceWeekday                     = "TU"
	WednesdayRecurrenceWeekday                   = "WE"
	ThursdayRecurrenceWeekday                    = "TH"
	FridayRecurrenceWeekday                      = "FR"
	SaturdayRecurrenceWeekday                    = "SA"
	SundayRecurrenceWeekday                      = "SU"
)
View Source
const DateFormatString = "20060102"
View Source
const DateTimeFormatString = "20060102T150405"
View Source
const UTCDateTimeFormatString = "20060102T150405Z"

Variables

This section is empty.

Functions

This section is empty.

Types

type AttendeeContact

type AttendeeContact Contact

func NewAttendeeContact

func NewAttendeeContact(name, email string) *AttendeeContact

creates a new icalendar attendee representation

func (*AttendeeContact) DecodeICalParams

func (c *AttendeeContact) DecodeICalParams(params properties.Params) error

decodes the contact params from the iCalendar specification

func (*AttendeeContact) DecodeICalValue

func (c *AttendeeContact) DecodeICalValue(value string) error

decodes the contact value from the iCalendar specification

func (*AttendeeContact) EncodeICalName

func (o *AttendeeContact) EncodeICalName() (properties.PropertyName, error)

encodes the contact property name for the iCalendar specification

func (*AttendeeContact) EncodeICalParams

func (c *AttendeeContact) EncodeICalParams() (params properties.Params, err error)

encodes the contact params for the iCalendar specification

func (*AttendeeContact) EncodeICalValue

func (c *AttendeeContact) EncodeICalValue() (string, error)

encodes the contact value for the iCalendar specification

func (*AttendeeContact) ValidateICalValue

func (c *AttendeeContact) ValidateICalValue() error

validates the contact value for the iCalendar specification

type CSV

type CSV []string

func NewCSV

func NewCSV(items ...string) *CSV

func (*CSV) DecodeICalValue

func (csv *CSV) DecodeICalValue(value string) error

func (*CSV) EncodeICalValue

func (csv *CSV) EncodeICalValue() (string, error)

type CalScale

type CalScale string
const (
	GregorianCalScale CalScale = "GREGORIAN"
)

type Comment

type Comment string

specifies non-processing information intended to provide a comment to the calendar user.

func NewComments

func NewComments(comments ...string) []Comment

creates a list of comments from strings

func (Comment) DecodeICalValue

func (c Comment) DecodeICalValue(value string) error

decodes the comment value from the iCalendar specification

func (Comment) EncodeICalName

func (c Comment) EncodeICalName() (properties.PropertyName, error)

encodes the comment value for the iCalendar specification

func (Comment) EncodeICalValue

func (c Comment) EncodeICalValue() (string, error)

encodes the comment value for the iCalendar specification

type Contact

type Contact struct {
	Entry mail.Address
}

Specifies the organizer of a group scheduled calendar entity. The property is specified within the "VFREEBUSY" calendar component to specify the calendar user requesting the free or busy time. When publishing a "VFREEBUSY" calendar component, the property is used to specify the calendar that the published busy time came from.

The property has the property parameters CN, for specifying the common or display name associated with the "Organizer", DIR, for specifying a pointer to the directory information associated with the "Organizer", SENT-BY, for specifying another calendar user that is acting on behalf of the "Organizer". The non-standard parameters may also be specified on this property. If the LANGUAGE property parameter is specified, the identified language applies to the CN parameter value.

func (*Contact) DecodeICalParams

func (c *Contact) DecodeICalParams(params properties.Params) error

decodes the contact params from the iCalendar specification

func (*Contact) DecodeICalValue

func (c *Contact) DecodeICalValue(value string) error

decodes the contact value from the iCalendar specification

func (*Contact) EncodeICalParams

func (c *Contact) EncodeICalParams() (params properties.Params, err error)

encodes the contact params for the iCalendar specification

func (*Contact) EncodeICalValue

func (c *Contact) EncodeICalValue() (string, error)

encodes the contact value for the iCalendar specification

func (*Contact) ValidateICalValue

func (c *Contact) ValidateICalValue() error

validates the contact value for the iCalendar specification

type DateTime

type DateTime struct {
	// contains filtered or unexported fields
}

a representation of a date and time for iCalendar

func NewDateTime

func NewDateTime(t time.Time) *DateTime

creates a new icalendar datetime representation

func (*DateTime) DecodeICalParams

func (d *DateTime) DecodeICalParams(params properties.Params) error

decodes the datetime params from the iCalendar specification

func (*DateTime) DecodeICalValue

func (d *DateTime) DecodeICalValue(value string) error

decodes the datetime value from the iCalendar specification

func (*DateTime) EncodeICalParams

func (d *DateTime) EncodeICalParams() (params properties.Params, err error)

encodes the datetime params for the iCalendar specification

func (*DateTime) EncodeICalValue

func (d *DateTime) EncodeICalValue() (string, error)

encodes the datetime value for the iCalendar specification

func (*DateTime) Equals

func (d *DateTime) Equals(test *DateTime) bool

checks to see if two datetimes are equal

func (*DateTime) NativeTime

func (d *DateTime) NativeTime() time.Time

returns the native time for the datetime object

func (*DateTime) String

func (d *DateTime) String() string

encodes the datetime value for the iCalendar specification

func (*DateTime) ValidateICalValue

func (d *DateTime) ValidateICalValue() error

validates the datetime value against the iCalendar specification

type DateTimes

type DateTimes []*DateTime

func NewDateTimes

func NewDateTimes(dates ...*DateTime) DateTimes

creates a new icalendar datetime array representation

func (*DateTimes) DecodeICalParams

func (ds *DateTimes) DecodeICalParams(params properties.Params) error

decodes a list of datetime params from the iCalendar specification

func (*DateTimes) DecodeICalValue

func (ds *DateTimes) DecodeICalValue(value string) error

encodes a list of datetime values for the iCalendar specification

func (*DateTimes) EncodeICalParams

func (ds *DateTimes) EncodeICalParams() (params properties.Params, err error)

encodes a list of datetime params for the iCalendar specification

func (*DateTimes) EncodeICalValue

func (ds *DateTimes) EncodeICalValue() (string, error)

encodes a list of datetime values for the iCalendar specification

type Duration

type Duration struct {
	// contains filtered or unexported fields
}

a representation of duration for iCalendar

func NewDuration

func NewDuration(d time.Duration) *Duration

creates a new iCalendar duration representation

func (*Duration) DecodeICalValue

func (d *Duration) DecodeICalValue(value string) error

decodes the duration of time from iCalendar format

func (*Duration) Decompose

func (d *Duration) Decompose() (weeks, days, hours, minutes, seconds int64)

breaks apart the duration into its component time parts

func (*Duration) EncodeICalValue

func (d *Duration) EncodeICalValue() (string, error)

encodes the duration of time into iCalendar format

func (*Duration) IsPast

func (d *Duration) IsPast() bool

returns true if the duration is negative

func (*Duration) NativeDuration

func (d *Duration) NativeDuration() time.Duration

returns the native golang duration

func (*Duration) String

func (d *Duration) String() string

type EventAccessClassification

type EventAccessClassification string

An access classification is only one component of the general security system within a calendar application. It provides a method of capturing the scope of the access the calendar owner intends for information within an individual calendar entry. The access classification of an individual iCalendar component is useful when measured along with the other security components of a calendar system (e.g., calendar user authentication, authorization, access rights, access role, etc.). Hence, the semantics of the individual access classifications cannot be completely defined by this memo alone. Additionally, due to the "blind" nature of most exchange processes using this memo, these access classifications cannot serve as an enforcement statement for a system receiving an iCalendar object. Rather, they provide a method for capturing the intention of the calendar owner for the access to the calendar component.

type EventStatus

type EventStatus string

In a group scheduled calendar component, the property is used by the "Organizer" to provide a confirmation of the event to the "Attendees". For example in an Event calendar component, the "Organizer" can indicate that a meeting is tentative, confirmed or cancelled.

type ExceptionDateTimes

type ExceptionDateTimes DateTimes

The exception dates, if specified, are used in computing the recurrence set. The recurrence set is the complete set of recurrence instances for a calendar component. The recurrence set is generated by considering the initial "DTSTART" property along with the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained within the iCalendar object. The "DTSTART" property defines the first instance in the recurrence set. Multiple instances of the "RRULE" and "EXRULE" properties can also be specified to define more sophisticated recurrence sets. The final recurrence set is generated by gathering all of the start date-times generated by any of the specified "RRULE" and "RDATE" properties, and then excluding any start date and times which fall within the union of start date and times generated by any specified "EXRULE" and "EXDATE" properties. This implies that start date and times within exclusion related properties (i.e., "EXDATE" and "EXRULE") take precedence over those specified by inclusion properties (i.e., "RDATE" and "RRULE"). Where duplicate instances are generated by the "RRULE" and "RDATE" properties, only one recurrence is considered. Duplicate instances are ignored.

The "EXDATE" property can be used to exclude the value specified in "DTSTART". However, in such cases the original "DTSTART" date MUST still be maintained by the calendaring and scheduling system because the original "DTSTART" value has inherent usage dependencies by other properties such as the "RECURRENCE-ID".

func NewExceptionDateTimes

func NewExceptionDateTimes(dates ...*DateTime) *ExceptionDateTimes

creates a new icalendar datetime array representation

func (*ExceptionDateTimes) DecodeICalParams

func (e *ExceptionDateTimes) DecodeICalParams(params properties.Params) error

encodes exception date times property params for icalendar

func (*ExceptionDateTimes) DecodeICalValue

func (e *ExceptionDateTimes) DecodeICalValue(value string) error

decodes exception date times property value for icalendar

func (*ExceptionDateTimes) EncodeICalName

func (e *ExceptionDateTimes) EncodeICalName() (properties.PropertyName, error)

encodes exception date times property name for icalendar

func (*ExceptionDateTimes) EncodeICalParams

func (e *ExceptionDateTimes) EncodeICalParams() (params properties.Params, err error)

encodes exception date times property params for icalendar

func (*ExceptionDateTimes) EncodeICalValue

func (e *ExceptionDateTimes) EncodeICalValue() (string, error)

encodes exception date times property value for icalendar

type Geo

type Geo struct {
	// contains filtered or unexported fields
}

a representation of a geographical point for iCalendar

func NewGeo

func NewGeo(lat, lng float64) *Geo

creates a new icalendar geo representation

func (*Geo) DecodeICalValue

func (g *Geo) DecodeICalValue(value string) error

decodes the geo value from the iCalendar specification

func (*Geo) EncodeICalValue

func (g *Geo) EncodeICalValue() (string, error)

encodes the geo value for the iCalendar specification

func (*Geo) Lat

func (g *Geo) Lat() float64

returns the latitude encoded into the geo point

func (*Geo) Lng

func (g *Geo) Lng() float64

returns the longitude encoded into the geo point

func (*Geo) ValidateICalValue

func (g *Geo) ValidateICalValue() error

validates the geo value against the iCalendar specification

type Location

type Location struct {
	// contains filtered or unexported fields
}

Specific venues such as conference or meeting rooms may be explicitly specified using this property. An alternate representation may be specified that is a URI that points to directory information with more structured specification of the location. For example, the alternate representation may specify either an LDAP URI pointing to an LDAP server entry or a CID URI pointing to a MIME body part containing a vCard [RFC 2426] for the location.

func NewLocation

func NewLocation(value string, altrep ...*url.URL) *Location

creates a new icalendar location representation

func (*Location) AltRep

func (l *Location) AltRep() *url.URL

returns an alternate representation for the location if one exists

func (*Location) DecodeICalParams

func (l *Location) DecodeICalParams(params properties.Params) error

decodes the location params from the iCalendar specification

func (*Location) DecodeICalValue

func (l *Location) DecodeICalValue(value string) error

decodes the location from the iCalendar specification

func (*Location) EncodeICalParams

func (l *Location) EncodeICalParams() (params properties.Params, err error)

encodes the location params for the iCalendar specification

func (*Location) EncodeICalValue

func (l *Location) EncodeICalValue() (string, error)

encodes the location for the iCalendar specification

func (*Location) ValidateICalValue

func (l *Location) ValidateICalValue() error

validates the location against the iCalendar specification

type Method

type Method string
const (
	PublishMethod Method = "PUBLISH"
)

type OrganizerContact

type OrganizerContact Contact

func NewOrganizerContact

func NewOrganizerContact(name, email string) *OrganizerContact

creates a new icalendar organizer representation

func (*OrganizerContact) DecodeICalParams

func (c *OrganizerContact) DecodeICalParams(params properties.Params) error

decodes the contact params from the iCalendar specification

func (*OrganizerContact) DecodeICalValue

func (c *OrganizerContact) DecodeICalValue(value string) error

decodes the contact value from the iCalendar specification

func (*OrganizerContact) EncodeICalName

func (o *OrganizerContact) EncodeICalName() (properties.PropertyName, error)

encodes the contact property name for the iCalendar specification

func (*OrganizerContact) EncodeICalParams

func (c *OrganizerContact) EncodeICalParams() (params properties.Params, err error)

encodes the contact params for the iCalendar specification

func (*OrganizerContact) EncodeICalValue

func (c *OrganizerContact) EncodeICalValue() (string, error)

encodes the contact value for the iCalendar specification

func (*OrganizerContact) ValidateICalValue

func (c *OrganizerContact) ValidateICalValue() error

validates the contact value for the iCalendar specification

type RecurrenceDateTimes

type RecurrenceDateTimes DateTimes

The recurrence dates, if specified, are used in computing the recurrence set. The recurrence set is the complete set of recurrence instances for a calendar component. The recurrence set is generated by considering the initial "DTSTART" property along with the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained within the iCalendar object. The "DTSTART" property defines the first instance in the recurrence set. Multiple instances of the "RRULE" and "EXRULE" properties can also be specified to define more sophisticated recurrence sets. The final recurrence set is generated by gathering all of the start date-times generated by any of the specified "RRULE" and "RDATE" properties, and then excluding any start date and times which fall within the union of start date and times generated by any specified "EXRULE" and "EXDATE" properties. This implies that start date and times within exclusion related properties (i.e., "EXDATE" and "EXRULE") take precedence over those specified by inclusion properties (i.e., "RDATE" and "RRULE"). Where duplicate instances are generated by the "RRULE" and "RDATE" properties, only one recurrence is considered. Duplicate instances are ignored.

func NewRecurrenceDateTimes

func NewRecurrenceDateTimes(dates ...*DateTime) *RecurrenceDateTimes

creates a new icalendar datetime array representation

func (*RecurrenceDateTimes) DecodeICalParams

func (r *RecurrenceDateTimes) DecodeICalParams(params properties.Params) error

encodes recurrence date times property params for icalendar

func (*RecurrenceDateTimes) DecodeICalValue

func (r *RecurrenceDateTimes) DecodeICalValue(value string) error

decodes recurrence date times property value for icalendar

func (*RecurrenceDateTimes) EncodeICalName

func (r *RecurrenceDateTimes) EncodeICalName() (properties.PropertyName, error)

encodes recurrence date times property name for icalendar

func (*RecurrenceDateTimes) EncodeICalParams

func (r *RecurrenceDateTimes) EncodeICalParams() (params properties.Params, err error)

encodes recurrence date times property params for icalendar

func (*RecurrenceDateTimes) EncodeICalValue

func (r *RecurrenceDateTimes) EncodeICalValue() (string, error)

encodes recurrence date times property value for icalendar

type RecurrenceFrequency

type RecurrenceFrequency string

the frequency an event recurs

func (RecurrenceFrequency) IsValidFrequency

func (r RecurrenceFrequency) IsValidFrequency() bool

returns true if weekday is a valid constant

type RecurrenceRule

type RecurrenceRule struct {
	Frequency     RecurrenceFrequency
	Until         *DateTime
	Count         int
	Interval      int
	BySecond      []int
	ByMinute      []int
	ByHour        []int
	ByDay         []RecurrenceWeekday
	ByMonthDay    []int
	ByYearDay     []int
	ByWeekNumber  []int
	ByMonth       []int
	BySetPosition []int
	WeekStart     RecurrenceWeekday
}

Any duration associated with the iCalendar object applies to all members of the generated recurrence set. Any modified duration for specific recurrences MUST be explicitly specified using the "RDATE" property.

func NewRecurrenceRule

func NewRecurrenceRule(frequency RecurrenceFrequency) *RecurrenceRule

creates a new recurrence rule object for iCalendar

func (*RecurrenceRule) DecodeICalValue

func (r *RecurrenceRule) DecodeICalValue(value string) error

decodes the recurrence rule value from the iCalendar specification

func (*RecurrenceRule) EncodeICalName

func (r *RecurrenceRule) EncodeICalName() (properties.PropertyName, error)

returns the recurrence rule name for the iCalendar specification

func (*RecurrenceRule) EncodeICalValue

func (r *RecurrenceRule) EncodeICalValue() (string, error)

encodes the recurrence rule value for the iCalendar specification

func (*RecurrenceRule) ValidateICalValue

func (r *RecurrenceRule) ValidateICalValue() error

validates the recurrence rule value against the iCalendar specification

type RecurrenceWeekday

type RecurrenceWeekday string

the frequency an event recurs

func (RecurrenceWeekday) IsValidWeekDay

func (r RecurrenceWeekday) IsValidWeekDay() bool

returns true if weekday is a valid constant

type TimeTransparency

type TimeTransparency string

Time Transparency is the characteristic of an event that determines whether it appears to consume time on a calendar. Events that consume actual time for the individual or resource associated with the calendar SHOULD be recorded as OPAQUE, allowing them to be detected by free-busy time searches. Other events, which do not take up the individual's (or resource's) time SHOULD be recorded as TRANSPARENT, making them invisible to free-busy time searches.

const (
	OpaqueTimeTransparency      TimeTransparency = "OPAQUE"      // Blocks or opaque on busy time searches. DEFAULT
	TransparentTimeTransparency                  = "TRANSPARENT" // Transparent on busy time searches.
)

type Url

type Url struct {
	// contains filtered or unexported fields
}

a representation of duration for iCalendar

func NewUrl

func NewUrl(u url.URL) *Url

creates a new iCalendar duration representation

func (*Url) DecodeICalValue

func (u *Url) DecodeICalValue(value string) error

decodes the URL from iCalendar format

func (*Url) EncodeICalParams

func (u *Url) EncodeICalParams() (params properties.Params, err error)

encodes the url params for the iCalendar specification

func (*Url) EncodeICalValue

func (u *Url) EncodeICalValue() (string, error)

encodes the URL into iCalendar format

func (*Url) ValidateICalValue

func (u *Url) ValidateICalValue() error

validates the URL for iCalendar format

Jump to

Keyboard shortcuts

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