calendar

package
v0.0.0-...-c865d5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventParams

type EventParams struct {
	ColorID     string
	Description string
}

type Google

type Google struct {
	// contains filtered or unexported fields
}

Google wraps the Calendar API for listing, deleting, and inserting events.

func NewGoogle

func NewGoogle(ctx context.Context, credentialsPath string) (*Google, error)

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

func (c *Google) DeleteEvent(ctx context.Context, calendarID, eventID string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL