Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Overview

Package cli implements Prism's command-line interface application.

This package provides the CLI application logic for the Prism client. It handles command parsing, API client communication, output formatting, and user interaction flows while maintaining Prism's core design principles.

Application Structure:

  • App: Main CLI application with command routing
  • Command handlers for all Prism operations
  • Output formatting with tables and JSON support
  • Error handling with user-friendly messages
  • Configuration management and validation

Supported Commands:

  • launch: Create new research instances
  • list: Show instance status and costs
  • connect: Get connection information
  • stop/start: Instance lifecycle management
  • volumes: EFS volume operations
  • storage: EBS storage management

Design Philosophy: Follows "Progressive Disclosure" - simple commands with optional advanced flags. All operations provide clear feedback and cost visibility.

Usage:

app := cli.NewApp(apiClient)
err := app.Run(os.Args)

Package cli provides the prism approval command group (v0.21.0 #495).

These commands expose the hierarchical launch approval workflow documented in issue #495. They complement (and share backend with) the older `prism approvals` and `prism request/approve/deny` commands introduced in v0.12.0.

Canonical CLI UX from #495:

prism approval list [--project <name>] [--status pending|approved|denied]
prism approval show <id>
prism approval approve <id> [--comment "..."]
prism approval deny <id> [--comment "..."]
prism approval request <type> --project <name> [--reason "..."]

Package cli provides approval workflow CLI commands for Prism v0.12.0.

These commands allow researchers to request GPU/expensive resources and PIs to manage the approval queue:

prism request gpu-workstation my-project
prism approvals list my-project
prism approvals dashboard
prism approve <request-id>
prism deny <request-id> --note "use CPU instead"

Package cli - Backup Implementation Layer

ARCHITECTURE NOTE: This file contains backup and restore command business logic. These commands are registered in root_command.go and called directly from the CLI.

This follows Prism's command architecture pattern:

  • Single-layer implementation for straightforward operations
  • Direct integration with root command structure
  • API-driven operations with consistent error handling

DO NOT REMOVE THIS FILE - it is actively used by root_command.go and App methods.

Package cli provides Slack/Teams bot integration commands for Prism.

These commands allow workspace owners to register their Prism instances with the shared spore-bot Slack service and manage per-user access:

prism bot workspace-add   -- register Slack app credentials
prism bot register        -- link a Slack/Teams user to an instance
prism bot enable          -- activate bot access (off by default)
prism bot disable         -- suspend access without removing registration
prism bot revoke          -- remove registration
prism bot status          -- show registered users and their access state

Package cli provides budget management commands for Prism.

The budget system provides comprehensive financial controls for research computing, enabling researchers and institutions to track spending, set limits, and automate cost-saving actions across individual projects and organizational accounts.

Budget Architecture:

  • Personal budgets: Individual researcher spending limits
  • Project budgets: Collaborative project financial controls
  • Organization budgets: Institution-wide spending management
  • Real-time tracking: Live cost monitoring with AWS billing integration
  • Automated actions: Hibernation, stopping, and launch prevention controls
  • Alert system: Email, Slack, webhook notifications for budget thresholds

Design Philosophy: Follows Prism's "Progressive Disclosure" principle - simple budget creation with optional advanced features like automated actions and custom alerts.

Usage Examples:

prism budget list                    # Show all budgets and current status
prism budget create my-project 1000  # Create $1000 project budget
prism budget status my-project       # Show detailed budget status
prism budget breakdown my-project    # Cost breakdown by service/instance

Package cli provides constants for Prism's command-line interface.

This file centralizes all hardcoded values used across CLI modules to improve maintainability and make configuration changes easier. Constants are organized into logical groups with clear documentation.

Package cli provides enhanced error handling and user-friendly error messages.

Package cli provides the command-line interface for Prism

Package cli - Instance Implementation Layer

ARCHITECTURE NOTE: This file contains the business logic implementation for instance commands. The user-facing CLI interface is defined in instances_cobra.go, which delegates to these methods.

This separation follows the Facade/Adapter pattern:

  • instances_cobra.go: CLI interface (Cobra commands, flag parsing, help text)
  • instance_impl.go: Business logic (API calls, formatting, error handling)

This architecture allows:

  • Clean separation of concerns
  • Reusable business logic (can be called from Cobra, TUI, or tests)
  • Consistent API interaction patterns across all commands

DO NOT REMOVE THIS FILE - it is actively used by instances_cobra.go and other components.

Package cli provides mock API client implementation for testing

Package cli provides interactive profile management wizards for Prism.

Package cli provides enhanced progress reporting for Prism launch operations.

Package cli provides the command-line interface for Prism

Package cli implements Prism's scaling and rightsizing command handlers.

This file contains all scaling-related functionality including:

  • Rightsizing analysis and recommendations
  • Dynamic instance scaling operations
  • Usage statistics and cost optimization
  • Helper functions for size mapping and cost estimation

Design Philosophy: Follows Prism's core principles of transparency, cost optimization, and progressive disclosure for scaling operations.

Security CLI commands for Prism

Package cli provides shared token CLI commands for Prism v0.5.13+

Package cli provides shared token CLI implementations for Prism v0.5.13+

Package cli - Snapshot Implementation Layer

ARCHITECTURE NOTE: This file contains instance snapshot command business logic. These commands are registered in root_command.go and called directly from the CLI.

This follows Prism's command architecture pattern:

  • Single-layer implementation for straightforward operations
  • Direct integration with root command structure
  • API-driven operations with consistent error handling

DO NOT REMOVE THIS FILE - it is actively used by root_command.go and App methods.

Package cli - Storage Cobra Command Layer

ARCHITECTURE NOTE: This file defines the user-facing CLI interface for storage commands. The actual business logic is in storage_impl.go (StorageCommands).

This separation follows the Facade/Adapter pattern:

  • storage_cobra.go: CLI interface (THIS FILE - Cobra commands, flag parsing, help text)
  • storage_impl.go: Business logic (API calls, formatting, error handling)

This Cobra layer is responsible for:

  • Defining command structure and subcommands
  • Parsing and validating flags
  • Providing help text and examples
  • Delegating to StorageCommands for execution

Package cli - Storage Implementation Layer

ARCHITECTURE NOTE: This file contains the business logic implementation for storage commands. The user-facing CLI interface is defined in storage_cobra.go, which delegates to these methods.

This separation follows the Facade/Adapter pattern:

  • storage_cobra.go: CLI interface (Cobra commands, flag parsing, help text)
  • storage_impl.go: Business logic (API calls, formatting, error handling)

This architecture allows:

  • Clean separation of concerns
  • Reusable business logic (can be called from Cobra, TUI, or tests)
  • Consistent API interaction patterns across all commands

DO NOT REMOVE THIS FILE - it is actively used by storage_cobra.go and other components.

Package cli implements Prism's command-line interface application.

Package cli implements template application commands for Prism.

These commands enable applying templates to already running instances, allowing for incremental environment evolution without instance recreation.

Package cli - Template Implementation Layer

ARCHITECTURE NOTE: This file contains the business logic implementation for template commands. The user-facing CLI interface is defined in templates_cobra.go, which delegates to these methods.

This separation follows the Facade/Adapter pattern:

  • templates_cobra.go: CLI interface (Cobra commands, flag parsing, help text)
  • template_impl.go: Business logic (API calls, formatting, error handling)

This architecture allows:

  • Clean separation of concerns
  • Reusable business logic (can be called from Cobra, TUI, or tests)
  • Consistent API interaction patterns across all commands

DO NOT REMOVE THIS FILE - it is actively used by templates_cobra.go and other components.

Package cli - Template Cobra Command Layer

ARCHITECTURE NOTE: This file defines the user-facing CLI interface for template commands. The actual business logic is in template_impl.go (TemplateCommands).

This separation follows the Facade/Adapter pattern:

  • templates_cobra.go: CLI interface (THIS FILE - Cobra commands, flag parsing, help text)
  • template_impl.go: Business logic (API calls, formatting, error handling)

This Cobra layer is responsible for:

  • Defining command structure and subcommands
  • Parsing and validating flags
  • Providing help text and examples
  • Delegating to TemplateCommands for execution

Package cli implements user management commands for Prism CLI.

This module provides comprehensive user management functionality including user creation, SSH key management, and provisioning across instances.

Commands:

  • user create <username> # Create a new user
  • user list # List users for current profile
  • user delete <username> # Delete a user
  • user ssh-key <subcommand> # SSH key management
  • user provision <username> <workspace> # Provision user on workspace
  • user status <username> # Show user status across instances

Examples:

prism user create alice
prism user ssh-key generate alice
prism user provision alice my-ml-instance
prism user list

Index

Constants

View Source
const (
	// DefaultDaemonURL is the default URL for the Prism daemon
	DefaultDaemonURL = "http://localhost:8947"

	// DefaultDaemonPort is the default port for the Prism daemon
	DefaultDaemonPort = "8947"

	// DaemonURLEnvVar is the environment variable for daemon URL override
	DaemonURLEnvVar = "PRISMD_URL"

	// AutoStartDisableEnvVar is the environment variable to disable auto-daemon startup
	AutoStartDisableEnvVar = "PRISM_NO_AUTO_START"
)
View Source
const (
	// DefaultVolumeType is the default EBS volume type for storage creation
	DefaultVolumeType = "gp3"

	// DefaultInstanceRetentionMinutes is the default retention period for terminated instances
	DefaultInstanceRetentionMinutes = 5

	// DefaultMountPointPrefix is the default prefix for volume mount points
	DefaultMountPointPrefix = "/mnt/"

	// DefaultConfigDir is the default configuration directory name
	DefaultConfigDir = ".prism"

	// DefaultConfigFile is the default daemon configuration file name
	DefaultConfigFile = "daemon_config.json"
)
View Source
const (
	// DaemonStartupTimeout is the maximum time to wait for daemon startup
	DaemonStartupTimeout = 10 * time.Second

	// DaemonStartupMaxAttempts is the maximum number of daemon ping attempts
	DaemonStartupMaxAttempts = 20

	// DaemonStartupRetryInterval is the interval between daemon ping attempts
	DaemonStartupRetryInterval = 500 * time.Millisecond

	// AMILaunchMonitorTimeout is the maximum time to monitor AMI launch progress (5 minutes)
	AMILaunchMonitorTimeout = 60

	// PackageLaunchMonitorTimeout is the maximum time to monitor package launch progress (20 minutes)
	PackageLaunchMonitorTimeout = 240

	// LaunchProgressInterval is the interval between launch progress checks
	LaunchProgressInterval = 5 * time.Second

	// SetupProgressCheckInterval is the interval for checking setup completion (30 seconds)
	SetupProgressCheckInterval = 30

	// SetupProgressStartDelay is the delay before starting setup progress checks (1 minute)
	SetupProgressStartDelay = 60

	// AnalyticsCollectionInterval is the interval for collecting usage analytics
	AnalyticsCollectionInterval = "2 minutes"
)
View Source
const (
	// DaemonNotRunningMessage is the standard message when daemon is not running
	DaemonNotRunningMessage = "daemon not running - this is unusual since daemon auto-starts. Try: prism admin daemon status"

	// DaemonAutoStartMessage is displayed when auto-starting the daemon
	DaemonAutoStartMessage = "🚀 Starting Prism daemon..."

	// DaemonAutoStartSuccessMessage is displayed when auto-start succeeds
	DaemonAutoStartSuccessMessage = "✅ Daemon ready"

	// DaemonAutoStartFailedMessage is displayed when auto-start fails
	DaemonAutoStartFailedMessage = "❌ Failed to auto-start daemon. Please start manually with: prism admin daemon start"

	// NoInstancesFoundMessage is displayed when no instances are found
	NoInstancesFoundMessage = "No workstations found. Launch one with: prism workspace launch <template> <name>"

	// NoInstancesFoundProjectMessage is displayed when no instances are found in a project
	NoInstancesFoundProjectMessage = "No workstations found in project '%s'. Launch one with: prism workspace launch <template> <name> --project %s"

	// NoEFSVolumesFoundMessage is displayed when no EFS volumes are found
	NoEFSVolumesFoundMessage = "No EFS volumes found. Create one with: prism volume create <name>"

	// NoEBSVolumesFoundMessage is displayed when no EBS volumes are found
	NoEBSVolumesFoundMessage = "No EBS volumes found. Create one with: prism storage create <name> <size>"
)
View Source
const (
	// AnalyticsLogFile is the path to the analytics log file on instances
	AnalyticsLogFile = "/var/log/prism-analytics.json"

	// RightsizingLogFile is the path to the rightsizing recommendations file on instances
	RightsizingLogFile = "/var/log/prism-rightsizing.json"

	// DefaultTemplateDir is the default directory for template files
	DefaultTemplateDir = "./templates"

	// TemplateFileExtensionYML is the YAML file extension for templates
	TemplateFileExtensionYML = ".yml"

	// TemplateFileExtensionYAML is the YAML file extension for templates
	TemplateFileExtensionYAML = ".yaml"
)
View Source
const (
	// DefaultFilePermissions is the default file permissions for config files
	DefaultFilePermissions = 0644

	// DefaultDirPermissions is the default directory permissions for config directories
	DefaultDirPermissions = 0755

	// TabWriterMinWidth is the minimum width for tabwriter columns
	TabWriterMinWidth = 0

	// TabWriterTabWidth is the tab width for tabwriter
	TabWriterTabWidth = 8

	// TabWriterPadding is the padding for tabwriter columns
	TabWriterPadding = 2

	// TabWriterPadChar is the padding character for tabwriter
	TabWriterPadChar = ' '

	// TabWriterFlags are the flags for tabwriter
	TabWriterFlags = 0

	// BytesToGB is the conversion factor from bytes to gigabytes
	BytesToGB = 1024 * 1024 * 1024

	// DaysToMonthEstimate is the multiplier for daily cost to monthly estimate
	DaysToMonthEstimate = 30

	// DaysToYearEstimate is the multiplier for daily cost to yearly estimate
	DaysToYearEstimate = 365

	// DefaultAnalyticsSampleCount is the default number of analytics samples to keep
	DefaultAnalyticsSampleCount = 1000

	// DefaultAnalyticsSampleHours is the approximate hours of data in default sample count
	DefaultAnalyticsSampleHours = 33
)
View Source
const (
	// LaunchProgressAMIMessage is displayed for AMI-based launches
	LaunchProgressAMIMessage = "📦 AMI-based launch - showing instance status..."

	// LaunchProgressPackageMessage is displayed for package-based launches
	LaunchProgressPackageMessage = "📦 Package-based launch - monitoring setup progress..."

	// LaunchProgressPackageTiming provides timing information for package setups
	LaunchProgressPackageTiming = "💡 Setup time varies: APT/DNF ~2-3 min, conda ~5-10 min"

	// SetupTimeoutMessage is displayed when setup monitoring times out
	SetupTimeoutMessage = "⚠️  Setup monitoring timeout (20 min). Instance may still be setting up."

	// SetupTimeoutHelpMessage provides help when setup times out
	SetupTimeoutHelpMessage = "💡 Check status with: prism workspace list"

	// SetupTimeoutConnectMessage suggests connecting when setup times out
	SetupTimeoutConnectMessage = "💡 Try connecting: prism workspace connect %s"

	// AMITimeoutMessage is displayed when AMI launch monitoring times out
	AMITimeoutMessage = "⚠️  Timeout waiting for instance to start (5 min). Check status with: prism workspace list"
)
View Source
const (
	// StateMessageInitializing is displayed when instance is initializing
	StateMessageInitializing = "⏳ Instance initializing..."

	// StateMessageStarting is displayed when instance is starting
	StateMessageStarting = "🔄 Instance starting... (%ds)"

	// StateMessageRunningReady is displayed when instance is ready
	StateMessageRunningReady = "✅ Instance running! Ready to connect."

	// StateMessageConnectCommand provides the connect command template
	StateMessageConnectCommand = "🔗 Connect: prism workspace connect %s"

	// StateMessageDryRunSuccess is displayed for successful dry runs
	StateMessageDryRunSuccess = "✅ Dry-run validation successful! No actual instance launched."

	// StateMessageUnexpectedStop is displayed when instance stops unexpectedly
	StateMessageUnexpectedStop = "❌ Instance stopped unexpectedly"

	// StateMessageTerminated is displayed when instance is terminated
	StateMessageTerminated = "❌ Instance terminated during launch"

	// StateMessageSetupBegin is displayed when setup begins
	StateMessageSetupBegin = "🔧 Instance running, beginning setup... (%ds)"

	// StateMessageInstallingPackages is displayed during package installation
	StateMessageInstallingPackages = "📥 Installing packages... (%ds)"

	// StateMessageConfiguringServices is displayed during service configuration
	StateMessageConfiguringServices = "⚙️  Configuring services... (%ds)"

	// StateMessageFinalSetup is displayed during final setup steps
	StateMessageFinalSetup = "🔧 Final setup steps... (%ds)"

	// StateMessageSetupComplete is displayed when setup is complete
	StateMessageSetupComplete = "✅ Setup complete! Instance ready."
)
View Source
const (
	// PackageManagerAMI represents AMI-based templates
	PackageManagerAMI = "AMI"

	// PackageManagerAPT represents APT-based templates
	PackageManagerAPT = "APT"

	// PackageManagerDNF represents DNF-based templates
	PackageManagerDNF = "DNF"

	// PackageManagerConda represents conda-based templates
	PackageManagerConda = "conda"
)
View Source
const (
	// StandardDateFormat is the standard date format used throughout the CLI
	StandardDateFormat = "2006-01-02 15:04:05"

	// ShortDateFormat is the short date format for compact displays
	ShortDateFormat = "2006-01-02 15:04"

	// CompactDateFormat is the compact date format for space-constrained displays
	CompactDateFormat = "2006-01-02"

	// ISO8601DateFormat is the ISO8601 date format for API compatibility
	ISO8601DateFormat = "2006-01-02T15:04:05Z"
)
View Source
const (
	// DefaultSavingsEstimate is the default percentage for estimated savings
	DefaultSavingsEstimate = 0.25 // 25%

	// TypicalRightsizingSavingsMin is the minimum typical savings from rightsizing
	TypicalRightsizingSavingsMin = 20 // 20%

	// TypicalRightsizingSavingsMax is the maximum typical savings from rightsizing
	TypicalRightsizingSavingsMax = 40 // 40%

	// OverProvisioningWastePercent is the typical waste from over-provisioning
	OverProvisioningWastePercent = 30 // 30%
)

Variables

View Source
var (
	// DotsSpinner is a simple dots animation
	DotsSpinner = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
	// LineSpinner is a simple line rotation
	LineSpinner = []string{"|", "/", "-", "\\"}
	// ArrowSpinner is a rotating arrow
	ArrowSpinner = []string{"←", "↖", "↑", "↗", "→", "↘", "↓", "↙"}
	// CircleSpinner is a circle animation
	CircleSpinner = []string{"◐", "◓", "◑", "◒"}
	// BoxSpinner is a box bouncing animation
	BoxSpinner = []string{"◰", "◳", "◲", "◱"}
	// EarthSpinner is a rotating earth (fun option!)
	EarthSpinner = []string{"🌍", "🌎", "🌏"}
)

Default spinner frames (various styles available)

View Source
var ComputePackageIndicators = []string{
	"openmpi", "mpich", "openmp", "fftw", "blas", "lapack", "atlas", "mkl",
}

ComputePackageIndicators contains keywords that indicate high compute requirements

View Source
var GPUPackageIndicators = []string{
	"tensorflow-gpu", "pytorch", "cuda", "nvidia", "cupy", "numba", "rapids",
}

GPUPackageIndicators contains keywords that indicate GPU requirements

View Source
var InstanceTypeSizeMapping = map[string]string{
	"t3.nano":     "XS",
	"t3.micro":    "XS",
	"t3.small":    "S",
	"t3.medium":   "M",
	"t3.large":    "L",
	"t3.xlarge":   "XL",
	"t3.2xlarge":  "XL",
	"t3a.nano":    "XS",
	"t3a.micro":   "XS",
	"t3a.small":   "S",
	"t3a.medium":  "M",
	"t3a.large":   "L",
	"t3a.xlarge":  "XL",
	"t3a.2xlarge": "XL",
	"t4g.nano":    "XS",
	"t4g.micro":   "XS",
	"t4g.small":   "S",
	"t4g.medium":  "M",
	"t4g.large":   "L",
	"t4g.xlarge":  "XL",
	"t4g.2xlarge": "XL",
}

InstanceTypeSizeMapping maps instance types to t-shirt sizes

View Source
var MemoryPackageIndicators = []string{
	"spark", "hadoop", "r-base", "bioconductor", "genomics",
}

MemoryPackageIndicators contains keywords that indicate high memory requirements

View Source
var ServicePortMappings = map[int]string{
	22:   "SSH",
	80:   "HTTP",
	443:  "HTTPS",
	3306: "MySQL",
	5432: "PostgreSQL",
	6379: "Redis",
	8787: "RStudio Server",
	8888: "Jupyter Notebook",
}

ServicePortMappings maps port numbers to their common services

View Source
var SizeInstanceTypeMapping = map[string]string{
	"XS": "t4g.nano",
	"S":  "t4g.small",
	"M":  "t4g.medium",
	"L":  "t4g.large",
	"XL": "t4g.xlarge",
}

SizeInstanceTypeMapping maps t-shirt sizes to preferred instance types

View Source
var TSizeSpecifications = map[string]TSizeSpecs{
	"XS": {"1vCPU", "2GB", "100GB", 0.50},
	"S":  {"2vCPU", "4GB", "500GB", 1.00},
	"M":  {"2vCPU", "8GB", "1TB", 2.00},
	"L":  {"4vCPU", "16GB", "2TB", 4.00},
	"XL": {"8vCPU", "32GB", "4TB", 8.00},
}

TSizeSpecifications maps t-shirt sizes to their specifications

View Source
var ValidTSizes = map[string]bool{
	"XS": true,
	"S":  true,
	"M":  true,
	"L":  true,
	"XL": true,
}

ValidTSizes contains all valid t-shirt sizes

Functions

func AddBatchConfigCommands

func AddBatchConfigCommands(invitationsCmd *cobra.Command, config *Config)

AddBatchConfigCommands adds batch configuration commands to the CLI

func AddBatchDeviceCommands added in v0.8.0

func AddBatchDeviceCommands(invitationsCmd *cobra.Command, config *Config)

AddBatchDeviceCommands adds secure invitation and device-management subcommands. All logic delegates to pkg/profile.SecureInvitationManager, which already exists.

func AddBatchInvitationCommands added in v0.8.0

func AddBatchInvitationCommands(invitationsCmd *cobra.Command, config *Config)

AddBatchInvitationCommands adds batch invitation management commands to the CLI. This wires the existing pkg/profile.BatchInvitationManager to CLI subcommands.

func AddExportCommands

func AddExportCommands(profilesCmd *cobra.Command, config *Config)

AddExportCommands adds the export and import commands using Strategy Pattern (SOLID: Single Responsibility)

func AddProfileCommands

func AddProfileCommands(rootCmd *cobra.Command, config *Config)

AddProfileCommands adds profile-related commands to the CLI

func FormatErrorForCLI

func FormatErrorForCLI(err error, operation string) string

FormatErrorForCLI formats an error for command-line output with helpful guidance

func FormatErrorMessage

func FormatErrorMessage(context, message string) string

FormatErrorMessage formats user-facing error messages without technical details

func FormatInfoMessage

func FormatInfoMessage(tip string) string

FormatInfoMessage formats informational messages with helpful tips

func FormatProgressMessage

func FormatProgressMessage(action, status string) string

FormatProgressMessage formats progress messages with consistent structure

func FormatSuccessMessage

func FormatSuccessMessage(action, resource, details string) string

FormatSuccessMessage formats success messages with consistent emoji and structure

func FormatWarningMessage

func FormatWarningMessage(context, message string) string

FormatWarningMessage formats warning messages with consistent structure

func IsInitialized added in v0.6.0

func IsInitialized() bool

IsInitialized reports whether the user has previously completed prism init.

func NewAboutCommand

func NewAboutCommand() *cobra.Command

NewAboutCommand creates a new about command

func NewGUICommand

func NewGUICommand() *cobra.Command

NewGUICommand creates a new gui command

func NewNotFoundError

func NewNotFoundError(resourceType, name, suggestion string) error

NewNotFoundError creates a resource not found error with suggestions

func NewStateError

func NewStateError(resourceType, name, currentState, expectedState string) error

NewStateError creates an error for invalid resource states

func NewUsageError

func NewUsageError(command, example string) error

NewUsageError creates a consistent usage error with command and example

func NewValidationError

func NewValidationError(field, value, expected string) error

NewValidationError creates a validation error with field context

func NewVersionCommand added in v0.6.0

func NewVersionCommand() *cobra.Command

NewVersionCommand creates a new version command

func UserFriendlyError

func UserFriendlyError(err error, context string) error

UserFriendlyError wraps errors with helpful guidance using Strategy Pattern (SOLID: Single Responsibility)

func WrapAPIError

func WrapAPIError(action string, err error) error

WrapAPIError wraps API errors with consistent context and formatting

func WrapDaemonError

func WrapDaemonError(err error) error

WrapDaemonError wraps daemon connection errors with standard recovery message

func WrapError

func WrapError(err error, operation string) error

WrapError wraps an error with contextual information and suggestions

Types

type AMIBuildArgParser

type AMIBuildArgParser struct{}

AMIBuildArgParser parses AMI build arguments using Strategy Pattern (SOLID: Single Responsibility)

func NewAMIBuildArgParser

func NewAMIBuildArgParser() *AMIBuildArgParser

NewAMIBuildArgParser creates a new argument parser

func (*AMIBuildArgParser) Parse

func (p *AMIBuildArgParser) Parse(args []string) (*AMIBuildConfig, error)

Parse parses command line arguments into configuration (Single Responsibility)

type AMIBuildCommand

type AMIBuildCommand struct {
	// contains filtered or unexported fields
}

AMIBuildCommand handles AMI build operations using Command Pattern (SOLID: Single Responsibility)

func NewAMIBuildCommand

func NewAMIBuildCommand() *AMIBuildCommand

NewAMIBuildCommand creates a new AMI build command

func (*AMIBuildCommand) Execute

func (c *AMIBuildCommand) Execute(args []string) error

Execute executes the AMI build command (Command Pattern)

type AMIBuildConfig

type AMIBuildConfig struct {
	TemplateName string
	Region       string
	Architecture string
	DryRun       bool
	SubnetID     string
	VpcID        string
}

AMIBuildConfig represents AMI build configuration (Single Responsibility)

type AMIBuilderService

type AMIBuilderService struct{}

AMIBuilderService handles AMI building operations using Strategy Pattern (SOLID: Single Responsibility)

func NewAMIBuilderService

func NewAMIBuilderService() *AMIBuilderService

NewAMIBuilderService creates a new AMI builder service

func (*AMIBuilderService) BuildAMI

func (s *AMIBuilderService) BuildAMI(buildConfig *AMIBuildConfig) error

BuildAMI builds the AMI using the configuration (Single Responsibility)

type AMICobraCommands

type AMICobraCommands struct {
	// contains filtered or unexported fields
}

AMICobraCommands handles AMI management commands

func NewAMICobraCommands

func NewAMICobraCommands(app *App) *AMICobraCommands

NewAMICobraCommands creates new AMI cobra commands

func (*AMICobraCommands) CreateAMICommand

func (ac *AMICobraCommands) CreateAMICommand() *cobra.Command

CreateAMICommand creates the ami command with subcommands

type AMISaveArgParser

type AMISaveArgParser struct{}

AMISaveArgParser parses AMI save arguments using Strategy Pattern (SOLID: Single Responsibility)

func NewAMISaveArgParser

func NewAMISaveArgParser() *AMISaveArgParser

NewAMISaveArgParser creates a new AMI save argument parser

func (*AMISaveArgParser) Parse

func (p *AMISaveArgParser) Parse(args []string) (*AMISaveConfig, error)

Parse parses command line arguments into save configuration (Single Responsibility)

type AMISaveBuilderService

type AMISaveBuilderService struct{}

AMISaveBuilderService handles AMI save operations using Strategy Pattern (SOLID: Single Responsibility)

func NewAMISaveBuilderService

func NewAMISaveBuilderService() *AMISaveBuilderService

NewAMISaveBuilderService creates a new AMI save builder service

func (*AMISaveBuilderService) SaveInstanceAsAMI

func (s *AMISaveBuilderService) SaveInstanceAsAMI(saveConfig *AMISaveConfig, instance *types.Instance) error

SaveInstanceAsAMI saves the instance as an AMI using the configuration (Single Responsibility)

type AMISaveCommand

type AMISaveCommand struct {
	// contains filtered or unexported fields
}

AMISaveCommand handles AMI save operations using Command Pattern (SOLID: Single Responsibility)

func NewAMISaveCommand

func NewAMISaveCommand(apiClient interface{}) *AMISaveCommand

NewAMISaveCommand creates a new AMI save command

func (*AMISaveCommand) Execute

func (c *AMISaveCommand) Execute(args []string) error

Execute executes the AMI save command (Command Pattern)

type AMISaveConfig

type AMISaveConfig struct {
	InstanceName  string
	TemplateName  string
	Description   string
	Region        string
	ProjectID     string
	Public        bool
	CopyToRegions []string
}

AMISaveConfig represents AMI save configuration (Single Responsibility)

type AMISaveConfirmationService

type AMISaveConfirmationService struct{}

AMISaveConfirmationService handles user confirmation using Strategy Pattern (SOLID: Single Responsibility)

func NewAMISaveConfirmationService

func NewAMISaveConfirmationService() *AMISaveConfirmationService

NewAMISaveConfirmationService creates a new confirmation service

func (*AMISaveConfirmationService) ConfirmSave

func (s *AMISaveConfirmationService) ConfirmSave(saveConfig *AMISaveConfig, instance *types.Instance) bool

ConfirmSave displays save details and gets user confirmation (Single Responsibility)

type AMIStrategyCommand

type AMIStrategyCommand struct{}

AMIStrategyCommand handles --ami-strategy flag

func (*AMIStrategyCommand) CanHandle

func (c *AMIStrategyCommand) CanHandle(arg string) bool

func (*AMIStrategyCommand) Execute

func (c *AMIStrategyCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ActiveProcessesCommand added in v0.35.5

type ActiveProcessesCommand struct{}

ActiveProcessesCommand handles --active-processes flag (#607) Comma-separated process names that prevent idle shutdown when running (e.g., "rsession,jupyter").

func (*ActiveProcessesCommand) CanHandle added in v0.35.5

func (c *ActiveProcessesCommand) CanHandle(arg string) bool

func (*ActiveProcessesCommand) Execute added in v0.35.5

func (c *ActiveProcessesCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type AdminCommandFactory

type AdminCommandFactory struct {
	// contains filtered or unexported fields
}

AdminCommandFactory creates the unified admin command group

func (*AdminCommandFactory) CreateCommand

func (f *AdminCommandFactory) CreateCommand() *cobra.Command

CreateCommand creates the admin command group

type App

type App struct {
	// contains filtered or unexported fields
}

App represents the CLI application

func NewApp

func NewApp(version string) *App

NewApp creates a new CLI application

func NewAppWithClient

func NewAppWithClient(version string, apiClient client.PrismAPI) *App

NewAppWithClient creates a new CLI application with a custom API client

func (*App) AMI

func (a *App) AMI(args []string) error

AMI processes AMI-related commands

func (*App) AMIDiscover

func (a *App) AMIDiscover(args []string) error

AMIDiscover demonstrates AMI auto-discovery functionality

func (*App) Apply

func (a *App) Apply(args []string) error

Apply handles the apply command using Command Pattern (SOLID: Single Responsibility)

func (*App) Backup

func (a *App) Backup(args []string) error

Backup handles data backup commands

func (*App) Connect

func (a *App) Connect(args []string) error

func (*App) Course added in v0.14.0

func (a *App) Course(args []string) error

Course handles the 'prism course' command dispatcher.

func (*App) Daemon

func (a *App) Daemon(args []string) error

Daemon handles daemon management commands

func (*App) Delete

func (a *App) Delete(args []string) error

Delete handles the delete command

func (*App) DeleteWithWait added in v0.6.0

func (a *App) DeleteWithWait(name string, wait bool) error

DeleteWithWait deletes an instance with optional blocking

func (*App) Diff

func (a *App) Diff(args []string) error

Diff handles the diff command using Command Pattern (SOLID: Single Responsibility)

func (*App) Exec

func (a *App) Exec(args []string) error

Exec handles the exec command

func (*App) GenerateComplianceReport

func (a *App) GenerateComplianceReport(framework string) error

GenerateComplianceReport generates detailed compliance report

func (*App) GetAWSManager added in v0.5.11

func (a *App) GetAWSManager() (*aws.Manager, error)

GetAWSManager creates an AWS manager using the current profile settings

func (*App) Hibernate

func (a *App) Hibernate(args []string) error

func (*App) HibernateWithWait added in v0.6.0

func (a *App) HibernateWithWait(name string, wait bool) error

HibernateWithWait hibernates an instance with optional blocking

func (*App) Invitation added in v0.5.11

func (a *App) Invitation(args []string) error

Invitation handles user-facing invitation commands (accept, decline, list)

func (*App) Launch

func (a *App) Launch(args []string) error

Launch handles the launch command

func (*App) Layers

func (a *App) Layers(args []string) error

Layers handles the layers command

func (*App) List

func (a *App) List(args []string) error

List handles the list command with optional project filtering

func (*App) ListBilledCost added in v0.36.0

func (a *App) ListBilledCost(name, projectFilter string, billedOnly bool) error

ListBilledCost shows the AWS-billed ("billed so far") cost for workspaces, read from AWS Cost Explorer, next to prism's local estimate (CurrentSpend). The estimate is a model accumulated by the daemon; the billed figure is the metered amount AWS has charged. When name is non-empty it scopes to one workspace; billedOnly drops the estimate and delta columns.

func (*App) ListComplianceFrameworks

func (a *App) ListComplianceFrameworks() error

ListComplianceFrameworks lists supported compliance frameworks

func (*App) ListCost

func (a *App) ListCost(args []string) error

ListCost handles the list cost command - shows detailed cost information

func (*App) Marketplace

func (a *App) Marketplace(args []string) error

Marketplace processes marketplace-related commands

func (*App) NewRootCommand

func (a *App) NewRootCommand() *cobra.Command

NewRootCommand creates the root command for the CLI

func (*App) Project

func (a *App) Project(args []string) error

Project command implementation

func (*App) Repo

func (a *App) Repo(args []string) error

Repo handles repository-related commands.

func (*App) Restore

func (a *App) Restore(args []string) error

Restore handles data restore commands

func (*App) Resume

func (a *App) Resume(args []string) error

func (*App) ResumeWithWait added in v0.6.0

func (a *App) ResumeWithWait(name string, wait bool) error

ResumeWithWait resumes an instance with optional blocking

func (*App) Rightsizing

func (a *App) Rightsizing(args []string) error

Rightsizing handles rightsizing analysis and recommendations

func (*App) Rollback

func (a *App) Rollback(args []string) error

Rollback handles the rollback command

func (*App) Run

func (a *App) Run(args []string) error

Run executes the application with the given arguments

func (*App) Scaling

func (a *App) Scaling(args []string) error

Scaling handles dynamic instance scaling operations

func (*App) Schools added in v0.8.0

func (a *App) Schools(args []string) error

Schools processes schools-related commands

func (*App) SecurityCommand

func (a *App) SecurityCommand() *cobra.Command

Security command handles all security-related operations

func (*App) SecurityConfig

func (a *App) SecurityConfig() error

SecurityConfig displays security configuration

func (*App) SecurityCorrelations

func (a *App) SecurityCorrelations() error

SecurityCorrelations displays security event correlations

func (*App) SecurityDashboard

func (a *App) SecurityDashboard() error

SecurityDashboard displays the security dashboard

func (*App) SecurityHealth

func (a *App) SecurityHealth() error

SecurityHealth performs and displays security health check

func (*App) SecurityKeychain

func (a *App) SecurityKeychain() error

SecurityKeychain displays keychain information using Strategy Pattern (SOLID: Single Responsibility)

func (*App) SecurityStatus

func (a *App) SecurityStatus() error

SecurityStatus displays comprehensive security status

func (*App) Snapshot

func (a *App) Snapshot(args []string) error

Snapshot handles instance snapshot commands

func (*App) Start

func (a *App) Start(args []string) error

Start handles the start command with intelligent state management

func (*App) StartWithWait added in v0.6.0

func (a *App) StartWithWait(name string, wait bool) error

StartWithWait starts an instance with optional blocking

func (*App) Stop

func (a *App) Stop(args []string) error

Stop handles the stop command

func (*App) StopWithWait added in v0.6.0

func (a *App) StopWithWait(name string, wait bool) error

StopWithWait stops an instance with optional blocking

func (*App) Storage

func (a *App) Storage(args []string) error

Storage handles storage commands

func (*App) TA added in v0.14.0

func (a *App) TA(args []string) error

TA handles the 'prism ta' command dispatcher.

func (*App) Templates

func (a *App) Templates(args []string) error

Templates handles the templates command

func (*App) ValidateAWSCompliance

func (a *App) ValidateAWSCompliance(framework string) error

ValidateAWSCompliance validates Prism against AWS compliance framework using Strategy Pattern (SOLID: Single Responsibility)

func (*App) ValidateSCPs

func (a *App) ValidateSCPs(framework string) error

ValidateSCPs validates Service Control Policies

func (*App) Volume

func (a *App) Volume(args []string) error

Volume handles volume commands

func (*App) Web

func (a *App) Web(args []string) error

Web handles web service commands

func (*App) Workshop added in v0.20.0

func (a *App) Workshop(args []string) error

Workshop handles the 'prism workshop' command dispatcher.

type ApprovalCobraCommands added in v0.12.0

type ApprovalCobraCommands struct {
	// contains filtered or unexported fields
}

ApprovalCobraCommands provides the approval workflow CLI commands

func NewApprovalCobraCommands added in v0.12.0

func NewApprovalCobraCommands(app *App) *ApprovalCobraCommands

NewApprovalCobraCommands creates new approval CLI commands

func (*ApprovalCobraCommands) CreateApprovalsCommand added in v0.12.0

func (ac *ApprovalCobraCommands) CreateApprovalsCommand() *cobra.Command

CreateApprovalsCommand creates `prism approvals` with list/dashboard subcommands

func (*ApprovalCobraCommands) CreateApproveCommand added in v0.12.0

func (ac *ApprovalCobraCommands) CreateApproveCommand() *cobra.Command

CreateApproveCommand creates `prism approve <request-id>`

func (*ApprovalCobraCommands) CreateDenyCommand added in v0.12.0

func (ac *ApprovalCobraCommands) CreateDenyCommand() *cobra.Command

CreateDenyCommand creates `prism deny <request-id>`

func (*ApprovalCobraCommands) CreateRequestCommand added in v0.12.0

func (ac *ApprovalCobraCommands) CreateRequestCommand() *cobra.Command

CreateRequestCommand creates `prism request` for submitting approval requests

type ApprovalCobraCommandsV2 added in v0.21.0

type ApprovalCobraCommandsV2 struct {
	// contains filtered or unexported fields
}

ApprovalCobraCommandsV2 provides the unified prism approval command group (#495)

func NewApprovalCobraCommandsV2 added in v0.21.0

func NewApprovalCobraCommandsV2(app *App) *ApprovalCobraCommandsV2

NewApprovalCobraCommandsV2 creates the singular `approval` command group.

func (*ApprovalCobraCommandsV2) CreateApprovalCommand added in v0.21.0

func (ac *ApprovalCobraCommandsV2) CreateApprovalCommand() *cobra.Command

CreateApprovalCommand returns the root `prism approval` command with subcommands.

type ApprovalIDCommand added in v0.21.0

type ApprovalIDCommand struct{}

ApprovalIDCommand handles --approval <id> flag (#495)

func (*ApprovalIDCommand) CanHandle added in v0.21.0

func (c *ApprovalIDCommand) CanHandle(arg string) bool

func (*ApprovalIDCommand) Execute added in v0.21.0

func (c *ApprovalIDCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type BackupCommands

type BackupCommands struct {
	// contains filtered or unexported fields
}

BackupCommands handles data backup and restore management operations (implementation layer)

func NewBackupCommands

func NewBackupCommands(app *App) *BackupCommands

NewBackupCommands creates backup commands handler

func (*BackupCommands) Backup

func (bc *BackupCommands) Backup(args []string) error

Backup handles the backup command with comprehensive data-level backup operations

func (*BackupCommands) Restore

func (bc *BackupCommands) Restore(args []string) error

Restore handles the restore command with comprehensive data restoration operations

type BasicCostStrategy

type BasicCostStrategy struct{}

BasicCostStrategy calculates costs without institutional discounts

func (*BasicCostStrategy) CalculateInstanceCost

func (b *BasicCostStrategy) CalculateInstanceCost(instance types.Instance, calculator *pricing.Calculator) CostAnalysis

func (*BasicCostStrategy) FormatRow

func (b *BasicCostStrategy) FormatRow(instance types.Instance, analysis CostAnalysis) string

func (*BasicCostStrategy) GetHeaders

func (b *BasicCostStrategy) GetHeaders() []string

type BotCobraCommands added in v0.35.5

type BotCobraCommands struct {
	// contains filtered or unexported fields
}

BotCobraCommands provides the `prism bot` command group.

func NewBotCobraCommands added in v0.35.5

func NewBotCobraCommands(app *App) *BotCobraCommands

NewBotCobraCommands creates new bot CLI commands.

func (*BotCobraCommands) CreateBotCommand added in v0.35.5

func (b *BotCobraCommands) CreateBotCommand() *cobra.Command

CreateBotCommand creates the `prism bot` parent command.

type BudgetCommands

type BudgetCommands struct {
	// contains filtered or unexported fields
}

BudgetCommands handles all budget-related CLI operations

func NewBudgetCommands

func NewBudgetCommands(app *App) *BudgetCommands

NewBudgetCommands creates a new budget commands handler

func (*BudgetCommands) CreateBudgetCommand

func (bc *BudgetCommands) CreateBudgetCommand() *cobra.Command

CreateBudgetCommand creates the root budget command with all subcommands

type CLIProfileManagerAdapter

type CLIProfileManagerAdapter struct {
	// contains filtered or unexported fields
}

CLIProfileManagerAdapter adapts the CLI's profile manager to the user interface

func (*CLIProfileManagerAdapter) GetCurrentProfile

func (c *CLIProfileManagerAdapter) GetCurrentProfile() (string, error)

func (*CLIProfileManagerAdapter) GetProfileConfig

func (c *CLIProfileManagerAdapter) GetProfileConfig(profileID string) (interface{}, error)

func (*CLIProfileManagerAdapter) UpdateProfileConfig

func (c *CLIProfileManagerAdapter) UpdateProfileConfig(profileID string, config interface{}) error

type CapacityBlockCobraCommands added in v0.20.0

type CapacityBlockCobraCommands struct {
	// contains filtered or unexported fields
}

CapacityBlockCobraCommands groups capacity-block commands.

func NewCapacityBlockCobraCommands added in v0.20.0

func NewCapacityBlockCobraCommands(app *App) *CapacityBlockCobraCommands

NewCapacityBlockCobraCommands creates the capacity-block command group.

func (*CapacityBlockCobraCommands) CreateCapacityBlockCommand added in v0.20.0

func (cb *CapacityBlockCobraCommands) CreateCapacityBlockCommand() *cobra.Command

CreateCapacityBlockCommand builds the 'capacity-block' top-level command.

type CapacityBlockCommand added in v0.20.0

type CapacityBlockCommand struct{}

CapacityBlockCommand handles --capacity-block flag for EC2 Capacity Blocks (#63)

func (*CapacityBlockCommand) CanHandle added in v0.20.0

func (c *CapacityBlockCommand) CanHandle(arg string) bool

func (*CapacityBlockCommand) Execute added in v0.20.0

func (c *CapacityBlockCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type CapacityErrorHandler

type CapacityErrorHandler struct{}

CapacityErrorHandler handles AWS capacity errors

func (*CapacityErrorHandler) CanHandle

func (h *CapacityErrorHandler) CanHandle(errorMsg string) bool

func (*CapacityErrorHandler) Handle

func (h *CapacityErrorHandler) Handle(err error, context string) error

type CommandFactory

type CommandFactory interface {
	CreateCommand() *cobra.Command
}

CommandFactory interface for creating specialized commands (Factory Pattern - SOLID)

type CommandFactoryRegistry

type CommandFactoryRegistry struct {
	// contains filtered or unexported fields
}

CommandFactoryRegistry manages all command factories (Factory Pattern - SOLID)

func NewCommandFactoryRegistry

func NewCommandFactoryRegistry(app *App) *CommandFactoryRegistry

NewCommandFactoryRegistry creates command factory registry

func (*CommandFactoryRegistry) RegisterAllCommands

func (r *CommandFactoryRegistry) RegisterAllCommands(rootCmd *cobra.Command)

RegisterAllCommands adds all commands to root using factories

type CompletionDelayCommand added in v0.37.0

type CompletionDelayCommand struct{}

CompletionDelayCommand handles --completion-delay flag (spawn adoption Phase 3b)

func (*CompletionDelayCommand) CanHandle added in v0.37.0

func (c *CompletionDelayCommand) CanHandle(arg string) bool

func (*CompletionDelayCommand) Execute added in v0.37.0

func (c *CompletionDelayCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type CompletionFileCommand added in v0.37.0

type CompletionFileCommand struct{}

CompletionFileCommand handles --completion-file flag (spawn adoption Phase 3b)

func (*CompletionFileCommand) CanHandle added in v0.37.0

func (c *CompletionFileCommand) CanHandle(arg string) bool

func (*CompletionFileCommand) Execute added in v0.37.0

func (c *CompletionFileCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ComplianceActionsRenderer

type ComplianceActionsRenderer struct{}

ComplianceActionsRenderer renders recommended actions section using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceActionsRenderer

func NewComplianceActionsRenderer() *ComplianceActionsRenderer

func (*ComplianceActionsRenderer) Render

func (r *ComplianceActionsRenderer) Render(w *tabwriter.Writer, complianceStatus map[string]interface{})

type ComplianceDataService

type ComplianceDataService struct {
	// contains filtered or unexported fields
}

ComplianceDataService handles data retrieval using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceDataService

func NewComplianceDataService(apiClient interface{}) *ComplianceDataService

func (*ComplianceDataService) GetComplianceData

func (s *ComplianceDataService) GetComplianceData(framework string) (map[string]interface{}, error)

type ComplianceGapRenderer

type ComplianceGapRenderer struct{}

ComplianceGapRenderer renders gap analysis section using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceGapRenderer

func NewComplianceGapRenderer() *ComplianceGapRenderer

func (*ComplianceGapRenderer) Render

func (r *ComplianceGapRenderer) Render(w *tabwriter.Writer, complianceStatus map[string]interface{})

type ComplianceHeaderService

type ComplianceHeaderService struct{}

ComplianceHeaderService handles header display using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceHeaderService

func NewComplianceHeaderService() *ComplianceHeaderService

func (*ComplianceHeaderService) DisplayHeader

func (s *ComplianceHeaderService) DisplayHeader(framework string)

type ComplianceOverviewRenderer

type ComplianceOverviewRenderer struct{}

ComplianceOverviewRenderer renders overview section using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceOverviewRenderer

func NewComplianceOverviewRenderer() *ComplianceOverviewRenderer

func (*ComplianceOverviewRenderer) Render

func (r *ComplianceOverviewRenderer) Render(w *tabwriter.Writer, complianceStatus map[string]interface{})

type ComplianceServicesRenderer

type ComplianceServicesRenderer struct{}

ComplianceServicesRenderer renders AWS services section using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceServicesRenderer

func NewComplianceServicesRenderer() *ComplianceServicesRenderer

func (*ComplianceServicesRenderer) Render

func (r *ComplianceServicesRenderer) Render(w *tabwriter.Writer, complianceStatus map[string]interface{})

type ComplianceValidator

type ComplianceValidator struct {
	// contains filtered or unexported fields
}

ComplianceValidator handles AWS compliance validation using Strategy Pattern (SOLID: Single Responsibility)

func NewComplianceValidator

func NewComplianceValidator(apiClient interface{}) *ComplianceValidator

NewComplianceValidator creates a new compliance validator

func (*ComplianceValidator) Validate

func (v *ComplianceValidator) Validate(framework string) error

Validate validates compliance for the given framework using Strategy Pattern

type Config

type Config struct {
	Daemon struct {
		URL string `json:"url"`
	} `json:"daemon"`
	AWS struct {
		Profile string `json:"profile"`
		Region  string `json:"region"`
	} `json:"aws"`
}

Config represents the CLI configuration

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from disk

type ConfigurationDiscoveryService

type ConfigurationDiscoveryService struct{}

ConfigurationDiscoveryService handles instance configuration discovery (SOLID: Single Responsibility)

func NewConfigurationDiscoveryService

func NewConfigurationDiscoveryService() *ConfigurationDiscoveryService

NewConfigurationDiscoveryService creates a new configuration discovery service

func (*ConfigurationDiscoveryService) DiscoverConfiguration

func (s *ConfigurationDiscoveryService) DiscoverConfiguration(instance *types.Instance) (*InstanceConfiguration, error)

DiscoverConfiguration discovers instance configuration (Single Responsibility)

type ConflictDiff

type ConflictDiff struct {
	Type        string
	Description string
	Resolution  string
}

ConflictDiff represents a configuration conflict

type ConnectionErrorHandler

type ConnectionErrorHandler struct{}

ConnectionErrorHandler handles connection-related errors

func (*ConnectionErrorHandler) CanHandle

func (h *ConnectionErrorHandler) CanHandle(errorMsg string) bool

func (*ConnectionErrorHandler) Handle

func (h *ConnectionErrorHandler) Handle(err error, context string) error

type CostAnalysis

type CostAnalysis struct {
	DailyCost         float64
	ListDailyCost     float64
	ActualSpend       float64
	CurrentCostPerMin float64
	ListCostPerMin    float64
	Age               string
	TypeIndicator     string
	Savings           float64
	SavingsPercent    float64
}

CostAnalysis holds the result of cost calculations.

Field semantics (kept consistent with pkg/types/runtime.go):

  • DailyCost / ListDailyCost: cost per day at the instance's running rate (USD/day).
  • ActualSpend: lifetime accumulated dollars since launch (USD).
  • CurrentCostPerMin / ListCostPerMin: present per-minute burn rate (USD/min).
  • Age: wall-clock duration since launch (not actual running time).

type CostAnalyzer

type CostAnalyzer struct {
	// contains filtered or unexported fields
}

CostAnalyzer provides cost analysis functionality using Strategy Pattern

func NewCostAnalyzer

func NewCostAnalyzer(hasDiscounts bool, calculator *pricing.Calculator) *CostAnalyzer

NewCostAnalyzer creates a cost analyzer with the appropriate strategy

func (*CostAnalyzer) AnalyzeInstances

func (ca *CostAnalyzer) AnalyzeInstances(instances []types.Instance) ([]CostAnalysis, CostSummary)

AnalyzeInstances analyzes a list of instances and returns cost data

func (*CostAnalyzer) FormatRow

func (ca *CostAnalyzer) FormatRow(instance types.Instance, analysis CostAnalysis) string

FormatRow formats a single instance row

func (*CostAnalyzer) GetHeaders

func (ca *CostAnalyzer) GetHeaders() []string

GetHeaders returns the headers for the cost table

type CostCalculationStrategy

type CostCalculationStrategy interface {
	CalculateInstanceCost(instance types.Instance, calculator *pricing.Calculator) CostAnalysis
	GetHeaders() []string
	FormatRow(instance types.Instance, analysis CostAnalysis) string
}

CostCalculationStrategy defines the interface for cost calculation strategies

type CostSummary

type CostSummary struct {
	TotalRunningCost     float64
	TotalListCost        float64
	TotalHistoricalSpend float64
	RunningInstances     int
}

CostSummary holds aggregate cost information

type CountCommand added in v0.37.0

type CountCommand struct{}

CountCommand handles --count <N> (spawn adoption job arrays): launch N instances as a job array. Parsed into JobArraySize; App.Launch branches to the array endpoint when it is > 1.

func (*CountCommand) CanHandle added in v0.37.0

func (c *CountCommand) CanHandle(arg string) bool

func (*CountCommand) Execute added in v0.37.0

func (c *CountCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type CourseCobraCommands added in v0.14.0

type CourseCobraCommands struct {
	// contains filtered or unexported fields
}

CourseCobraCommands handles course management commands.

func NewCourseCobraCommands added in v0.14.0

func NewCourseCobraCommands(app *App) *CourseCobraCommands

NewCourseCobraCommands creates new course cobra commands.

func (*CourseCobraCommands) CreateCourseCommand added in v0.14.0

func (cc *CourseCobraCommands) CreateCourseCommand() *cobra.Command

CreateCourseCommand creates the 'course' top-level command.

type CredentialsErrorHandler

type CredentialsErrorHandler struct{}

CredentialsErrorHandler handles AWS credential errors

func (*CredentialsErrorHandler) CanHandle

func (h *CredentialsErrorHandler) CanHandle(errorMsg string) bool

func (*CredentialsErrorHandler) Handle

func (h *CredentialsErrorHandler) Handle(err error, context string) error

type DNSCommand added in v0.35.4

type DNSCommand struct{}

DNSCommand handles --dns flag for spored DNS registration (#588)

func (*DNSCommand) CanHandle added in v0.35.4

func (c *DNSCommand) CanHandle(arg string) bool

func (*DNSCommand) Execute added in v0.35.4

func (c *DNSCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type DaemonCobraCommands

type DaemonCobraCommands struct {
	// contains filtered or unexported fields
}

DaemonCobraCommands creates the daemon command with proper Cobra subcommands

func NewDaemonCobraCommands

func NewDaemonCobraCommands(app *App) *DaemonCobraCommands

NewDaemonCobraCommands creates new daemon cobra commands

func (*DaemonCobraCommands) CreateDaemonCommand

func (dc *DaemonCobraCommands) CreateDaemonCommand() *cobra.Command

CreateDaemonCommand creates the main daemon command with all subcommands

type DaemonConfig

type DaemonConfig struct {
	InstanceRetentionMinutes int    `json:"instance_retention_minutes"`
	Port                     string `json:"port"`
}

DaemonConfig represents daemon configuration for CLI purposes

type DaemonErrorHandler

type DaemonErrorHandler struct{}

DaemonErrorHandler handles daemon-related errors

func (*DaemonErrorHandler) CanHandle

func (h *DaemonErrorHandler) CanHandle(errorMsg string) bool

func (*DaemonErrorHandler) Handle

func (h *DaemonErrorHandler) Handle(err error, context string) error

type DefaultErrorHandler

type DefaultErrorHandler struct{}

DefaultErrorHandler handles unknown errors

func (*DefaultErrorHandler) CanHandle

func (h *DefaultErrorHandler) CanHandle(errorMsg string) bool

func (*DefaultErrorHandler) Handle

func (h *DefaultErrorHandler) Handle(err error, context string) error

type DryRunCommand

type DryRunCommand struct{}

DryRunCommand handles --dry-run flag

func (*DryRunCommand) CanHandle

func (d *DryRunCommand) CanHandle(arg string) bool

func (*DryRunCommand) Execute

func (d *DryRunCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type EFACommand added in v0.37.0

type EFACommand struct{}

EFACommand handles --efa flag (spawn adoption Phase 3a)

func (*EFACommand) CanHandle added in v0.37.0

func (e *EFACommand) CanHandle(arg string) bool

func (*EFACommand) Execute added in v0.37.0

func (e *EFACommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ErrorCategory

type ErrorCategory string

ErrorCategory represents the type of error for better categorization

const (
	ErrorCategoryDaemon      ErrorCategory = "daemon"
	ErrorCategoryNetwork     ErrorCategory = "network"
	ErrorCategoryCredentials ErrorCategory = "credentials"
	ErrorCategoryProfile     ErrorCategory = "profile"
	ErrorCategoryLaunch      ErrorCategory = "launch"
	ErrorCategoryTemplate    ErrorCategory = "template"
	ErrorCategoryValidation  ErrorCategory = "validation"
	ErrorCategoryKeychain    ErrorCategory = "keychain"
	ErrorCategoryCapacity    ErrorCategory = "capacity"
	ErrorCategorySecurity    ErrorCategory = "security"
	ErrorCategoryAccess      ErrorCategory = "access"
	ErrorCategoryUnknown     ErrorCategory = "unknown"
)

type ErrorHandler

type ErrorHandler interface {
	CanHandle(errorMsg string) bool
	Handle(err error, context string) error
}

ErrorHandler interface for different error types (Strategy Pattern - SOLID)

type ErrorHandlerRegistry

type ErrorHandlerRegistry struct {
	// contains filtered or unexported fields
}

ErrorHandlerRegistry manages error handlers (Strategy Pattern - SOLID)

func NewErrorHandlerRegistry

func NewErrorHandlerRegistry() *ErrorHandlerRegistry

NewErrorHandlerRegistry creates error handler registry

func (*ErrorHandlerRegistry) Handle

func (r *ErrorHandlerRegistry) Handle(err error, context string) error

Handle processes error using appropriate handler

type ExportCommandFactory

type ExportCommandFactory struct {
	// contains filtered or unexported fields
}

ExportCommandFactory creates export/import commands using Factory Pattern (SOLID: Single Responsibility)

func NewExportCommandFactory

func NewExportCommandFactory(config *Config) *ExportCommandFactory

func (*ExportCommandFactory) CreateExportCommand

func (f *ExportCommandFactory) CreateExportCommand() *cobra.Command

func (*ExportCommandFactory) CreateImportCommand

func (f *ExportCommandFactory) CreateImportCommand() *cobra.Command

type ExportExecutionService

type ExportExecutionService struct{}

func NewExportExecutionService

func NewExportExecutionService() *ExportExecutionService

func (*ExportExecutionService) ExecuteExport

func (s *ExportExecutionService) ExecuteExport(profileManager *profile.ManagerEnhanced, selectedProfiles []profile.Profile, outputPath string, flags *ExportFlags) error

type ExportFilterService

type ExportFilterService struct{}

func NewExportFilterService

func NewExportFilterService() *ExportFilterService

func (*ExportFilterService) GetFilteredProfiles

func (s *ExportFilterService) GetFilteredProfiles(profileManager *profile.ManagerEnhanced, flags *ExportFlags) ([]profile.Profile, error)

type ExportFlagService

type ExportFlagService struct{}

func NewExportFlagService

func NewExportFlagService() *ExportFlagService

func (*ExportFlagService) ParseExportFlags

func (s *ExportFlagService) ParseExportFlags(cmd *cobra.Command) (*ExportFlags, error)

type ExportFlags

type ExportFlags struct {
	IncludeCredentials bool
	IncludeInvitations bool
	ProfilesFlag       string
	FormatFlag         string
	PasswordFlag       string
}

type ExportHandler

type ExportHandler struct {
	// contains filtered or unexported fields
}

ExportHandler handles export operations using Strategy Pattern (SOLID: Single Responsibility)

func NewExportHandler

func NewExportHandler(config *Config) *ExportHandler

func (*ExportHandler) HandleExport

func (h *ExportHandler) HandleExport(cmd *cobra.Command, args []string) error

type ExportProfileService

type ExportProfileService struct{}

func NewExportProfileService

func NewExportProfileService() *ExportProfileService

func (*ExportProfileService) CreateProfileManager

func (s *ExportProfileService) CreateProfileManager(config *Config) (*profile.ManagerEnhanced, error)

type ExportValidationService

type ExportValidationService struct{}

func NewExportValidationService

func NewExportValidationService() *ExportValidationService

func (*ExportValidationService) ValidateExport

func (s *ExportValidationService) ValidateExport(selectedProfiles []profile.Profile) error

type FileOpsCobraCommands added in v0.20.0

type FileOpsCobraCommands struct {
	// contains filtered or unexported fields
}

FileOpsCobraCommands groups SSM file-transfer commands.

func NewFileOpsCobraCommands added in v0.20.0

func NewFileOpsCobraCommands(app *App) *FileOpsCobraCommands

NewFileOpsCobraCommands creates the file ops command group.

func (*FileOpsCobraCommands) CreateFilesCommand added in v0.20.0

func (fc *FileOpsCobraCommands) CreateFilesCommand() *cobra.Command

CreateFilesCommand builds the 'workspace files' sub-command tree.

type FundingCommand added in v0.5.10

type FundingCommand struct{}

FundingCommand handles --funding flag (v0.5.10+)

func (*FundingCommand) CanHandle added in v0.5.10

func (f *FundingCommand) CanHandle(arg string) bool

func (*FundingCommand) Execute added in v0.5.10

func (f *FundingCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type HealthCobraCommands added in v0.7.0

type HealthCobraCommands struct {
	// contains filtered or unexported fields
}

HealthCobraCommands handles AWS Health monitoring commands

func NewHealthCobraCommands added in v0.7.0

func NewHealthCobraCommands(app *App) *HealthCobraCommands

NewHealthCobraCommands creates a new HealthCobraCommands instance

func (*HealthCobraCommands) CreateHealthCommand added in v0.7.0

func (c *HealthCobraCommands) CreateHealthCommand() *cobra.Command

CreateHealthCommand creates the aws-health command

type IPDetectionErrorHandler

type IPDetectionErrorHandler struct{}

IPDetectionErrorHandler handles IP detection failures

func (*IPDetectionErrorHandler) CanHandle

func (h *IPDetectionErrorHandler) CanHandle(errorMsg string) bool

func (*IPDetectionErrorHandler) Handle

func (h *IPDetectionErrorHandler) Handle(err error, context string) error

type IdleCobraCommands

type IdleCobraCommands struct {
	// contains filtered or unexported fields
}

IdleCobraCommands handles idle policy-related commands with proper Cobra structure

func NewIdleCobraCommands

func NewIdleCobraCommands(app *App) *IdleCobraCommands

NewIdleCobraCommands creates a new idle policy commands handler

func (*IdleCobraCommands) CreateIdleCommand

func (ic *IdleCobraCommands) CreateIdleCommand() *cobra.Command

CreateIdleCommand creates the main idle command with subcommands

type IdlePolicyCommand

type IdlePolicyCommand struct{}

IdlePolicyCommand handles --idle-policy flag (formerly --hibernation)

func (*IdlePolicyCommand) CanHandle

func (h *IdlePolicyCommand) CanHandle(arg string) bool

func (*IdlePolicyCommand) Execute

func (h *IdlePolicyCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ImportExecutionService

type ImportExecutionService struct{}

func NewImportExecutionService

func NewImportExecutionService() *ImportExecutionService

func (*ImportExecutionService) ExecuteImport

func (s *ImportExecutionService) ExecuteImport(profileManager *profile.ManagerEnhanced, inputPath string, flags *ImportFlags) (*export.ImportResult, error)

type ImportFlagService

type ImportFlagService struct{}

func NewImportFlagService

func NewImportFlagService() *ImportFlagService

func (*ImportFlagService) ParseImportFlags

func (s *ImportFlagService) ParseImportFlags(cmd *cobra.Command) (*ImportFlags, error)

type ImportFlags

type ImportFlags struct {
	ModeFlag              string
	ProfilesFlag          string
	ImportCredentialsFlag bool
	PasswordFlag          string
	ImportMode            export.ImportMode
	ProfileFilter         []string
}

type ImportHandler

type ImportHandler struct {
	// contains filtered or unexported fields
}

ImportHandler handles import operations using Strategy Pattern (SOLID: Single Responsibility)

func NewImportHandler

func NewImportHandler(config *Config) *ImportHandler

func (*ImportHandler) HandleImport

func (h *ImportHandler) HandleImport(cmd *cobra.Command, args []string) error

type ImportProfileService

type ImportProfileService struct{}

func NewImportProfileService

func NewImportProfileService() *ImportProfileService

func (*ImportProfileService) CreateProfileManager

func (s *ImportProfileService) CreateProfileManager(config *Config) (*profile.ManagerEnhanced, error)

type ImportResultService

type ImportResultService struct{}

func NewImportResultService

func NewImportResultService() *ImportResultService

func (*ImportResultService) DisplayResults

func (s *ImportResultService) DisplayResults(result *export.ImportResult) error

type ImportValidationService

type ImportValidationService struct{}

func NewImportValidationService

func NewImportValidationService() *ImportValidationService

func (*ImportValidationService) ValidateImport

func (s *ImportValidationService) ValidateImport(flags *ImportFlags) error

type InitCobraCommands added in v0.5.8

type InitCobraCommands struct {
	// contains filtered or unexported fields
}

InitCobraCommands handles the init wizard command

func NewInitCobraCommands added in v0.5.8

func NewInitCobraCommands(app *App) *InitCobraCommands

NewInitCobraCommands creates new init cobra commands

func (*InitCobraCommands) CreateInitCommand added in v0.5.8

func (ic *InitCobraCommands) CreateInitCommand() *cobra.Command

CreateInitCommand creates the init command

type InstanceCommandFactory

type InstanceCommandFactory struct {
	// contains filtered or unexported fields
}

InstanceCommandFactory creates workspace management commands

func (*InstanceCommandFactory) CreateCommands

func (f *InstanceCommandFactory) CreateCommands() []*cobra.Command

type InstanceCommands

type InstanceCommands struct {
	// contains filtered or unexported fields
}

InstanceCommands handles all instance management operations (implementation layer)

func NewInstanceCommands

func NewInstanceCommands(app *App) *InstanceCommands

NewInstanceCommands creates instance commands handler

func (*InstanceCommands) Connect

func (ic *InstanceCommands) Connect(args []string) error

Connect handles the connect command

func (*InstanceCommands) Delete

func (ic *InstanceCommands) Delete(args []string) error

Delete handles the delete command

func (*InstanceCommands) Exec

func (ic *InstanceCommands) Exec(args []string) error

Exec handles the exec command - executes commands remotely on instances Note: This method is called from the Cobra command structure, so flag parsing is handled by Cobra. This simplified version assumes args contains only positional arguments.

func (*InstanceCommands) Hibernate

func (ic *InstanceCommands) Hibernate(args []string) error

Hibernate handles the hibernate command

func (*InstanceCommands) Resize

func (ic *InstanceCommands) Resize(args []string) error

Resize handles the resize command - changes instance type/size

func (*InstanceCommands) Resume

func (ic *InstanceCommands) Resume(args []string) error

Resume handles the resume command

func (*InstanceCommands) Start

func (ic *InstanceCommands) Start(args []string) error

Start handles the start command with intelligent state management

func (*InstanceCommands) Stop

func (ic *InstanceCommands) Stop(args []string) error

Stop handles the stop command

type InstanceConfiguration

type InstanceConfiguration struct {
	BaseOS         string
	PackageManager string
	Packages       PackageSet
	Users          []User
	Services       []Service
	Ports          []int
}

Helper types for configuration discovery

type InstanceValidationService

type InstanceValidationService struct {
	// contains filtered or unexported fields
}

InstanceValidationService handles instance validation using Strategy Pattern (SOLID: Single Responsibility)

func NewInstanceValidationService

func NewInstanceValidationService(apiClient interface{}) *InstanceValidationService

NewInstanceValidationService creates a new instance validation service

func (*InstanceValidationService) ValidateInstance

func (s *InstanceValidationService) ValidateInstance(saveConfig *AMISaveConfig) (*types.Instance, error)

ValidateInstance validates the instance exists and is in running state (Single Responsibility)

type InstitutionalCostStrategy

type InstitutionalCostStrategy struct{}

InstitutionalCostStrategy calculates costs with institutional discounts

func (*InstitutionalCostStrategy) CalculateInstanceCost

func (i *InstitutionalCostStrategy) CalculateInstanceCost(instance types.Instance, calculator *pricing.Calculator) CostAnalysis

func (*InstitutionalCostStrategy) FormatRow

func (i *InstitutionalCostStrategy) FormatRow(instance types.Instance, analysis CostAnalysis) string

func (*InstitutionalCostStrategy) GetHeaders

func (i *InstitutionalCostStrategy) GetHeaders() []string

type InvitationCobraCommands added in v0.5.11

type InvitationCobraCommands struct {
	// contains filtered or unexported fields
}

InvitationCobraCommands handles invitation management commands

func NewInvitationCobraCommands added in v0.5.11

func NewInvitationCobraCommands(app *App) *InvitationCobraCommands

NewInvitationCobraCommands creates new invitation cobra commands

func (*InvitationCobraCommands) CreateInvitationCommand added in v0.5.11

func (ic *InvitationCobraCommands) CreateInvitationCommand() *cobra.Command

CreateInvitationCommand creates the invitation command with subcommands

type IssuesDisplayStrategy

type IssuesDisplayStrategy struct{}

IssuesDisplayStrategy displays keychain issues

func (*IssuesDisplayStrategy) Display

func (s *IssuesDisplayStrategy) Display(w *tabwriter.Writer, data map[string]interface{}) error

type JobArrayNameCommand added in v0.37.0

type JobArrayNameCommand struct{}

JobArrayNameCommand handles --job-array-name <name> (spawn adoption job arrays).

func (*JobArrayNameCommand) CanHandle added in v0.37.0

func (c *JobArrayNameCommand) CanHandle(arg string) bool

func (*JobArrayNameCommand) Execute added in v0.37.0

func (c *JobArrayNameCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type KeychainDisplayManager

type KeychainDisplayManager struct {
	// contains filtered or unexported fields
}

KeychainDisplayManager manages keychain display strategies (Strategy Pattern - SOLID)

func NewKeychainDisplayManager

func NewKeychainDisplayManager() *KeychainDisplayManager

NewKeychainDisplayManager creates keychain display manager

func (*KeychainDisplayManager) DisplayAll

func (m *KeychainDisplayManager) DisplayAll(w *tabwriter.Writer, data map[string]interface{}) error

DisplayAll renders all keychain information using strategies

type KeychainDisplayStrategy

type KeychainDisplayStrategy interface {
	Display(w *tabwriter.Writer, data map[string]interface{}) error
}

KeychainDisplayStrategy interface for different display sections (Strategy Pattern - SOLID)

type KeychainErrorHandler

type KeychainErrorHandler struct{}

KeychainErrorHandler handles macOS keychain issues

func (*KeychainErrorHandler) CanHandle

func (h *KeychainErrorHandler) CanHandle(errorMsg string) bool

func (*KeychainErrorHandler) Handle

func (h *KeychainErrorHandler) Handle(err error, context string) error

type KeysCobraCommands

type KeysCobraCommands struct {
	// contains filtered or unexported fields
}

KeysCobraCommands handles SSH key management commands

func NewKeysCobraCommands

func NewKeysCobraCommands(app *App) *KeysCobraCommands

NewKeysCobraCommands creates a new keys command handler

func (*KeysCobraCommands) CreateKeysCommand

func (k *KeysCobraCommands) CreateKeysCommand() *cobra.Command

CreateKeysCommand creates the keys command with subcommands

type LaunchCommand

type LaunchCommand interface {
	Execute(req *types.LaunchRequest, args []string, index int) (newIndex int, err error)
	CanHandle(arg string) bool
}

LaunchCommand represents a launch operation using Command Pattern (SOLID)

type LaunchCommandDispatcher

type LaunchCommandDispatcher struct {
	// contains filtered or unexported fields
}

LaunchCommandDispatcher manages launch flag parsing (Single Responsibility)

func NewLaunchCommandDispatcher

func NewLaunchCommandDispatcher() *LaunchCommandDispatcher

NewLaunchCommandDispatcher creates a new launch command dispatcher

func (*LaunchCommandDispatcher) ParseFlags

func (d *LaunchCommandDispatcher) ParseFlags(req *types.LaunchRequest, args []string) error

ParseFlags parses launch flags using command pattern

func (*LaunchCommandDispatcher) RegisterCommand

func (d *LaunchCommandDispatcher) RegisterCommand(cmd LaunchCommand)

RegisterCommand registers a new launch command (Open/Closed Principle)

type LaunchCommandFactory

type LaunchCommandFactory struct {
	// contains filtered or unexported fields
}

LaunchCommandFactory creates the launch command

func (*LaunchCommandFactory) CreateCommand

func (f *LaunchCommandFactory) CreateCommand() *cobra.Command

type LaunchErrorHandler

type LaunchErrorHandler struct{}

LaunchErrorHandler handles instance launch errors

func (*LaunchErrorHandler) CanHandle

func (h *LaunchErrorHandler) CanHandle(errorMsg string) bool

func (*LaunchErrorHandler) Handle

func (h *LaunchErrorHandler) Handle(err error, context string) error

type LogsCommands

type LogsCommands struct {
	// contains filtered or unexported fields
}

LogsCommands handles log-related operations

func NewLogsCommands

func NewLogsCommands(app *App) *LogsCommands

NewLogsCommands creates new logs commands

func (*LogsCommands) CreateLogsCommand

func (lc *LogsCommands) CreateLogsCommand() *cobra.Command

CreateLogsCommand creates the main logs command with subcommands

type MarketplaceCobraCommands

type MarketplaceCobraCommands struct {
	// contains filtered or unexported fields
}

MarketplaceCobraCommands handles template marketplace commands

func NewMarketplaceCobraCommands

func NewMarketplaceCobraCommands(app *App) *MarketplaceCobraCommands

NewMarketplaceCobraCommands creates new marketplace cobra commands

func (*MarketplaceCobraCommands) CreateMarketplaceCommand

func (mc *MarketplaceCobraCommands) CreateMarketplaceCommand() *cobra.Command

CreateMarketplaceCommand creates the marketplace command with subcommands

type MockAPIClient

type MockAPIClient struct {
	// Response configuration
	ShouldReturnError      bool
	ErrorMessage           string
	PingError              error
	ConnectError           error // Specific error for ConnectInstance method
	StopError              error // Specific error for StopInstance method
	StartError             error // Specific error for StartInstance method
	DeleteError            error // Specific error for DeleteInstance method
	HibernateError         error // Specific error for HibernateInstance method
	ResumeError            error // Specific error for ResumeInstance method
	ListInstancesError     error // Specific error for ListInstances method
	HibernationStatusError error // Specific error for GetInstanceHibernationStatus method
	LaunchError            error // Specific error for LaunchInstance method

	// BilledCostTagInactive makes GetBilledCost return the region-fallback shape:
	// the cost-allocation tag is not active, so the figure is the region's EC2
	// total rather than one instance's cost.
	BilledCostTagInactive bool

	// Mock data
	Instances      []types.Instance
	Templates      map[string]types.Template
	StorageVolumes []types.StorageVolume // Unified storage (EFS, EBS, S3)
	Projects       []types.Project
	Approvals      []*project.ApprovalRequest // Configurable list for ListApprovals/ListAllApprovals
	// Legacy idle fields removed - using new hibernation policy system
	DaemonStatus      *types.DaemonStatus
	HibernationStatus *types.HibernationStatus

	// Call tracking
	LaunchCalls        []types.LaunchRequest
	LaunchArrayCalls   []types.LaunchArrayRequest
	LaunchSweepCalls   []types.LaunchSweepRequest
	StartCalls         []string
	StopCalls          []string
	DeleteCalls        []string
	HibernateCalls     []string
	ResumeCalls        []string
	ConnectCalls       []string
	GetInstanceCalls   []string
	CreateVolumeCalls  []types.VolumeCreateRequest
	CreateStorageCalls []types.StorageCreateRequest

	// Configuration
	Options client.Options
}

MockAPIClient implements the PrismAPI interface for testing

func NewMockAPIClient

func NewMockAPIClient() *MockAPIClient

NewMockAPIClient creates a new mock API client with default test data

func NewMockAPIClientWithConnectError

func NewMockAPIClientWithConnectError(errorMsg string) *MockAPIClient

NewMockAPIClientWithConnectError creates a mock client that fails only on ConnectInstance calls

func NewMockAPIClientWithError

func NewMockAPIClientWithError(errorMsg string) *MockAPIClient

NewMockAPIClientWithError creates a mock client that returns errors for testing error paths

func NewMockAPIClientWithPingError

func NewMockAPIClientWithPingError() *MockAPIClient

NewMockAPIClientWithPingError creates a mock client that fails on Ping for daemon connection testing

func (*MockAPIClient) AcceptInvitation added in v0.5.11

func (m *MockAPIClient) AcceptInvitation(ctx context.Context, token string) (*client.InvitationActionResponse, error)

func (*MockAPIClient) AddMarketplaceReview

func (m *MockAPIClient) AddMarketplaceReview(ctx context.Context, templateID string, review map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) AddOnboardingTemplate added in v0.12.0

func (m *MockAPIClient) AddOnboardingTemplate(ctx context.Context, projectID string, tmpl types.OnboardingTemplate) error

func (*MockAPIClient) AddProjectMember

func (m *MockAPIClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) error

func (*MockAPIClient) AddWorkshopParticipant added in v0.20.0

func (m *MockAPIClient) AddWorkshopParticipant(ctx context.Context, workshopID string, req map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) AllowProjectLaunches added in v0.5.9

func (m *MockAPIClient) AllowProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)

AllowProjectLaunches allows new instance launches for a project (mock)

func (*MockAPIClient) ApplyIdlePolicy

func (m *MockAPIClient) ApplyIdlePolicy(ctx context.Context, instanceName, policyID string) error

func (*MockAPIClient) ApplyTemplate

Template application operations

func (*MockAPIClient) ApproveRequest added in v0.12.0

func (m *MockAPIClient) ApproveRequest(ctx context.Context, projectID, requestID, note string) (*project.ApprovalRequest, error)

func (*MockAPIClient) AssignPolicySet

func (m *MockAPIClient) AssignPolicySet(ctx context.Context, policySet string) (*client.PolicyAssignResponse, error)

func (*MockAPIClient) AttachStorage

func (m *MockAPIClient) AttachStorage(ctx context.Context, volumeName, instanceName string) error

func (*MockAPIClient) AttachVolume

func (m *MockAPIClient) AttachVolume(ctx context.Context, volumeName, instanceName string) error

func (*MockAPIClient) CancelTransfer added in v0.5.13

func (m *MockAPIClient) CancelTransfer(ctx context.Context, transferID string) error

func (*MockAPIClient) CheckAMIFreshness

func (m *MockAPIClient) CheckAMIFreshness(ctx context.Context) (map[string]interface{}, error)

CheckAMIFreshness checks the freshness of AMIs for all templates

func (*MockAPIClient) CheckAllocationStatus added in v0.7.2

func (m *MockAPIClient) CheckAllocationStatus(ctx context.Context, allocationID string) (*client.AllocationStatus, error)

CheckAllocationStatus checks if an allocation is exhausted (mock)

func (*MockAPIClient) CheckTemplateAccess

func (m *MockAPIClient) CheckTemplateAccess(ctx context.Context, templateName string) (*client.PolicyCheckResponse, error)

func (*MockAPIClient) CheckVersionCompatibility

func (m *MockAPIClient) CheckVersionCompatibility(ctx context.Context, clientVersion string) error

func (*MockAPIClient) CleanupAMIs

func (m *MockAPIClient) CleanupAMIs(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) CloseInstanceTunnels

func (m *MockAPIClient) CloseInstanceTunnels(_ context.Context, _ string) error

CloseInstanceTunnels closes all tunnels for a given instance

func (*MockAPIClient) CloseTunnel

func (m *MockAPIClient) CloseTunnel(_ context.Context, _ string, _ string) error

CloseTunnel closes a specific tunnel

func (*MockAPIClient) ConfigureThrottling added in v0.6.0

func (m *MockAPIClient) ConfigureThrottling(ctx context.Context, config throttle.Config) error

Throttling operations

func (*MockAPIClient) ConnectInstance

func (m *MockAPIClient) ConnectInstance(ctx context.Context, name string) (string, error)

func (*MockAPIClient) CreateAMI

func (m *MockAPIClient) CreateAMI(ctx context.Context, request types.AMICreationRequest) (map[string]interface{}, error)

func (*MockAPIClient) CreateAMISnapshot

func (m *MockAPIClient) CreateAMISnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) CreateAllocation added in v0.7.2

CreateAllocation creates a budget allocation for a project (mock)

func (*MockAPIClient) CreateBackup

func (*MockAPIClient) CreateBudget added in v0.7.2

func (m *MockAPIClient) CreateBudget(ctx context.Context, req project.CreateBudgetRequest) (*types.Budget, error)

CreateBudget creates a new budget pool (mock)

func (*MockAPIClient) CreateInstanceSnapshot

func (*MockAPIClient) CreateProject

Project management operations

func (*MockAPIClient) CreateSharedToken added in v0.5.11

func (m *MockAPIClient) CreateSharedToken(ctx context.Context, projectID string, req *types.CreateSharedTokenRequest) (*types.SharedInvitationToken, error)

Shared token operations

func (*MockAPIClient) CreateStorage

Storage operations (EBS)

func (*MockAPIClient) CreateTunnels

func (m *MockAPIClient) CreateTunnels(_ context.Context, _ string, _ []string) (*client.CreateTunnelsResponse, error)

CreateTunnels creates tunnels for the specified services

func (*MockAPIClient) CreateVolume

Volume operations (EFS)

func (*MockAPIClient) CreateWorkshop added in v0.20.0

func (m *MockAPIClient) CreateWorkshop(ctx context.Context, req map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) CreateWorkshopFromConfig added in v0.20.0

func (m *MockAPIClient) CreateWorkshopFromConfig(ctx context.Context, configName string, req map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) DeclineInvitation added in v0.5.11

func (m *MockAPIClient) DeclineInvitation(ctx context.Context, token string, reason string) (*client.InvitationActionResponse, error)

func (*MockAPIClient) DeleteAMI

func (m *MockAPIClient) DeleteAMI(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) DeleteAMISnapshot

func (m *MockAPIClient) DeleteAMISnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) DeleteAllocation added in v0.7.2

func (m *MockAPIClient) DeleteAllocation(ctx context.Context, allocationID string) error

DeleteAllocation deletes a budget allocation (mock)

func (*MockAPIClient) DeleteBackup

func (m *MockAPIClient) DeleteBackup(ctx context.Context, backupID string) (*types.BackupDeleteResult, error)

func (*MockAPIClient) DeleteBudget added in v0.7.2

func (m *MockAPIClient) DeleteBudget(ctx context.Context, budgetID string) error

DeleteBudget deletes a budget pool (mock)

func (*MockAPIClient) DeleteCourse added in v0.17.0

func (m *MockAPIClient) DeleteCourse(ctx context.Context, courseID string) error

v0.14.0 — University Education System (interface methods for fixture cleanup)

func (*MockAPIClient) DeleteGrantPeriod added in v0.12.0

func (m *MockAPIClient) DeleteGrantPeriod(ctx context.Context, projectID string) error

func (*MockAPIClient) DeleteInstance

func (m *MockAPIClient) DeleteInstance(ctx context.Context, name string) error

func (*MockAPIClient) DeleteInstanceSnapshot

func (m *MockAPIClient) DeleteInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotDeleteResult, error)

func (*MockAPIClient) DeleteOnboardingTemplate added in v0.12.0

func (m *MockAPIClient) DeleteOnboardingTemplate(ctx context.Context, projectID, nameOrID string) error

func (*MockAPIClient) DeleteProject

func (m *MockAPIClient) DeleteProject(ctx context.Context, id string) error

func (*MockAPIClient) DeleteProjectBudgetShare added in v0.12.0

func (m *MockAPIClient) DeleteProjectBudgetShare(ctx context.Context, projectID, shareID string) error

func (*MockAPIClient) DeleteProjectCushion added in v0.11.0

func (m *MockAPIClient) DeleteProjectCushion(_ context.Context, _ string) error

DeleteProjectCushion removes mock cushion config.

func (*MockAPIClient) DeleteStorage

func (m *MockAPIClient) DeleteStorage(ctx context.Context, name string) error

func (*MockAPIClient) DeleteVolume

func (m *MockAPIClient) DeleteVolume(ctx context.Context, name string) error

func (*MockAPIClient) DeleteWorkshop added in v0.20.0

func (m *MockAPIClient) DeleteWorkshop(ctx context.Context, workshopID string) error

func (*MockAPIClient) DenyRequest added in v0.12.0

func (m *MockAPIClient) DenyRequest(ctx context.Context, projectID, requestID, note string) (*project.ApprovalRequest, error)

func (*MockAPIClient) DetachStorage

func (m *MockAPIClient) DetachStorage(ctx context.Context, volumeName string) error

func (*MockAPIClient) DetachVolume

func (m *MockAPIClient) DetachVolume(ctx context.Context, volumeName string) error

func (*MockAPIClient) DiffTemplate

func (*MockAPIClient) DisableProjectBudget

func (m *MockAPIClient) DisableProjectBudget(ctx context.Context, projectID string) (map[string]interface{}, error)

func (*MockAPIClient) DisableThrottling added in v0.6.0

func (m *MockAPIClient) DisableThrottling(ctx context.Context, scope string) error

func (*MockAPIClient) EndWorkshop added in v0.20.0

func (m *MockAPIClient) EndWorkshop(ctx context.Context, workshopID string) (map[string]interface{}, error)

func (*MockAPIClient) ExecInstance

func (m *MockAPIClient) ExecInstance(ctx context.Context, instanceName string, req types.ExecRequest) (*types.ExecResult, error)

func (*MockAPIClient) ExecuteIdleActions

func (m *MockAPIClient) ExecuteIdleActions(ctx context.Context) (*types.IdleExecutionResponse, error)

func (*MockAPIClient) ExportRightsizingData

func (m *MockAPIClient) ExportRightsizingData(ctx context.Context, instanceName string) ([]types.InstanceMetrics, error)

func (*MockAPIClient) ExtendSharedToken added in v0.5.11

func (m *MockAPIClient) ExtendSharedToken(ctx context.Context, tokenID string, daysToAdd int) error

func (*MockAPIClient) ForkMarketplaceTemplate

func (m *MockAPIClient) ForkMarketplaceTemplate(ctx context.Context, templateID string, options map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) GetAMICosts

func (m *MockAPIClient) GetAMICosts(ctx context.Context, templateName string) (map[string]interface{}, error)

func (*MockAPIClient) GetAMIStatus

func (m *MockAPIClient) GetAMIStatus(ctx context.Context, creationID string) (map[string]interface{}, error)

func (*MockAPIClient) GetAllocation added in v0.7.2

func (m *MockAPIClient) GetAllocation(ctx context.Context, allocationID string) (*types.ProjectBudgetAllocation, error)

GetAllocation gets an allocation by ID (mock)

func (*MockAPIClient) GetApproval added in v0.21.0

func (m *MockAPIClient) GetApproval(ctx context.Context, projectID, approvalID string) (*project.ApprovalRequest, error)

func (*MockAPIClient) GetBackup

func (m *MockAPIClient) GetBackup(ctx context.Context, backupID string) (*types.BackupInfo, error)

func (*MockAPIClient) GetBackupContents

func (*MockAPIClient) GetBilledCost added in v0.36.0

func (m *MockAPIClient) GetBilledCost(ctx context.Context, name string) (*types.BilledCostResult, error)

GetBilledCost returns mock AWS-billed cost for an instance.

func (*MockAPIClient) GetBudget added in v0.7.2

func (m *MockAPIClient) GetBudget(ctx context.Context, budgetID string) (*types.Budget, error)

GetBudget gets a budget by ID (mock)

func (*MockAPIClient) GetBudgetAllocations added in v0.7.2

func (m *MockAPIClient) GetBudgetAllocations(ctx context.Context, budgetID string) ([]*types.ProjectBudgetAllocation, error)

GetBudgetAllocations gets all allocations for a budget (mock)

func (*MockAPIClient) GetBudgetSummary added in v0.7.2

func (m *MockAPIClient) GetBudgetSummary(ctx context.Context, budgetID string) (*types.BudgetSummary, error)

GetBudgetSummary gets a budget summary (mock)

func (*MockAPIClient) GetCallCount

func (m *MockAPIClient) GetCallCount() int

GetCallCount returns the total number of API calls made

func (*MockAPIClient) GetCostTrends

func (m *MockAPIClient) GetCostTrends(ctx context.Context, projectID, period string) (map[string]interface{}, error)

func (*MockAPIClient) GetGrantPeriod added in v0.12.0

func (m *MockAPIClient) GetGrantPeriod(ctx context.Context, projectID string) (*types.GrantPeriod, error)

func (*MockAPIClient) GetIdleHistory

func (m *MockAPIClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)

func (*MockAPIClient) GetIdlePendingActions

func (m *MockAPIClient) GetIdlePendingActions(ctx context.Context) ([]types.IdleState, error)

func (*MockAPIClient) GetIdlePolicy

func (m *MockAPIClient) GetIdlePolicy(ctx context.Context, policyID string) (*idle.PolicyTemplate, error)

func (*MockAPIClient) GetIdleSavingsReport

func (m *MockAPIClient) GetIdleSavingsReport(ctx context.Context, period string) (map[string]interface{}, error)

func (*MockAPIClient) GetInstance

func (m *MockAPIClient) GetInstance(ctx context.Context, name string) (*types.Instance, error)

func (*MockAPIClient) GetInstanceHibernationStatus

func (m *MockAPIClient) GetInstanceHibernationStatus(ctx context.Context, name string) (*types.HibernationStatus, error)

func (*MockAPIClient) GetInstanceIdlePolicies

func (m *MockAPIClient) GetInstanceIdlePolicies(ctx context.Context, instanceName string) ([]*idle.PolicyTemplate, error)

func (*MockAPIClient) GetInstanceLayers

func (m *MockAPIClient) GetInstanceLayers(ctx context.Context, name string) ([]templates.AppliedTemplate, error)

func (*MockAPIClient) GetInstanceLogTypes

func (m *MockAPIClient) GetInstanceLogTypes(ctx context.Context, instanceName string) (*types.LogTypesResponse, error)

func (*MockAPIClient) GetInstanceLogs

func (m *MockAPIClient) GetInstanceLogs(ctx context.Context, instanceName string, req types.LogRequest) (*types.LogResponse, error)

func (*MockAPIClient) GetInstanceMetrics

func (m *MockAPIClient) GetInstanceMetrics(ctx context.Context, instanceName string, limit int) ([]types.InstanceMetrics, error)

func (*MockAPIClient) GetInstanceSnapshot

func (m *MockAPIClient) GetInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotInfo, error)

func (*MockAPIClient) GetInvitationByID added in v0.7.2

func (m *MockAPIClient) GetInvitationByID(ctx context.Context, invitationID string) (*client.GetInvitationResponse, error)

GetInvitationByID gets an invitation by ID (mock)

func (*MockAPIClient) GetInvitationByToken added in v0.5.11

func (m *MockAPIClient) GetInvitationByToken(ctx context.Context, token string) (*client.GetInvitationResponse, error)

Invitation operations

func (*MockAPIClient) GetLogsSummary

func (m *MockAPIClient) GetLogsSummary(ctx context.Context) (*types.LogSummaryResponse, error)

func (*MockAPIClient) GetMarketplaceFeatured

func (m *MockAPIClient) GetMarketplaceFeatured(ctx context.Context) (map[string]interface{}, error)

func (*MockAPIClient) GetMarketplaceTemplate

func (m *MockAPIClient) GetMarketplaceTemplate(ctx context.Context, templateID string) (map[string]interface{}, error)

func (*MockAPIClient) GetMarketplaceTrending

func (m *MockAPIClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)

func (*MockAPIClient) GetMonthlyReport added in v0.12.0

func (m *MockAPIClient) GetMonthlyReport(ctx context.Context, projectID, month, format string) (string, error)

func (*MockAPIClient) GetPolicyStatus

func (m *MockAPIClient) GetPolicyStatus(ctx context.Context) (*client.PolicyStatusResponse, error)

func (*MockAPIClient) GetProgress added in v0.7.3

func (m *MockAPIClient) GetProgress(ctx context.Context, name string) (*types.ProgressResponse, error)

GetProgress returns mock progress for an instance (v0.7.2 - Issue #453)

func (*MockAPIClient) GetProject

func (m *MockAPIClient) GetProject(ctx context.Context, id string) (*types.Project, error)

func (*MockAPIClient) GetProjectAllocations added in v0.7.2

func (m *MockAPIClient) GetProjectAllocations(ctx context.Context, projectID string) ([]*types.ProjectBudgetAllocation, error)

GetProjectAllocations gets all allocations for a project (mock)

func (*MockAPIClient) GetProjectBudgetHistory added in v0.8.0

func (m *MockAPIClient) GetProjectBudgetHistory(ctx context.Context, projectID string, days int) ([]float64, error)

func (*MockAPIClient) GetProjectBudgetStatus

func (m *MockAPIClient) GetProjectBudgetStatus(ctx context.Context, projectID string) (*project.BudgetStatus, error)

func (*MockAPIClient) GetProjectCostBreakdown

func (m *MockAPIClient) GetProjectCostBreakdown(ctx context.Context, projectID string, startTime, endTime time.Time) (*types.ProjectCostBreakdown, error)

func (*MockAPIClient) GetProjectCredits added in v0.12.0

func (m *MockAPIClient) GetProjectCredits(ctx context.Context, projectID string) (map[string]interface{}, error)

GetProjectCredits returns mock AWS credit balances (Issue #207).

func (*MockAPIClient) GetProjectCushion added in v0.11.0

func (m *MockAPIClient) GetProjectCushion(_ context.Context, _ string) (map[string]interface{}, error)

GetProjectCushion returns mock cushion config.

func (*MockAPIClient) GetProjectDiscounts added in v0.12.0

func (m *MockAPIClient) GetProjectDiscounts(ctx context.Context, projectID string) (map[string]interface{}, error)

GetProjectDiscounts returns mock discount discovery results (Issue #207).

func (*MockAPIClient) GetProjectFundingSummary added in v0.7.2

func (m *MockAPIClient) GetProjectFundingSummary(ctx context.Context, projectID string) (*types.ProjectFundingSummary, error)

GetProjectFundingSummary gets the funding summary for a project (mock)

func (*MockAPIClient) GetProjectGDEW added in v0.12.0

func (m *MockAPIClient) GetProjectGDEW(ctx context.Context, projectID string) (map[string]interface{}, error)

GetProjectGDEW returns mock GDEW status (Issue #206).

func (*MockAPIClient) GetProjectMembers

func (m *MockAPIClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, error)

func (*MockAPIClient) GetProjectQuotas added in v0.12.0

func (m *MockAPIClient) GetProjectQuotas(ctx context.Context, projectID string) ([]types.RoleQuota, error)

func (*MockAPIClient) GetProjectResourceUsage

func (m *MockAPIClient) GetProjectResourceUsage(ctx context.Context, projectID string, duration time.Duration) (*types.ProjectResourceUsage, error)

func (*MockAPIClient) GetRegistryStatus

func (m *MockAPIClient) GetRegistryStatus(ctx context.Context) (*client.RegistryStatusResponse, error)

Registry operations

func (*MockAPIClient) GetRestoreStatus

func (m *MockAPIClient) GetRestoreStatus(ctx context.Context, restoreID string) (*types.RestoreResult, error)

func (*MockAPIClient) GetRightsizingRecommendations

func (m *MockAPIClient) GetRightsizingRecommendations(ctx context.Context) (*types.RightsizingRecommendationsResponse, error)

func (*MockAPIClient) GetRightsizingStats

func (m *MockAPIClient) GetRightsizingStats(ctx context.Context, instanceName string) (*types.RightsizingStatsResponse, error)

func (*MockAPIClient) GetRightsizingSummary

func (m *MockAPIClient) GetRightsizingSummary(ctx context.Context) (*types.RightsizingSummaryResponse, error)

func (*MockAPIClient) GetSSHConnection added in v0.37.0

func (m *MockAPIClient) GetSSHConnection(ctx context.Context, name string) (*types.SSHConnection, error)

GetSSHConnection returns the structured SSH endpoint, with the same call recording and running-state rules as ConnectInstance (the CLI's connect path uses this).

func (*MockAPIClient) GetSharedToken added in v0.5.11

func (m *MockAPIClient) GetSharedToken(ctx context.Context, tokenID string) (*types.SharedInvitationToken, error)

func (*MockAPIClient) GetSharedTokenQR added in v0.23.0

func (m *MockAPIClient) GetSharedTokenQR(ctx context.Context, tokenCode string) ([]byte, error)

func (*MockAPIClient) GetStatus

func (m *MockAPIClient) GetStatus(ctx context.Context) (*types.DaemonStatus, error)

Status operations

func (*MockAPIClient) GetStorage

func (m *MockAPIClient) GetStorage(ctx context.Context, name string) (*types.StorageVolume, error)

func (*MockAPIClient) GetTemplate

func (m *MockAPIClient) GetTemplate(ctx context.Context, name string) (*types.Template, error)

func (*MockAPIClient) GetThrottlingRemaining added in v0.6.0

func (m *MockAPIClient) GetThrottlingRemaining(ctx context.Context, scope string) (map[string]interface{}, error)

func (*MockAPIClient) GetThrottlingStatus added in v0.6.0

func (m *MockAPIClient) GetThrottlingStatus(ctx context.Context, scope string) (*throttle.Status, error)

func (*MockAPIClient) GetTransferStatus added in v0.5.13

func (m *MockAPIClient) GetTransferStatus(ctx context.Context, transferID string) (*storage.TransferProgress, error)

func (*MockAPIClient) GetVolume

func (m *MockAPIClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)

func (*MockAPIClient) GetWorkshop added in v0.20.0

func (m *MockAPIClient) GetWorkshop(ctx context.Context, workshopID string) (map[string]interface{}, error)

func (*MockAPIClient) GetWorkshopDashboard added in v0.20.0

func (m *MockAPIClient) GetWorkshopDashboard(ctx context.Context, workshopID string) (map[string]interface{}, error)

func (*MockAPIClient) GetWorkshopDownload added in v0.20.0

func (m *MockAPIClient) GetWorkshopDownload(ctx context.Context, workshopID string) (map[string]interface{}, error)

func (*MockAPIClient) HibernateInstance

func (m *MockAPIClient) HibernateInstance(ctx context.Context, name string) error

func (*MockAPIClient) LaunchArray added in v0.37.0

func (*MockAPIClient) LaunchInstance

func (m *MockAPIClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)

Instance operations

func (*MockAPIClient) LaunchSweep added in v0.37.0

func (*MockAPIClient) ListAMISnapshots

func (m *MockAPIClient) ListAMISnapshots(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) ListAllApprovals added in v0.12.0

func (m *MockAPIClient) ListAllApprovals(ctx context.Context, status project.ApprovalStatus) ([]*project.ApprovalRequest, error)

func (*MockAPIClient) ListApprovals added in v0.12.0

func (m *MockAPIClient) ListApprovals(ctx context.Context, projectID string, status project.ApprovalStatus) ([]*project.ApprovalRequest, error)

func (*MockAPIClient) ListBackups

func (m *MockAPIClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)

func (*MockAPIClient) ListBudgets added in v0.7.2

func (m *MockAPIClient) ListBudgets(ctx context.Context) ([]*types.Budget, error)

ListBudgets lists all budgets (mock)

func (*MockAPIClient) ListIdlePolicies

func (m *MockAPIClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)

func (*MockAPIClient) ListInstanceFiles added in v0.29.0

func (m *MockAPIClient) ListInstanceFiles(ctx context.Context, instanceName, path string) ([]interface{}, error)

SSM file operations (#30a)

func (*MockAPIClient) ListInstanceSnapshots

func (m *MockAPIClient) ListInstanceSnapshots(ctx context.Context) (*types.InstanceSnapshotListResponse, error)

func (*MockAPIClient) ListInstances

func (m *MockAPIClient) ListInstances(ctx context.Context) (*types.ListResponse, error)

func (*MockAPIClient) ListInstancesWithRefresh

func (m *MockAPIClient) ListInstancesWithRefresh(_ context.Context, _ bool) (*types.ListResponse, error)

ListInstancesWithRefresh lists instances with optional refresh

func (*MockAPIClient) ListOnboardingTemplates added in v0.12.0

func (m *MockAPIClient) ListOnboardingTemplates(ctx context.Context, projectID string) ([]types.OnboardingTemplate, error)

func (*MockAPIClient) ListPolicySets

func (m *MockAPIClient) ListPolicySets(ctx context.Context) (*client.PolicySetsResponse, error)

func (*MockAPIClient) ListProjectBudgetShares added in v0.12.0

func (m *MockAPIClient) ListProjectBudgetShares(ctx context.Context, projectID string) ([]*types.BudgetShareRecord, error)

func (*MockAPIClient) ListProjectInvitations added in v0.8.0

func (m *MockAPIClient) ListProjectInvitations(ctx context.Context, projectID string, status string) (*client.ListProjectInvitationsResponse, error)

ListProjectInvitations lists invitations for a project (mock)

func (*MockAPIClient) ListProjectThrottleOverrides added in v0.6.0

func (m *MockAPIClient) ListProjectThrottleOverrides(ctx context.Context) ([]throttle.Override, error)

func (*MockAPIClient) ListProjects

func (*MockAPIClient) ListRestoreOperations

func (m *MockAPIClient) ListRestoreOperations(ctx context.Context) ([]types.RestoreResult, error)

func (*MockAPIClient) ListSharedTokens added in v0.5.11

func (m *MockAPIClient) ListSharedTokens(ctx context.Context, projectID string) ([]*types.SharedInvitationToken, error)

func (*MockAPIClient) ListStorage

func (m *MockAPIClient) ListStorage(ctx context.Context) ([]*types.StorageVolume, error)

func (*MockAPIClient) ListTemplateAMIs

func (m *MockAPIClient) ListTemplateAMIs(ctx context.Context, templateName string) ([]client.AMIReferenceResponse, error)

func (*MockAPIClient) ListTemplates

func (m *MockAPIClient) ListTemplates(ctx context.Context) (map[string]types.Template, error)

Template operations

func (*MockAPIClient) ListTransfers added in v0.5.13

func (m *MockAPIClient) ListTransfers(ctx context.Context) ([]*storage.TransferProgress, error)

func (*MockAPIClient) ListTunnels

ListTunnels lists all tunnels for an instance

func (*MockAPIClient) ListUserAMIs

func (m *MockAPIClient) ListUserAMIs(ctx context.Context) (map[string]interface{}, error)

func (*MockAPIClient) ListVolumes

func (m *MockAPIClient) ListVolumes(ctx context.Context) ([]*types.StorageVolume, error)

func (*MockAPIClient) ListWorkshopConfigs added in v0.20.0

func (m *MockAPIClient) ListWorkshopConfigs(ctx context.Context) (map[string]interface{}, error)

func (*MockAPIClient) ListWorkshops added in v0.20.0

func (m *MockAPIClient) ListWorkshops(ctx context.Context, params string) (map[string]interface{}, error)

func (*MockAPIClient) LookupAMI

func (m *MockAPIClient) LookupAMI(ctx context.Context, templateName, region, architecture string) (*client.AMIReferenceResponse, error)

func (*MockAPIClient) MakeRequest

func (m *MockAPIClient) MakeRequest(method, path string, body interface{}) ([]byte, error)

Raw API request method for generic endpoint access

func (*MockAPIClient) MountVolume

func (m *MockAPIClient) MountVolume(ctx context.Context, volumeName, instanceName, mountPoint string) error

func (*MockAPIClient) Ping

func (m *MockAPIClient) Ping(ctx context.Context) error

func (*MockAPIClient) PreventProjectLaunches added in v0.5.9

func (m *MockAPIClient) PreventProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)

PreventProjectLaunches prevents new instance launches for a project (mock)

func (*MockAPIClient) PreviewAMIResolution

func (m *MockAPIClient) PreviewAMIResolution(ctx context.Context, templateName string) (map[string]interface{}, error)

func (*MockAPIClient) ProvisionWorkshop added in v0.20.0

func (m *MockAPIClient) ProvisionWorkshop(ctx context.Context, workshopID string) (map[string]interface{}, error)

func (*MockAPIClient) PublishMarketplaceTemplate

func (m *MockAPIClient) PublishMarketplaceTemplate(ctx context.Context, template map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) PullFileFromInstance added in v0.29.0

func (m *MockAPIClient) PullFileFromInstance(ctx context.Context, instanceName, remotePath, localPath string) (map[string]interface{}, error)

func (*MockAPIClient) PushFileToInstance added in v0.29.0

func (m *MockAPIClient) PushFileToInstance(ctx context.Context, instanceName, localPath, remotePath string) (map[string]interface{}, error)

func (*MockAPIClient) RecommendIdlePolicy

func (m *MockAPIClient) RecommendIdlePolicy(ctx context.Context, instanceName string) (*idle.PolicyTemplate, error)

func (*MockAPIClient) RecordSpending added in v0.7.2

func (m *MockAPIClient) RecordSpending(ctx context.Context, allocationID string, amount float64) (*project.SpendingResult, error)

RecordSpending records spending against an allocation (mock)

func (*MockAPIClient) RedeemSharedToken added in v0.5.11

func (*MockAPIClient) RemoveIdlePolicy

func (m *MockAPIClient) RemoveIdlePolicy(ctx context.Context, instanceName, policyID string) error

func (*MockAPIClient) RemoveProjectMember

func (m *MockAPIClient) RemoveProjectMember(ctx context.Context, projectID, userID string) error

func (*MockAPIClient) RemoveProjectThrottleOverride added in v0.6.0

func (m *MockAPIClient) RemoveProjectThrottleOverride(ctx context.Context, projectID string) error

func (*MockAPIClient) RemoveWorkshopParticipant added in v0.20.0

func (m *MockAPIClient) RemoveWorkshopParticipant(ctx context.Context, workshopID, userID string) error

func (*MockAPIClient) ResendInvitation added in v0.7.2

func (m *MockAPIClient) ResendInvitation(ctx context.Context, invitationID string) error

ResendInvitation resends an invitation (mock)

func (*MockAPIClient) ResetCallTracking

func (m *MockAPIClient) ResetCallTracking()

ResetCallTracking clears all call tracking arrays

func (*MockAPIClient) ResizeInstance

func (m *MockAPIClient) ResizeInstance(ctx context.Context, req types.ResizeRequest) (*types.ResizeResponse, error)

func (*MockAPIClient) ResolveAMI

func (m *MockAPIClient) ResolveAMI(ctx context.Context, templateName string, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) RestoreAMIFromSnapshot

func (m *MockAPIClient) RestoreAMIFromSnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) RestoreBackup

func (m *MockAPIClient) RestoreBackup(ctx context.Context, req types.RestoreRequest) (*types.RestoreResult, error)

func (*MockAPIClient) RestoreInstanceFromSnapshot

func (m *MockAPIClient) RestoreInstanceFromSnapshot(ctx context.Context, snapshotID string, req types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)

func (*MockAPIClient) ResumeInstance

func (m *MockAPIClient) ResumeInstance(ctx context.Context, name string) error

func (*MockAPIClient) RevokeInvitation added in v0.7.2

func (m *MockAPIClient) RevokeInvitation(ctx context.Context, invitationID string) error

RevokeInvitation revokes an invitation (mock)

func (*MockAPIClient) RevokeSharedToken added in v0.5.11

func (m *MockAPIClient) RevokeSharedToken(ctx context.Context, tokenID string) error

func (*MockAPIClient) RollbackInstance

func (m *MockAPIClient) RollbackInstance(ctx context.Context, req types.RollbackRequest) error

func (*MockAPIClient) SaveWorkshopConfig added in v0.20.0

func (m *MockAPIClient) SaveWorkshopConfig(ctx context.Context, workshopID, name string) (map[string]interface{}, error)

func (*MockAPIClient) SearchMarketplace

func (m *MockAPIClient) SearchMarketplace(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) SendBulkInvitation added in v0.5.11

func (m *MockAPIClient) SendBulkInvitation(ctx context.Context, projectID string, req *types.BulkInvitationRequest) (*types.BulkInvitationResponse, error)

func (*MockAPIClient) SendInvitation added in v0.5.11

func (*MockAPIClient) SetGrantPeriod added in v0.12.0

func (m *MockAPIClient) SetGrantPeriod(ctx context.Context, projectID string, gp types.GrantPeriod) error

func (*MockAPIClient) SetOptions

func (m *MockAPIClient) SetOptions(opts client.Options)

SetOptions sets the API client options

func (*MockAPIClient) SetPolicyEnforcement

func (m *MockAPIClient) SetPolicyEnforcement(ctx context.Context, enabled bool) (*client.PolicyEnforcementResponse, error)

func (*MockAPIClient) SetProjectBudget

func (m *MockAPIClient) SetProjectBudget(ctx context.Context, projectID string, req client.SetProjectBudgetRequest) (map[string]interface{}, error)

func (*MockAPIClient) SetProjectCushion added in v0.11.0

func (m *MockAPIClient) SetProjectCushion(_ context.Context, _ string, cfg map[string]interface{}) (map[string]interface{}, error)

SetProjectCushion saves mock cushion config.

func (*MockAPIClient) SetProjectQuota added in v0.12.0

func (m *MockAPIClient) SetProjectQuota(ctx context.Context, projectID string, quota types.RoleQuota) error

func (*MockAPIClient) SetProjectThrottleOverride added in v0.6.0

func (m *MockAPIClient) SetProjectThrottleOverride(ctx context.Context, projectID string, override throttle.Override) error

func (*MockAPIClient) SetRegistryStatus

func (m *MockAPIClient) SetRegistryStatus(ctx context.Context, active bool) error

func (*MockAPIClient) ShareProjectBudget added in v0.12.0

func (m *MockAPIClient) ShareProjectBudget(ctx context.Context, req types.BudgetShareRequest) (*types.BudgetShareRecord, error)

func (*MockAPIClient) Shutdown

func (m *MockAPIClient) Shutdown(ctx context.Context) error

func (*MockAPIClient) StartInstance

func (m *MockAPIClient) StartInstance(ctx context.Context, name string) error

func (*MockAPIClient) StartTransfer added in v0.5.13

Transfer operations (S3-backed file transfer)

func (*MockAPIClient) StopInstance

func (m *MockAPIClient) StopInstance(ctx context.Context, name string) error

func (*MockAPIClient) SubmitApproval added in v0.12.0

func (m *MockAPIClient) SubmitApproval(ctx context.Context, projectID string, approvalType project.ApprovalType, details map[string]interface{}, reason string) (*project.ApprovalRequest, error)

func (*MockAPIClient) TestAMIAvailability

func (m *MockAPIClient) TestAMIAvailability(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) UnmountVolume

func (m *MockAPIClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error

func (*MockAPIClient) UpdateAllocation added in v0.7.2

func (m *MockAPIClient) UpdateAllocation(ctx context.Context, allocationID string, req project.UpdateAllocationRequest) (*types.ProjectBudgetAllocation, error)

UpdateAllocation updates an allocation (mock)

func (*MockAPIClient) UpdateBudget added in v0.7.2

func (m *MockAPIClient) UpdateBudget(ctx context.Context, budgetID string, req project.UpdateBudgetRequest) (*types.Budget, error)

UpdateBudget updates a budget (mock)

func (*MockAPIClient) UpdateProject

func (m *MockAPIClient) UpdateProject(ctx context.Context, id string, req project.UpdateProjectRequest) (*types.Project, error)

func (*MockAPIClient) UpdateProjectBudget

func (m *MockAPIClient) UpdateProjectBudget(ctx context.Context, projectID string, req client.UpdateProjectBudgetRequest) (map[string]interface{}, error)

func (*MockAPIClient) UpdateProjectGDEW added in v0.12.0

func (m *MockAPIClient) UpdateProjectGDEW(ctx context.Context, projectID string, totalSpend, egressCharges float64) (map[string]interface{}, error)

UpdateProjectGDEW updates GDEW spend/egress figures (mock, Issue #206).

func (*MockAPIClient) UpdateProjectMember

func (m *MockAPIClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error

func (*MockAPIClient) UpdateWorkshop added in v0.20.0

func (m *MockAPIClient) UpdateWorkshop(ctx context.Context, workshopID string, req map[string]interface{}) (map[string]interface{}, error)

func (*MockAPIClient) VerifyBackup

type NetworkConfigErrorHandler

type NetworkConfigErrorHandler struct{}

NetworkConfigErrorHandler handles VPC/subnet errors

func (*NetworkConfigErrorHandler) CanHandle

func (h *NetworkConfigErrorHandler) CanHandle(errorMsg string) bool

func (*NetworkConfigErrorHandler) Handle

func (h *NetworkConfigErrorHandler) Handle(err error, context string) error

type NetworkDiscoveryService

type NetworkDiscoveryService struct{}

NetworkDiscoveryService handles VPC/subnet discovery using Strategy Pattern (SOLID: Single Responsibility)

func NewNetworkDiscoveryService

func NewNetworkDiscoveryService() *NetworkDiscoveryService

NewNetworkDiscoveryService creates a new network discovery service

func (*NetworkDiscoveryService) DiscoverResources

func (s *NetworkDiscoveryService) DiscoverResources(buildConfig *AMIBuildConfig) error

DiscoverResources auto-discovers VPC and subnet if needed (Single Responsibility)

type NetworkErrorHandler

type NetworkErrorHandler struct{}

NetworkErrorHandler handles network connectivity errors

func (*NetworkErrorHandler) CanHandle

func (h *NetworkErrorHandler) CanHandle(errorMsg string) bool

func (*NetworkErrorHandler) Handle

func (h *NetworkErrorHandler) Handle(err error, context string) error

type NoProgressCommand added in v0.7.3

type NoProgressCommand struct{}

NoProgressCommand handles --no-progress flag

func (*NoProgressCommand) CanHandle added in v0.7.3

func (n *NoProgressCommand) CanHandle(arg string) bool

func (*NoProgressCommand) Execute added in v0.7.3

func (n *NoProgressCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type OnCompleteCommand added in v0.37.0

type OnCompleteCommand struct{}

OnCompleteCommand handles --on-complete flag (spawn adoption Phase 3b)

func (*OnCompleteCommand) CanHandle added in v0.37.0

func (c *OnCompleteCommand) CanHandle(arg string) bool

func (*OnCompleteCommand) Execute added in v0.37.0

func (c *OnCompleteCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type PackageDiff

type PackageDiff struct {
	Name           string
	Action         string
	CurrentVersion string
	TargetVersion  string
	PackageManager string
}

PackageDiff represents a package difference

type PackageManagerCommand

type PackageManagerCommand struct{}

PackageManagerCommand handles --with flag

func (*PackageManagerCommand) CanHandle

func (p *PackageManagerCommand) CanHandle(arg string) bool

func (*PackageManagerCommand) Execute

func (p *PackageManagerCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type PackageSet

type PackageSet struct {
	System []string
	Python []string
}

type ParameterCommand

type ParameterCommand struct{}

ParameterCommand handles --param flag for template parameters

func (*ParameterCommand) CanHandle

func (p *ParameterCommand) CanHandle(arg string) bool

func (*ParameterCommand) Execute

func (p *ParameterCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type PlacementGroupCommand added in v0.37.0

type PlacementGroupCommand struct{}

PlacementGroupCommand handles --placement-group flag (spawn adoption Phase 3a)

func (*PlacementGroupCommand) CanHandle added in v0.37.0

func (p *PlacementGroupCommand) CanHandle(arg string) bool

func (*PlacementGroupCommand) Execute added in v0.37.0

func (p *PlacementGroupCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type PolicyCobraCommands

type PolicyCobraCommands struct {
	// contains filtered or unexported fields
}

PolicyCobraCommands handles policy management commands using Cobra framework

func NewPolicyCobraCommands

func NewPolicyCobraCommands(app *App) *PolicyCobraCommands

NewPolicyCobraCommands creates a new policy commands handler

func (*PolicyCobraCommands) CreatePolicyCommand

func (p *PolicyCobraCommands) CreatePolicyCommand() *cobra.Command

CreatePolicyCommand creates the main policy command with subcommands

type PolicyCommandFactory

type PolicyCommandFactory struct {
	// contains filtered or unexported fields
}

PolicyCommandFactory creates policy commands using the factory pattern

func (*PolicyCommandFactory) CreateCommands

func (f *PolicyCommandFactory) CreateCommands() []*cobra.Command

CreateCommands returns all policy-related commands

type PreferScriptCommand

type PreferScriptCommand struct{}

PreferScriptCommand handles --prefer-script flag

func (*PreferScriptCommand) CanHandle

func (c *PreferScriptCommand) CanHandle(arg string) bool

func (*PreferScriptCommand) Execute

func (c *PreferScriptCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ProfileErrorHandler

type ProfileErrorHandler struct{}

ProfileErrorHandler handles profile-related errors

func (*ProfileErrorHandler) CanHandle

func (h *ProfileErrorHandler) CanHandle(errorMsg string) bool

func (*ProfileErrorHandler) Handle

func (h *ProfileErrorHandler) Handle(err error, context string) error

type ProfileWizard

type ProfileWizard struct {
	// contains filtered or unexported fields
}

ProfileWizard provides interactive profile creation and management

func NewProfileWizard

func NewProfileWizard(config *Config) (*ProfileWizard, error)

NewProfileWizard creates a new profile wizard

func (*ProfileWizard) RunInteractiveSetup

func (pw *ProfileWizard) RunInteractiveSetup() error

RunInteractiveSetup runs the interactive profile setup wizard

type ProgressReporter

type ProgressReporter struct {
	// contains filtered or unexported fields
}

ProgressReporter provides enhanced real-time progress reporting for Prism operations

func NewProgressReporter

func NewProgressReporter(instanceName, templateName string, template *types.Template) *ProgressReporter

NewProgressReporter creates a new enhanced progress reporter

func (*ProgressReporter) FormatDuration

func (pr *ProgressReporter) FormatDuration(d time.Duration) string

FormatDuration formats a duration in a human-readable way (exported for access from app.go)

func (*ProgressReporter) GetProgressStages

func (pr *ProgressReporter) GetProgressStages() []ProgressStage

GetProgressStages returns the stages for the current template type

func (*ProgressReporter) ShowCompletion

func (pr *ProgressReporter) ShowCompletion(instance *types.Instance)

ShowCompletion displays completion information

func (*ProgressReporter) ShowError

func (pr *ProgressReporter) ShowError(err error, instance *types.Instance)

ShowError displays enhanced error information

func (*ProgressReporter) ShowHeader

func (pr *ProgressReporter) ShowHeader()

ShowHeader displays the enhanced progress header

func (*ProgressReporter) UpdateProgress

func (pr *ProgressReporter) UpdateProgress(instance *types.Instance, elapsed time.Duration)

UpdateProgress updates and displays current progress

type ProgressStage

type ProgressStage struct {
	Name        string
	Description string
	Icon        string
	MinDuration time.Duration
	MaxDuration time.Duration
}

ProgressStage represents a stage in the launch process

type ProjectCobraCommands

type ProjectCobraCommands struct {
	// contains filtered or unexported fields
}

ProjectCobraCommands handles project management commands

func NewProjectCobraCommands

func NewProjectCobraCommands(app *App) *ProjectCobraCommands

NewProjectCobraCommands creates new project cobra commands

func (*ProjectCobraCommands) AddInvitationCommands added in v0.5.11

func (pc *ProjectCobraCommands) AddInvitationCommands() []*cobra.Command

AddInvitationCommandsToProject adds invitation-related subcommands to the project command

func (*ProjectCobraCommands) CreateProjectCommand

func (pc *ProjectCobraCommands) CreateProjectCommand() *cobra.Command

CreateProjectCommand creates the project command with subcommands

type ProjectCommand

type ProjectCommand struct{}

ProjectCommand handles --project flag

func (*ProjectCommand) CanHandle

func (p *ProjectCommand) CanHandle(arg string) bool

func (*ProjectCommand) Execute

func (p *ProjectCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ProviderInfoDisplayStrategy

type ProviderInfoDisplayStrategy struct{}

ProviderInfoDisplayStrategy displays provider information

func (*ProviderInfoDisplayStrategy) Display

func (s *ProviderInfoDisplayStrategy) Display(w *tabwriter.Writer, data map[string]interface{}) error

type QuietCommand added in v0.7.3

type QuietCommand struct{}

QuietCommand handles --quiet flag

func (*QuietCommand) CanHandle added in v0.7.3

func (q *QuietCommand) CanHandle(arg string) bool

func (*QuietCommand) Execute added in v0.7.3

func (q *QuietCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type QuotaCobraCommands added in v0.7.0

type QuotaCobraCommands struct {
	// contains filtered or unexported fields
}

QuotaCobraCommands handles quota management commands

func NewQuotaCobraCommands added in v0.7.0

func NewQuotaCobraCommands(app *App) *QuotaCobraCommands

NewQuotaCobraCommands creates a new QuotaCobraCommands instance

func (*QuotaCobraCommands) CreateQuotaCommand added in v0.7.0

func (c *QuotaCobraCommands) CreateQuotaCommand() *cobra.Command

CreateQuotaCommand creates the quota command with subcommands

type RateLimitCobraCommands added in v0.5.13

type RateLimitCobraCommands struct {
	// contains filtered or unexported fields
}

RateLimitCobraCommands provides Cobra commands for rate limiting management

func NewRateLimitCobraCommands added in v0.5.13

func NewRateLimitCobraCommands(app *App) *RateLimitCobraCommands

NewRateLimitCobraCommands creates a new rate limit commands instance

func (*RateLimitCobraCommands) CreateRateLimitCommand added in v0.5.13

func (r *RateLimitCobraCommands) CreateRateLimitCommand() *cobra.Command

CreateRateLimitCommand creates the rate-limit command group

type RecommendationsDisplayStrategy

type RecommendationsDisplayStrategy struct{}

RecommendationsDisplayStrategy displays keychain recommendations

func (*RecommendationsDisplayStrategy) Display

func (s *RecommendationsDisplayStrategy) Display(w *tabwriter.Writer, data map[string]interface{}) error

type RegionCommand

type RegionCommand struct{}

RegionCommand handles --region flag

func (*RegionCommand) CanHandle

func (r *RegionCommand) CanHandle(arg string) bool

func (*RegionCommand) Execute

func (r *RegionCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type RepoCobraCommands

type RepoCobraCommands struct {
	// contains filtered or unexported fields
}

RepoCobraCommands handles repository management commands

func NewRepoCobraCommands

func NewRepoCobraCommands(app *App) *RepoCobraCommands

NewRepoCobraCommands creates new repository cobra commands

func (*RepoCobraCommands) CreateRepoCommand

func (rc *RepoCobraCommands) CreateRepoCommand() *cobra.Command

CreateRepoCommand creates the repo command with subcommands

type RepositoryAddRequest

type RepositoryAddRequest struct {
	Name     string
	Location string
	Type     string
	Priority int
	Branch   string
}

RepositoryAddRequest represents repository creation parameters (Factory Pattern - SOLID)

type RepositoryConfigParser

type RepositoryConfigParser struct{}

RepositoryConfigParser parses CLI arguments for repository addition (Single Responsibility)

func (*RepositoryConfigParser) Parse

Parse extracts repository configuration from CLI arguments

type RepositoryFactory

type RepositoryFactory struct{}

RepositoryFactory creates repository objects based on type (Factory Pattern - SOLID)

func (*RepositoryFactory) CreateRepository

func (f *RepositoryFactory) CreateRepository(req *RepositoryAddRequest) (*repository.Repository, error)

CreateRepository creates repository object from request

type RequestApprovalCommand added in v0.21.0

type RequestApprovalCommand struct{}

RequestApprovalCommand handles --request-approval flag (#495)

func (*RequestApprovalCommand) CanHandle added in v0.21.0

func (c *RequestApprovalCommand) CanHandle(arg string) bool

func (*RequestApprovalCommand) Execute added in v0.21.0

func (c *RequestApprovalCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ResearchUserCobraCommands

type ResearchUserCobraCommands struct {
	// contains filtered or unexported fields
}

ResearchUserCobraCommands handles research user-related commands with proper Cobra structure

func NewResearchUserCobraCommands

func NewResearchUserCobraCommands(app *App) *ResearchUserCobraCommands

NewResearchUserCobraCommands creates a new research user commands handler

func (*ResearchUserCobraCommands) CreateResearchUserCommand

func (ruc *ResearchUserCobraCommands) CreateResearchUserCommand() *cobra.Command

CreateResearchUserCommand creates the main user command with subcommands

type ResearchUserCommand

type ResearchUserCommand struct{}

ResearchUserCommand handles --research-user flag (Phase 5A+)

func (*ResearchUserCommand) CanHandle

func (r *ResearchUserCommand) CanHandle(arg string) bool

func (*ResearchUserCommand) Execute

func (r *ResearchUserCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ResearchUserSummary

type ResearchUserSummary struct {
	Username           string            `json:"username"`
	UID                int               `json:"uid"`
	GID                int               `json:"gid"`
	FullName           string            `json:"full_name"`
	Email              string            `json:"email"`
	HomeDirectory      string            `json:"home_directory"`
	EFSVolumeID        string            `json:"efs_volume_id"`
	EFSMountPoint      string            `json:"efs_mount_point"`
	Shell              string            `json:"shell"`
	SSHPublicKeys      []string          `json:"ssh_public_keys"`
	SSHKeyFingerprint  string            `json:"ssh_key_fingerprint"`
	SecondaryGroups    []string          `json:"secondary_groups"`
	SudoAccess         bool              `json:"sudo_access"`
	DockerAccess       bool              `json:"docker_access"`
	DefaultEnvironment map[string]string `json:"default_environment"`
	DotfileRepo        string            `json:"dotfile_repo"`
	CreatedAt          time.Time         `json:"created_at"`
	LastUsed           *time.Time        `json:"last_used"`
	ProfileOwner       string            `json:"profile_owner"`
}

Helper types for API responses

type ResumeErrorHandler added in v0.6.0

type ResumeErrorHandler struct{}

ResumeErrorHandler handles instance resume errors from hibernation

func (*ResumeErrorHandler) CanHandle added in v0.6.0

func (h *ResumeErrorHandler) CanHandle(errorMsg string) bool

func (*ResumeErrorHandler) Handle added in v0.6.0

func (h *ResumeErrorHandler) Handle(err error, context string) error

type RightsizingCobraCommands

type RightsizingCobraCommands struct {
	// contains filtered or unexported fields
}

RightsizingCobraCommands provides Cobra-based rightsizing command structure

func NewRightsizingCobraCommands

func NewRightsizingCobraCommands(app *App) *RightsizingCobraCommands

NewRightsizingCobraCommands creates rightsizing commands

func (*RightsizingCobraCommands) CreateRightsizingCommand

func (r *RightsizingCobraCommands) CreateRightsizingCommand() *cobra.Command

CreateRightsizingCommand creates the main rightsizing command with subcommands

type S3MountCobraCommands added in v0.20.0

type S3MountCobraCommands struct {
	// contains filtered or unexported fields
}

S3MountCobraCommands handles `prism storage s3` commands (Cobra layer)

func NewS3MountCobraCommands added in v0.20.0

func NewS3MountCobraCommands(app *App) *S3MountCobraCommands

NewS3MountCobraCommands creates new S3 mount cobra commands.

func (*S3MountCobraCommands) CreateS3Command added in v0.20.0

func (sc *S3MountCobraCommands) CreateS3Command() *cobra.Command

CreateS3Command creates the `prism storage s3` subcommand group.

type SSHKeyCommand added in v0.7.2

type SSHKeyCommand struct{}

SSHKeyCommand handles --ssh-key flag for SSH access

func (*SSHKeyCommand) CanHandle added in v0.7.2

func (s *SSHKeyCommand) CanHandle(arg string) bool

func (*SSHKeyCommand) Execute added in v0.7.2

func (s *SSHKeyCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type SSHKeyInfo

type SSHKeyInfo struct {
	KeyID         string     `json:"key_id"`
	KeyType       string     `json:"key_type"`
	Fingerprint   string     `json:"fingerprint"`
	PublicKey     string     `json:"public_key"`
	Comment       string     `json:"comment"`
	CreatedAt     time.Time  `json:"created_at"`
	LastUsed      *time.Time `json:"last_used"`
	AutoGenerated bool       `json:"auto_generated"`
}

type ScalingCommands

type ScalingCommands struct {
	// contains filtered or unexported fields
}

ScalingCommands handles all scaling and rightsizing related commands

func NewScalingCommands

func NewScalingCommands(app *App) *ScalingCommands

NewScalingCommands creates a new ScalingCommands instance

func (*ScalingCommands) Rightsizing

func (s *ScalingCommands) Rightsizing(args []string) error

Rightsizing handles rightsizing analysis and recommendations

func (*ScalingCommands) Scaling

func (s *ScalingCommands) Scaling(args []string) error

Scaling handles dynamic instance scaling operations

type SchoolsCobraCommands added in v0.8.0

type SchoolsCobraCommands struct {
	// contains filtered or unexported fields
}

SchoolsCobraCommands handles institution school registry commands

func NewSchoolsCobraCommands added in v0.8.0

func NewSchoolsCobraCommands(app *App) *SchoolsCobraCommands

NewSchoolsCobraCommands creates new schools cobra commands

func (*SchoolsCobraCommands) CreateSchoolsCommand added in v0.8.0

func (sc *SchoolsCobraCommands) CreateSchoolsCommand() *cobra.Command

CreateSchoolsCommand creates the schools command with subcommands

type SecurityGroupErrorHandler

type SecurityGroupErrorHandler struct{}

SecurityGroupErrorHandler handles security group access errors

func (*SecurityGroupErrorHandler) CanHandle

func (h *SecurityGroupErrorHandler) CanHandle(errorMsg string) bool

func (*SecurityGroupErrorHandler) Handle

func (h *SecurityGroupErrorHandler) Handle(err error, context string) error

type Service

type Service struct {
	Name    string
	Command string
	Port    int
}

type ServiceDiff

type ServiceDiff struct {
	Name   string
	Action string
	Port   int
}

ServiceDiff represents a service difference

type ShowAMIResolutionCommand

type ShowAMIResolutionCommand struct{}

ShowAMIResolutionCommand handles --show-ami-resolution flag

func (*ShowAMIResolutionCommand) CanHandle

func (c *ShowAMIResolutionCommand) CanHandle(arg string) bool

func (*ShowAMIResolutionCommand) Execute

func (c *ShowAMIResolutionCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type SizeCommand

type SizeCommand struct{}

SizeCommand handles --size flag

func (*SizeCommand) CanHandle

func (s *SizeCommand) CanHandle(arg string) bool

func (*SizeCommand) Execute

func (s *SizeCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type SizeSpecs

type SizeSpecs struct {
	CPU     string
	Memory  string
	Storage string
}

type SlackWorkspaceCommand added in v0.35.5

type SlackWorkspaceCommand struct{}

SlackWorkspaceCommand handles --slack-workspace flag (#607)

func (*SlackWorkspaceCommand) CanHandle added in v0.35.5

func (c *SlackWorkspaceCommand) CanHandle(arg string) bool

func (*SlackWorkspaceCommand) Execute added in v0.35.5

func (c *SlackWorkspaceCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type SleepWakeCobraCommands added in v0.5.13

type SleepWakeCobraCommands struct {
	// contains filtered or unexported fields
}

SleepWakeCobraCommands manages sleep/wake CLI commands

func NewSleepWakeCobraCommands added in v0.5.13

func NewSleepWakeCobraCommands(app *App) *SleepWakeCobraCommands

NewSleepWakeCobraCommands creates a new sleep/wake command manager

func (*SleepWakeCobraCommands) CreateSleepWakeCommand added in v0.5.13

func (c *SleepWakeCobraCommands) CreateSleepWakeCommand() *cobra.Command

CreateSleepWakeCommand creates the sleep-wake command group

type SnapshotCommands

type SnapshotCommands struct {
	// contains filtered or unexported fields
}

SnapshotCommands handles instance snapshot management operations (implementation layer)

func NewSnapshotCommands

func NewSnapshotCommands(app *App) *SnapshotCommands

NewSnapshotCommands creates a new snapshot commands handler

func (*SnapshotCommands) Snapshot

func (s *SnapshotCommands) Snapshot(args []string) error

Snapshot handles the snapshot command

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

Spinner provides an animated terminal spinner for long-running operations

func NewSpinner

func NewSpinner(message string) *Spinner

NewSpinner creates a new spinner with the given message

func (*Spinner) Start

func (s *Spinner) Start()

Start begins the spinner animation

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop stops the spinner animation

func (*Spinner) StopWithMessage

func (s *Spinner) StopWithMessage(message string)

StopWithMessage stops the spinner and prints a final message

func (*Spinner) UpdateMessage

func (s *Spinner) UpdateMessage(message string)

UpdateMessage updates the spinner message while it's running

func (*Spinner) WithDelay

func (s *Spinner) WithDelay(delay time.Duration) *Spinner

WithDelay sets the animation delay

func (*Spinner) WithFrames

func (s *Spinner) WithFrames(frames []string) *Spinner

WithFrames sets custom spinner frames

type SpotCommand

type SpotCommand struct{}

SpotCommand handles --spot flag

func (*SpotCommand) CanHandle

func (s *SpotCommand) CanHandle(arg string) bool

func (*SpotCommand) Execute

func (s *SpotCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type SpotMaxPriceCommand added in v0.37.0

type SpotMaxPriceCommand struct{}

SpotMaxPriceCommand handles --spot-max-price flag (spawn adoption Phase 3a)

func (*SpotMaxPriceCommand) CanHandle added in v0.37.0

func (s *SpotMaxPriceCommand) CanHandle(arg string) bool

func (*SpotMaxPriceCommand) Execute added in v0.37.0

func (s *SpotMaxPriceCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type StorageAnalyticsCobraCommands added in v0.20.0

type StorageAnalyticsCobraCommands struct {
	// contains filtered or unexported fields
}

StorageAnalyticsCobraCommands handles `prism storage analytics` commands.

func NewStorageAnalyticsCobraCommands added in v0.20.0

func NewStorageAnalyticsCobraCommands(app *App) *StorageAnalyticsCobraCommands

NewStorageAnalyticsCobraCommands creates new storage analytics cobra commands.

func (*StorageAnalyticsCobraCommands) CreateAnalyticsCommand added in v0.20.0

func (sc *StorageAnalyticsCobraCommands) CreateAnalyticsCommand() *cobra.Command

CreateAnalyticsCommand creates the `prism storage analytics` subcommand.

type StorageCobraCommands

type StorageCobraCommands struct {
	// contains filtered or unexported fields
}

StorageCobraCommands handles storage/volume commands (Cobra layer)

func NewStorageCobraCommands

func NewStorageCobraCommands(app *App) *StorageCobraCommands

NewStorageCobraCommands creates new storage cobra commands

func (*StorageCobraCommands) CreateStorageCommand

func (sc *StorageCobraCommands) CreateStorageCommand() *cobra.Command

CreateStorageCommand creates the storage command with subcommands

func (*StorageCobraCommands) CreateVolumeCommand

func (sc *StorageCobraCommands) CreateVolumeCommand() *cobra.Command

CreateVolumeCommand creates the volume command for EFS volumes

type StorageCommand

type StorageCommand struct{}

StorageCommand handles --storage flag

func (*StorageCommand) CanHandle

func (s *StorageCommand) CanHandle(arg string) bool

func (*StorageCommand) Execute

func (s *StorageCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type StorageCommands

type StorageCommands struct {
	// contains filtered or unexported fields
}

StorageCommands handles all storage management operations (implementation layer)

func NewStorageCommands

func NewStorageCommands(app *App) *StorageCommands

NewStorageCommands creates storage commands handler

func (*StorageCommands) Storage

func (sc *StorageCommands) Storage(args []string) error

Storage handles storage commands

func (*StorageCommands) Volume

func (sc *StorageCommands) Volume(args []string) error

Volume handles volume commands

type StructuredError

type StructuredError struct {
	Category    ErrorCategory `json:"category"`
	Operation   string        `json:"operation"`
	Message     string        `json:"message"`
	Suggestions []string      `json:"suggestions"`
	OriginalErr error         `json:"original_error,omitempty"`
}

StructuredError provides categorized error information with context

func NewStructuredError

func NewStructuredError(category ErrorCategory, operation, message string, suggestions []string, originalErr error) *StructuredError

NewStructuredError creates a new structured error

func (*StructuredError) Error

func (e *StructuredError) Error() string

Error implements the error interface

type SubnetCommand

type SubnetCommand struct{}

SubnetCommand handles --subnet flag

func (*SubnetCommand) CanHandle

func (s *SubnetCommand) CanHandle(arg string) bool

func (*SubnetCommand) Execute

func (s *SubnetCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type SystemCommands

type SystemCommands struct {
	// contains filtered or unexported fields
}

SystemCommands handles all system and daemon-related operations

func NewSystemCommands

func NewSystemCommands(app *App) *SystemCommands

NewSystemCommands creates a new SystemCommands instance

func (*SystemCommands) Daemon

func (s *SystemCommands) Daemon(args []string) error

Daemon handles daemon management commands

type TACobraCommands added in v0.14.0

type TACobraCommands struct {
	// contains filtered or unexported fields
}

TACobraCommands handles TA operations.

func NewTACobraCommands added in v0.14.0

func NewTACobraCommands(app *App) *TACobraCommands

NewTACobraCommands creates new TA cobra commands.

func (*TACobraCommands) CreateTACommand added in v0.14.0

func (tc *TACobraCommands) CreateTACommand() *cobra.Command

CreateTACommand creates the 'ta' top-level command.

type TSizeSpecs

type TSizeSpecs struct {
	CPU     string
	Memory  string
	Storage string
	Cost    float64 // Daily cost estimate
}

TSizeSpecs represents the specifications for a t-shirt size

type TTLCommand added in v0.35.4

type TTLCommand struct{}

TTLCommand handles --ttl flag for spored time-to-live enforcement (#588)

func (*TTLCommand) CanHandle added in v0.35.4

func (c *TTLCommand) CanHandle(arg string) bool

func (*TTLCommand) Execute added in v0.35.4

func (c *TTLCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type TemplateApplicationService

type TemplateApplicationService struct {
	// contains filtered or unexported fields
}

TemplateApplicationService handles template application operations (SOLID: Single Responsibility)

func NewTemplateApplicationService

func NewTemplateApplicationService(apiClient interface{}) *TemplateApplicationService

NewTemplateApplicationService creates a new application service

func (*TemplateApplicationService) ApplyTemplate

func (s *TemplateApplicationService) ApplyTemplate(config *TemplateApplyConfig, template interface{}) (*TemplateApplyResponse, error)

ApplyTemplate applies the template using the configuration (Single Responsibility)

type TemplateApplyArgParser

type TemplateApplyArgParser struct{}

TemplateApplyArgParser parses template apply arguments (SOLID: Single Responsibility)

func NewTemplateApplyArgParser

func NewTemplateApplyArgParser() *TemplateApplyArgParser

NewTemplateApplyArgParser creates a new argument parser

func (*TemplateApplyArgParser) Parse

Parse parses command line arguments into apply configuration (Single Responsibility)

type TemplateApplyCommand

type TemplateApplyCommand struct {
	// contains filtered or unexported fields
}

TemplateApplyCommand handles template application operations using Command Pattern (SOLID: Single Responsibility)

func NewTemplateApplyCommand

func NewTemplateApplyCommand(apiClient interface{}) *TemplateApplyCommand

NewTemplateApplyCommand creates a new template apply command

func (*TemplateApplyCommand) Execute

func (c *TemplateApplyCommand) Execute(args []string) error

Execute executes the template apply command (Command Pattern)

type TemplateApplyConfig

type TemplateApplyConfig struct {
	TemplateName   string
	InstanceName   string
	DryRun         bool
	Force          bool
	PackageManager string
}

TemplateApplyConfig represents template application configuration (Single Responsibility)

type TemplateApplyDisplayService

type TemplateApplyDisplayService struct{}

TemplateApplyDisplayService handles result display (SOLID: Single Responsibility)

func NewTemplateApplyDisplayService

func NewTemplateApplyDisplayService() *TemplateApplyDisplayService

NewTemplateApplyDisplayService creates a new display service

func (*TemplateApplyDisplayService) DisplayResults

func (s *TemplateApplyDisplayService) DisplayResults(config *TemplateApplyConfig, response *TemplateApplyResponse) error

DisplayResults displays template application results (Single Responsibility)

type TemplateApplyResponse

type TemplateApplyResponse struct {
	Message            string
	PackagesInstalled  int
	ServicesConfigured int
	UsersCreated       int
	RollbackCheckpoint string
	Warnings           []string
	ExecutionTime      time.Duration
}

TemplateApplyResponse represents template application results

type TemplateApplyValidationService

type TemplateApplyValidationService struct {
	// contains filtered or unexported fields
}

TemplateApplyValidationService handles template validation (SOLID: Single Responsibility)

func NewTemplateApplyValidationService

func NewTemplateApplyValidationService(apiClient interface{}) *TemplateApplyValidationService

NewTemplateApplyValidationService creates a new validation service

func (*TemplateApplyValidationService) ValidateTemplateAndDaemon

func (s *TemplateApplyValidationService) ValidateTemplateAndDaemon(config *TemplateApplyConfig) (interface{}, error)

ValidateTemplateAndDaemon validates daemon is running and template exists (Single Responsibility)

type TemplateCobraCommands

type TemplateCobraCommands struct {
	// contains filtered or unexported fields
}

TemplateCobraCommands creates the templates command with proper Cobra subcommands (Cobra layer)

func NewTemplateCobraCommands

func NewTemplateCobraCommands(app *App) *TemplateCobraCommands

NewTemplateCobraCommands creates new template cobra commands

func (*TemplateCobraCommands) CreateTemplatesCommand

func (tc *TemplateCobraCommands) CreateTemplatesCommand() *cobra.Command

CreateTemplatesCommand creates the main templates command with all subcommands

type TemplateCommandFactory

type TemplateCommandFactory struct {
	// contains filtered or unexported fields
}

TemplateCommandFactory creates template management commands

func (*TemplateCommandFactory) CreateCommands

func (f *TemplateCommandFactory) CreateCommands() []*cobra.Command

type TemplateCommands

type TemplateCommands struct {
	// contains filtered or unexported fields
}

TemplateCommands handles all template management operations (implementation layer)

func NewTemplateCommands

func NewTemplateCommands(app *App) *TemplateCommands

NewTemplateCommands creates template commands handler

func (*TemplateCommands) Templates

func (tc *TemplateCommands) Templates(args []string) error

Templates handles the main templates command and routing

type TemplateDiff

type TemplateDiff struct {
	PackagesToInstall   []PackageDiff
	ServicesToConfigure []ServiceDiff
	UsersToCreate       []UserDiff
	UsersToModify       []UserDiff
	PortsToOpen         []int
	ConflictsFound      []ConflictDiff
}

TemplateDiff represents template diff results

func (*TemplateDiff) HasChanges

func (d *TemplateDiff) HasChanges() bool

HasChanges returns true if diff contains any changes

func (*TemplateDiff) Summary

func (d *TemplateDiff) Summary() string

Summary returns a summary of changes

type TemplateDiffArgParser

type TemplateDiffArgParser struct{}

TemplateDiffArgParser parses template diff arguments (SOLID: Single Responsibility)

func NewTemplateDiffArgParser

func NewTemplateDiffArgParser() *TemplateDiffArgParser

NewTemplateDiffArgParser creates a new argument parser

func (*TemplateDiffArgParser) Parse

Parse parses command line arguments into diff configuration (Single Responsibility)

type TemplateDiffCommand

type TemplateDiffCommand struct {
	// contains filtered or unexported fields
}

TemplateDiffCommand handles template diff operations using Command Pattern (SOLID: Single Responsibility)

func NewTemplateDiffCommand

func NewTemplateDiffCommand(apiClient interface{}) *TemplateDiffCommand

NewTemplateDiffCommand creates a new template diff command

func (*TemplateDiffCommand) Execute

func (c *TemplateDiffCommand) Execute(args []string) error

Execute executes the template diff command (Command Pattern)

type TemplateDiffConfig

type TemplateDiffConfig struct {
	TemplateName string
	InstanceName string
}

TemplateDiffConfig represents template diff configuration (Single Responsibility)

type TemplateDiffDisplayService

type TemplateDiffDisplayService struct{}

TemplateDiffDisplayService handles diff result display (SOLID: Single Responsibility)

func NewTemplateDiffDisplayService

func NewTemplateDiffDisplayService() *TemplateDiffDisplayService

NewTemplateDiffDisplayService creates a new display service

func (*TemplateDiffDisplayService) DisplayDiff

func (s *TemplateDiffDisplayService) DisplayDiff(config *TemplateDiffConfig, diff *TemplateDiff) error

DisplayDiff displays template diff results (Single Responsibility)

type TemplateDiffService

type TemplateDiffService struct {
	// contains filtered or unexported fields
}

TemplateDiffService handles diff calculation operations (SOLID: Single Responsibility)

func NewTemplateDiffService

func NewTemplateDiffService(apiClient interface{}) *TemplateDiffService

NewTemplateDiffService creates a new diff service

func (*TemplateDiffService) CalculateDiff

func (s *TemplateDiffService) CalculateDiff(config *TemplateDiffConfig, template interface{}) (*TemplateDiff, error)

CalculateDiff calculates the diff between template and instance (Single Responsibility)

type TemplateDiffValidationService

type TemplateDiffValidationService struct {
	// contains filtered or unexported fields
}

TemplateDiffValidationService handles template validation for diff (SOLID: Single Responsibility)

func NewTemplateDiffValidationService

func NewTemplateDiffValidationService(apiClient interface{}) *TemplateDiffValidationService

NewTemplateDiffValidationService creates a new validation service

func (*TemplateDiffValidationService) ValidateTemplateAndDaemon

func (s *TemplateDiffValidationService) ValidateTemplateAndDaemon(config *TemplateDiffConfig) (interface{}, error)

ValidateTemplateAndDaemon validates daemon is running and template exists (Single Responsibility)

type TemplateErrorHandler

type TemplateErrorHandler struct{}

TemplateErrorHandler handles template-related errors

func (*TemplateErrorHandler) CanHandle

func (h *TemplateErrorHandler) CanHandle(errorMsg string) bool

func (*TemplateErrorHandler) Handle

func (h *TemplateErrorHandler) Handle(err error, context string) error

type TemplateGenerationService

type TemplateGenerationService struct{}

TemplateGenerationService handles template generation from configuration (SOLID: Single Responsibility)

func NewTemplateGenerationService

func NewTemplateGenerationService() *TemplateGenerationService

NewTemplateGenerationService creates a new template generation service

func (*TemplateGenerationService) GenerateTemplate

func (s *TemplateGenerationService) GenerateTemplate(config *TemplateSnapshotConfig, instanceConfig *InstanceConfiguration) (string, error)

GenerateTemplate generates template YAML from configuration (Single Responsibility)

type TemplateSnapshotArgParser

type TemplateSnapshotArgParser struct{}

TemplateSnapshotArgParser parses template snapshot arguments (SOLID: Single Responsibility)

func NewTemplateSnapshotArgParser

func NewTemplateSnapshotArgParser() *TemplateSnapshotArgParser

NewTemplateSnapshotArgParser creates a new argument parser

func (*TemplateSnapshotArgParser) Parse

Parse parses command line arguments into configuration (Single Responsibility)

type TemplateSnapshotCommand

type TemplateSnapshotCommand struct {
	// contains filtered or unexported fields
}

TemplateSnapshotCommand handles template snapshot operations using Command Pattern (SOLID: Single Responsibility)

func NewTemplateSnapshotCommand

func NewTemplateSnapshotCommand(apiClient interface{}) *TemplateSnapshotCommand

NewTemplateSnapshotCommand creates a new template snapshot command

func (*TemplateSnapshotCommand) Execute

func (c *TemplateSnapshotCommand) Execute(args []string) error

Execute executes the template snapshot command (Command Pattern)

type TemplateSnapshotConfig

type TemplateSnapshotConfig struct {
	InstanceName string
	TemplateName string
	Description  string
	BaseTemplate string
	DryRun       bool
}

TemplateSnapshotConfig represents template snapshot configuration (Single Responsibility)

type TemplateSnapshotSaveService

type TemplateSnapshotSaveService struct{}

TemplateSnapshotSaveService handles template saving and result display (SOLID: Single Responsibility)

func NewTemplateSnapshotSaveService

func NewTemplateSnapshotSaveService() *TemplateSnapshotSaveService

NewTemplateSnapshotSaveService creates a new save service

func (*TemplateSnapshotSaveService) HandleTemplateResult

func (s *TemplateSnapshotSaveService) HandleTemplateResult(config *TemplateSnapshotConfig, template string) error

HandleTemplateResult handles template preview or saving (Single Responsibility)

type TemplateSnapshotValidationService

type TemplateSnapshotValidationService struct {
	// contains filtered or unexported fields
}

TemplateSnapshotValidationService handles instance validation for snapshots (SOLID: Single Responsibility)

func NewTemplateSnapshotValidationService

func NewTemplateSnapshotValidationService(apiClient interface{}) *TemplateSnapshotValidationService

NewTemplateSnapshotValidationService creates a new validation service

func (*TemplateSnapshotValidationService) ValidateInstance

ValidateInstance validates the instance for snapshot creation (Single Responsibility)

type TemplateValidationErrorHandler

type TemplateValidationErrorHandler struct{}

TemplateValidationErrorHandler handles template validation errors

func (*TemplateValidationErrorHandler) CanHandle

func (h *TemplateValidationErrorHandler) CanHandle(errorMsg string) bool

func (*TemplateValidationErrorHandler) Handle

func (h *TemplateValidationErrorHandler) Handle(err error, context string) error

type ThrottlingCobraCommands added in v0.5.13

type ThrottlingCobraCommands struct {
	// contains filtered or unexported fields
}

ThrottlingCobraCommands provides Cobra commands for advanced launch throttling management

func NewThrottlingCobraCommands added in v0.5.13

func NewThrottlingCobraCommands(app *App) *ThrottlingCobraCommands

NewThrottlingCobraCommands creates a new throttling commands instance

func (*ThrottlingCobraCommands) CreateThrottlingCommand added in v0.5.13

func (t *ThrottlingCobraCommands) CreateThrottlingCommand() *cobra.Command

CreateThrottlingCommand creates the throttling command group

type User

type User struct {
	Name   string
	Groups []string
}

type UserCommandFactory

type UserCommandFactory struct {
	// contains filtered or unexported fields
}

UserCommandFactory creates user commands using factory pattern

func (*UserCommandFactory) CreateCommands

func (f *UserCommandFactory) CreateCommands() []*cobra.Command

CreateCommands creates all user commands

type UserCommands

type UserCommands struct {
	// contains filtered or unexported fields
}

UserCommands provides user management functionality

func NewUserCommands

func NewUserCommands(app *App) *UserCommands

NewUserCommands creates a new user commands handler

func (*UserCommands) GetCurrentProfile

func (r *UserCommands) GetCurrentProfile() (string, error)

type UserDiff

type UserDiff struct {
	Name         string
	TargetGroups []string
}

UserDiff represents a user difference

type ValidationErrorHandler

type ValidationErrorHandler struct{}

ValidationErrorHandler handles validation errors

func (*ValidationErrorHandler) CanHandle

func (h *ValidationErrorHandler) CanHandle(errorMsg string) bool

func (*ValidationErrorHandler) Handle

func (h *ValidationErrorHandler) Handle(err error, context string) error

type VersionCommand

type VersionCommand struct{}

VersionCommand handles --version flag (v0.5.5 Universal Version System)

func (*VersionCommand) CanHandle

func (v *VersionCommand) CanHandle(arg string) bool

func (*VersionCommand) Execute

func (v *VersionCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type VolumeCommand

type VolumeCommand struct{}

VolumeCommand handles --volume flag

func (*VolumeCommand) CanHandle

func (v *VolumeCommand) CanHandle(arg string) bool

func (*VolumeCommand) Execute

func (v *VolumeCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type VpcCommand

type VpcCommand struct{}

VpcCommand handles --vpc flag

func (*VpcCommand) CanHandle

func (v *VpcCommand) CanHandle(arg string) bool

func (*VpcCommand) Execute

func (v *VpcCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type WaitCommand

type WaitCommand struct{}

WaitCommand handles --wait flag

func (*WaitCommand) CanHandle

func (w *WaitCommand) CanHandle(arg string) bool

func (*WaitCommand) Execute

func (w *WaitCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type WarningsDisplayStrategy

type WarningsDisplayStrategy struct{}

WarningsDisplayStrategy displays keychain warnings

func (*WarningsDisplayStrategy) Display

func (s *WarningsDisplayStrategy) Display(w *tabwriter.Writer, data map[string]interface{}) error

type WebAccessErrorHandler

type WebAccessErrorHandler struct{}

WebAccessErrorHandler handles web interface access issues

func (*WebAccessErrorHandler) CanHandle

func (h *WebAccessErrorHandler) CanHandle(errorMsg string) bool

func (*WebAccessErrorHandler) Handle

func (h *WebAccessErrorHandler) Handle(err error, context string) error

type WebCommands

type WebCommands struct {
	// contains filtered or unexported fields
}

WebCommands handles web service commands

func NewWebCommands

func NewWebCommands(app *App) *WebCommands

NewWebCommands creates a new WebCommands instance

func (*WebCommands) Close

func (wc *WebCommands) Close(args []string) error

Close closes web service tunnels

func (*WebCommands) List

func (wc *WebCommands) List(args []string) error

List lists all web services for an instance

func (*WebCommands) Open

func (wc *WebCommands) Open(args []string) error

Open opens a web service in the default browser

type WorkshopCobraCommands added in v0.20.0

type WorkshopCobraCommands struct {
	// contains filtered or unexported fields
}

WorkshopCobraCommands handles workshop management commands.

func NewWorkshopCobraCommands added in v0.20.0

func NewWorkshopCobraCommands(app *App) *WorkshopCobraCommands

NewWorkshopCobraCommands creates new workshop cobra commands.

func (*WorkshopCobraCommands) CreateWorkshopCommand added in v0.20.0

func (wc *WorkshopCobraCommands) CreateWorkshopCommand() *cobra.Command

CreateWorkshopCommand creates the 'workshop' top-level command.

type WorkspaceCommandFactory

type WorkspaceCommandFactory struct {
	// contains filtered or unexported fields
}

WorkspaceCommandFactory creates the unified workspace command group

func (*WorkspaceCommandFactory) CreateCommand

func (f *WorkspaceCommandFactory) CreateCommand() *cobra.Command

CreateCommand creates the workspace command group

type YesCommand added in v0.8.0

type YesCommand struct{}

YesCommand handles --yes / -y flag (skip cost confirmation prompt)

func (*YesCommand) CanHandle added in v0.8.0

func (y *YesCommand) CanHandle(arg string) bool

func (*YesCommand) Execute added in v0.8.0

func (y *YesCommand) Execute(req *types.LaunchRequest, args []string, index int) (int, error)

type ZombiesCobraCommands added in v0.5.11

type ZombiesCobraCommands struct {
	// contains filtered or unexported fields
}

ZombiesCobraCommands provides zombie resource detection commands

func NewZombiesCobraCommands added in v0.5.11

func NewZombiesCobraCommands(app *App) *ZombiesCobraCommands

NewZombiesCobraCommands creates a new zombies command handler

func (*ZombiesCobraCommands) CreateZombiesCommand added in v0.5.11

func (z *ZombiesCobraCommands) CreateZombiesCommand() *cobra.Command

CreateZombiesCommand creates the zombies command group

Jump to

Keyboard shortcuts

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