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 CompactThreadResponse(resp *api.ThreadResponse, opts CompactOptions) *api.ThreadResponse
- func FormatLocalTime(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 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 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