cmd

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Overview

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

This package contains the root command and all subcommands for the StackEye CLI tool. Commands are organized hierarchically using Cobra.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Package cmd implements the CLI commands for StackEye.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute runs the root command and returns any error. This is called by main.main() and handles command execution. Deprecated: Use ExecuteWithExitCode() for proper exit code handling.

func ExecuteWithExitCode

func ExecuteWithExitCode() int

ExecuteWithExitCode runs the root command and returns an appropriate exit code. This maps errors to exit codes for proper CLI behavior:

  • 0: Success
  • 1: General error
  • 2: Command misuse (invalid arguments)
  • 3: Authentication required
  • 4: Permission denied
  • 5: Resource not found
  • 6: Rate limited
  • 7: Server error
  • 8: Network error
  • 9: Timeout
  • 10: Plan limit exceeded

Example usage in main.go:

func main() {
    os.Exit(cmd.ExecuteWithExitCode())
}

func GetConfig

func GetConfig() *config.Config

GetConfig returns the loaded configuration. Returns nil if called before Execute() or if config loading failed. Subcommands should call this in their Run/RunE functions.

func GetConfigOrFail

func GetConfigOrFail() *config.Config

GetConfigOrFail returns the loaded configuration or exits with an error. This is a convenience function for commands that require a valid config.

func GetDryRun

func GetDryRun() bool

GetDryRun returns true if commands should show what would be done without executing. Commands that modify state should check this and print their intended actions instead.

func GetNoInput

func GetNoInput() bool

GetNoInput returns true if interactive prompts should be disabled. Commands should check this before prompting for user input.

func GetVerbosity

func GetVerbosity() int

GetVerbosity returns the kubectl-style verbosity level (0-10). Level meanings:

  • 0: Errors only (default)
  • 1: Warnings + errors
  • 2: Info messages
  • 3: Extended info (config/context details)
  • 4: Debug messages (internal flow)
  • 5: HTTP requests (method, URL, duration)
  • 6: HTTP responses (+ status code, body size)
  • 7: Request headers (redacted)
  • 8: Response headers
  • 9: Full bodies (truncated at 10KB)
  • 10: Trace (curl equivalent, timing breakdown)

func InitHelp

func InitHelp(cmd *cobra.Command, cfg *HelpConfig)

InitHelp initializes the custom help system for the CLI. This should be called after creating the root command.

Example:

rootCmd := NewRootCmd()
InitHelp(rootCmd, &HelpConfig{
    ColorManager: output.NewColorManager(output.ColorAuto),
})

func NewAPIKeyCmd

func NewAPIKeyCmd() *cobra.Command

NewAPIKeyCmd creates and returns the api-key parent command. This command provides management of API keys for programmatic access.

func NewAPIKeyCreateCmd

func NewAPIKeyCreateCmd() *cobra.Command

NewAPIKeyCreateCmd creates and returns the api-key create subcommand.

func NewAPIKeyDeleteCmd

func NewAPIKeyDeleteCmd() *cobra.Command

NewAPIKeyDeleteCmd creates and returns the api-key delete subcommand.

func NewAPIKeyListCmd

func NewAPIKeyListCmd() *cobra.Command

NewAPIKeyListCmd creates and returns the api-key list subcommand.

func NewAdminCmd

func NewAdminCmd() *cobra.Command

NewAdminCmd creates and returns the admin parent command. This command provides access to platform administration features. Admin commands require platform administrator privileges.

func NewAdminM2MKeyCmd

func NewAdminM2MKeyCmd() *cobra.Command

NewAdminM2MKeyCmd creates and returns the admin m2m-key parent command. This command provides access to machine-to-machine key management features.

func NewAdminM2MKeyCreateCmd

func NewAdminM2MKeyCreateCmd() *cobra.Command

NewAdminM2MKeyCreateCmd creates and returns the m2m-key create command.

func NewAdminM2MKeyDeactivateCmd

func NewAdminM2MKeyDeactivateCmd() *cobra.Command

NewAdminM2MKeyDeactivateCmd creates and returns the m2m-key deactivate command.

func NewAdminM2MKeyGetCmd

func NewAdminM2MKeyGetCmd() *cobra.Command

NewAdminM2MKeyGetCmd creates and returns the m2m-key get command.

func NewAdminM2MKeyListCmd

func NewAdminM2MKeyListCmd() *cobra.Command

NewAdminM2MKeyListCmd creates and returns the m2m-key list command.

func NewAdminM2MKeyRotateCmd

func NewAdminM2MKeyRotateCmd() *cobra.Command

NewAdminM2MKeyRotateCmd creates and returns the m2m-key rotate command.

func NewAdminWorkerKeyCmd

func NewAdminWorkerKeyCmd() *cobra.Command

NewAdminWorkerKeyCmd creates and returns the admin worker-key parent command. This command provides access to worker key management features.

func NewAdminWorkerKeyCreateCmd

func NewAdminWorkerKeyCreateCmd() *cobra.Command

NewAdminWorkerKeyCreateCmd creates and returns the worker-key create command.

func NewAdminWorkerKeyDeleteCmd

func NewAdminWorkerKeyDeleteCmd() *cobra.Command

NewAdminWorkerKeyDeleteCmd creates and returns the worker-key delete command.

func NewAdminWorkerKeyHealthCmd

func NewAdminWorkerKeyHealthCmd() *cobra.Command

NewAdminWorkerKeyHealthCmd creates and returns the worker-key health command.

func NewAlertAckCmd

func NewAlertAckCmd() *cobra.Command

NewAlertAckCmd creates and returns the alert ack subcommand.

func NewAlertCmd

func NewAlertCmd() *cobra.Command

NewAlertCmd creates and returns the alert parent command. This command provides management of monitoring alerts.

func NewAlertGetCmd

func NewAlertGetCmd() *cobra.Command

NewAlertGetCmd creates and returns the alert get subcommand.

func NewAlertHistoryCmd

func NewAlertHistoryCmd() *cobra.Command

NewAlertHistoryCmd creates and returns the alert history subcommand.

func NewAlertListCmd

func NewAlertListCmd() *cobra.Command

NewAlertListCmd creates and returns the alert list subcommand.

func NewAlertResolveCmd

func NewAlertResolveCmd() *cobra.Command

NewAlertResolveCmd creates and returns the alert resolve subcommand.

func NewAlertStatsCmd

func NewAlertStatsCmd() *cobra.Command

NewAlertStatsCmd creates and returns the alert stats subcommand.

func NewBillingCmd

func NewBillingCmd() *cobra.Command

NewBillingCmd creates and returns the billing parent command. This command provides access to billing and subscription information.

func NewBillingInfoCmd

func NewBillingInfoCmd() *cobra.Command

NewBillingInfoCmd creates and returns the billing info command.

func NewBillingInvoicesCmd

func NewBillingInvoicesCmd() *cobra.Command

NewBillingInvoicesCmd creates and returns the billing invoices command.

func NewBillingPortalCmd

func NewBillingPortalCmd() *cobra.Command

NewBillingPortalCmd creates and returns the billing portal command.

func NewBillingStatusCmd

func NewBillingStatusCmd() *cobra.Command

NewBillingStatusCmd creates and returns the billing status command.

func NewBillingUsageCmd

func NewBillingUsageCmd() *cobra.Command

NewBillingUsageCmd creates and returns the billing usage command.

func NewChannelCmd

func NewChannelCmd() *cobra.Command

NewChannelCmd creates and returns the channel parent command. This command provides management of notification channels.

func NewChannelCreateCmd

func NewChannelCreateCmd() *cobra.Command

NewChannelCreateCmd creates and returns the channel create subcommand.

func NewChannelDeleteCmd

func NewChannelDeleteCmd() *cobra.Command

NewChannelDeleteCmd creates and returns the channel delete subcommand.

func NewChannelGetCmd

func NewChannelGetCmd() *cobra.Command

NewChannelGetCmd creates and returns the channel get subcommand.

func NewChannelListCmd

func NewChannelListCmd() *cobra.Command

NewChannelListCmd creates and returns the channel list subcommand.

func NewChannelTestCmd

func NewChannelTestCmd() *cobra.Command

NewChannelTestCmd creates and returns the channel test subcommand.

func NewChannelUpdateCmd

func NewChannelUpdateCmd() *cobra.Command

NewChannelUpdateCmd creates and returns the channel update subcommand.

func NewCompletionCmd

func NewCompletionCmd() *cobra.Command

NewCompletionCmd creates and returns the completion parent command. This command provides shell completion script generation.

Usage:

stackeye completion bash > ~/.bash_completion.d/stackeye

func NewConfigCmd

func NewConfigCmd() *cobra.Command

NewConfigCmd creates and returns the config parent command.

func NewContextCmd

func NewContextCmd() *cobra.Command

NewContextCmd creates and returns the context parent command.

func NewDashboardCmd

func NewDashboardCmd() *cobra.Command

NewDashboardCmd creates and returns the dashboard command.

func NewIncidentCmd

func NewIncidentCmd() *cobra.Command

NewIncidentCmd creates and returns the incident parent command. This command provides management of status page incidents.

func NewIncidentCreateCmd

func NewIncidentCreateCmd() *cobra.Command

NewIncidentCreateCmd creates and returns the incident create subcommand.

func NewIncidentDeleteCmd

func NewIncidentDeleteCmd() *cobra.Command

NewIncidentDeleteCmd creates and returns the incident delete subcommand.

func NewIncidentListCmd

func NewIncidentListCmd() *cobra.Command

NewIncidentListCmd creates and returns the incident list subcommand.

func NewIncidentResolveCmd

func NewIncidentResolveCmd() *cobra.Command

NewIncidentResolveCmd creates and returns the incident resolve subcommand.

func NewIncidentUpdateCmd

func NewIncidentUpdateCmd() *cobra.Command

NewIncidentUpdateCmd creates and returns the incident update subcommand.

func NewLoginCmd

func NewLoginCmd() *cobra.Command

NewLoginCmd creates and returns the login command.

func NewLogoutCmd

func NewLogoutCmd() *cobra.Command

NewLogoutCmd creates and returns the logout command.

func NewMaintenanceCalendarCmd

func NewMaintenanceCalendarCmd() *cobra.Command

NewMaintenanceCalendarCmd creates and returns the maintenance calendar subcommand.

func NewMaintenanceCmd

func NewMaintenanceCmd() *cobra.Command

NewMaintenanceCmd creates and returns the maintenance parent command. This command provides management of scheduled maintenance windows.

func NewMaintenanceCreateCmd

func NewMaintenanceCreateCmd() *cobra.Command

NewMaintenanceCreateCmd creates and returns the maintenance create subcommand.

func NewMaintenanceDeleteCmd

func NewMaintenanceDeleteCmd() *cobra.Command

NewMaintenanceDeleteCmd creates and returns the maintenance delete subcommand.

func NewMaintenanceListCmd

func NewMaintenanceListCmd() *cobra.Command

NewMaintenanceListCmd creates and returns the maintenance list subcommand.

func NewMuteCmd

func NewMuteCmd() *cobra.Command

NewMuteCmd creates and returns the mute parent command. This command provides management of alert mute periods.

func NewMuteCreateCmd

func NewMuteCreateCmd() *cobra.Command

NewMuteCreateCmd creates and returns the mute create subcommand.

func NewMuteDeleteCmd

func NewMuteDeleteCmd() *cobra.Command

NewMuteDeleteCmd creates and returns the mute delete subcommand.

func NewMuteExpireCmd

func NewMuteExpireCmd() *cobra.Command

NewMuteExpireCmd creates and returns the mute expire subcommand.

func NewMuteGetCmd

func NewMuteGetCmd() *cobra.Command

NewMuteGetCmd creates and returns the mute get subcommand.

func NewMuteListCmd

func NewMuteListCmd() *cobra.Command

NewMuteListCmd creates and returns the mute list subcommand.

func NewOrgCmd

func NewOrgCmd() *cobra.Command

NewOrgCmd creates and returns the org parent command. This command provides management of organizations.

func NewOrgGetCmd

func NewOrgGetCmd() *cobra.Command

NewOrgGetCmd creates and returns the org get subcommand.

func NewOrgListCmd

func NewOrgListCmd() *cobra.Command

NewOrgListCmd creates and returns the org list subcommand.

func NewOrgSwitchCmd

func NewOrgSwitchCmd() *cobra.Command

NewOrgSwitchCmd creates and returns the org switch subcommand.

func NewProbeCmd

func NewProbeCmd() *cobra.Command

NewProbeCmd creates and returns the probe parent command. This command provides management of monitoring probes.

func NewProbeCreateCmd

func NewProbeCreateCmd() *cobra.Command

NewProbeCreateCmd creates and returns the probe create subcommand.

func NewProbeDeleteCmd

func NewProbeDeleteCmd() *cobra.Command

NewProbeDeleteCmd creates and returns the probe delete subcommand.

func NewProbeDepsAddCmd

func NewProbeDepsAddCmd() *cobra.Command

NewProbeDepsAddCmd creates and returns the probe deps add subcommand.

func NewProbeDepsCmd

func NewProbeDepsCmd() *cobra.Command

NewProbeDepsCmd creates and returns the probe deps parent command. This command provides management of probe dependencies for hierarchical alerting.

func NewProbeDepsListCmd

func NewProbeDepsListCmd() *cobra.Command

NewProbeDepsListCmd creates and returns the probe deps list subcommand.

func NewProbeGetCmd

func NewProbeGetCmd() *cobra.Command

NewProbeGetCmd creates and returns the probe get subcommand.

func NewProbeHistoryCmd

func NewProbeHistoryCmd() *cobra.Command

NewProbeHistoryCmd creates and returns the probe history subcommand.

func NewProbeLinkChannelCmd

func NewProbeLinkChannelCmd() *cobra.Command

NewProbeLinkChannelCmd creates and returns the probe link-channel subcommand.

func NewProbeListCmd

func NewProbeListCmd() *cobra.Command

NewProbeListCmd creates and returns the probe list subcommand.

func NewProbePauseCmd

func NewProbePauseCmd() *cobra.Command

NewProbePauseCmd creates and returns the probe pause subcommand.

func NewProbeResumeCmd

func NewProbeResumeCmd() *cobra.Command

NewProbeResumeCmd creates and returns the probe resume subcommand.

func NewProbeStatsCmd

func NewProbeStatsCmd() *cobra.Command

NewProbeStatsCmd creates and returns the probe stats subcommand.

func NewProbeTestCmd

func NewProbeTestCmd() *cobra.Command

NewProbeTestCmd creates and returns the probe test subcommand.

func NewProbeUpdateCmd

func NewProbeUpdateCmd() *cobra.Command

NewProbeUpdateCmd creates and returns the probe update subcommand.

func NewProbeWizardCmd

func NewProbeWizardCmd() *cobra.Command

NewProbeWizardCmd creates and returns the probe wizard command.

func NewRegionCmd

func NewRegionCmd() *cobra.Command

NewRegionCmd creates and returns the region parent command. This command provides information about monitoring regions.

func NewRegionListCmd

func NewRegionListCmd() *cobra.Command

NewRegionListCmd creates and returns the region list subcommand.

func NewRegionStatusCmd

func NewRegionStatusCmd() *cobra.Command

NewRegionStatusCmd creates and returns the region status subcommand.

func NewSetupCmd

func NewSetupCmd() *cobra.Command

NewSetupCmd creates and returns the setup command.

func NewStatusPageAddProbeCmd

func NewStatusPageAddProbeCmd() *cobra.Command

NewStatusPageAddProbeCmd creates and returns the status-page add-probe subcommand.

func NewStatusPageCmd

func NewStatusPageCmd() *cobra.Command

NewStatusPageCmd creates and returns the status-page parent command. This command provides management of public status pages.

func NewStatusPageCreateCmd

func NewStatusPageCreateCmd() *cobra.Command

NewStatusPageCreateCmd creates and returns the status-page create subcommand.

func NewStatusPageDeleteCmd

func NewStatusPageDeleteCmd() *cobra.Command

NewStatusPageDeleteCmd creates and returns the status-page delete subcommand.

func NewStatusPageDomainVerifyCmd

func NewStatusPageDomainVerifyCmd() *cobra.Command

NewStatusPageDomainVerifyCmd creates and returns the status-page domain-verify subcommand.

func NewStatusPageGetCmd

func NewStatusPageGetCmd() *cobra.Command

NewStatusPageGetCmd creates and returns the status-page get subcommand.

func NewStatusPageGetStatusCmd

func NewStatusPageGetStatusCmd() *cobra.Command

NewStatusPageGetStatusCmd creates and returns the status-page get-status subcommand.

func NewStatusPageListCmd

func NewStatusPageListCmd() *cobra.Command

NewStatusPageListCmd creates and returns the status-page list subcommand.

func NewStatusPageRemoveProbeCmd

func NewStatusPageRemoveProbeCmd() *cobra.Command

NewStatusPageRemoveProbeCmd creates and returns the status-page remove-probe subcommand.

func NewStatusPageReorderProbesCmd

func NewStatusPageReorderProbesCmd() *cobra.Command

NewStatusPageReorderProbesCmd creates and returns the status-page reorder-probes subcommand.

func NewStatusPageUpdateCmd

func NewStatusPageUpdateCmd() *cobra.Command

NewStatusPageUpdateCmd creates and returns the status-page update subcommand.

func NewTeamCmd

func NewTeamCmd() *cobra.Command

NewTeamCmd creates and returns the team parent command. This command provides management of team members and invitations.

func NewTeamInvitationsCmd

func NewTeamInvitationsCmd() *cobra.Command

NewTeamInvitationsCmd creates and returns the team invitations subcommand.

func NewTeamInviteCmd

func NewTeamInviteCmd() *cobra.Command

NewTeamInviteCmd creates and returns the team invite subcommand.

func NewTeamListCmd

func NewTeamListCmd() *cobra.Command

NewTeamListCmd creates and returns the team list subcommand.

func NewTeamRemoveCmd

func NewTeamRemoveCmd() *cobra.Command

NewTeamRemoveCmd creates and returns the team remove subcommand.

func NewTeamRevokeInvitationCmd

func NewTeamRevokeInvitationCmd() *cobra.Command

NewTeamRevokeInvitationCmd creates and returns the team revoke-invitation subcommand.

func NewTeamUpdateRoleCmd

func NewTeamUpdateRoleCmd() *cobra.Command

NewTeamUpdateRoleCmd creates and returns the team update-role subcommand.

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd creates and returns the version command.

func NewWhoamiCmd

func NewWhoamiCmd() *cobra.Command

NewWhoamiCmd creates and returns the whoami command.

func RenderHelp

func RenderHelp(cmd *cobra.Command) (string, error)

RenderHelp renders the help output for a command. This can be used to test help rendering.

func RootCmd

func RootCmd() *cobra.Command

RootCmd returns the root command for adding subcommands. This is used by subcommand packages to register themselves.

func SetNoColor

func SetNoColor(disabled bool)

SetNoColor updates the help system to disable colors. This is called when --no-color flag is set.

Types

type AlertAckBatchResponse

type AlertAckBatchResponse struct {
	Acknowledged []*client.Alert `json:"acknowledged"`
	Failed       []AlertAckError `json:"failed,omitempty"`
	Total        int             `json:"total"`
	SuccessCount int             `json:"success_count"`
	FailedCount  int             `json:"failed_count"`
}

AlertAckBatchResponse wraps multiple acknowledged alerts for batch output.

type AlertAckError

type AlertAckError struct {
	ID    string `json:"id"`
	Error string `json:"error"`
}

AlertAckError represents a failed acknowledgment attempt.

type AlertAckResponse

type AlertAckResponse struct {
	Alert   *client.Alert `json:"alert"`
	Message string        `json:"message,omitempty"`
}

AlertAckResponse wraps the acknowledged alert data for output.

type AlertGetResponse

type AlertGetResponse struct {
	Alert    *client.Alert               `json:"alert"`
	Timeline []client.AlertTimelineEvent `json:"timeline,omitempty"`
}

AlertGetResponse wraps the alert data with optional timeline for output.

type AlertResolveBatchResponse

type AlertResolveBatchResponse struct {
	Resolved     []*client.Alert     `json:"resolved"`
	Failed       []AlertResolveError `json:"failed,omitempty"`
	Total        int                 `json:"total"`
	SuccessCount int                 `json:"success_count"`
	FailedCount  int                 `json:"failed_count"`
}

AlertResolveBatchResponse wraps multiple resolved alerts for batch output.

type AlertResolveError

type AlertResolveError struct {
	ID    string `json:"id"`
	Error string `json:"error"`
}

AlertResolveError represents a failed resolution attempt.

type AlertResolveResponse

type AlertResolveResponse struct {
	Alert   *client.Alert `json:"alert"`
	Message string        `json:"message,omitempty"`
}

AlertResolveResponse wraps the resolved alert data for output.

type ChannelTestResult

type ChannelTestResult struct {
	ChannelID      uuid.UUID `json:"channel_id" yaml:"channel_id"`
	ChannelName    string    `json:"channel_name" yaml:"channel_name"`
	ChannelType    string    `json:"channel_type" yaml:"channel_type"`
	Success        bool      `json:"success" yaml:"success"`
	Message        string    `json:"message" yaml:"message"`
	Error          *string   `json:"error,omitempty" yaml:"error,omitempty"`
	ResponseTimeMs int       `json:"response_time_ms" yaml:"response_time_ms"`
}

ChannelTestResult wraps the test response with channel metadata for output formatting. This struct is exported to allow JSON/YAML serialization with proper field tags.

type CommandGroup

type CommandGroup struct {
	Name     string
	Commands []*cobra.Command
}

CommandGroup represents a logical grouping of commands for help output.

func GroupCommands

func GroupCommands(commands []*cobra.Command) []CommandGroup

GroupCommands organizes commands into logical groups for display.

type HelpConfig

type HelpConfig struct {
	// ColorManager provides colored output formatting.
	ColorManager *output.ColorManager
	// Writer is the output destination (defaults to os.Stdout).
	Writer io.Writer
}

HelpConfig holds configuration for the custom help system.

func GetHelpConfig

func GetHelpConfig() *HelpConfig

GetHelpConfig returns the current help configuration. Returns a default config if InitHelp hasn't been called.

type OrgDetail

type OrgDetail struct {
	// Basic organization info
	ID        string `json:"id"`
	Name      string `json:"name"`
	Slug      string `json:"slug"`
	Role      string `json:"role"`
	IsCurrent bool   `json:"is_current"`

	// Plan and billing info
	Plan          string  `json:"plan"`
	PlanStatus    string  `json:"plan_status"`
	TrialEndsAt   *string `json:"trial_ends_at,omitempty"`
	NextBillingAt *string `json:"next_billing_at,omitempty"`

	// Usage and limits
	MonitorCount    int `json:"monitor_count"`
	MonitorLimit    int `json:"monitor_limit"`
	TeamMemberCount int `json:"team_member_count"`
	TeamMemberLimit int `json:"team_member_limit"`
}

OrgDetail combines organization info with billing and usage details.

type ProbeHistoryEntry

type ProbeHistoryEntry struct {
	ID             uuid.UUID `json:"id" yaml:"id"`
	CheckedAt      time.Time `json:"checked_at" yaml:"checked_at"`
	Region         string    `json:"region" yaml:"region"`
	Status         string    `json:"status" yaml:"status"`
	ResponseTimeMs int       `json:"response_time_ms" yaml:"response_time_ms"`
	StatusCode     *int      `json:"status_code,omitempty" yaml:"status_code,omitempty"`
	ErrorMessage   *string   `json:"error_message,omitempty" yaml:"error_message,omitempty"`
	SSLExpiryDays  *int      `json:"ssl_expiry_days,omitempty" yaml:"ssl_expiry_days,omitempty"`
}

ProbeHistoryEntry represents a single check result in the history output.

type ProbeHistoryOutput

type ProbeHistoryOutput struct {
	ProbeID uuid.UUID           `json:"probe_id" yaml:"probe_id"`
	Results []ProbeHistoryEntry `json:"results" yaml:"results"`
	Total   int64               `json:"total" yaml:"total"`
	Page    int                 `json:"page" yaml:"page"`
	Limit   int                 `json:"limit" yaml:"limit"`
}

ProbeHistoryOutput wraps probe results for output formatting. This struct is exported to allow JSON/YAML serialization with proper field tags.

type ProbeStatsOutput

type ProbeStatsOutput struct {
	ProbeID       uuid.UUID `json:"probe_id" yaml:"probe_id"`
	Period        string    `json:"period" yaml:"period"`
	UptimePercent float64   `json:"uptime_percent" yaml:"uptime_percent"`
	TotalChecks   int64     `json:"total_checks" yaml:"total_checks"`
	SuccessChecks int64     `json:"success_checks" yaml:"success_checks"`
	FailureChecks int64     `json:"failure_checks" yaml:"failure_checks"`
	AvgResponseMs float64   `json:"avg_response_time_ms" yaml:"avg_response_time_ms"`
	P95ResponseMs float64   `json:"p95_response_time_ms" yaml:"p95_response_time_ms"`
	P99ResponseMs float64   `json:"p99_response_time_ms" yaml:"p99_response_time_ms"`
	MinResponseMs int       `json:"min_response_time_ms" yaml:"min_response_time_ms"`
	MaxResponseMs int       `json:"max_response_time_ms" yaml:"max_response_time_ms"`
	From          time.Time `json:"from" yaml:"from"`
	To            time.Time `json:"to" yaml:"to"`
	TimeBuckets   int       `json:"time_buckets" yaml:"time_buckets"`
}

ProbeStatsOutput wraps probe statistics for output formatting. This struct is exported to allow JSON/YAML serialization with proper field tags.

type ProbeTestResult

type ProbeTestResult struct {
	ProbeID        uuid.UUID `json:"probe_id" yaml:"probe_id"`
	ProbeName      string    `json:"probe_name" yaml:"probe_name"`
	ProbeURL       string    `json:"probe_url" yaml:"probe_url"`
	Status         string    `json:"status" yaml:"status"`
	ResponseTimeMs int       `json:"response_time_ms" yaml:"response_time_ms"`
	StatusCode     *int      `json:"status_code,omitempty" yaml:"status_code,omitempty"`
	ErrorMessage   *string   `json:"error_message,omitempty" yaml:"error_message,omitempty"`
	SSLExpiryDays  *int      `json:"ssl_expiry_days,omitempty" yaml:"ssl_expiry_days,omitempty"`
	CheckedAt      time.Time `json:"checked_at" yaml:"checked_at"`
}

ProbeTestResult wraps the test response with probe metadata for output formatting. This struct is exported to allow JSON/YAML serialization with proper field tags.

type SwitchResult

type SwitchResult struct {
	OrganizationID   string `json:"organization_id"`
	OrganizationName string `json:"organization_name"`
	OrganizationSlug string `json:"organization_slug"`
	Role             string `json:"role"`
	Message          string `json:"message"`
}

SwitchResult represents the result of an organization switch.

Source Files

Jump to

Keyboard shortcuts

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