Documentation
¶
Overview ¶
Package ics provides RFC 5545 iCalendar generation and parsing for mail calendar invitations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
UID string // auto-generated if empty
Summary string // SUMMARY (required)
Location string // LOCATION (optional)
Start time.Time // DTSTART (required)
End time.Time // DTEND (required)
Organizer Address // ORGANIZER
Attendees []Address // ATTENDEE list (To + Cc, excluding Bcc)
}
Event holds the data needed to generate an ICS VCALENDAR invitation.
type ParsedEvent ¶
type ParsedEvent struct {
Method string // VCALENDAR-level METHOD (REQUEST/REPLY/CANCEL)
IsLarkDraft bool // true when VCALENDAR contains X-LARK-MAIL-DRAFT (Feishu private property indicating the event is editable)
UID string // VEVENT UID
Summary string // VEVENT SUMMARY, RFC 5545 TEXT unescaped
Location string // VEVENT LOCATION, RFC 5545 TEXT unescaped
Start time.Time // VEVENT DTSTART
End time.Time // VEVENT DTEND
Organizer string // ORGANIZER email (from MAILTO: URI or bare email)
Attendees []string // ATTENDEE emails (from MAILTO: URIs or bare emails)
OriginalTime int64 // RECURRENCE-ID as Unix seconds, 0 if not present. Used together with UID to derive the Feishu calendar event_id = UID + "_" + OriginalTime.
}
ParsedEvent holds key fields extracted from an ICS VCALENDAR.
func ParseEvent ¶
func ParseEvent(icsText string) *ParsedEvent
ParseEvent extracts key fields from an ICS VCALENDAR string. Returns nil if no VEVENT is found.
Click to show internal directories.
Click to hide internal directories.