calendar

package
v1.0.40 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 10 Imported by: 0

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

func NewCommand() *cobra.Command

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
	JSONOutput   bool
	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.

Jump to

Keyboard shortcuts

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