Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTimezone ¶
Types ¶
type CalService ¶
type CalService struct{}
CalService is a service to fetch iCalendar formatted data
func (CalService) GetTodaysEvents ¶
func (s CalService) GetTodaysEvents(ctx context.Context, url, timezone string) (CalendarResponse, error)
GetTodaysEvents gets today's events from the given ical calendar url and the timezone.
type CalendarEvent ¶
type CalendarResponse ¶
type CalendarResponse struct { TimeZone string `json:"timezone"` // The timezone used CurrentLocalTime time.Time `json:"currentlocaltime"` // Sanity check: Current local time in the timezone given Events []CalendarEvent `json:"events"` // The calendar events found Version string `json:"version"` // Service version }
Click to show internal directories.
Click to hide internal directories.