Documentation
¶
Overview ¶
Package calendar implements the gro calendar command and subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientFactory = func(ctx context.Context) (CalendarClient, error) { return calendar.NewClient(ctx) }
ClientFactory is the function used to create Calendar clients. Override in tests to inject mocks.
Functions ¶
func NewCommand ¶
NewCommand returns the calendar command with all subcommands
Types ¶
type CalendarClient ¶ added in v1.0.35
type CalendarClient interface {
ListCalendars(ctx context.Context) ([]*calendarv3.CalendarListEntry, error)
ListEvents(ctx context.Context, calendarID string, timeMin, timeMax string, maxResults int64) ([]*calendarv3.Event, error)
GetEvent(ctx context.Context, calendarID, eventID string) (*calendarv3.Event, error)
RSVPEvent(ctx context.Context, calendarID, eventID, response string) error
SetEventColor(ctx context.Context, calendarID, eventID, colorID string) error
}
CalendarClient defines the interface for Calendar client operations used by calendar commands.
type EventListOptions ¶ added in v1.0.30
type EventListOptions struct {
CalendarID string
TimeMin string // RFC3339 format
TimeMax string // RFC3339 format
MaxResults int64
Header string // Header message to print (empty to show count-based header)
EmptyMessage string // Message when no events found
}
EventListOptions configures how events are listed and displayed.
Click to show internal directories.
Click to hide internal directories.