calendar

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package calendar provides calendar-related CLI commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultCalendarID

func GetDefaultCalendarID(
	ctx context.Context,
	client ports.NylasClient,
	grantID string,
	calendarID string,
	writable bool,
) (string, error)

GetDefaultCalendarID retrieves the default calendar ID for a given grant. If calendarID is already provided, returns it unchanged. Otherwise, fetches calendars and returns:

  1. The primary writable calendar (for writable=true)
  2. The primary calendar (for writable=false)
  3. The first writable calendar (fallback for writable=true)
  4. The first calendar (fallback for writable=false)

Returns an error if no suitable calendar is found.

func NewCalendarCmd

func NewCalendarCmd() *cobra.Command

NewCalendarCmd creates the calendar command group.

Types

type EventTimeDisplay

type EventTimeDisplay struct {
	OriginalTime      string
	OriginalTimezone  string
	ConvertedTime     string
	ConvertedTimezone string
	ShowConversion    bool // true if original != converted
}

EventTimeDisplay represents formatted time display with timezone conversion.

type ParsedTime

type ParsedTime struct {
	Time     time.Time
	Timezone string
	Original string
}

ParsedTime represents a parsed natural language time expression.

Jump to

Keyboard shortcuts

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