Documentation
¶
Index ¶
- func CacheAge(cacheDir, typeID string) time.Duration
- func CheckUpcoming(evts []content.EventInstance, withinDays int) []content.EventInstance
- func ExportICS(evts []content.EventInstance, w io.Writer) error
- func ExportVCS(evts []content.EventInstance, w io.Writer) error
- func FetchKhoros(boardID, typeID, defaultScope string, timeout time.Duration) ([]content.EventInstance, error)
- func FetchRSS(rssURL, typeID, defaultScope string, timeout time.Duration) ([]content.EventInstance, error)
- func FilterByLocation(events []content.EventInstance, userLat, userLon float64, ...) []content.EventInstance
- func FormatHookMessage(upcoming []content.EventInstance) string
- func GoogleCalendarURL(e content.EventInstance) string
- func LoadCache(cacheDir, typeID string) ([]content.EventInstance, error)
- func MergeAndSort(a, b []content.EventInstance) []content.EventInstance
- func OutlookWebURL(e content.EventInstance) string
- func ParseKhoros(data []byte, typeID, defaultScope string) ([]content.EventInstance, error)
- func ParseRSS(data []byte, typeID, defaultScope string) ([]content.EventInstance, error)
- func Resolve(et content.EventType, cacheDir string, force bool) ([]content.EventInstance, error)
- func SaveCache(cacheDir, typeID string, evts []content.EventInstance) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUpcoming ¶
func CheckUpcoming(evts []content.EventInstance, withinDays int) []content.EventInstance
CheckUpcoming returns events whose date is within the next N days.
func ExportICS ¶
func ExportICS(evts []content.EventInstance, w io.Writer) error
ExportICS writes events in iCal format (RFC 5545) to w.
func ExportVCS ¶
func ExportVCS(evts []content.EventInstance, w io.Writer) error
ExportVCS writes events in vCalendar 1.0 format (.vcs) to w.
func FetchKhoros ¶
func FetchRSS ¶
func FetchRSS(rssURL, typeID, defaultScope string, timeout time.Duration) ([]content.EventInstance, error)
FetchRSS fetches an RSS feed and returns parsed EventInstances.
func FilterByLocation ¶
func FilterByLocation(events []content.EventInstance, userLat, userLon float64, localRadius, regionalRadius int) []content.EventInstance
FilterByLocation filters events based on user location and scope-based radius thresholds.
func FormatHookMessage ¶
func FormatHookMessage(upcoming []content.EventInstance) string
FormatHookMessage formats a terminal-friendly reminder for upcoming events.
func GoogleCalendarURL ¶
func GoogleCalendarURL(e content.EventInstance) string
GoogleCalendarURL returns a URL that opens Google Calendar with the event pre-filled.
func LoadCache ¶
func LoadCache(cacheDir, typeID string) ([]content.EventInstance, error)
LoadCache reads cached events for a given event type.
func MergeAndSort ¶
func MergeAndSort(a, b []content.EventInstance) []content.EventInstance
MergeAndSort combines two event slices, deduplicates by ID, sorts by date ascending.
func OutlookWebURL ¶
func OutlookWebURL(e content.EventInstance) string
OutlookWebURL returns a URL that opens Outlook Web with the event pre-filled.
func ParseKhoros ¶
func ParseKhoros(data []byte, typeID, defaultScope string) ([]content.EventInstance, error)
func ParseRSS ¶
func ParseRSS(data []byte, typeID, defaultScope string) ([]content.EventInstance, error)
ParseRSS parses RSS XML into EventInstances.
Types ¶
This section is empty.