Documentation
¶
Index ¶
- type EventParams
- type Google
- func (c *Google) DeleteEvent(ctx context.Context, calendarID, eventID string) error
- func (c *Google) InsertEvent(ctx context.Context, calendarID, summary string, start, end time.Time, ...) (string, error)
- func (c *Google) ListOurEvents(ctx context.Context, calendarID string, timeMin, timeMax time.Time) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventParams ¶
type Google ¶
type Google struct {
// contains filtered or unexported fields
}
Google wraps the Calendar API for listing, deleting, and inserting events.
func NewGoogle ¶
NewGoogle builds a Calendar API client using a service account JSON key file. Scope is calendar.events (create/read/delete). loc is used for time bounds (e.g. Europe/Kyiv).
func (*Google) DeleteEvent ¶
DeleteEvent removes the event by ID.
func (*Google) InsertEvent ¶
func (c *Google) InsertEvent(ctx context.Context, calendarID, summary string, start, end time.Time, params EventParams) (string, error)
InsertEvent creates an event with the given summary, start/end, colorId, and private extended property source=sso-notifier. Description is optional.
func (*Google) ListOurEvents ¶
func (c *Google) ListOurEvents(ctx context.Context, calendarID string, timeMin, timeMax time.Time) ([]string, error)
ListOurEvents returns event IDs for events in [timeMin, timeMax] that have private extended property source=sso-notifier. Lists events in range then filters by ExtendedProperties.Private["source"] to avoid depending on PrivateExtendedProperty query support in the generated client.