Documentation
¶
Index ¶
- func NeedsSetup(cfg *config.Config) bool
- func PrintSetupHint()
- type AdminAuditCmd
- type AdminAuditLoginHistoryCmd
- type AdminAuditLogsCmd
- type AdminAuditSMTPLogsCmd
- type AdminAuditSecurityCmd
- type AdminAuditSessionsCmd
- type AdminCmd
- type AdminDomainsAddCmd
- type AdminDomainsCmd
- type AdminDomainsGetCmd
- type AdminDomainsListCmd
- type AdminDomainsUpdateCmd
- type AdminDomainsVerifyCmd
- type AdminGroupsCmd
- type AdminGroupsCreateCmd
- type AdminGroupsDeleteCmd
- type AdminGroupsGetCmd
- type AdminGroupsListCmd
- type AdminGroupsMembersAddCmd
- type AdminGroupsMembersCmd
- type AdminGroupsMembersRemoveCmd
- type AdminGroupsUpdateCmd
- type AdminUsersActivateCmd
- type AdminUsersCmd
- type AdminUsersCreateCmd
- type AdminUsersDeactivateCmd
- type AdminUsersDeleteCmd
- type AdminUsersGetCmd
- type AdminUsersListCmd
- type AdminUsersUpdateCmd
- type AttachmentListRow
- type AuthCmd
- type AuthListCmd
- type AuthLoginCmd
- type AuthLogoutCmd
- type CLI
- type CompletionCmd
- type ConfigCmd
- type ConfigGetCmd
- type ConfigListConfigCmd
- type ConfigPathCmd
- type ConfigSetCmd
- type ConfigUnsetCmd
- type DeliveryLogRow
- type FormatterProvider
- type Globals
- type LsCmd
- type MailAdminCmd
- type MailAdminLogsCmd
- type MailAdminRetentionCmd
- type MailAdminRetentionGetCmd
- type MailAdminSpamCategoriesCmd
- type MailAdminSpamCmd
- type MailAdminSpamGetCmd
- type MailAdminSpamUpdateCmd
- type MailAttachmentsCmd
- type MailAttachmentsDownloadCmd
- type MailAttachmentsListCmd
- type MailCmd
- type MailFoldersCmd
- type MailFoldersListCmd
- type MailLabelsCmd
- type MailLabelsListCmd
- type MailMessagesCmd
- type MailMessagesGetCmd
- type MailMessagesListCmd
- type MailMessagesSearchCmd
- type MailMessagesThreadCmd
- type MailSendCmd
- type MailSendComposeCmd
- type MailSendForwardCmd
- type MailSendReplyCmd
- type MailSettingsCmd
- type MailSettingsDisplayNameCmd
- type MailSettingsDisplayNameGetCmd
- type MailSettingsDisplayNameSetCmd
- type MailSettingsForwardingCmd
- type MailSettingsForwardingGetCmd
- type MailSettingsSignaturesCmd
- type MailSettingsSignaturesCreateCmd
- type MailSettingsSignaturesListCmd
- type MailSettingsVacationCmd
- type MailSettingsVacationDisableCmd
- type MailSettingsVacationGetCmd
- type MailSettingsVacationSetCmd
- type MessageDetail
- type MessageListRow
- type SchemaArg
- type SchemaCmd
- type SchemaFlag
- type SchemaNode
- type ServiceProvider
- type SetupCmd
- type SignatureRow
- type SpamCategoryRow
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NeedsSetup ¶
NeedsSetup returns true if the CLI has not been configured yet
Types ¶
type AdminAuditCmd ¶
type AdminAuditCmd struct {
Logs AdminAuditLogsCmd `cmd:"" help:"View admin action audit logs"`
LoginHistory AdminAuditLoginHistoryCmd `cmd:"login-history" help:"View login history (90-day retention)"`
SMTPLogs AdminAuditSMTPLogsCmd `cmd:"smtp-logs" help:"View SMTP transaction logs"`
Sessions AdminAuditSessionsCmd `cmd:"" help:"View active sessions"`
Security AdminAuditSecurityCmd `cmd:"" help:"View security policy settings"`
}
AdminAuditCmd holds audit and security subcommands
type AdminAuditLoginHistoryCmd ¶
type AdminAuditLoginHistoryCmd struct {
From string `help:"Start date (YYYY-MM-DD or RFC3339)" required:""`
To string `help:"End date (YYYY-MM-DD or RFC3339)" required:""`
Mode string `` /* 142-byte string literal not displayed */
Limit int `help:"Batch size per page (Note: 90-day retention limit)" default:"100"`
}
AdminAuditLoginHistoryCmd shows login history logs
func (*AdminAuditLoginHistoryCmd) Run ¶
func (cmd *AdminAuditLoginHistoryCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the login history command
type AdminAuditLogsCmd ¶
type AdminAuditLogsCmd struct {
From string `help:"Start date (YYYY-MM-DD or RFC3339)" required:""`
To string `help:"End date (YYYY-MM-DD or RFC3339)" required:""`
Search string `help:"Filter by category, performer, or operation"`
Limit int `help:"Results per page" default:"100"`
}
AdminAuditLogsCmd shows admin action audit logs
func (*AdminAuditLogsCmd) Run ¶
func (cmd *AdminAuditLogsCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the audit logs command
type AdminAuditSMTPLogsCmd ¶
type AdminAuditSMTPLogsCmd struct {
From string `help:"Start date (YYYY-MM-DD or RFC3339)" required:""`
To string `help:"End date (YYYY-MM-DD or RFC3339)" required:""`
SearchBy string `help:"Search criteria field" enum:"messageId,fromAddr,toAddr," default:""`
Search string `help:"Search value (requires --search-by)"`
Limit int `help:"Results per page" default:"100"`
}
AdminAuditSMTPLogsCmd shows SMTP transaction logs
func (*AdminAuditSMTPLogsCmd) Run ¶
func (cmd *AdminAuditSMTPLogsCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the SMTP logs command
type AdminAuditSecurityCmd ¶
type AdminAuditSecurityCmd struct{}
AdminAuditSecurityCmd provides information about security policy settings
func (*AdminAuditSecurityCmd) Run ¶
func (cmd *AdminAuditSecurityCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the security command
type AdminAuditSessionsCmd ¶
type AdminAuditSessionsCmd struct{}
AdminAuditSessionsCmd provides information about active sessions
func (*AdminAuditSessionsCmd) Run ¶
func (cmd *AdminAuditSessionsCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the sessions command
type AdminCmd ¶
type AdminCmd struct {
Users AdminUsersCmd `cmd:"" help:"Manage organization users"`
Groups AdminGroupsCmd `cmd:"" help:"Manage organization groups"`
Domains AdminDomainsCmd `cmd:"" help:"Manage organization domains"`
Audit AdminAuditCmd `cmd:"" help:"View audit logs and security information"`
}
AdminCmd holds admin subcommands
type AdminDomainsAddCmd ¶
type AdminDomainsAddCmd struct {
Name string `arg:"" help:"Domain name to add (e.g., example.com)"`
}
AdminDomainsAddCmd adds a new domain to the organization
func (*AdminDomainsAddCmd) Run ¶
func (cmd *AdminDomainsAddCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the add domain command
type AdminDomainsCmd ¶
type AdminDomainsCmd struct {
List AdminDomainsListCmd `cmd:"" help:"List all domains"`
Get AdminDomainsGetCmd `cmd:"" help:"Get domain details"`
Add AdminDomainsAddCmd `cmd:"" help:"Add a new domain"`
Verify AdminDomainsVerifyCmd `cmd:"" help:"Verify domain ownership"`
Update AdminDomainsUpdateCmd `cmd:"" help:"Update domain settings"`
}
AdminDomainsCmd holds domain subcommands
type AdminDomainsGetCmd ¶
type AdminDomainsGetCmd struct {
Name string `arg:"" help:"Domain name (e.g., example.com)"`
}
AdminDomainsGetCmd gets details for a specific domain
func (*AdminDomainsGetCmd) Run ¶
func (cmd *AdminDomainsGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the get domain command
type AdminDomainsListCmd ¶
type AdminDomainsListCmd struct{}
AdminDomainsListCmd lists all domains in the organization
func (*AdminDomainsListCmd) Run ¶
func (cmd *AdminDomainsListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list domains command
type AdminDomainsUpdateCmd ¶
type AdminDomainsUpdateCmd struct {
Name string `arg:"" help:"Domain name to update"`
Setting string `` /* 194-byte string literal not displayed */
}
AdminDomainsUpdateCmd updates domain settings
func (*AdminDomainsUpdateCmd) Run ¶
func (cmd *AdminDomainsUpdateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the update domain command
type AdminDomainsVerifyCmd ¶
type AdminDomainsVerifyCmd struct {
Name string `arg:"" help:"Domain name to verify"`
Method string `help:"Verification method: txt, cname, html" required:"" enum:"txt,cname,html" short:"m"`
}
AdminDomainsVerifyCmd verifies domain ownership
func (*AdminDomainsVerifyCmd) Run ¶
func (cmd *AdminDomainsVerifyCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the verify domain command
type AdminGroupsCmd ¶
type AdminGroupsCmd struct {
List AdminGroupsListCmd `cmd:"" help:"List organization groups"`
Get AdminGroupsGetCmd `cmd:"" help:"Get group details"`
Create AdminGroupsCreateCmd `cmd:"" help:"Create a new group"`
Update AdminGroupsUpdateCmd `cmd:"" help:"Update group settings"`
Delete AdminGroupsDeleteCmd `cmd:"" help:"Delete a group permanently"`
Members AdminGroupsMembersCmd `cmd:"" help:"Manage group members"`
}
AdminGroupsCmd holds group subcommands
type AdminGroupsCreateCmd ¶
type AdminGroupsCreateCmd struct {
Name string `arg:"" help:"Group display name"`
Email string `help:"Group email address" required:"" short:"e"`
Description string `help:"Group description" short:"d"`
}
AdminGroupsCreateCmd creates a new group
func (*AdminGroupsCreateCmd) Run ¶
func (cmd *AdminGroupsCreateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the create group command
type AdminGroupsDeleteCmd ¶
type AdminGroupsDeleteCmd struct {
Identifier string `arg:"" help:"Group ID (zgid) or group email address"`
Confirm bool `help:"Confirm permanent deletion"`
}
AdminGroupsDeleteCmd permanently deletes a group
func (*AdminGroupsDeleteCmd) Run ¶
func (cmd *AdminGroupsDeleteCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the delete group command
type AdminGroupsGetCmd ¶
type AdminGroupsGetCmd struct {
Identifier string `arg:"" help:"Group ID (zgid) or group email address"`
ShowMembers bool `help:"Include member list" short:"m" default:"true"`
}
AdminGroupsGetCmd gets details for a specific group
func (*AdminGroupsGetCmd) Run ¶
func (cmd *AdminGroupsGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the get group command
type AdminGroupsListCmd ¶
type AdminGroupsListCmd struct {
Limit int `help:"Maximum groups to show per page" short:"l" default:"50"`
All bool `help:"Fetch all groups" short:"a"`
}
AdminGroupsListCmd lists groups in the organization
func (*AdminGroupsListCmd) Run ¶
func (cmd *AdminGroupsListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list groups command
type AdminGroupsMembersAddCmd ¶
type AdminGroupsMembersAddCmd struct {
Group string `arg:"" help:"Group ID (zgid) or group email address"`
Members []string `arg:"" help:"Email addresses of members to add"`
Role string `help:"Member role: member, moderator" default:"member" enum:"member,moderator" short:"r"`
}
AdminGroupsMembersAddCmd adds members to a group
func (*AdminGroupsMembersAddCmd) Run ¶
func (cmd *AdminGroupsMembersAddCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the add group members command
type AdminGroupsMembersCmd ¶
type AdminGroupsMembersCmd struct {
Add AdminGroupsMembersAddCmd `cmd:"" help:"Add members to a group"`
Remove AdminGroupsMembersRemoveCmd `cmd:"" help:"Remove members from a group"`
}
AdminGroupsMembersCmd holds group member management subcommands
type AdminGroupsMembersRemoveCmd ¶
type AdminGroupsMembersRemoveCmd struct {
Group string `arg:"" help:"Group ID (zgid) or group email address"`
Members []string `arg:"" help:"Email addresses of members to remove"`
}
AdminGroupsMembersRemoveCmd removes members from a group
func (*AdminGroupsMembersRemoveCmd) Run ¶
func (cmd *AdminGroupsMembersRemoveCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the remove group members command
type AdminGroupsUpdateCmd ¶
type AdminGroupsUpdateCmd struct {
Identifier string `arg:"" help:"Group ID (zgid) or group email address"`
Name string `help:"New group name" short:"n"`
Description string `help:"New description" short:"d"`
}
AdminGroupsUpdateCmd updates a group's settings
func (*AdminGroupsUpdateCmd) Run ¶
func (cmd *AdminGroupsUpdateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the update group command
type AdminUsersActivateCmd ¶
type AdminUsersActivateCmd struct {
Identifier string `arg:"" help:"User ID (zuid) or email address"`
}
AdminUsersActivateCmd activates a user account
func (*AdminUsersActivateCmd) Run ¶
func (cmd *AdminUsersActivateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the activate user command
type AdminUsersCmd ¶
type AdminUsersCmd struct {
List AdminUsersListCmd `cmd:"" help:"List organization users"`
Get AdminUsersGetCmd `cmd:"" help:"Get user details"`
Create AdminUsersCreateCmd `cmd:"" help:"Create a new user"`
Update AdminUsersUpdateCmd `cmd:"" help:"Update user role"`
Activate AdminUsersActivateCmd `cmd:"" help:"Activate a user account"`
Deactivate AdminUsersDeactivateCmd `cmd:"" help:"Deactivate a user account"`
Delete AdminUsersDeleteCmd `cmd:"" help:"Delete a user permanently"`
}
AdminUsersCmd holds user subcommands
type AdminUsersCreateCmd ¶
type AdminUsersCreateCmd struct {
Email string `arg:"" help:"Primary email address for the new user"`
Password string `help:"Initial password (if not set, Zoho sends setup email)" short:"p"`
FirstName string `help:"First name" short:"f"`
LastName string `help:"Last name" short:"l"`
DisplayName string `help:"Display name" short:"d"`
Role string `help:"Role: member, admin" default:"member" enum:"member,admin" short:"r"`
}
AdminUsersCreateCmd creates a new user
func (*AdminUsersCreateCmd) Run ¶
func (cmd *AdminUsersCreateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the create user command
type AdminUsersDeactivateCmd ¶
type AdminUsersDeactivateCmd struct {
Identifier string `arg:"" help:"User ID (zuid) or email address"`
BlockIncoming bool `help:"Block incoming mail for deactivated user"`
RemoveForward bool `help:"Remove mail forwarding rules"`
RemoveGroups bool `help:"Remove from all groups"`
RemoveAliases bool `help:"Remove email aliases"`
}
AdminUsersDeactivateCmd deactivates a user account
func (*AdminUsersDeactivateCmd) Run ¶
func (cmd *AdminUsersDeactivateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the deactivate user command
type AdminUsersDeleteCmd ¶
type AdminUsersDeleteCmd struct {
Identifier string `arg:"" help:"User ID (zuid) or email address"`
Confirm bool `help:"Confirm permanent deletion"`
}
AdminUsersDeleteCmd permanently deletes a user
func (*AdminUsersDeleteCmd) Run ¶
func (cmd *AdminUsersDeleteCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the delete user command
type AdminUsersGetCmd ¶
type AdminUsersGetCmd struct {
Identifier string `arg:"" help:"User ID (zuid) or email address"`
}
AdminUsersGetCmd gets details for a specific user
func (*AdminUsersGetCmd) Run ¶
func (cmd *AdminUsersGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the get user command
type AdminUsersListCmd ¶
type AdminUsersListCmd struct {
Limit int `help:"Maximum users to show per page" short:"l" default:"50"`
All bool `help:"Fetch all users (no pagination limit)" short:"a"`
}
AdminUsersListCmd lists users in the organization
func (*AdminUsersListCmd) Run ¶
func (cmd *AdminUsersListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list users command
type AdminUsersUpdateCmd ¶
type AdminUsersUpdateCmd struct {
Identifier string `arg:"" help:"User ID (zuid) or email address"`
Role string `help:"New role: member, admin" required:"" enum:"member,admin" short:"r"`
}
AdminUsersUpdateCmd updates a user's role
func (*AdminUsersUpdateCmd) Run ¶
func (cmd *AdminUsersUpdateCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the update user command
type AttachmentListRow ¶
AttachmentListRow is a display struct for attachment list output
type AuthCmd ¶
type AuthCmd struct {
Login AuthLoginCmd `cmd:"" help:"Log in to Zoho account"`
Logout AuthLogoutCmd `cmd:"" help:"Log out and remove stored credentials"`
List AuthListCmd `cmd:"" help:"List stored accounts"`
}
AuthCmd holds authentication subcommands
type AuthListCmd ¶
type AuthListCmd struct {
Check bool `help:"Validate stored tokens are still valid" short:"c"`
}
AuthListCmd implements the auth list command
func (*AuthListCmd) Run ¶
func (cmd *AuthListCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the list command
type AuthLoginCmd ¶
type AuthLoginCmd struct {
Manual bool `help:"Manual paste mode (no browser)" short:"m"`
}
AuthLoginCmd implements the auth login command
func (*AuthLoginCmd) Run ¶
func (cmd *AuthLoginCmd) Run(cfg *config.Config, fp *FormatterProvider, globals *Globals) error
Run executes the login command
type AuthLogoutCmd ¶
type AuthLogoutCmd struct {
All bool `help:"Remove all stored accounts" short:"a"`
}
AuthLogoutCmd implements the auth logout command
func (*AuthLogoutCmd) Run ¶
func (cmd *AuthLogoutCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the logout command
type CLI ¶
type CLI struct {
Globals
Setup SetupCmd `cmd:"" help:"Interactive first-time setup wizard"`
Auth AuthCmd `cmd:"" help:"Authentication commands"`
Config ConfigCmd `cmd:"" help:"Configuration commands"`
Admin AdminCmd `cmd:"" help:"Admin operations"`
Mail MailCmd `cmd:"" help:"Mail operations"`
// Desire-path shortcuts
Send MailSendComposeCmd `cmd:"" help:"Send an email (shortcut for mail send compose)" hidden:""`
Ls LsCmd `cmd:"" help:"List resources (users, groups, folders, labels)" hidden:""`
// Shell completion
Completion CompletionCmd `cmd:"" help:"Shell completion commands"`
// Introspection
Schema SchemaCmd `cmd:"" help:"Show machine-readable command tree as JSON"`
Version VersionCmd `cmd:"" help:"Show version information"`
}
CLI is the root command structure
type CompletionCmd ¶
type CompletionCmd struct {
Install kongplete.InstallCompletions `cmd:"" help:"Install shell completions for bash, zsh, or fish"`
}
CompletionCmd wraps kongplete's InstallCompletions
type ConfigCmd ¶
type ConfigCmd struct {
Get ConfigGetCmd `cmd:"" help:"Get a configuration value"`
Set ConfigSetCmd `cmd:"" help:"Set a configuration value"`
Unset ConfigUnsetCmd `cmd:"" help:"Remove a configuration value"`
List ConfigListConfigCmd `cmd:"" name:"list" help:"List all configuration values"`
Path ConfigPathCmd `cmd:"" help:"Show config file path"`
}
ConfigCmd holds configuration subcommands
type ConfigGetCmd ¶
type ConfigGetCmd struct {
Key string `arg:"" help:"Config key to get (e.g., region, client_id)"`
}
ConfigGetCmd implements config get command
func (*ConfigGetCmd) Run ¶
func (cmd *ConfigGetCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the get command
type ConfigListConfigCmd ¶
type ConfigListConfigCmd struct{}
ConfigListConfigCmd implements config list command
func (*ConfigListConfigCmd) Run ¶
func (cmd *ConfigListConfigCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the list command
type ConfigPathCmd ¶
type ConfigPathCmd struct{}
ConfigPathCmd implements config path command
func (*ConfigPathCmd) Run ¶
func (cmd *ConfigPathCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the path command
type ConfigSetCmd ¶
type ConfigSetCmd struct {
Key string `arg:"" help:"Config key to set"`
Value string `arg:"" help:"Value to set"`
}
ConfigSetCmd implements config set command
func (*ConfigSetCmd) Run ¶
func (cmd *ConfigSetCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the set command
type ConfigUnsetCmd ¶
type ConfigUnsetCmd struct {
Key string `arg:"" help:"Config key to remove"`
}
ConfigUnsetCmd implements config unset command
func (*ConfigUnsetCmd) Run ¶
func (cmd *ConfigUnsetCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the unset command
type DeliveryLogRow ¶
type DeliveryLogRow struct {
Subject string
From string
To string
Status string
SentTime string
DeliveryTime string
}
DeliveryLogRow is a display struct for delivery log output
type FormatterProvider ¶
FormatterProvider wraps the formatter interface for Kong binding
type Globals ¶
type Globals struct {
Region string `help:"Zoho region" default:"" enum:"us,eu,in,au,jp,ca,sa,uk," env:"ZOH_REGION"`
Output string `help:"Output format" default:"auto" enum:"json,plain,rich,auto" short:"o" env:"ZOH_OUTPUT"`
Verbose bool `help:"Verbose output" short:"v" env:"ZOH_VERBOSE"`
ResultsOnly bool `help:"Strip JSON envelope, return data array only" env:"ZOH_RESULTS_ONLY"`
NoInput bool `help:"Disable interactive prompts (fail instead)" env:"ZOH_NO_INPUT"`
Force bool `help:"Skip confirmation prompts for destructive operations" env:"ZOH_FORCE"`
DryRun bool `help:"Preview operation without executing" name:"dry-run" env:"ZOH_DRY_RUN"`
}
Globals holds global flags available to all commands
func (*Globals) ResolvedOutput ¶
ResolvedOutput returns the effective output mode "auto" detects TTY: if stdout is TTY -> rich, else -> plain
type LsCmd ¶
type LsCmd struct {
Users AdminUsersListCmd `cmd:"" help:"List users (shortcut for admin users list)"`
Groups AdminGroupsListCmd `cmd:"" help:"List groups (shortcut for admin groups list)"`
Folders MailFoldersListCmd `cmd:"" help:"List folders (shortcut for mail folders list)"`
Labels MailLabelsListCmd `cmd:"" help:"List labels (shortcut for mail labels list)"`
}
LsCmd provides desire-path shortcuts for listing resources These are aliases to full command paths for faster interactive use
type MailAdminCmd ¶
type MailAdminCmd struct {
Retention MailAdminRetentionCmd `cmd:"" help:"Manage retention policies"`
Spam MailAdminSpamCmd `cmd:"" help:"Manage spam filter settings"`
Logs MailAdminLogsCmd `cmd:"" help:"View delivery logs"`
}
MailAdminCmd holds mail admin subcommands
type MailAdminLogsCmd ¶
type MailAdminLogsCmd struct {
Limit int `help:"Maximum logs to show" default:"50"`
Start int `help:"Starting offset" default:"0"`
}
MailAdminLogsCmd retrieves delivery logs
func (*MailAdminLogsCmd) Run ¶
func (cmd *MailAdminLogsCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the get delivery logs command
type MailAdminRetentionCmd ¶
type MailAdminRetentionCmd struct {
Get MailAdminRetentionGetCmd `cmd:"" help:"View retention policy settings"`
}
MailAdminRetentionCmd holds retention policy subcommands
type MailAdminRetentionGetCmd ¶
type MailAdminRetentionGetCmd struct{}
MailAdminRetentionGetCmd retrieves retention policy settings
func (*MailAdminRetentionGetCmd) Run ¶
func (cmd *MailAdminRetentionGetCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the get retention policy command
type MailAdminSpamCategoriesCmd ¶
type MailAdminSpamCategoriesCmd struct{}
MailAdminSpamCategoriesCmd lists all available spam categories
func (*MailAdminSpamCategoriesCmd) Run ¶
func (cmd *MailAdminSpamCategoriesCmd) Run(fp *FormatterProvider) error
Run executes the list spam categories command
type MailAdminSpamCmd ¶
type MailAdminSpamCmd struct {
Get MailAdminSpamGetCmd `cmd:"" help:"View spam settings for a category"`
Update MailAdminSpamUpdateCmd `cmd:"" help:"Update spam allowlist/blocklist"`
Categories MailAdminSpamCategoriesCmd `cmd:"" help:"List available spam categories"`
}
MailAdminSpamCmd holds spam filter subcommands
type MailAdminSpamGetCmd ¶
type MailAdminSpamGetCmd struct {
Category string `help:"Spam category (e.g., allowlist-email, blocklist-domain)" required:""`
}
MailAdminSpamGetCmd retrieves spam settings for a category
func (*MailAdminSpamGetCmd) Run ¶
func (cmd *MailAdminSpamGetCmd) Run(cfg *config.Config, fp *FormatterProvider) error
Run executes the get spam settings command
type MailAdminSpamUpdateCmd ¶
type MailAdminSpamUpdateCmd struct {
Category string `help:"Spam category (e.g., allowlist-email, blocklist-domain)" required:""`
Values []string `help:"Email addresses, domains, or IPs to add (repeatable)" required:""`
}
MailAdminSpamUpdateCmd updates spam settings for a category
type MailAttachmentsCmd ¶
type MailAttachmentsCmd struct {
List MailAttachmentsListCmd `cmd:"" help:"List attachments for a message"`
Download MailAttachmentsDownloadCmd `cmd:"" help:"Download an attachment"`
}
MailAttachmentsCmd holds attachment subcommands
type MailAttachmentsDownloadCmd ¶
type MailAttachmentsDownloadCmd struct {
AttachmentID string `arg:"" help:"Attachment ID to download"`
MessageID string `help:"Message ID (required)" required:""`
Folder string `help:"Folder name or ID (required)" short:"f" required:""`
OutputPath string `help:"Output file path (default: attachment name)" name:"output-path" predictor:"file"`
}
MailAttachmentsDownloadCmd downloads an attachment
func (*MailAttachmentsDownloadCmd) Run ¶
func (cmd *MailAttachmentsDownloadCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the download attachment command
type MailAttachmentsListCmd ¶
type MailAttachmentsListCmd struct {
MessageID string `arg:"" help:"Message ID"`
Folder string `help:"Folder name or ID (required)" short:"f" required:""`
}
MailAttachmentsListCmd lists attachments for a message
func (*MailAttachmentsListCmd) Run ¶
func (cmd *MailAttachmentsListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list attachments command
type MailCmd ¶
type MailCmd struct {
Folders MailFoldersCmd `cmd:"" help:"Manage mail folders"`
Labels MailLabelsCmd `cmd:"" help:"Manage mail labels"`
Messages MailMessagesCmd `cmd:"" help:"Manage messages"`
Attachments MailAttachmentsCmd `cmd:"" help:"Manage attachments"`
Send MailSendCmd `cmd:"" help:"Send email messages"`
Settings MailSettingsCmd `cmd:"" help:"Manage mail settings"`
Admin MailAdminCmd `cmd:"" help:"Mail administration operations"`
}
MailCmd holds mail subcommands
type MailFoldersCmd ¶
type MailFoldersCmd struct {
List MailFoldersListCmd `cmd:"" help:"List all folders"`
}
MailFoldersCmd holds folder subcommands
type MailFoldersListCmd ¶
type MailFoldersListCmd struct{}
MailFoldersListCmd lists all mail folders
func (*MailFoldersListCmd) Run ¶
func (cmd *MailFoldersListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list folders command
type MailLabelsCmd ¶
type MailLabelsCmd struct {
List MailLabelsListCmd `cmd:"" help:"List all labels"`
}
MailLabelsCmd holds label subcommands
type MailLabelsListCmd ¶
type MailLabelsListCmd struct{}
MailLabelsListCmd lists all mail labels
func (*MailLabelsListCmd) Run ¶
func (cmd *MailLabelsListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list labels command
type MailMessagesCmd ¶
type MailMessagesCmd struct {
List MailMessagesListCmd `cmd:"" help:"List messages in a folder"`
Get MailMessagesGetCmd `cmd:"" help:"Get full message details"`
Search MailMessagesSearchCmd `cmd:"" help:"Search messages with query filters"`
Thread MailMessagesThreadCmd `cmd:"" help:"View all messages in a thread"`
}
MailMessagesCmd holds message subcommands
type MailMessagesGetCmd ¶
type MailMessagesGetCmd struct {
MessageID string `arg:"" help:"Message ID to retrieve"`
Folder string `help:"Folder name or ID (required)" short:"f" required:""`
}
MailMessagesGetCmd gets full details for a specific message
func (*MailMessagesGetCmd) Run ¶
func (cmd *MailMessagesGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider, globals *Globals) error
Run executes the get message command
type MailMessagesListCmd ¶
type MailMessagesListCmd struct {
Folder string `help:"Folder name or ID" default:"Inbox" short:"f"`
Limit int `help:"Maximum messages to show" short:"l" default:"50"`
All bool `help:"Fetch all messages (no pagination limit)" short:"a"`
}
MailMessagesListCmd lists messages in a folder
func (*MailMessagesListCmd) Run ¶
func (cmd *MailMessagesListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list messages command
type MailMessagesSearchCmd ¶
type MailMessagesSearchCmd struct {
Query string `arg:"" optional:"" help:"Free-text search query"`
From string `help:"Filter by sender email" short:"f"`
Subject string `help:"Filter by subject" short:"s"`
After string `help:"Messages after date (YYYY-MM-DD)" short:"a"`
Before string `help:"Messages before date (YYYY-MM-DD)" short:"b"`
Unread bool `help:"Only unread messages" short:"u"`
HasAttachment bool `help:"Only messages with attachments"`
Limit int `help:"Maximum results" short:"l" default:"50"`
}
MailMessagesSearchCmd searches for messages using query filters
func (*MailMessagesSearchCmd) Run ¶
func (cmd *MailMessagesSearchCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the search messages command
type MailMessagesThreadCmd ¶
type MailMessagesThreadCmd struct {
ThreadID string `arg:"" help:"Thread ID to view"`
Folder string `help:"Folder name or ID" default:"Inbox" short:"f"`
Limit int `help:"Maximum messages to scan" short:"l" default:"200"`
}
MailMessagesThreadCmd shows all messages in a thread
func (*MailMessagesThreadCmd) Run ¶
func (cmd *MailMessagesThreadCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the thread view command
type MailSendCmd ¶
type MailSendCmd struct {
Compose MailSendComposeCmd `cmd:"" help:"Compose and send a new email"`
Reply MailSendReplyCmd `cmd:"" help:"Reply to a message"`
Forward MailSendForwardCmd `cmd:"" help:"Forward a message"`
}
MailSendCmd holds send subcommands
type MailSendComposeCmd ¶
type MailSendComposeCmd struct {
To string `help:"Recipient email address" required:""`
Cc string `help:"CC recipient(s)" short:"c"`
Bcc string `help:"BCC recipient(s)" short:"b"`
Subject string `help:"Email subject" required:""`
Body string `help:"Email body content" required:""`
HTML bool `help:"Send as HTML (default: plain text)" name:"html"`
Attach []string `help:"File path(s) to attach (repeatable)" name:"attach" predictor:"file"`
}
MailSendComposeCmd composes and sends a new email
func (*MailSendComposeCmd) Run ¶
func (cmd *MailSendComposeCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the compose command
type MailSendForwardCmd ¶
type MailSendForwardCmd struct {
MessageID string `arg:"" help:"Message ID to forward"`
Folder string `help:"Folder name or ID" required:"" short:"f"`
To string `help:"Recipient email address" required:""`
Body string `help:"Additional message body" default:""`
HTML bool `help:"Send as HTML (default: plain text)" name:"html"`
Attach []string `help:"File path(s) to attach (repeatable)" name:"attach" predictor:"file"`
}
MailSendForwardCmd forwards a message
func (*MailSendForwardCmd) Run ¶
func (cmd *MailSendForwardCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the forward command
type MailSendReplyCmd ¶
type MailSendReplyCmd struct {
MessageID string `arg:"" help:"Message ID to reply to"`
Folder string `help:"Folder name or ID" required:"" short:"f"`
Body string `help:"Reply body content" required:""`
HTML bool `help:"Send as HTML (default: plain text)" name:"html"`
Attach []string `help:"File path(s) to attach (repeatable)" name:"attach" predictor:"file"`
All bool `help:"Reply to all recipients" name:"all"`
}
MailSendReplyCmd replies to a message
func (*MailSendReplyCmd) Run ¶
func (cmd *MailSendReplyCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the reply command
type MailSettingsCmd ¶
type MailSettingsCmd struct {
Signatures MailSettingsSignaturesCmd `cmd:"" help:"Manage email signatures"`
Vacation MailSettingsVacationCmd `cmd:"" help:"Manage vacation auto-reply"`
DisplayName MailSettingsDisplayNameCmd `cmd:"display-name" help:"Manage account display name"`
Forwarding MailSettingsForwardingCmd `cmd:"" help:"View forwarding settings"`
}
MailSettingsCmd holds settings subcommands
type MailSettingsDisplayNameCmd ¶
type MailSettingsDisplayNameCmd struct {
Get MailSettingsDisplayNameGetCmd `cmd:"" help:"View account display name"`
Set MailSettingsDisplayNameSetCmd `cmd:"" help:"Update account display name"`
}
MailSettingsDisplayNameCmd holds display name subcommands
type MailSettingsDisplayNameGetCmd ¶
type MailSettingsDisplayNameGetCmd struct{}
MailSettingsDisplayNameGetCmd displays the account display name
func (*MailSettingsDisplayNameGetCmd) Run ¶
func (cmd *MailSettingsDisplayNameGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the get display name command
type MailSettingsDisplayNameSetCmd ¶
type MailSettingsDisplayNameSetCmd struct {
Name string `arg:"" help:"New display name" required:""`
}
MailSettingsDisplayNameSetCmd updates the account display name
func (*MailSettingsDisplayNameSetCmd) Run ¶
func (cmd *MailSettingsDisplayNameSetCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the set display name command
type MailSettingsForwardingCmd ¶
type MailSettingsForwardingCmd struct {
Get MailSettingsForwardingGetCmd `cmd:"" help:"View forwarding settings"`
}
MailSettingsForwardingCmd holds forwarding subcommands
type MailSettingsForwardingGetCmd ¶
type MailSettingsForwardingGetCmd struct{}
MailSettingsForwardingGetCmd displays forwarding settings
func (*MailSettingsForwardingGetCmd) Run ¶
func (cmd *MailSettingsForwardingGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the get forwarding command
type MailSettingsSignaturesCmd ¶
type MailSettingsSignaturesCmd struct {
List MailSettingsSignaturesListCmd `cmd:"" help:"List all email signatures"`
Create MailSettingsSignaturesCreateCmd `cmd:"" help:"Create a new email signature"`
}
MailSettingsSignaturesCmd holds signature subcommands
type MailSettingsSignaturesCreateCmd ¶
type MailSettingsSignaturesCreateCmd struct {
Name string `help:"Signature name" required:""`
Content string `help:"Signature HTML content" required:""`
Position int `help:"Position: 0=below quoted, 1=above quoted" default:"0"`
AssignUsers string `help:"Comma-separated email addresses to assign signature to" name:"assign-users"`
}
MailSettingsSignaturesCreateCmd creates a new email signature
func (*MailSettingsSignaturesCreateCmd) Run ¶
func (cmd *MailSettingsSignaturesCreateCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the create signature command
type MailSettingsSignaturesListCmd ¶
type MailSettingsSignaturesListCmd struct{}
MailSettingsSignaturesListCmd lists all email signatures
func (*MailSettingsSignaturesListCmd) Run ¶
func (cmd *MailSettingsSignaturesListCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the list signatures command
type MailSettingsVacationCmd ¶
type MailSettingsVacationCmd struct {
Get MailSettingsVacationGetCmd `cmd:"" help:"View vacation auto-reply settings"`
Set MailSettingsVacationSetCmd `cmd:"" help:"Enable vacation auto-reply"`
Disable MailSettingsVacationDisableCmd `cmd:"" help:"Disable vacation auto-reply"`
}
MailSettingsVacationCmd holds vacation auto-reply subcommands
type MailSettingsVacationDisableCmd ¶
type MailSettingsVacationDisableCmd struct{}
MailSettingsVacationDisableCmd disables vacation auto-reply
func (*MailSettingsVacationDisableCmd) Run ¶
func (cmd *MailSettingsVacationDisableCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the disable vacation command
type MailSettingsVacationGetCmd ¶
type MailSettingsVacationGetCmd struct{}
MailSettingsVacationGetCmd displays vacation auto-reply settings
func (*MailSettingsVacationGetCmd) Run ¶
func (cmd *MailSettingsVacationGetCmd) Run(sp *ServiceProvider, fp *FormatterProvider) error
Run executes the get vacation command
type MailSettingsVacationSetCmd ¶
type MailSettingsVacationSetCmd struct {
From string `help:"Start date (MM/DD/YYYY HH:MM:SS)" required:""`
To string `help:"End date (MM/DD/YYYY HH:MM:SS)" required:""`
Subject string `help:"Auto-reply subject" required:""`
Content string `help:"Auto-reply message content" required:""`
Interval int `help:"Reply interval in minutes" default:"1440"`
SendTo string `help:"Send to: all/contacts/noncontacts/org/nonOrgAll" default:"all" enum:"all,contacts,noncontacts,org,nonOrgAll"`
}
MailSettingsVacationSetCmd enables vacation auto-reply
func (*MailSettingsVacationSetCmd) Run ¶
func (cmd *MailSettingsVacationSetCmd) Run(sp *ServiceProvider, globals *Globals) error
Run executes the set vacation command
type MessageDetail ¶
type MessageDetail struct {
Subject string
From string
To string
Cc string
Date string
Size string
Status string
Priority string
HasAttachment string
MessageID string
ThreadID string
FolderID string
Body string
}
MessageDetail is a display struct combining metadata and content
type MessageListRow ¶
type MessageListRow struct {
Status string
FromAddress string
Subject string
Date string
Attachment string
MessageID string
}
MessageListRow is a display struct for message list output with formatted fields
type SchemaArg ¶
type SchemaArg struct {
Name string `json:"name"`
Help string `json:"help,omitempty"`
Required bool `json:"required,omitempty"`
}
SchemaArg represents a positional argument
type SchemaCmd ¶
type SchemaCmd struct {
Command string `arg:"" optional:"" help:"Command path to show schema for (e.g., 'admin users')"`
}
SchemaCmd outputs machine-readable command tree as JSON
type SchemaFlag ¶
type SchemaFlag struct {
Name string `json:"name"`
Help string `json:"help,omitempty"`
Type string `json:"type"`
Required bool `json:"required,omitempty"`
Default string `json:"default,omitempty"`
Enum []string `json:"enum,omitempty"`
Short string `json:"short,omitempty"`
Env string `json:"env,omitempty"`
}
SchemaFlag represents a command flag
type SchemaNode ¶
type SchemaNode struct {
Name string `json:"name"`
Type string `json:"type"` // "application", "command", "argument"
Help string `json:"help,omitempty"`
Aliases []string `json:"aliases,omitempty"`
Hidden bool `json:"hidden,omitempty"`
Children []*SchemaNode `json:"commands,omitempty"`
Flags []*SchemaFlag `json:"flags,omitempty"`
Args []*SchemaArg `json:"args,omitempty"`
}
SchemaNode represents a node in the command tree
type ServiceProvider ¶
type ServiceProvider struct {
// contains filtered or unexported fields
}
ServiceProvider lazily creates and caches Zoho service clients.
func NewServiceProvider ¶
func NewServiceProvider(cfg *config.Config) *ServiceProvider
NewServiceProvider creates a ServiceProvider with the given config.
func (*ServiceProvider) Admin ¶
func (sp *ServiceProvider) Admin() (zoho.AdminService, error)
Admin returns the AdminService, creating it on first call.
func (*ServiceProvider) Mail ¶
func (sp *ServiceProvider) Mail() (zoho.MailService, error)
Mail returns the MailService, creating it on first call.
type SignatureRow ¶
SignatureRow is a display struct for signature list output with formatted fields
type SpamCategoryRow ¶
SpamCategoryRow is a display struct for spam category list