Documentation
¶
Index ¶
- Constants
- func ColorBlue(text string) string
- func ColorBold(text string) string
- func ColorCyan(text string) string
- func ColorGray(text string) string
- func ColorGreen(text string) string
- func ColorRed(text string) string
- func ColorStatus(status string) string
- func ColorYellow(text string) string
- func Colorize(color, text string) string
- func CompactDriveFilesResponse(resp *api.DriveFilesResponse, opts CompactOptions) *api.DriveFilesResponse
- func CompactEmail(email *api.Email, opts CompactOptions) *api.Email
- func CompactEmailsResponse(resp *api.EmailsResponse, opts CompactOptions) *api.EmailsResponse
- func CompactEvent(event *api.Event, opts CompactOptions) *api.Event
- func CompactEventsResponse(resp *api.EventsResponse, opts CompactOptions) *api.EventsResponse
- func CompactSheetBulkContentResponse(resp *api.SheetBulkContentResponse, opts CompactOptions) *api.SheetBulkContentResponse
- func CompactTaskBlockListResponse(resp *api.TaskBlockListResponse, opts CompactOptions) *api.TaskBlockListResponse
- func CompactTaskItem(item *api.TaskItemDto, opts CompactOptions) *api.TaskItemDto
- func CompactTaskItemResponse(resp *api.TaskItemResponse, opts CompactOptions) *api.TaskItemResponse
- func CompactTaskItemResult(resp *api.TaskItemResult, opts CompactOptions) *api.TaskItemResult
- func CompactTaskItemsResponse(resp *api.TaskItemsResponse, opts CompactOptions) *api.TaskItemsResponse
- func CompactTaskSearchResponse(resp *api.TaskSearchResponse, opts CompactOptions) *api.TaskSearchResponse
- func CompactThreadResponse(resp *api.ThreadResponse, opts CompactOptions) *api.ThreadResponse
- func FormatLocalTime(utc time.Time) string
- func FormatLocalTimePtr(utc *time.Time) string
- func GetLocalEnd(endLocal string, endUtc time.Time) string
- func GetLocalStart(startLocal string, startUtc time.Time) string
- func GetOutputLocation() *time.Location
- func Print(data interface{}, format Format)
- func PrintBanner()
- func PrintCompletion(profile string)
- func PrintDivider()
- func PrintInfo(msg string)
- func PrintStep(n, total int, msg string)
- func PrintSuccess(msg string)
- func PrintWithOptions(data interface{}, format Format, opts PrintOptions)
- func SetColorEnabled(enabled bool)
- type CompactOptions
- type Format
- type PrintOptions
Constants ¶
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" Gray = "\033[90m" Bold = "\033[1m" )
ANSI color codes
Variables ¶
This section is empty.
Functions ¶
func ColorGreen ¶
func ColorYellow ¶
func CompactDriveFilesResponse ¶ added in v0.2.0
func CompactDriveFilesResponse(resp *api.DriveFilesResponse, opts CompactOptions) *api.DriveFilesResponse
CompactDriveFilesResponse applies compact transformations to a drive files response
func CompactEmail ¶
func CompactEmail(email *api.Email, opts CompactOptions) *api.Email
CompactEmail applies compact transformations to a single email
func CompactEmailsResponse ¶
func CompactEmailsResponse(resp *api.EmailsResponse, opts CompactOptions) *api.EmailsResponse
CompactEmailsResponse applies compact transformations to an emails response
func CompactEvent ¶
func CompactEvent(event *api.Event, opts CompactOptions) *api.Event
CompactEvent applies compact transformations to a single event
func CompactEventsResponse ¶
func CompactEventsResponse(resp *api.EventsResponse, opts CompactOptions) *api.EventsResponse
CompactEventsResponse applies compact transformations to an events response
func CompactSheetBulkContentResponse ¶ added in v0.3.0
func CompactSheetBulkContentResponse(resp *api.SheetBulkContentResponse, opts CompactOptions) *api.SheetBulkContentResponse
CompactSheetBulkContentResponse trims per-tab values to a reasonable head in compact mode so an LLM agent doesn't drown in untouched ranges. The Clipped/FullRange hints from the server are preserved so the agent still knows where to drill in.
func CompactTaskBlockListResponse ¶ added in v0.3.0
func CompactTaskBlockListResponse(resp *api.TaskBlockListResponse, opts CompactOptions) *api.TaskBlockListResponse
CompactTaskBlockListResponse truncates each block's text. Metadata is small (typically a single language or checked field) and kept intact.
func CompactTaskItem ¶ added in v0.3.0
func CompactTaskItem(item *api.TaskItemDto, opts CompactOptions) *api.TaskItemDto
CompactTaskItem trims a single TaskItemDto. Returns the compacted item (or nil if input was nil).
func CompactTaskItemResponse ¶ added in v0.3.0
func CompactTaskItemResponse(resp *api.TaskItemResponse, opts CompactOptions) *api.TaskItemResponse
CompactTaskItemResponse trims a single-item response.
func CompactTaskItemResult ¶ added in v0.3.0
func CompactTaskItemResult(resp *api.TaskItemResult, opts CompactOptions) *api.TaskItemResult
CompactTaskItemResult trims the embedded Item on create/update responses. The error fields are left untouched.
func CompactTaskItemsResponse ¶ added in v0.3.0
func CompactTaskItemsResponse(resp *api.TaskItemsResponse, opts CompactOptions) *api.TaskItemsResponse
CompactTaskItemsResponse trims every item in a list response.
func CompactTaskSearchResponse ¶ added in v0.3.0
func CompactTaskSearchResponse(resp *api.TaskSearchResponse, opts CompactOptions) *api.TaskSearchResponse
CompactTaskSearchResponse trims each search result's embedded item.
func CompactThreadResponse ¶
func CompactThreadResponse(resp *api.ThreadResponse, opts CompactOptions) *api.ThreadResponse
CompactThreadResponse applies compact transformations to a thread response
func FormatLocalTime ¶
FormatLocalTime converts a UTC time to the output timezone and formats it as RFC3339.
func FormatLocalTimePtr ¶ added in v0.3.0
FormatLocalTimePtr formats a nullable UTC time pointer; returns "" on nil so the caller doesn't have to branch. Mirrors the wire's "field absent ≡ no value" contract for our nullable DTO fields.
func GetLocalEnd ¶
GetLocalEnd returns the local end time string. If endLocal is provided and non-empty, it's returned as-is. Otherwise, endUtc is converted to local time.
func GetLocalStart ¶
GetLocalStart returns the local start time string. If startLocal is provided and non-empty, it's returned as-is. Otherwise, startUtc is converted to local time.
func GetOutputLocation ¶
GetOutputLocation returns the timezone location for output formatting. It checks PE_TIMEZONE environment variable first, falling back to time.Local.
func PrintCompletion ¶
func PrintCompletion(profile string)
PrintCompletion prints the final success block with quick-start hints.
func PrintWithOptions ¶
func PrintWithOptions(data interface{}, format Format, opts PrintOptions)
func SetColorEnabled ¶
func SetColorEnabled(enabled bool)
SetColorEnabled allows overriding color detection
Types ¶
type CompactOptions ¶
type CompactOptions struct {
MaxDescriptionLength int // default: 100
FilterAttendees bool // default: true
MaxAttendees int // default: 10 (0 = unlimited)
}
CompactOptions configures compact mode transformations
func DefaultCompactOptions ¶
func DefaultCompactOptions() CompactOptions
DefaultCompactOptions returns the default compact mode settings
type PrintOptions ¶
type PrintOptions struct {
Compact bool
}
PrintOptions configures output behavior