diff --git a/calendar.go b/calendar.go index 1153b4d..39d18b6 100644 --- a/calendar.go +++ b/calendar.go @@ -44,13 +44,13 @@ func NewCalendar( return nil, fmt.Errorf("you must specify a PRODID number") } return &calendar{ - Begin: properties.NewBlockDelimiterProperty(registries.BEGIN, registries.Vcalendar), + Begin: properties.NewBlockDelimiterProperty(registries.Begin, registries.Vcalendar), ProdId: properties.NewProductIdProperty(prodId), Version: properties.NewVersionProperty(calendarVersion), Method: properties.NewMethodProperty(calendarMethod), CalScale: properties.NewCalScaleProperty(), Components: calendarComponents, - End: properties.NewBlockDelimiterProperty(registries.END, registries.Vcalendar), + End: properties.NewBlockDelimiterProperty(registries.End, registries.Vcalendar), }, nil } diff --git a/components/alarm_calendar_component.go b/components/alarm_calendar_component.go index ead67b7..89f484c 100644 --- a/components/alarm_calendar_component.go +++ b/components/alarm_calendar_component.go @@ -29,15 +29,17 @@ func NewAlarmCalendarComponent( trigger properties.TriggerProperty, propertyList ...properties.Property) AlarmCalendarComponent { return &alarmCalendarComponent{ - Begin: properties.NewBlockDelimiterProperty(registries.BEGIN, registries.Valarm), + Begin: properties.NewBlockDelimiterProperty(registries.Begin, registries.Valarm), Trigger: trigger, Properties: propertyList, Action: action, - End: properties.NewBlockDelimiterProperty(registries.END, registries.Valarm), + End: properties.NewBlockDelimiterProperty(registries.End, registries.Valarm), } } -func (aC *alarmCalendarComponent) GetProperty(name registries.PropertyNames) properties.Property { +func (aC *alarmCalendarComponent) GetProperty( + name registries.PropertyRegistry, +) properties.Property { for i := 0; i < len(aC.Properties); i++ { if aC.Properties[i].GetName() == name { return aC.Properties[i] @@ -46,43 +48,43 @@ func (aC *alarmCalendarComponent) GetProperty(name registries.PropertyNames) pro return nil } -func (aC *alarmCalendarComponent) MandatoryProperties() []registries.PropertyNames { +func (aC *alarmCalendarComponent) MandatoryProperties() []registries.PropertyRegistry { switch aC.Action.GetActionValue() { case registries.Audio: - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.ACTION, - registries.TRIGGER, + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Action, + registries.Trigger, } case registries.Display: - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.ACTION, - registries.TRIGGER, - registries.DESCRIPTION, + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Action, + registries.Trigger, + registries.Description, } case registries.Email: - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.ACTION, - registries.TRIGGER, - registries.DESCRIPTION, - registries.SUMMARY, + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Action, + registries.Trigger, + registries.Description, + registries.Summary, } default: - return []registries.PropertyNames{registries.BEGIN, registries.END} + return []registries.PropertyRegistry{registries.Begin, registries.End} } } -func (aC *alarmCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (aC *alarmCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } -func (aC *alarmCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{registries.DURATION_PROP, registries.REPEAT} +func (aC *alarmCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{registries.DurationProperty, registries.Repeat} } func (aC *alarmCalendarComponent) SerializeToICSFormat(output io.Writer) { diff --git a/components/calendar_component.go b/components/calendar_component.go index 28e897e..e0bc29e 100644 --- a/components/calendar_component.go +++ b/components/calendar_component.go @@ -16,18 +16,18 @@ type CalendarComponent interface { SerializeToICSFormat(output io.Writer) // MandatoryProperties return the list of the mandatory properties of a CalendarComponent - MandatoryProperties() []registries.PropertyNames + MandatoryProperties() []registries.PropertyRegistry - // GetProperty get a property by his registries.PropertyNames - GetProperty(name registries.PropertyNames) properties.Property + // GetProperty get a property by his registries.PropertyRegistry + GetProperty(name registries.PropertyRegistry) properties.Property // MutuallyExclusiveProperties return the list of the mutually exclusives properties of a CalendarComponent // Example : In a VEVENT component, you can't have a DTEND and a DURATION property at the same time - MutuallyExclusiveProperties() []registries.PropertyNames + MutuallyExclusiveProperties() []registries.PropertyRegistry // MutuallyInclusiveProperties return the list of the mutually inclusive properties of a CalendarComponent // Example : In a VALARM component, if you set a value for the DURATION property, you have to also set one for the REPEAT property - MutuallyInclusiveProperties() []registries.PropertyNames + MutuallyInclusiveProperties() []registries.PropertyRegistry } // CalendarComponents is an array of CalendarComponent diff --git a/components/event_calendar_component.go b/components/event_calendar_component.go index eec700a..4038768 100644 --- a/components/event_calendar_component.go +++ b/components/event_calendar_component.go @@ -32,7 +32,7 @@ func NewEventCalendarComponent( propertyList ...properties.Property) EventCalendarComponent { return &eventCalendarComponent{ Begin: properties.NewBlockDelimiterProperty( - registries.BEGIN, + registries.Begin, registries.Vevent, ), UID: uid, @@ -40,13 +40,15 @@ func NewEventCalendarComponent( AlarmCalendarComponents: alarmCalendarComponents, Properties: propertyList, End: properties.NewBlockDelimiterProperty( - registries.END, + registries.End, registries.Vevent, ), } } -func (eC *eventCalendarComponent) GetProperty(name registries.PropertyNames) properties.Property { +func (eC *eventCalendarComponent) GetProperty( + name registries.PropertyRegistry, +) properties.Property { for i := 0; i < len(eC.Properties); i++ { if eC.Properties[i].GetName() == name { return eC.Properties[i] @@ -54,21 +56,21 @@ func (eC *eventCalendarComponent) GetProperty(name registries.PropertyNames) pro } return nil } -func (eC *eventCalendarComponent) MandatoryProperties() []registries.PropertyNames { - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.UID, - registries.DTSTAMP, +func (eC *eventCalendarComponent) MandatoryProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Uid, + registries.DateTimeStamp, } } -func (eC *eventCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{registries.DTEND, registries.DURATION_PROP} +func (eC *eventCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{registries.DateTimeEnd, registries.DurationProperty} } -func (eC *eventCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (eC *eventCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } func (eC *eventCalendarComponent) SerializeToICSFormat(output io.Writer) { diff --git a/components/event_calendar_component_test.go b/components/event_calendar_component_test.go index 4e31e0d..9a63d33 100644 --- a/components/event_calendar_component_test.go +++ b/components/event_calendar_component_test.go @@ -66,6 +66,6 @@ func TestEventCalendarComponent_GetProperty(t *testing.T) { summary, ) - prop := component.GetProperty(registries.SUMMARY) + prop := component.GetProperty(registries.Summary) assert.Equal(t, "Event Summary", prop.GetValue()) } diff --git a/components/freebusy_calendar_component.go b/components/freebusy_calendar_component.go index bc71204..30ce8e6 100644 --- a/components/freebusy_calendar_component.go +++ b/components/freebusy_calendar_component.go @@ -29,16 +29,16 @@ func NewFreeBusyCalendarComponent( dateTimeStamp properties.DateTimeStampProperty, propertyList ...properties.Property) FreeBusyCalendarComponent { return &freeBusyCalendarComponent{ - Begin: properties.NewBlockDelimiterProperty(registries.BEGIN, registries.Vfreebusy), + Begin: properties.NewBlockDelimiterProperty(registries.Begin, registries.Vfreebusy), UID: uid, DateTimeStamp: dateTimeStamp, Properties: propertyList, - End: properties.NewBlockDelimiterProperty(registries.END, registries.Vfreebusy), + End: properties.NewBlockDelimiterProperty(registries.End, registries.Vfreebusy), } } func (fC *freeBusyCalendarComponent) GetProperty( - name registries.PropertyNames, + name registries.PropertyRegistry, ) properties.Property { for i := 0; i < len(fC.Properties); i++ { if fC.Properties[i].GetName() == name { @@ -48,21 +48,21 @@ func (fC *freeBusyCalendarComponent) GetProperty( return nil } -func (fC *freeBusyCalendarComponent) MandatoryProperties() []registries.PropertyNames { - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.UID, - registries.DTSTAMP, +func (fC *freeBusyCalendarComponent) MandatoryProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Uid, + registries.DateTimeStamp, } } -func (fC *freeBusyCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (fC *freeBusyCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } -func (fC *freeBusyCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (fC *freeBusyCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } func (fC *freeBusyCalendarComponent) SerializeToICSFormat(output io.Writer) { diff --git a/components/journal_calendar_component.go b/components/journal_calendar_component.go index 0eef946..e41f287 100644 --- a/components/journal_calendar_component.go +++ b/components/journal_calendar_component.go @@ -29,15 +29,17 @@ func NewJournalCalendarComponent( dateTimeStamp properties.DateTimeStampProperty, propertyList ...properties.Property) JournalCalendarComponent { return &journalCalendarComponent{ - Begin: properties.NewBlockDelimiterProperty(registries.BEGIN, registries.Vjournal), + Begin: properties.NewBlockDelimiterProperty(registries.Begin, registries.Vjournal), UID: uid, DateTimeStamp: dateTimeStamp, Properties: propertyList, - End: properties.NewBlockDelimiterProperty(registries.END, registries.Vjournal), + End: properties.NewBlockDelimiterProperty(registries.End, registries.Vjournal), } } -func (jC *journalCalendarComponent) GetProperty(name registries.PropertyNames) properties.Property { +func (jC *journalCalendarComponent) GetProperty( + name registries.PropertyRegistry, +) properties.Property { for i := 0; i < len(jC.Properties); i++ { if jC.Properties[i].GetName() == name { return jC.Properties[i] @@ -46,21 +48,21 @@ func (jC *journalCalendarComponent) GetProperty(name registries.PropertyNames) p return nil } -func (jC *journalCalendarComponent) MandatoryProperties() []registries.PropertyNames { - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.UID, - registries.DTSTAMP, +func (jC *journalCalendarComponent) MandatoryProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Uid, + registries.DateTimeStamp, } } -func (jC *journalCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (jC *journalCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } -func (jC *journalCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (jC *journalCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } func (jC *journalCalendarComponent) SerializeToICSFormat(output io.Writer) { diff --git a/components/time_zone_calendar_component.go b/components/time_zone_calendar_component.go index d5e7a20..12ffef1 100644 --- a/components/time_zone_calendar_component.go +++ b/components/time_zone_calendar_component.go @@ -56,16 +56,16 @@ func NewTimeZoneCalendarComponent( components TimeZoneCalendarSubComponents, propertyList ...properties.Property) TimeZoneCalendarStandardComponent { return &timeZoneCalendarComponent{ - Begin: properties.NewBlockDelimiterProperty(registries.BEGIN, registries.Vtimezone), + Begin: properties.NewBlockDelimiterProperty(registries.Begin, registries.Vtimezone), TimeZoneId: timeZoneId, Components: components, Properties: propertyList, - End: properties.NewBlockDelimiterProperty(registries.END, registries.Vtimezone), + End: properties.NewBlockDelimiterProperty(registries.End, registries.Vtimezone), } } func (tC *timeZoneCalendarComponent) GetProperty( - name registries.PropertyNames, + name registries.PropertyRegistry, ) properties.Property { for i := 0; i < len(tC.Properties); i++ { if tC.Properties[i].GetName() == name { @@ -76,7 +76,7 @@ func (tC *timeZoneCalendarComponent) GetProperty( } func (tC *timeZoneCalendarSubComponent) GetProperty( - name registries.PropertyNames, + name registries.PropertyRegistry, ) properties.Property { for i := 0; i < len(tC.Properties); i++ { if tC.Properties[i].GetName() == name { @@ -96,7 +96,7 @@ func NewTimeZoneDayLightSubcomponent( propertyList ...properties.Property) TimeZoneCalendarDaylightComponent { return &timeZoneCalendarSubComponent{ Begin: properties.NewBlockDelimiterProperty( - registries.BEGIN, + registries.Begin, registries.Daylight, ), DateTimeStart: dateTimeStart, @@ -104,7 +104,7 @@ func NewTimeZoneDayLightSubcomponent( TimeZoneOffsetFrom: timeZoneOffsetFrom, Properties: propertyList, End: properties.NewBlockDelimiterProperty( - registries.END, + registries.End, registries.Daylight, ), } @@ -120,7 +120,7 @@ func NewTimeZoneCalendarStandardSubcomponent( propertyList ...properties.Property) TimeZoneCalendarSubComponent { return &timeZoneCalendarSubComponent{ Begin: properties.NewBlockDelimiterProperty( - registries.BEGIN, + registries.Begin, registries.Standard, ), DateTimeStart: dateTimeStart, @@ -128,7 +128,7 @@ func NewTimeZoneCalendarStandardSubcomponent( TimeZoneOffsetFrom: timeZoneOffsetFrom, Properties: propertyList, End: properties.NewBlockDelimiterProperty( - registries.END, + registries.End, registries.Standard, ), } @@ -146,16 +146,20 @@ func (tC *timeZoneCalendarComponent) SerializeToICSFormat(output io.Writer) { tC.End.ToICalendarPropFormat(output) } -func (tC *timeZoneCalendarComponent) MandatoryProperties() []registries.PropertyNames { - return []registries.PropertyNames{registries.BEGIN, registries.END, registries.PROP_TZID} +func (tC *timeZoneCalendarComponent) MandatoryProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.TimeZoneIdProperty, + } } -func (tC *timeZoneCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (tC *timeZoneCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } -func (tC *timeZoneCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (tC *timeZoneCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } func (tC *timeZoneCalendarSubComponent) SerializeToICSFormat(output io.Writer) { @@ -169,20 +173,20 @@ func (tC *timeZoneCalendarSubComponent) SerializeToICSFormat(output io.Writer) { tC.End.ToICalendarPropFormat(output) } -func (tC *timeZoneCalendarSubComponent) MandatoryProperties() []registries.PropertyNames { - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.DTSTART, - registries.TZOFFSETTO, - registries.TZOFFSETFROM, +func (tC *timeZoneCalendarSubComponent) MandatoryProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.DateTimeStart, + registries.TimeZoneOffsetTo, + registries.TimeZoneOffsetFrom, } } -func (tC *timeZoneCalendarSubComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (tC *timeZoneCalendarSubComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } -func (tC *timeZoneCalendarSubComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (tC *timeZoneCalendarSubComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } diff --git a/components/todo_calendar_component.go b/components/todo_calendar_component.go index d254603..c2062dd 100644 --- a/components/todo_calendar_component.go +++ b/components/todo_calendar_component.go @@ -32,7 +32,7 @@ func NewToDoCalendarComponent( propertyList ...properties.Property) ToDoCalendarComponent { return &toDoCalendarComponent{ Begin: properties.NewBlockDelimiterProperty( - registries.BEGIN, + registries.Begin, registries.Vtodo, ), UID: uid, @@ -40,13 +40,13 @@ func NewToDoCalendarComponent( AlarmCalendarComponents: alarmCalendarComponents, Properties: propertyList, End: properties.NewBlockDelimiterProperty( - registries.END, + registries.End, registries.Vtodo, ), } } -func (tC *toDoCalendarComponent) GetProperty(name registries.PropertyNames) properties.Property { +func (tC *toDoCalendarComponent) GetProperty(name registries.PropertyRegistry) properties.Property { for i := 0; i < len(tC.Properties); i++ { if tC.Properties[i].GetName() == name { return tC.Properties[i] @@ -55,21 +55,21 @@ func (tC *toDoCalendarComponent) GetProperty(name registries.PropertyNames) prop return nil } -func (tC *toDoCalendarComponent) MandatoryProperties() []registries.PropertyNames { - return []registries.PropertyNames{ - registries.BEGIN, - registries.END, - registries.UID, - registries.DTSTAMP, +func (tC *toDoCalendarComponent) MandatoryProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{ + registries.Begin, + registries.End, + registries.Uid, + registries.DateTimeStamp, } } -func (tC *toDoCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{registries.DUE, registries.DURATION_PROP} +func (tC *toDoCalendarComponent) MutuallyExclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{registries.DateTimeDue, registries.DurationProperty} } -func (tC *toDoCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyNames { - return []registries.PropertyNames{} +func (tC *toDoCalendarComponent) MutuallyInclusiveProperties() []registries.PropertyRegistry { + return []registries.PropertyRegistry{} } func (tC *toDoCalendarComponent) SerializeToICSFormat(output io.Writer) { diff --git a/parameters/time_zone_identifier.go b/parameters/time_zone_identifier.go index 116ea23..04062e2 100644 --- a/parameters/time_zone_identifier.go +++ b/parameters/time_zone_identifier.go @@ -21,7 +21,7 @@ type TimeZoneIdentifierParam interface { func NewTimeZoneIdentifierParam(value string) TimeZoneIdentifierParam { return &textParameter{ - ParamName: registries.TZIDParameter, + ParamName: registries.TimeZoneId, Value: types.NewTextValue(value), } } diff --git a/parser/property_parser.go b/parser/property_parser.go index d8b767e..81532af 100644 --- a/parser/property_parser.go +++ b/parser/property_parser.go @@ -23,7 +23,7 @@ func ParseProperty(propertyName string, propertyValue string) (properties.Proper return attendee, nil case "BEGIN": return properties.NewBlockDelimiterPropertyFromString( - registries.BEGIN, + registries.Begin, propertyValue, ), nil case "CATEGORIES": @@ -53,7 +53,7 @@ func ParseProperty(propertyName string, propertyValue string) (properties.Proper case "DUE": return properties.NewDateTimeDuePropertyFromString(propertyValue, types.WithUtcTime), nil case "END": - return properties.NewBlockDelimiterPropertyFromString(registries.END, propertyValue), nil + return properties.NewBlockDelimiterPropertyFromString(registries.End, propertyValue), nil case "EXDATE": return properties.NewExceptionDateTimePropertyFromString( propertyValue, diff --git a/properties/action_property.go b/properties/action_property.go index 3e4a81f..aaf5135 100644 --- a/properties/action_property.go +++ b/properties/action_property.go @@ -18,7 +18,7 @@ func NewActionProperty( params ...parameters.Parameter, ) ActionProperty { return &actionPropertyType{ - PropName: registries.ACTION, + PropName: registries.Action, Value: types.NewActionValue(action), Parameters: params, } @@ -29,7 +29,7 @@ func NewActionPropertyFromString( params ...parameters.Parameter, ) BlockDelimiterProperty { return &actionPropertyType{ - PropName: registries.ACTION, + PropName: registries.Action, Value: types.NewActionValue(registries.ActionRegistry(actionString)), Parameters: params, } diff --git a/properties/attachment_property.go b/properties/attachment_property.go index 1bbdfc7..67b0cfb 100644 --- a/properties/attachment_property.go +++ b/properties/attachment_property.go @@ -20,7 +20,7 @@ func NewAttachmentProperty( params ...parameters.Parameter, ) AttachmentProperty { return &textPropertyType{ - PropName: registries.ATTACH, + PropName: registries.Attachment, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/attendee_property.go b/properties/attendee_property.go index c786e0a..42481e7 100644 --- a/properties/attendee_property.go +++ b/properties/attendee_property.go @@ -21,7 +21,7 @@ type AttendeeProperty interface { // [See RFC-5545 ref]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.1 func NewAttendeeProperty(uri *url.URL, params ...parameters.Parameter) AttendeeProperty { return &calendarUserAddressPropertyType{ - PropName: registries.ATTENDEE, + PropName: registries.Attendee, Value: types.NewCalendarUserAddressValue(uri), Parameters: params, } @@ -37,7 +37,7 @@ func NewAttendeePropertyFromString( } return &calendarUserAddressPropertyType{ - PropName: registries.ATTENDEE, + PropName: registries.Attendee, Value: types.NewCalendarUserAddressValue(urlValue), Parameters: params, }, nil diff --git a/properties/block_delemiter_property.go b/properties/block_delemiter_property.go index f391206..539cda8 100644 --- a/properties/block_delemiter_property.go +++ b/properties/block_delemiter_property.go @@ -12,7 +12,7 @@ type BlockDelimiterProperty interface { } func NewBlockDelimiterProperty( - block registries.PropertyNames, + block registries.PropertyRegistry, component registries.ComponentRegistry, ) BlockDelimiterProperty { return &blockDelimiterPropertyType{ @@ -22,7 +22,7 @@ func NewBlockDelimiterProperty( } func NewBlockDelimiterPropertyFromString( - block registries.PropertyNames, + block registries.PropertyRegistry, stringComponent string, ) BlockDelimiterProperty { return &blockDelimiterPropertyType{ diff --git a/properties/calandar_scale_property.go b/properties/calandar_scale_property.go index ef02d40..35d1132 100644 --- a/properties/calandar_scale_property.go +++ b/properties/calandar_scale_property.go @@ -18,7 +18,7 @@ type CalendarScaleProperty interface { func NewCalScaleProperty(params ...parameters.Parameter) CalendarScaleProperty { return &textPropertyType{ Parameters: params, - PropName: registries.CALSCALE, + PropName: registries.CalendarScale, Value: types.NewTextValue( CalendarScaleValue), } diff --git a/properties/categories_property.go b/properties/categories_property.go index 07bb5b0..c4e3a1e 100644 --- a/properties/categories_property.go +++ b/properties/categories_property.go @@ -15,7 +15,7 @@ type CategoriesProperty interface { func NewCategoryProperty(values []string, params ...parameters.Parameter) CategoriesProperty { return &textPropertyType{ - PropName: registries.CATEGORIES, + PropName: registries.Categories, Values: types.NewTextValues(values), Parameters: params, } @@ -26,7 +26,7 @@ func NewCategoryPropertyFromString( params ...parameters.Parameter, ) CategoriesProperty { return &textPropertyType{ - PropName: registries.CATEGORIES, + PropName: registries.Categories, Values: types.NewTextValues(utils.StringToStringArray(values)), Parameters: params, } diff --git a/properties/classification_property.go b/properties/classification_property.go index 7a68409..6d55a5d 100644 --- a/properties/classification_property.go +++ b/properties/classification_property.go @@ -17,7 +17,7 @@ func NewClassificationProperty( params ...parameters.Parameter, ) ClassificationProperty { return &classificationPropertyType{ - PropName: registries.CLASS, + PropName: registries.Class, Value: types.NewClassificationValue(classValue), Parameters: params, } @@ -28,7 +28,7 @@ func NewClassificationPropertyFromString( params ...parameters.Parameter, ) ClassificationProperty { return &classificationPropertyType{ - PropName: registries.CLASS, + PropName: registries.Class, Value: types.NewClassificationValue(registries.ClassificationRegistry(classValue)), Parameters: params, } diff --git a/properties/comment_property.go b/properties/comment_property.go index 4a50267..3255ae6 100644 --- a/properties/comment_property.go +++ b/properties/comment_property.go @@ -14,7 +14,7 @@ type CommentProperty interface { func NewCommentProperty(value string, params ...parameters.Parameter) CommentProperty { return &textPropertyType{ - PropName: registries.COMMENT, + PropName: registries.Comment, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/contact_property.go b/properties/contact_property.go index e10409f..a61bd58 100644 --- a/properties/contact_property.go +++ b/properties/contact_property.go @@ -14,7 +14,7 @@ type ContactProperty interface { func NewContactProperty(value string, params ...parameters.Parameter) ContactProperty { return &textPropertyType{ - PropName: registries.CONTACT, + PropName: registries.Contact, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/date_time_completed_property.go b/properties/date_time_completed_property.go index 226d969..a645be3 100644 --- a/properties/date_time_completed_property.go +++ b/properties/date_time_completed_property.go @@ -19,7 +19,7 @@ func NewDateTimeCompletedProperty( value time.Time, ) DateTimeCompletedProperty { return &dateTimePropertyType{ - PropName: registries.COMPLETED_PROP, + PropName: registries.CompletedProperty, Value: types.NewDateTimeValue(value, types.WithUtcTime), } } @@ -28,7 +28,7 @@ func NewDateTimeCompletedPropertyFromString( value string, params ...parameters.Parameter) DateTimeCompletedProperty { return &dateTimePropertyType{ - PropName: registries.COMPLETED_PROP, + PropName: registries.CompletedProperty, Value: types.NewDateTimeValueFromString(value, types.WithUtcTime), Parameters: params, } diff --git a/properties/date_time_created_property.go b/properties/date_time_created_property.go index ede6183..2d2200f 100644 --- a/properties/date_time_created_property.go +++ b/properties/date_time_created_property.go @@ -20,7 +20,7 @@ func NewDateTimeCreatedProperty( params ...parameters.Parameter, ) DateTimeCreatedProperty { return &dateTimePropertyType{ - PropName: registries.CREATED, + PropName: registries.DateTimeCreated, Value: types.NewDateTimeValue(timeValue, types.WithUtcTime), Parameters: params, } @@ -30,7 +30,7 @@ func NewDateTimeCreatedPropertyFromString( value string, params ...parameters.Parameter) DateTimeCreatedProperty { return &dateTimePropertyType{ - PropName: registries.CREATED, + PropName: registries.DateTimeCreated, Value: types.NewDateTimeValueFromString(value, types.WithUtcTime), Parameters: params, } diff --git a/properties/date_time_due_property.go b/properties/date_time_due_property.go index 35c48da..b9c0f67 100644 --- a/properties/date_time_due_property.go +++ b/properties/date_time_due_property.go @@ -30,13 +30,13 @@ func NewDateTimeDueProperty( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.DUE, + PropName: registries.DateTimeDue, Value: types.NewDateTimeValue(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.DUE, + PropName: registries.DateTimeDue, Value: types.NewDateValue(value), Parameters: params, } @@ -59,13 +59,13 @@ func NewDateTimeDuePropertyFromString( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.DUE, + PropName: registries.DateTimeDue, Value: types.NewDateTimeValueFromString(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.DUE, + PropName: registries.DateTimeDue, Value: types.NewDateValueFromString(value), Parameters: params, } diff --git a/properties/date_time_end_property.go b/properties/date_time_end_property.go index d2c8391..73cccc3 100644 --- a/properties/date_time_end_property.go +++ b/properties/date_time_end_property.go @@ -30,13 +30,13 @@ func NewDateTimeEndProperty( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.DTEND, + PropName: registries.DateTimeEnd, Value: types.NewDateTimeValue(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.DTEND, + PropName: registries.DateTimeEnd, Value: types.NewDateValue(value), Parameters: params, } @@ -59,13 +59,13 @@ func NewDateTimeEndPropertyFromString( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.DTEND, + PropName: registries.DateTimeEnd, Value: types.NewDateTimeValueFromString(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.DTEND, + PropName: registries.DateTimeEnd, Value: types.NewDateValueFromString(value), Parameters: params, } diff --git a/properties/date_time_stamp_property.go b/properties/date_time_stamp_property.go index eb1cbde..36c03dc 100644 --- a/properties/date_time_stamp_property.go +++ b/properties/date_time_stamp_property.go @@ -20,7 +20,7 @@ func NewDateTimeStampProperty( params ...parameters.Parameter, ) DateTimeStampProperty { return &dateTimePropertyType{ - PropName: registries.DTSTAMP, + PropName: registries.DateTimeStamp, Value: types.NewDateTimeValue(timeValue, types.WithUtcTime), Parameters: params, } @@ -30,7 +30,7 @@ func NewDateTimeStampPropertyFromString( value string, params ...parameters.Parameter) DateTimeStampProperty { return &dateTimePropertyType{ - PropName: registries.DTSTAMP, + PropName: registries.DateTimeStamp, Value: types.NewDateTimeValueFromString(value, types.WithUtcTime), Parameters: params, } diff --git a/properties/date_time_start_property.go b/properties/date_time_start_property.go index 0ab2fe1..9ffbb96 100644 --- a/properties/date_time_start_property.go +++ b/properties/date_time_start_property.go @@ -30,13 +30,13 @@ func NewDateTimeStartProperty( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.DTSTART, + PropName: registries.DateTimeStart, Value: types.NewDateTimeValue(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.DTSTART, + PropName: registries.DateTimeStart, Value: types.NewDateValue(value), Parameters: params, } @@ -59,13 +59,13 @@ func NewDateTimeStartPropertyFromString( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.DTSTART, + PropName: registries.DateTimeStart, Value: types.NewDateTimeValueFromString(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.DTSTART, + PropName: registries.DateTimeStart, Value: types.NewDateValueFromString(value), Parameters: params, } diff --git a/properties/description_property.go b/properties/description_property.go index e69f7d1..f957a85 100644 --- a/properties/description_property.go +++ b/properties/description_property.go @@ -15,7 +15,7 @@ type DescriptionProperty interface { func NewDescriptionProperty(descriptionValue string, params ...parameters.Parameter) DescriptionProperty { return &textPropertyType{ - PropName: registries.DESCRIPTION, + PropName: registries.Description, Value: types.NewTextValue(descriptionValue), Parameters: params, } diff --git a/properties/duration_property.go b/properties/duration_property.go index cce9928..14c0bfe 100644 --- a/properties/duration_property.go +++ b/properties/duration_property.go @@ -13,7 +13,7 @@ type DurationProperty interface { func NewDurationProperty(duration string) DurationProperty { return &durationPropertyType{ - PropName: registries.DURATION_PROP, + PropName: registries.DurationProperty, Value: types.NewDurationValue(duration), } } diff --git a/properties/exception_date_time_property.go b/properties/exception_date_time_property.go index a0ab071..d126c11 100644 --- a/properties/exception_date_time_property.go +++ b/properties/exception_date_time_property.go @@ -32,13 +32,13 @@ func NewExceptionDateTimeProperty( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.EXDATE, + PropName: registries.ExceptionDateTimes, Values: types.NewDateTimeValues(values, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.EXDATE, + PropName: registries.ExceptionDateTimes, Values: types.NewDateValues(values), Parameters: params, } @@ -61,7 +61,7 @@ func NewExceptionDateTimePropertyFromString( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.EXDATE, + PropName: registries.ExceptionDateTimes, Values: types.NewDateTimeValuesFromString( utils.StringToStringArray(values), format, @@ -70,7 +70,7 @@ func NewExceptionDateTimePropertyFromString( } case string(registries.Date): return &datePropertyType{ - PropName: registries.EXDATE, + PropName: registries.ExceptionDateTimes, Values: types.NewDateValuesFromString(utils.StringToStringArray(values)), Parameters: params, } diff --git a/properties/exception_rule_property.go b/properties/exception_rule_property.go index 43c2ad3..09dc2e2 100644 --- a/properties/exception_rule_property.go +++ b/properties/exception_rule_property.go @@ -13,9 +13,10 @@ type ExceptionRuleProperty interface { RequestStatusPropertyType } +// NewExceptionRuleProperty Deprecated func NewExceptionRuleProperty(parts ...recurrence_rule.RRPart) ExceptionRuleProperty { return &recurrenceRulePropertyType{ - PropName: registries.EXRULE, + PropName: registries.ExceptionRule, Value: recurrence_rule.NewRecurrenceRuleValue(parts), } } diff --git a/properties/free_busy_time_property.go b/properties/free_busy_time_property.go index 5cbebba..2dd00e0 100644 --- a/properties/free_busy_time_property.go +++ b/properties/free_busy_time_property.go @@ -22,7 +22,7 @@ func NewFreeBusyTimeProperty( paramSlice := make(parameters.Parameters, 0) paramSlice = append(paramSlice, freeBusyTimeParam) return &periodPropertyType{ - PropName: registries.FREEBUSY, + PropName: registries.FreeBusyTime, Value: types.NewPeriodValue(startTime, endTime), Parameters: paramSlice, } diff --git a/properties/geographic_position_property.go b/properties/geographic_position_property.go index 2683f1d..5dbb11d 100644 --- a/properties/geographic_position_property.go +++ b/properties/geographic_position_property.go @@ -22,7 +22,7 @@ func NewGeographicPositionProperty( params ...parameters.Parameter, ) GeographicPositionProperty { return &geoPropertyType{ - PropName: registries.GEO, + PropName: registries.Geo, Longitude: types.NewFloatValue(long), Latitude: types.NewFloatValue(lat), Parameters: params, @@ -48,7 +48,7 @@ func NewGeographicPositionPropertyFromString( ) } return &geoPropertyType{ - PropName: registries.GEO, + PropName: registries.Geo, Longitude: types.NewFloatValue(float32(long)), Latitude: types.NewFloatValue(float32(lat)), Parameters: params, diff --git a/properties/last_modified_property.go b/properties/last_modified_property.go index 083d96f..7b89fb3 100644 --- a/properties/last_modified_property.go +++ b/properties/last_modified_property.go @@ -15,14 +15,14 @@ type LastModifiedProperty interface { func NewLastModifiedProperty(value time.Time) LastModifiedProperty { return &dateTimePropertyType{ - PropName: registries.LASTMODIFIED, + PropName: registries.LastModified, Value: types.NewDateTimeValue(value, types.WithUtcTime), } } func NewLastModifiedPropertyFromString(value string) LastModifiedProperty { return &dateTimePropertyType{ - PropName: registries.LASTMODIFIED, + PropName: registries.LastModified, Value: types.NewDateTimeValueFromString(value, types.WithUtcTime), } } diff --git a/properties/location_property.go b/properties/location_property.go index 1ad1a29..8f58bc5 100644 --- a/properties/location_property.go +++ b/properties/location_property.go @@ -14,7 +14,7 @@ type LocationProperty interface { func NewLocationProperty(value string, params ...parameters.Parameter) LocationProperty { return &textPropertyType{ - PropName: registries.LOCATION, + PropName: registries.Location, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/method_property.go b/properties/method_property.go index c9d0b67..f67f680 100644 --- a/properties/method_property.go +++ b/properties/method_property.go @@ -14,7 +14,7 @@ type MethodProperty interface { func NewMethodProperty(value string, params ...parameters.Parameter) MethodProperty { return &textPropertyType{ - PropName: registries.METHOD, + PropName: registries.Method, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/organizer_property.go b/properties/organizer_property.go index a049079..04461ca 100644 --- a/properties/organizer_property.go +++ b/properties/organizer_property.go @@ -18,7 +18,7 @@ type OrganizerProperty interface { func NewOrganizerProperty(uri *url.URL, params ...parameters.Parameter) OrganizerProperty { return &calendarUserAddressPropertyType{ - PropName: registries.ORGANIZER, + PropName: registries.Organizer, Value: types.NewCalendarUserAddressValue(uri), Parameters: params, } @@ -34,7 +34,7 @@ func NewOrganizerPropertyFromString( } return &calendarUserAddressPropertyType{ - PropName: registries.ORGANIZER, + PropName: registries.Organizer, Value: types.NewCalendarUserAddressValue(urlValue), Parameters: params, }, nil diff --git a/properties/percent_complete_property.go b/properties/percent_complete_property.go index 970790c..706a358 100644 --- a/properties/percent_complete_property.go +++ b/properties/percent_complete_property.go @@ -17,7 +17,7 @@ type PercentCompleteProperty interface { func NewPercentCompleteProperty(value int32, params ...parameters.Parameter) IntegerPropertyType { return &integerPropertyType{ - PropName: registries.PERCENTCOMPLETE, + PropName: registries.PercentComplete, Value: types.NewIntegerValue(value), Parameters: params, } @@ -32,7 +32,7 @@ func NewPercentCompletePropertyFromString( return nil, fmt.Errorf("%s cannot be parsed as int32", value) } return &integerPropertyType{ - PropName: registries.PERCENTCOMPLETE, + PropName: registries.PercentComplete, Value: types.NewIntegerValue(int32(percentage)), Parameters: params, }, nil diff --git a/properties/priority_property.go b/properties/priority_property.go index e3cb89d..15fc3f7 100644 --- a/properties/priority_property.go +++ b/properties/priority_property.go @@ -17,7 +17,7 @@ type PriorityProperty interface { func NewPriorityProperty(value int32, params ...parameters.Parameter) PriorityProperty { return &integerPropertyType{ - PropName: registries.PRIORITY, + PropName: registries.Priority, Value: types.NewIntegerValue(value), Parameters: params, } @@ -32,7 +32,7 @@ func NewPriorityPropertyFromString( return nil, fmt.Errorf("%s cannot be parsed as int32", value) } return &integerPropertyType{ - PropName: registries.PRIORITY, + PropName: registries.Priority, Value: types.NewIntegerValue(int32(priority)), Parameters: params, }, nil diff --git a/properties/product_id_property.go b/properties/product_id_property.go index 55e121a..a5c70c5 100644 --- a/properties/product_id_property.go +++ b/properties/product_id_property.go @@ -14,7 +14,7 @@ type ProductIdProperty interface { func NewProductIdProperty(value string, params ...parameters.Parameter) ProductIdProperty { return &textPropertyType{ - PropName: registries.PRODID, + PropName: registries.ProductIdentifier, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/property.go b/properties/property.go index 2475ed6..79db2d0 100644 --- a/properties/property.go +++ b/properties/property.go @@ -22,7 +22,7 @@ type Property interface { // ToICalendarPropFormat format output to the icalendar specs ToICalendarPropFormat(output io.Writer) // GetName return the property name - GetName() registries.PropertyNames + GetName() registries.PropertyRegistry // GetValue return the string of a property GetValue() string } @@ -100,13 +100,13 @@ type BlockDelimiterPropertyType interface { } type textPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.TextValue Values []types.TextValue Parameters parameters.Parameters } -func (tP *textPropertyType) GetName() registries.PropertyNames { +func (tP *textPropertyType) GetName() registries.PropertyRegistry { return tP.PropName } @@ -115,12 +115,12 @@ func (tP *textPropertyType) GetValue() string { } type integerPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.IntegerValue Parameters parameters.Parameters } -func (iP *integerPropertyType) GetName() registries.PropertyNames { +func (iP *integerPropertyType) GetName() registries.PropertyRegistry { return iP.PropName } @@ -129,13 +129,13 @@ func (iP *integerPropertyType) GetValue() string { } type dateTimePropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.DateTimeValue Values []types.DateTimeValue Parameters parameters.Parameters } -func (dtP *dateTimePropertyType) GetName() registries.PropertyNames { +func (dtP *dateTimePropertyType) GetName() registries.PropertyRegistry { return dtP.PropName } @@ -144,13 +144,13 @@ func (dtP *dateTimePropertyType) GetValue() string { } type datePropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.DateValue Values []types.DateValue Parameters parameters.Parameters } -func (dP *datePropertyType) GetName() registries.PropertyNames { +func (dP *datePropertyType) GetName() registries.PropertyRegistry { return dP.PropName } @@ -159,13 +159,13 @@ func (dP *datePropertyType) GetValue() string { } type periodPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.PeriodValue Values []types.PeriodValue Parameters parameters.Parameters } -func (pP *periodPropertyType) GetName() registries.PropertyNames { +func (pP *periodPropertyType) GetName() registries.PropertyRegistry { return pP.PropName } @@ -174,12 +174,12 @@ func (pP *periodPropertyType) GetValue() string { } type durationPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.DurationValue Parameters parameters.Parameters } -func (dP *durationPropertyType) GetName() registries.PropertyNames { +func (dP *durationPropertyType) GetName() registries.PropertyRegistry { return dP.PropName } @@ -188,13 +188,13 @@ func (dP *durationPropertyType) GetValue() string { } type geoPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Longitude types.FloatValue Latitude types.FloatValue Parameters parameters.Parameters } -func (gP *geoPropertyType) GetName() registries.PropertyNames { +func (gP *geoPropertyType) GetName() registries.PropertyRegistry { return gP.PropName } @@ -203,12 +203,12 @@ func (gP *geoPropertyType) GetValue() string { } type calendarUserAddressPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.CalendarUserAddressValue Parameters parameters.Parameters } -func (caP *calendarUserAddressPropertyType) GetName() registries.PropertyNames { +func (caP *calendarUserAddressPropertyType) GetName() registries.PropertyRegistry { return caP.PropName } @@ -217,12 +217,12 @@ func (caP *calendarUserAddressPropertyType) GetValue() string { } type utcOffsetPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.UtcOffsetValue Parameters parameters.Parameters } -func (uoP *utcOffsetPropertyType) GetName() registries.PropertyNames { +func (uoP *utcOffsetPropertyType) GetName() registries.PropertyRegistry { return uoP.PropName } @@ -231,12 +231,12 @@ func (uoP *utcOffsetPropertyType) GetValue() string { } type uriPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.UriValue Parameters parameters.Parameters } -func (uP *uriPropertyType) GetName() registries.PropertyNames { +func (uP *uriPropertyType) GetName() registries.PropertyRegistry { return uP.PropName } @@ -245,14 +245,14 @@ func (uP *uriPropertyType) GetValue() string { } type requestStatusPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry StatusCode types.TextValue StatusDescription types.TextValue ExtraData types.TextValue Parameters parameters.Parameters } -func (rsP *requestStatusPropertyType) GetName() registries.PropertyNames { +func (rsP *requestStatusPropertyType) GetName() registries.PropertyRegistry { return rsP.PropName } @@ -261,11 +261,11 @@ func (rsP *requestStatusPropertyType) GetValue() string { } type recurrenceRulePropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value recurrence_rule.RecurrenceRuleValue } -func (rrP *recurrenceRulePropertyType) GetName() registries.PropertyNames { +func (rrP *recurrenceRulePropertyType) GetName() registries.PropertyRegistry { return rrP.PropName } @@ -274,12 +274,12 @@ func (rrP *recurrenceRulePropertyType) GetValue() string { } type actionPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.ActionValue Parameters parameters.Parameters } -func (aP *actionPropertyType) GetName() registries.PropertyNames { +func (aP *actionPropertyType) GetName() registries.PropertyRegistry { return aP.PropName } @@ -288,12 +288,12 @@ func (aP *actionPropertyType) GetValue() string { } type classificationPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.ClassificationValue Parameters parameters.Parameters } -func (cP *classificationPropertyType) GetName() registries.PropertyNames { +func (cP *classificationPropertyType) GetName() registries.PropertyRegistry { return cP.PropName } @@ -302,12 +302,12 @@ func (cP *classificationPropertyType) GetValue() string { } type statusPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.StatusValue Parameters parameters.Parameters } -func (sP *statusPropertyType) GetName() registries.PropertyNames { +func (sP *statusPropertyType) GetName() registries.PropertyRegistry { return sP.PropName } @@ -316,12 +316,12 @@ func (sP *statusPropertyType) GetValue() string { } type timeTransparencyPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.TimeTransparencyValue Parameters parameters.Parameters } -func (ttP *timeTransparencyPropertyType) GetName() registries.PropertyNames { +func (ttP *timeTransparencyPropertyType) GetName() registries.PropertyRegistry { return ttP.PropName } @@ -330,12 +330,12 @@ func (ttP *timeTransparencyPropertyType) GetValue() string { } type blockDelimiterPropertyType struct { - PropName registries.PropertyNames + PropName registries.PropertyRegistry Value types.BlockDelimiterValue Parameters parameters.Parameters } -func (bdP *blockDelimiterPropertyType) GetName() registries.PropertyNames { +func (bdP *blockDelimiterPropertyType) GetName() registries.PropertyRegistry { return bdP.PropName } diff --git a/properties/recurrence_date_times_property.go b/properties/recurrence_date_times_property.go index 354e2ec..a0fcc5e 100644 --- a/properties/recurrence_date_times_property.go +++ b/properties/recurrence_date_times_property.go @@ -32,19 +32,19 @@ func NewRecurrenceDateTimesProperty( switch valueType { case string(registries.Period): return &periodPropertyType{ - PropName: registries.RDATE, + PropName: registries.RecurrenceDateTimes, Values: types.NewPeriodValues(startValues, endValues), Parameters: params, } case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.RDATE, + PropName: registries.RecurrenceDateTimes, Values: types.NewDateTimeValues(startValues, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.RDATE, + PropName: registries.RecurrenceDateTimes, Values: types.NewDateValues(startValues), Parameters: params, } diff --git a/properties/recurrence_id_property.go b/properties/recurrence_id_property.go index 9d5813d..08fb4df 100644 --- a/properties/recurrence_id_property.go +++ b/properties/recurrence_id_property.go @@ -30,13 +30,13 @@ func NewRecurrenceIdProperty( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.RECURRENCEID, + PropName: registries.RecurrenceId, Value: types.NewDateTimeValue(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.RECURRENCEID, + PropName: registries.RecurrenceId, Value: types.NewDateValue(value), Parameters: params, } @@ -59,13 +59,13 @@ func NewRecurrenceIdPropertyFromString( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.RECURRENCEID, + PropName: registries.RecurrenceId, Value: types.NewDateTimeValueFromString(value, format), Parameters: params, } case string(registries.Date): return &datePropertyType{ - PropName: registries.RECURRENCEID, + PropName: registries.RecurrenceId, Value: types.NewDateValueFromString(value), Parameters: params, } diff --git a/properties/recurrence_rule_property.go b/properties/recurrence_rule_property.go index dec8a5c..78c1695 100644 --- a/properties/recurrence_rule_property.go +++ b/properties/recurrence_rule_property.go @@ -13,7 +13,7 @@ type RecurrenceRuleProperty interface { func NewRecurrenceRuleProperty(parts ...recurrence_rule.RRPart) RecurrenceRuleProperty { return &recurrenceRulePropertyType{ - PropName: registries.RRULE, + PropName: registries.RecurrenceRule, Value: recurrence_rule.NewRecurrenceRuleValue(parts), } } diff --git a/properties/related_to_property.go b/properties/related_to_property.go index 0984442..3cb49f2 100644 --- a/properties/related_to_property.go +++ b/properties/related_to_property.go @@ -14,7 +14,7 @@ type RelatedToProperty interface { func NewRelatedToProperty(value string, params ...parameters.Parameter) RelatedToProperty { return &textPropertyType{ - PropName: registries.RELATEDTO, + PropName: registries.RelatedTo, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/repeat_count_property.go b/properties/repeat_count_property.go index 6bbcc66..bf8310d 100644 --- a/properties/repeat_count_property.go +++ b/properties/repeat_count_property.go @@ -17,7 +17,7 @@ type RepeatCountProperty interface { func NewRepeatCountProperty(value int32, params ...parameters.Parameter) RepeatCountProperty { return &integerPropertyType{ - PropName: registries.REPEAT, + PropName: registries.Repeat, Value: types.NewIntegerValue(value), Parameters: params, } @@ -32,7 +32,7 @@ func NewRepeatCountPropertyFromString( return nil, fmt.Errorf("%s cannot be parsed as int32", value) } return &integerPropertyType{ - PropName: registries.REPEAT, + PropName: registries.Repeat, Value: types.NewIntegerValue(int32(repeat)), Parameters: params, }, nil diff --git a/properties/request_status_property.go b/properties/request_status_property.go index 0e26232..b57a662 100644 --- a/properties/request_status_property.go +++ b/properties/request_status_property.go @@ -22,7 +22,7 @@ func NewRequestStatusProperty( params ...parameters.Parameter, ) RequestStatusProperty { return &requestStatusPropertyType{ - PropName: registries.REQUESTSTATUS, + PropName: registries.RequestStatus, StatusCode: types.NewTextValue(code), StatusDescription: types.NewTextValue(description), ExtraData: types.NewTextValue(extraData), @@ -48,7 +48,7 @@ func NewRequestStatusPropertyFromString( extraData = status[1] } return &requestStatusPropertyType{ - PropName: registries.REQUESTSTATUS, + PropName: registries.RequestStatus, StatusCode: types.NewTextValue(code), StatusDescription: types.NewTextValue(description), ExtraData: types.NewTextValue(extraData), diff --git a/properties/resources_property.go b/properties/resources_property.go index 45eb4bd..2b2fb8e 100644 --- a/properties/resources_property.go +++ b/properties/resources_property.go @@ -16,7 +16,7 @@ type ResourcesProperty interface { func NewResourcesProperty(values []string, params ...parameters.Parameter) ResourcesProperty { return &textPropertyType{ - PropName: registries.RESOURCES, + PropName: registries.Resources, Values: types.NewTextValues(values), Parameters: params, } @@ -28,7 +28,7 @@ func NewResourcesPropertyFromString( ) ResourcesProperty { resources := strings.Split(values, ",") return &textPropertyType{ - PropName: registries.RESOURCES, + PropName: registries.Resources, Values: types.NewTextValues(resources), Parameters: params, } diff --git a/properties/sequence_property.go b/properties/sequence_property.go index a065283..e4916a1 100644 --- a/properties/sequence_property.go +++ b/properties/sequence_property.go @@ -17,7 +17,7 @@ type SequenceProperty interface { func NewSequenceProperty(value int32, params ...parameters.Parameter) SequenceProperty { return &integerPropertyType{ - PropName: registries.SEQUENCE, + PropName: registries.Sequence, Value: types.NewIntegerValue(value), Parameters: params, } @@ -32,7 +32,7 @@ func NewSequencePropertyFromString( return nil, fmt.Errorf("%s cannot be parsed as int32", value) } return &integerPropertyType{ - PropName: registries.SEQUENCE, + PropName: registries.Sequence, Value: types.NewIntegerValue(int32(sequence)), Parameters: params, }, nil diff --git a/properties/status_property.go b/properties/status_property.go index 915c38d..0206c0f 100644 --- a/properties/status_property.go +++ b/properties/status_property.go @@ -14,7 +14,7 @@ type StatusProperty interface { func NewStatusProperty(status types.StatusType, params ...parameters.Parameter) StatusProperty { return &statusPropertyType{ - PropName: registries.STATUS, + PropName: registries.Status, Value: types.NewStatusValue(status), Parameters: params, } @@ -22,7 +22,7 @@ func NewStatusProperty(status types.StatusType, params ...parameters.Parameter) func NewStatusPropertyFromString(status string, params ...parameters.Parameter) StatusProperty { return &statusPropertyType{ - PropName: registries.STATUS, + PropName: registries.Status, Value: types.NewStatusValue(types.StatusType(status)), Parameters: params, } diff --git a/properties/summary_property.go b/properties/summary_property.go index dadac16..f350c99 100644 --- a/properties/summary_property.go +++ b/properties/summary_property.go @@ -16,7 +16,7 @@ func NewSummaryProperty( summaryValue string, params ...parameters.Parameter, ) SummaryProperty { return &textPropertyType{ - PropName: registries.SUMMARY, + PropName: registries.Summary, Value: types.NewTextValue(summaryValue), Parameters: params, } diff --git a/properties/time_transparency_property.go b/properties/time_transparency_property.go index 8ec3364..0aca693 100644 --- a/properties/time_transparency_property.go +++ b/properties/time_transparency_property.go @@ -17,7 +17,7 @@ func NewTimeTransparencyProperty( params ...parameters.Parameter, ) TimeTransparencyProperty { return &timeTransparencyPropertyType{ - PropName: registries.TRANSP, + PropName: registries.TimeTransparency, Value: types.NewTimeTransparencyValue(value), Parameters: params, } @@ -28,7 +28,7 @@ func NewTimeTransparencyPropertyFromString( params ...parameters.Parameter, ) TimeTransparencyProperty { return &timeTransparencyPropertyType{ - PropName: registries.TRANSP, + PropName: registries.TimeTransparency, Value: types.NewTimeTransparencyValue(types.TimeTransparencyType(value)), Parameters: params, } diff --git a/properties/time_zone_id.go b/properties/time_zone_id.go index a5cf9c8..a2a4d62 100644 --- a/properties/time_zone_id.go +++ b/properties/time_zone_id.go @@ -13,7 +13,7 @@ type TimeZoneIdProperty interface { func NewTimeZoneIdProperty(value string) TimeZoneIdProperty { return &textPropertyType{ - PropName: registries.PROP_TZID, + PropName: registries.TimeZoneIdProperty, Value: types.NewTextValue(value), } } diff --git a/properties/time_zone_name.go b/properties/time_zone_name.go index acbbca5..29909d8 100644 --- a/properties/time_zone_name.go +++ b/properties/time_zone_name.go @@ -14,7 +14,7 @@ type TimeZoneNameProperty interface { func NewTimeZoneNameProperty(value string, params ...parameters.Parameter) TimeZoneNameProperty { return &textPropertyType{ - PropName: registries.TZNAME, + PropName: registries.TimeZoneName, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/time_zone_offset_from_property.go b/properties/time_zone_offset_from_property.go index 7db1463..70a9520 100644 --- a/properties/time_zone_offset_from_property.go +++ b/properties/time_zone_offset_from_property.go @@ -17,7 +17,7 @@ func NewTimeZoneOffsetFromProperty( params ...parameters.Parameter, ) TimeZoneOffsetFromProperty { return &utcOffsetPropertyType{ - PropName: registries.TZOFFSETFROM, + PropName: registries.TimeZoneOffsetFrom, Value: types.NewUtcOffsetValue(value), Parameters: params, } diff --git a/properties/time_zone_offset_to_property.go b/properties/time_zone_offset_to_property.go index 15c007f..eaf5d6b 100644 --- a/properties/time_zone_offset_to_property.go +++ b/properties/time_zone_offset_to_property.go @@ -17,7 +17,7 @@ func NewTimeZoneOffsetToProperty( params ...parameters.Parameter, ) TimeZoneOffsetToProperty { return &utcOffsetPropertyType{ - PropName: registries.TZOFFSETTO, + PropName: registries.TimeZoneOffsetTo, Value: types.NewUtcOffsetValue(value), Parameters: params, } diff --git a/properties/time_zone_url.go b/properties/time_zone_url.go index 80c20ac..70fcb95 100644 --- a/properties/time_zone_url.go +++ b/properties/time_zone_url.go @@ -18,7 +18,7 @@ type TimeZoneUrlProperty interface { func NewTimeZoneUrlProperty(value *url.URL, params ...parameters.Parameter) TimeZoneUrlProperty { return &uriPropertyType{ - PropName: registries.TZURL, + PropName: registries.TimeZoneUrl, Value: types.NewUriValue(value), Parameters: params, } @@ -34,7 +34,7 @@ func NewTimeZoneUrlPropertyFromString( } return &uriPropertyType{ - PropName: registries.TZURL, + PropName: registries.TimeZoneUrl, Value: types.NewUriValue(urlValue), Parameters: params, }, nil diff --git a/properties/trigger_property.go b/properties/trigger_property.go index e100974..9bae88e 100644 --- a/properties/trigger_property.go +++ b/properties/trigger_property.go @@ -35,13 +35,13 @@ func NewTriggerProperty( switch valueType { case string(registries.DateTime): return &dateTimePropertyType{ - PropName: registries.TRIGGER, + PropName: registries.Trigger, Value: types.NewDateTimeValue(dateTimeValue, format), Parameters: params, } case string(registries.Duration): return &durationPropertyType{ - PropName: registries.TRIGGER, + PropName: registries.Trigger, Value: types.NewDurationValue(durationValue), Parameters: params, } diff --git a/properties/uid_property.go b/properties/uid_property.go index d011a99..8013c10 100644 --- a/properties/uid_property.go +++ b/properties/uid_property.go @@ -14,7 +14,7 @@ type UidProperty interface { func NewUidProperty(value string, params ...parameters.Parameter) UidProperty { return &textPropertyType{ - PropName: registries.UID, + PropName: registries.Uid, Value: types.NewTextValue(value), Parameters: params, } diff --git a/properties/url_property.go b/properties/url_property.go index f9a18ab..9c473f5 100644 --- a/properties/url_property.go +++ b/properties/url_property.go @@ -18,7 +18,7 @@ type UrlProperty interface { func NewUrlProperty(uri *url.URL, params ...parameters.Parameter) UrlProperty { return &uriPropertyType{ - PropName: registries.URL, + PropName: registries.Url, Value: types.NewUriValue(uri), Parameters: params, } @@ -31,7 +31,7 @@ func NewUrlPropertyFromString(uri string, params ...parameters.Parameter) (UrlPr } return &uriPropertyType{ - PropName: registries.URL, + PropName: registries.Url, Value: types.NewUriValue(urlValue), Parameters: params, }, nil diff --git a/properties/version_property.go b/properties/version_property.go index 99e0e22..b099f03 100644 --- a/properties/version_property.go +++ b/properties/version_property.go @@ -14,7 +14,7 @@ type VersionProperty interface { func NewVersionProperty(value string, params ...parameters.Parameter) VersionProperty { return &textPropertyType{ - PropName: registries.VERSION, + PropName: registries.Version, Value: types.NewTextValue(value), Parameters: params, } diff --git a/registries/parameter.go b/registries/parameter.go index 811bc87..cbfa770 100644 --- a/registries/parameter.go +++ b/registries/parameter.go @@ -59,9 +59,9 @@ const ( // SentBy [See RFC-5545 spec] // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.18 SentBy ParameterRegistry = "SENT-BY" - // TZIDParameter [See RFC-5545 spec] + // TimeZoneIdProperty [See RFC-5545 spec] // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.19 - TZIDParameter ParameterRegistry = "TZID" + TimeZoneId ParameterRegistry = "TZID" // Value [See RFC-5545 spec] // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.20 Value ParameterRegistry = "VALUE" diff --git a/registries/properties.go b/registries/properties.go index d364b0b..57804ab 100644 --- a/registries/properties.go +++ b/registries/properties.go @@ -1,57 +1,156 @@ package registries -// RFC5545 section https://datatracker.ietf.org/doc/html/rfc5545#section-8.3.2 - -type PropertyNames string +// PropertyRegistry contains all property names of the [RFC-5545] +// [RFC-5545]: https://datatracker.ietf.org/doc/html/rfc5545#section-8.3.2 +type PropertyRegistry string const ( - ACTION PropertyNames = "ACTION" - ATTACH PropertyNames = "ATTACH" - ATTENDEE PropertyNames = "ATTENDEE" - BEGIN PropertyNames = "BEGIN" - CATEGORIES PropertyNames = "CATEGORIES" - CALSCALE PropertyNames = "CALSCALE" - CLASS PropertyNames = "CLASS" - COMMENT PropertyNames = "COMMENT" - COMPLETED_PROP PropertyNames = "COMPLETED" - CONTACT PropertyNames = "CONTACT" - CREATED PropertyNames = "CREATED" - DESCRIPTION PropertyNames = "DESCRIPTION" - DTEND PropertyNames = "DTEND" - DTSTART PropertyNames = "DTSTART" - DTSTAMP PropertyNames = "DTSTAMP" - DURATION_PROP PropertyNames = "DURATION" - DUE PropertyNames = "DUE" - END PropertyNames = "END" - EXDATE PropertyNames = "EXDATE" - EXRULE PropertyNames = "EXRULE" - FREEBUSY PropertyNames = "FREEBUSY" - GEO PropertyNames = "GEO" - LASTMODIFIED PropertyNames = "LAST-MODIFIED" - LOCATION PropertyNames = "LOCATION" - METHOD PropertyNames = "METHOD" - ORGANIZER PropertyNames = "ORGANIZER" - PERCENTCOMPLETE PropertyNames = "PERCENT-COMPLETE" - PRIORITY PropertyNames = "PRIORITY" - PROP_TZID PropertyNames = "TZID" - PRODID PropertyNames = "PRODID" - RDATE PropertyNames = "RDATE" - RECURRENCEID PropertyNames = "RECURRENCE-ID" - RELATEDTO PropertyNames = "RELATED-TO" - REPEAT PropertyNames = "REPEAT" - REQUESTSTATUS PropertyNames = "REQUEST-STATUS" - RESOURCES PropertyNames = "RESOURCES" - RRULE PropertyNames = "RRULE" - SEQUENCE PropertyNames = "SEQUENCE" - STATUS PropertyNames = "STATUS" - SUMMARY PropertyNames = "SUMMARY" - TRANSP PropertyNames = "TRANSP" - TRIGGER PropertyNames = "TRIGGER" - TZNAME PropertyNames = "TZNAME" - TZOFFSETFROM PropertyNames = "TZOFFSETFROM" - TZOFFSETTO PropertyNames = "TZOFFSETTO" - TZURL PropertyNames = "TZURL" - UID PropertyNames = "UID" - URL PropertyNames = "URL" - VERSION PropertyNames = "VERSION" + // CalendarScale [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.7.1 + CalendarScale PropertyRegistry = "CALSCALE" + // Method [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.7.2 + Method PropertyRegistry = "METHOD" + // ProductIdentifier [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.7.3 + ProductIdentifier PropertyRegistry = "PRODID" + // Version [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.7.4 + Version PropertyRegistry = "VERSION" + // Attachment [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.1 + Attachment PropertyRegistry = "ATTACH" + // Categories [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.2 + Categories PropertyRegistry = "CATEGORIES" + // Class [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.3 + Class PropertyRegistry = "CLASS" + // Comment [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.4 + Comment PropertyRegistry = "COMMENT" + // Description [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.5 + Description PropertyRegistry = "DESCRIPTION" + // Geo [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.6 + Geo PropertyRegistry = "GEO" + // Location [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.7 + Location PropertyRegistry = "LOCATION" + // PercentComplete [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.8 + PercentComplete PropertyRegistry = "PERCENT-COMPLETE" + // Priority [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.9 + Priority PropertyRegistry = "PRIORITY" + // Resources [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.10 + Resources PropertyRegistry = "RESOURCES" + // Status [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.11 + Status PropertyRegistry = "STATUS" + // Summary [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.12 + Summary PropertyRegistry = "SUMMARY" + // CompletedProperty [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.1 + CompletedProperty PropertyRegistry = "COMPLETED" + // DateTimeEnd [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.2 + DateTimeEnd PropertyRegistry = "DTEND" + // DateTimeDue [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.3 + DateTimeDue PropertyRegistry = "DUE" + // DateTimeStart [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.4 + DateTimeStart PropertyRegistry = "DTSTART" + // DurationProperty [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.5 + DurationProperty PropertyRegistry = "DURATION" + // FreeBusyTime [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.6 + FreeBusyTime PropertyRegistry = "FREEBUSY" + // TimeTransparency [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.7 + TimeTransparency PropertyRegistry = "TRANSP" + // TimeZoneIdProperty [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.3.1 + TimeZoneIdProperty PropertyRegistry = "TZID" + // TimeZoneName [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.3.2 + TimeZoneName PropertyRegistry = "TZNAME" + // TimeZoneOffsetFrom [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.3.3 + TimeZoneOffsetFrom PropertyRegistry = "TZOFFSETFROM" + // TimeZoneOffsetTo [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.3.4 + TimeZoneOffsetTo PropertyRegistry = "TZOFFSETTO" + // TimeZoneUrl [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.3.5 + TimeZoneUrl PropertyRegistry = "TZURL" + // Attendee [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.1 + Attendee PropertyRegistry = "ATTENDEE" + // Contact [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.2 + Contact PropertyRegistry = "CONTACT" + // Organizer [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.3 + Organizer PropertyRegistry = "ORGANIZER" + // RecurrenceId [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.4 + RecurrenceId PropertyRegistry = "RECURRENCE-ID" + // RelatedTo [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.5 + RelatedTo PropertyRegistry = "RELATED-TO" + // Url [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.6 + Url PropertyRegistry = "URL" + // Uid [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.7 + Uid PropertyRegistry = "UID" + // ExceptionDateTimes [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.1 + ExceptionDateTimes PropertyRegistry = "EXDATE" + // ExceptionRule [See RFC-5545 spec] + // Deprecated: As stated in the [RFC-5545], this registry value is deprecated + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.2 + // [RFC-5545]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.2 + ExceptionRule PropertyRegistry = "EXRULE" + // RecurrenceDateTimes [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.2 + RecurrenceDateTimes PropertyRegistry = "RDATE" + // RecurrenceRule [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.3 + RecurrenceRule PropertyRegistry = "RRULE" + // Action [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.6.1 + Action PropertyRegistry = "ACTION" + // Repeat [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.6.2 + Repeat PropertyRegistry = "REPEAT" + // Trigger [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.6.3 + Trigger PropertyRegistry = "TRIGGER" + // DateTimeCreated [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.1 + DateTimeCreated PropertyRegistry = "CREATED" + // DateTimeStamp [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.2 + DateTimeStamp PropertyRegistry = "DTSTAMP" + // LastModified [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.3 + LastModified PropertyRegistry = "LAST-MODIFIED" + // Sequence [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.4 + Sequence PropertyRegistry = "SEQUENCE" + // RequestStatus [See RFC-5545 spec] + // [See RFC-5545 spec]: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.8.3 + RequestStatus PropertyRegistry = "REQUEST-STATUS" + + // Begin is used to start a new component definition + Begin PropertyRegistry = "BEGIN" + // End is used to end a component definition + End PropertyRegistry = "END" )