Documentation
¶
Overview ¶
Package cli implements Prism's command-line interface application.
This package provides the CLI application logic for the Prism client (cws). 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 - 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 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 provides interactive onboarding wizard 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
- Variables
- func AddBatchConfigCommands(invitationsCmd *cobra.Command, config *Config)
- func AddExportCommands(profilesCmd *cobra.Command, config *Config)
- func AddProfileCommands(rootCmd *cobra.Command, config *Config)
- func FormatErrorForCLI(err error, operation string) string
- func FormatErrorMessage(context, message string) string
- func FormatInfoMessage(tip string) string
- func FormatProgressMessage(action, status string) string
- func FormatSuccessMessage(action, resource, details string) string
- func FormatWarningMessage(context, message string) string
- func IsInitialized() bool
- func NewAboutCommand() *cobra.Command
- func NewGUICommand() *cobra.Command
- func NewNotFoundError(resourceType, name, suggestion string) error
- func NewStateError(resourceType, name, currentState, expectedState string) error
- func NewTUICommand() *cobra.Command
- func NewUsageError(command, example string) error
- func NewValidationError(field, value, expected string) error
- func NewVersionCommand() *cobra.Command
- func UserFriendlyError(err error, context string) error
- func WrapAPIError(action string, err error) error
- func WrapDaemonError(err error) error
- func WrapError(err error, operation string) error
- type AMIBuildArgParser
- type AMIBuildCommand
- type AMIBuildConfig
- type AMIBuilderService
- type AMICobraCommands
- type AMISaveArgParser
- type AMISaveBuilderService
- type AMISaveCommand
- type AMISaveConfig
- type AMISaveConfirmationService
- type AMIStrategyCommand
- type AdminCommandFactory
- type App
- func (a *App) AMI(args []string) error
- func (a *App) AMIDiscover(args []string) error
- func (a *App) Apply(args []string) error
- func (a *App) Backup(args []string) error
- func (a *App) Connect(args []string) error
- func (a *App) Daemon(args []string) error
- func (a *App) Delete(args []string) error
- func (a *App) DeleteWithWait(name string, wait bool) error
- func (a *App) Diff(args []string) error
- func (a *App) Exec(args []string) error
- func (a *App) GenerateComplianceReport(framework string) error
- func (a *App) GetAWSManager() (*aws.Manager, error)
- func (a *App) Hibernate(args []string) error
- func (a *App) HibernateWithWait(name string, wait bool) error
- func (a *App) Invitation(args []string) error
- func (a *App) Launch(args []string) error
- func (a *App) Layers(args []string) error
- func (a *App) List(args []string) error
- func (a *App) ListComplianceFrameworks() error
- func (a *App) ListCost(args []string) error
- func (a *App) Marketplace(args []string) error
- func (a *App) NewRootCommand() *cobra.Command
- func (a *App) Project(args []string) error
- func (a *App) Repo(args []string) error
- func (a *App) Restore(args []string) error
- func (a *App) Resume(args []string) error
- func (a *App) ResumeWithWait(name string, wait bool) error
- func (a *App) Rightsizing(args []string) error
- func (a *App) Rollback(args []string) error
- func (a *App) Run(args []string) error
- func (a *App) Scaling(args []string) error
- func (a *App) SecurityCommand() *cobra.Command
- func (a *App) SecurityConfig() error
- func (a *App) SecurityCorrelations() error
- func (a *App) SecurityDashboard() error
- func (a *App) SecurityHealth() error
- func (a *App) SecurityKeychain() error
- func (a *App) SecurityStatus() error
- func (a *App) Snapshot(args []string) error
- func (a *App) Start(args []string) error
- func (a *App) StartWithWait(name string, wait bool) error
- func (a *App) Stop(args []string) error
- func (a *App) StopWithWait(name string, wait bool) error
- func (a *App) Storage(args []string) error
- func (a *App) TUI(_ []string) error
- func (a *App) Templates(args []string) error
- func (a *App) ValidateAWSCompliance(framework string) error
- func (a *App) ValidateSCPs(framework string) error
- func (a *App) Volume(args []string) error
- func (a *App) Web(args []string) error
- type BackupCommands
- type BasicCostStrategy
- type BudgetCommands
- type CLIProfileManagerAdapter
- type CapacityErrorHandler
- type CommandFactory
- type CommandFactoryRegistry
- type ComplianceActionsRenderer
- type ComplianceDataService
- type ComplianceGapRenderer
- type ComplianceHeaderService
- type ComplianceOverviewRenderer
- type ComplianceServicesRenderer
- type ComplianceValidator
- type Config
- type ConfigurationDiscoveryService
- type ConflictDiff
- type ConnectionErrorHandler
- type CostAnalysis
- type CostAnalyzer
- type CostCalculationStrategy
- type CostSummary
- type CredentialsErrorHandler
- type DaemonCobraCommands
- type DaemonConfig
- type DaemonErrorHandler
- type DefaultErrorHandler
- type DefaultStateHandler
- type DryRunCommand
- type DryRunStateHandler
- type ErrorCategory
- type ErrorHandler
- type ErrorHandlerRegistry
- type ErrorStateHandler
- type ExportCommandFactory
- type ExportExecutionService
- type ExportFilterService
- type ExportFlagService
- type ExportFlags
- type ExportHandler
- type ExportProfileService
- type ExportValidationService
- type FundingCommand
- type HealthCobraCommands
- type IPDetectionErrorHandler
- type IdleCobraCommands
- type IdleConfig
- type IdleConfigParams
- type IdleConfigRetriever
- type IdleConfigurationCommand
- type IdleDisplayService
- type IdleInstanceInfo
- type IdleInstanceService
- type IdleParameterService
- type IdlePolicyCommand
- type IdleScriptBuilder
- type IdleUpdateService
- type IdleValidationService
- type ImportExecutionService
- type ImportFlagService
- type ImportFlags
- type ImportHandler
- type ImportProfileService
- type ImportResultService
- type ImportValidationService
- type InitCobraCommands
- type InitWizard
- type InstanceCommandFactory
- type InstanceCommands
- func (ic *InstanceCommands) Connect(args []string) error
- func (ic *InstanceCommands) Delete(args []string) error
- func (ic *InstanceCommands) Exec(args []string) error
- func (ic *InstanceCommands) Hibernate(args []string) error
- func (ic *InstanceCommands) Resize(args []string) error
- func (ic *InstanceCommands) Resume(args []string) error
- func (ic *InstanceCommands) Start(args []string) error
- func (ic *InstanceCommands) Stop(args []string) error
- type InstanceConfiguration
- type InstanceStateHandler
- type InstanceValidationService
- type InstitutionalCostStrategy
- type InvitationCobraCommands
- type IssuesDisplayStrategy
- type KeychainDisplayManager
- type KeychainDisplayStrategy
- type KeychainErrorHandler
- type KeysCobraCommands
- type LaunchCommand
- type LaunchCommandDispatcher
- type LaunchCommandFactory
- type LaunchErrorHandler
- type LaunchProgressMonitor
- type LogsCommands
- type MarketplaceCobraCommands
- type MockAPIClient
- func (m *MockAPIClient) AcceptInvitation(ctx context.Context, token string) (*client.InvitationActionResponse, error)
- func (m *MockAPIClient) AddMarketplaceReview(ctx context.Context, templateID string, review map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) error
- func (m *MockAPIClient) AllowProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (m *MockAPIClient) AnalyzeRightsizing(ctx context.Context, req types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
- func (m *MockAPIClient) ApplyIdlePolicy(ctx context.Context, instanceName, policyID string) error
- func (m *MockAPIClient) ApplyTemplate(ctx context.Context, req templates.ApplyRequest) (*templates.ApplyResponse, error)
- func (m *MockAPIClient) AssignPolicySet(ctx context.Context, policySet string) (*client.PolicyAssignResponse, error)
- func (m *MockAPIClient) AttachStorage(ctx context.Context, volumeName, instanceName string) error
- func (m *MockAPIClient) AttachVolume(ctx context.Context, volumeName, instanceName string) error
- func (m *MockAPIClient) CancelTransfer(ctx context.Context, transferID string) error
- func (m *MockAPIClient) CheckAMIFreshness(ctx context.Context) (map[string]interface{}, error)
- func (m *MockAPIClient) CheckAllocationStatus(ctx context.Context, allocationID string) (*client.AllocationStatus, error)
- func (m *MockAPIClient) CheckTemplateAccess(ctx context.Context, templateName string) (*client.PolicyCheckResponse, error)
- func (m *MockAPIClient) CheckVersionCompatibility(ctx context.Context, clientVersion string) error
- func (m *MockAPIClient) CleanupAMIs(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) CloseInstanceTunnels(_ context.Context, _ string) error
- func (m *MockAPIClient) CloseTunnel(_ context.Context, _ string, _ string) error
- func (m *MockAPIClient) ConfigureThrottling(ctx context.Context, config throttle.Config) error
- func (m *MockAPIClient) ConnectInstance(ctx context.Context, name string) (string, error)
- func (m *MockAPIClient) CreateAMI(ctx context.Context, request types.AMICreationRequest) (map[string]interface{}, error)
- func (m *MockAPIClient) CreateAMISnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) CreateAllocation(ctx context.Context, req project.CreateAllocationRequest) (*types.ProjectBudgetAllocation, error)
- func (m *MockAPIClient) CreateBackup(ctx context.Context, req types.BackupCreateRequest) (*types.BackupCreateResult, error)
- func (m *MockAPIClient) CreateBudget(ctx context.Context, req project.CreateBudgetRequest) (*types.Budget, error)
- func (m *MockAPIClient) CreateInstanceSnapshot(ctx context.Context, req types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
- func (m *MockAPIClient) CreateProject(ctx context.Context, req project.CreateProjectRequest) (*types.Project, error)
- func (m *MockAPIClient) CreateSharedToken(ctx context.Context, projectID string, req *types.CreateSharedTokenRequest) (*types.SharedInvitationToken, error)
- func (m *MockAPIClient) CreateStorage(ctx context.Context, req types.StorageCreateRequest) (*types.StorageVolume, error)
- func (m *MockAPIClient) CreateTunnels(_ context.Context, _ string, _ []string) (*client.CreateTunnelsResponse, error)
- func (m *MockAPIClient) CreateVolume(ctx context.Context, req types.VolumeCreateRequest) (*types.StorageVolume, error)
- func (m *MockAPIClient) DeclineInvitation(ctx context.Context, token string, reason string) (*client.InvitationActionResponse, error)
- func (m *MockAPIClient) DeleteAMI(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) DeleteAMISnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) DeleteAllocation(ctx context.Context, allocationID string) error
- func (m *MockAPIClient) DeleteBackup(ctx context.Context, backupID string) (*types.BackupDeleteResult, error)
- func (m *MockAPIClient) DeleteBudget(ctx context.Context, budgetID string) error
- func (m *MockAPIClient) DeleteInstance(ctx context.Context, name string) error
- func (m *MockAPIClient) DeleteInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotDeleteResult, error)
- func (m *MockAPIClient) DeleteProject(ctx context.Context, id string) error
- func (m *MockAPIClient) DeleteStorage(ctx context.Context, name string) error
- func (m *MockAPIClient) DeleteVolume(ctx context.Context, name string) error
- func (m *MockAPIClient) DetachStorage(ctx context.Context, volumeName string) error
- func (m *MockAPIClient) DetachVolume(ctx context.Context, volumeName string) error
- func (m *MockAPIClient) DiffTemplate(ctx context.Context, req templates.DiffRequest) (*templates.TemplateDiff, error)
- func (m *MockAPIClient) DisableProjectBudget(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (m *MockAPIClient) DisableThrottling(ctx context.Context, scope string) error
- func (m *MockAPIClient) ExecInstance(ctx context.Context, instanceName string, req types.ExecRequest) (*types.ExecResult, error)
- func (m *MockAPIClient) ExecuteIdleActions(ctx context.Context) (*types.IdleExecutionResponse, error)
- func (m *MockAPIClient) ExportRightsizingData(ctx context.Context, instanceName string) ([]types.InstanceMetrics, error)
- func (m *MockAPIClient) ExtendSharedToken(ctx context.Context, tokenID string, daysToAdd int) error
- func (m *MockAPIClient) ForkMarketplaceTemplate(ctx context.Context, templateID string, options map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) GetAMICosts(ctx context.Context, templateName string) (map[string]interface{}, error)
- func (m *MockAPIClient) GetAMIStatus(ctx context.Context, creationID string) (map[string]interface{}, error)
- func (m *MockAPIClient) GetAllocation(ctx context.Context, allocationID string) (*types.ProjectBudgetAllocation, error)
- func (m *MockAPIClient) GetBackup(ctx context.Context, backupID string) (*types.BackupInfo, error)
- func (m *MockAPIClient) GetBackupContents(ctx context.Context, req types.BackupContentsRequest) (*types.BackupContentsResponse, error)
- func (m *MockAPIClient) GetBudget(ctx context.Context, budgetID string) (*types.Budget, error)
- func (m *MockAPIClient) GetBudgetAllocations(ctx context.Context, budgetID string) ([]*types.ProjectBudgetAllocation, error)
- func (m *MockAPIClient) GetBudgetSummary(ctx context.Context, budgetID string) (*types.BudgetSummary, error)
- func (m *MockAPIClient) GetCallCount() int
- func (m *MockAPIClient) GetCostTrends(ctx context.Context, projectID, period string) (map[string]interface{}, error)
- func (m *MockAPIClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)
- func (m *MockAPIClient) GetIdlePendingActions(ctx context.Context) ([]types.IdleState, error)
- func (m *MockAPIClient) GetIdlePolicy(ctx context.Context, policyID string) (*idle.PolicyTemplate, error)
- func (m *MockAPIClient) GetIdleSavingsReport(ctx context.Context, period string) (map[string]interface{}, error)
- func (m *MockAPIClient) GetInstance(ctx context.Context, name string) (*types.Instance, error)
- func (m *MockAPIClient) GetInstanceHibernationStatus(ctx context.Context, name string) (*types.HibernationStatus, error)
- func (m *MockAPIClient) GetInstanceIdlePolicies(ctx context.Context, instanceName string) ([]*idle.PolicyTemplate, error)
- func (m *MockAPIClient) GetInstanceLayers(ctx context.Context, name string) ([]templates.AppliedTemplate, error)
- func (m *MockAPIClient) GetInstanceLogTypes(ctx context.Context, instanceName string) (*types.LogTypesResponse, error)
- func (m *MockAPIClient) GetInstanceLogs(ctx context.Context, instanceName string, req types.LogRequest) (*types.LogResponse, error)
- func (m *MockAPIClient) GetInstanceMetrics(ctx context.Context, instanceName string, limit int) ([]types.InstanceMetrics, error)
- func (m *MockAPIClient) GetInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotInfo, error)
- func (m *MockAPIClient) GetInvitationByID(ctx context.Context, invitationID string) (*client.GetInvitationResponse, error)
- func (m *MockAPIClient) GetInvitationByToken(ctx context.Context, token string) (*client.GetInvitationResponse, error)
- func (m *MockAPIClient) GetLogsSummary(ctx context.Context) (*types.LogSummaryResponse, error)
- func (m *MockAPIClient) GetMarketplaceFeatured(ctx context.Context) (map[string]interface{}, error)
- func (m *MockAPIClient) GetMarketplaceTemplate(ctx context.Context, templateID string) (map[string]interface{}, error)
- func (m *MockAPIClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)
- func (m *MockAPIClient) GetPolicyStatus(ctx context.Context) (*client.PolicyStatusResponse, error)
- func (m *MockAPIClient) GetProject(ctx context.Context, id string) (*types.Project, error)
- func (m *MockAPIClient) GetProjectAllocations(ctx context.Context, projectID string) ([]*types.ProjectBudgetAllocation, error)
- func (m *MockAPIClient) GetProjectBudgetStatus(ctx context.Context, projectID string) (*project.BudgetStatus, error)
- func (m *MockAPIClient) GetProjectCostBreakdown(ctx context.Context, projectID string, startTime, endTime time.Time) (*types.ProjectCostBreakdown, error)
- func (m *MockAPIClient) GetProjectFundingSummary(ctx context.Context, projectID string) (*types.ProjectFundingSummary, error)
- func (m *MockAPIClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, error)
- func (m *MockAPIClient) GetProjectResourceUsage(ctx context.Context, projectID string, duration time.Duration) (*types.ProjectResourceUsage, error)
- func (m *MockAPIClient) GetRegistryStatus(ctx context.Context) (*client.RegistryStatusResponse, error)
- func (m *MockAPIClient) GetRestoreStatus(ctx context.Context, restoreID string) (*types.RestoreResult, error)
- func (m *MockAPIClient) GetRightsizingRecommendations(ctx context.Context) (*types.RightsizingRecommendationsResponse, error)
- func (m *MockAPIClient) GetRightsizingStats(ctx context.Context, instanceName string) (*types.RightsizingStatsResponse, error)
- func (m *MockAPIClient) GetRightsizingSummary(ctx context.Context) (*types.RightsizingSummaryResponse, error)
- func (m *MockAPIClient) GetSharedToken(ctx context.Context, tokenID string) (*types.SharedInvitationToken, error)
- func (m *MockAPIClient) GetStatus(ctx context.Context) (*types.DaemonStatus, error)
- func (m *MockAPIClient) GetStorage(ctx context.Context, name string) (*types.StorageVolume, error)
- func (m *MockAPIClient) GetTemplate(ctx context.Context, name string) (*types.Template, error)
- func (m *MockAPIClient) GetThrottlingRemaining(ctx context.Context, scope string) (map[string]interface{}, error)
- func (m *MockAPIClient) GetThrottlingStatus(ctx context.Context, scope string) (*throttle.Status, error)
- func (m *MockAPIClient) GetTransferStatus(ctx context.Context, transferID string) (*storage.TransferProgress, error)
- func (m *MockAPIClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)
- func (m *MockAPIClient) HibernateInstance(ctx context.Context, name string) error
- func (m *MockAPIClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)
- func (m *MockAPIClient) ListAMISnapshots(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)
- func (m *MockAPIClient) ListBudgets(ctx context.Context) ([]*types.Budget, error)
- func (m *MockAPIClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)
- func (m *MockAPIClient) ListInstanceSnapshots(ctx context.Context) (*types.InstanceSnapshotListResponse, error)
- func (m *MockAPIClient) ListInstances(ctx context.Context) (*types.ListResponse, error)
- func (m *MockAPIClient) ListInstancesWithRefresh(_ context.Context, _ bool) (*types.ListResponse, error)
- func (m *MockAPIClient) ListPolicySets(ctx context.Context) (*client.PolicySetsResponse, error)
- func (m *MockAPIClient) ListProjectThrottleOverrides(ctx context.Context) ([]throttle.Override, error)
- func (m *MockAPIClient) ListProjects(ctx context.Context, filter *project.ProjectFilter) (*project.ProjectListResponse, error)
- func (m *MockAPIClient) ListRestoreOperations(ctx context.Context) ([]types.RestoreResult, error)
- func (m *MockAPIClient) ListSharedTokens(ctx context.Context, projectID string) ([]*types.SharedInvitationToken, error)
- func (m *MockAPIClient) ListStorage(ctx context.Context) ([]*types.StorageVolume, error)
- func (m *MockAPIClient) ListTemplateAMIs(ctx context.Context, templateName string) ([]client.AMIReferenceResponse, error)
- func (m *MockAPIClient) ListTemplates(ctx context.Context) (map[string]types.Template, error)
- func (m *MockAPIClient) ListTransfers(ctx context.Context) ([]*storage.TransferProgress, error)
- func (m *MockAPIClient) ListTunnels(_ context.Context, _ string) (*client.ListTunnelsResponse, error)
- func (m *MockAPIClient) ListUserAMIs(ctx context.Context) (map[string]interface{}, error)
- func (m *MockAPIClient) ListVolumes(ctx context.Context) ([]*types.StorageVolume, error)
- func (m *MockAPIClient) LookupAMI(ctx context.Context, templateName, region, architecture string) (*client.AMIReferenceResponse, error)
- func (m *MockAPIClient) MakeRequest(method, path string, body interface{}) ([]byte, error)
- func (m *MockAPIClient) MountVolume(ctx context.Context, volumeName, instanceName, mountPoint string) error
- func (m *MockAPIClient) Ping(ctx context.Context) error
- func (m *MockAPIClient) PreventProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (m *MockAPIClient) PreviewAMIResolution(ctx context.Context, templateName string) (map[string]interface{}, error)
- func (m *MockAPIClient) PublishMarketplaceTemplate(ctx context.Context, template map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) RecommendIdlePolicy(ctx context.Context, instanceName string) (*idle.PolicyTemplate, error)
- func (m *MockAPIClient) RecordSpending(ctx context.Context, allocationID string, amount float64) (*project.SpendingResult, error)
- func (m *MockAPIClient) RedeemSharedToken(ctx context.Context, req *types.RedeemSharedTokenRequest) (*types.RedeemSharedTokenResponse, error)
- func (m *MockAPIClient) RemoveIdlePolicy(ctx context.Context, instanceName, policyID string) error
- func (m *MockAPIClient) RemoveProjectMember(ctx context.Context, projectID, userID string) error
- func (m *MockAPIClient) RemoveProjectThrottleOverride(ctx context.Context, projectID string) error
- func (m *MockAPIClient) ResendInvitation(ctx context.Context, invitationID string) error
- func (m *MockAPIClient) ResetCallTracking()
- func (m *MockAPIClient) ResizeInstance(ctx context.Context, req types.ResizeRequest) (*types.ResizeResponse, error)
- func (m *MockAPIClient) ResolveAMI(ctx context.Context, templateName string, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) RestoreAMIFromSnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) RestoreBackup(ctx context.Context, req types.RestoreRequest) (*types.RestoreResult, error)
- func (m *MockAPIClient) RestoreInstanceFromSnapshot(ctx context.Context, snapshotID string, req types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)
- func (m *MockAPIClient) ResumeInstance(ctx context.Context, name string) error
- func (m *MockAPIClient) RevokeInvitation(ctx context.Context, invitationID string) error
- func (m *MockAPIClient) RevokeSharedToken(ctx context.Context, tokenID string) error
- func (m *MockAPIClient) RollbackInstance(ctx context.Context, req types.RollbackRequest) error
- func (m *MockAPIClient) SearchMarketplace(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) SendBulkInvitation(ctx context.Context, projectID string, req *types.BulkInvitationRequest) (*types.BulkInvitationResponse, error)
- func (m *MockAPIClient) SendInvitation(ctx context.Context, projectID string, req client.SendInvitationRequest) (*client.SendInvitationResponse, error)
- func (m *MockAPIClient) SetOptions(opts client.Options)
- func (m *MockAPIClient) SetPolicyEnforcement(ctx context.Context, enabled bool) (*client.PolicyEnforcementResponse, error)
- func (m *MockAPIClient) SetProjectBudget(ctx context.Context, projectID string, req client.SetProjectBudgetRequest) (map[string]interface{}, error)
- func (m *MockAPIClient) SetProjectThrottleOverride(ctx context.Context, projectID string, override throttle.Override) error
- func (m *MockAPIClient) SetRegistryStatus(ctx context.Context, active bool) error
- func (m *MockAPIClient) Shutdown(ctx context.Context) error
- func (m *MockAPIClient) StartInstance(ctx context.Context, name string) error
- func (m *MockAPIClient) StartTransfer(ctx context.Context, req client.TransferRequest) (*client.TransferResponse, error)
- func (m *MockAPIClient) StopInstance(ctx context.Context, name string) error
- func (m *MockAPIClient) TestAMIAvailability(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (m *MockAPIClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error
- func (m *MockAPIClient) UpdateAllocation(ctx context.Context, allocationID string, req project.UpdateAllocationRequest) (*types.ProjectBudgetAllocation, error)
- func (m *MockAPIClient) UpdateBudget(ctx context.Context, budgetID string, req project.UpdateBudgetRequest) (*types.Budget, error)
- func (m *MockAPIClient) UpdateProject(ctx context.Context, id string, req project.UpdateProjectRequest) (*types.Project, error)
- func (m *MockAPIClient) UpdateProjectBudget(ctx context.Context, projectID string, req client.UpdateProjectBudgetRequest) (map[string]interface{}, error)
- func (m *MockAPIClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error
- func (m *MockAPIClient) VerifyBackup(ctx context.Context, req types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
- type NetworkConfigErrorHandler
- type NetworkDiscoveryService
- type NetworkErrorHandler
- type PackageDiff
- type PackageManagerCommand
- type PackageSet
- type ParameterCommand
- type PendingStateHandler
- type PolicyCobraCommands
- type PolicyCommandFactory
- type PreferScriptCommand
- type ProfileErrorHandler
- type ProfileWizard
- type ProgressReporter
- func (pr *ProgressReporter) FormatDuration(d time.Duration) string
- func (pr *ProgressReporter) GetProgressStages() []ProgressStage
- func (pr *ProgressReporter) ShowCompletion(instance *types.Instance)
- func (pr *ProgressReporter) ShowError(err error, instance *types.Instance)
- func (pr *ProgressReporter) ShowHeader()
- func (pr *ProgressReporter) UpdateProgress(instance *types.Instance, elapsed time.Duration)
- type ProgressStage
- type ProjectCobraCommands
- type ProjectCommand
- type ProviderInfoDisplayStrategy
- type QuotaCobraCommands
- type RateLimitCobraCommands
- type RecommendationsDisplayStrategy
- type RegionCommand
- type RepoCobraCommands
- type RepositoryAddRequest
- type RepositoryConfigParser
- type RepositoryFactory
- type ResearchArea
- type ResearchUserCobraCommands
- type ResearchUserCommand
- type ResearchUserSummary
- type ResumeErrorHandler
- type RightsizingCobraCommands
- type RunningStateHandler
- type SSHKeyCommand
- type SSHKeyInfo
- type ScalingCommands
- type SecurityGroupErrorHandler
- type Service
- type ServiceDiff
- type ShowAMIResolutionCommand
- type SizeCommand
- type SizeSpecs
- type SleepWakeCobraCommands
- type SnapshotCommands
- type Spinner
- type SpotCommand
- type StorageCobraCommands
- type StorageCommand
- type StorageCommands
- type StructuredError
- type SubnetCommand
- type SystemCommands
- type TSizeSpecs
- type TemplateApplicationService
- type TemplateApplyArgParser
- type TemplateApplyCommand
- type TemplateApplyConfig
- type TemplateApplyDisplayService
- type TemplateApplyResponse
- type TemplateApplyValidationService
- type TemplateCobraCommands
- type TemplateCommandFactory
- type TemplateCommands
- type TemplateDiff
- type TemplateDiffArgParser
- type TemplateDiffCommand
- type TemplateDiffConfig
- type TemplateDiffDisplayService
- type TemplateDiffService
- type TemplateDiffValidationService
- type TemplateErrorHandler
- type TemplateGenerationService
- type TemplateSnapshotArgParser
- type TemplateSnapshotCommand
- type TemplateSnapshotConfig
- type TemplateSnapshotSaveService
- type TemplateSnapshotValidationService
- type TemplateValidationErrorHandler
- type ThrottlingCobraCommands
- type User
- type UserCommandFactory
- type UserCommands
- type UserDiff
- type ValidationErrorHandler
- type VersionCommand
- type VolumeCommand
- type VpcCommand
- type WaitCommand
- type WarningsDisplayStrategy
- type WebAccessErrorHandler
- type WebCommands
- type WorkspaceCommandFactory
- type ZombiesCobraCommands
Constants ¶
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 = "CWSD_URL" // AutoStartDisableEnvVar is the environment variable to disable auto-daemon startup AutoStartDisableEnvVar = "CWS_NO_AUTO_START" )
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" )
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" )
const ( // DaemonNotRunningMessage is the standard message when daemon is not running DaemonNotRunningMessage = "daemon not running - this is unusual since daemon auto-starts. Try: prism 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 daemon start" // NoInstancesFoundMessage is displayed when no instances are found NoInstancesFoundMessage = "No workstations found. Launch one with: prism 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 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>" )
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" )
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 )
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 list" // SetupTimeoutConnectMessage suggests connecting when setup times out SetupTimeoutConnectMessage = "💡 Try connecting: prism connect %s" // AMITimeoutMessage is displayed when AMI launch monitoring times out AMITimeoutMessage = "⚠️ Timeout waiting for instance to start (5 min). Check status with: prism list" )
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 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." )
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" )
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" )
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 ¶
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)
var ComputePackageIndicators = []string{
"openmpi", "mpich", "openmp", "fftw", "blas", "lapack", "atlas", "mkl",
}
ComputePackageIndicators contains keywords that indicate high compute requirements
var GPUPackageIndicators = []string{
"tensorflow-gpu", "pytorch", "cuda", "nvidia", "cupy", "numba", "rapids",
}
GPUPackageIndicators contains keywords that indicate GPU requirements
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
var MemoryPackageIndicators = []string{
"spark", "hadoop", "r-base", "bioconductor", "genomics",
}
MemoryPackageIndicators contains keywords that indicate high memory requirements
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
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
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
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 ¶
AddBatchConfigCommands adds batch configuration commands to the CLI
func AddExportCommands ¶
AddExportCommands adds the export and import commands using Strategy Pattern (SOLID: Single Responsibility)
func AddProfileCommands ¶
AddProfileCommands adds profile-related commands to the CLI
func FormatErrorForCLI ¶
FormatErrorForCLI formats an error for command-line output with helpful guidance
func FormatErrorMessage ¶
FormatErrorMessage formats user-facing error messages without technical details
func FormatInfoMessage ¶
FormatInfoMessage formats informational messages with helpful tips
func FormatProgressMessage ¶
FormatProgressMessage formats progress messages with consistent structure
func FormatSuccessMessage ¶
FormatSuccessMessage formats success messages with consistent emoji and structure
func FormatWarningMessage ¶
FormatWarningMessage formats warning messages with consistent structure
func IsInitialized ¶ added in v0.6.0
func IsInitialized() bool
IsInitialized checks if the user has completed initialization
func NewAboutCommand ¶
NewAboutCommand creates a new about command
func NewNotFoundError ¶
NewNotFoundError creates a resource not found error with suggestions
func NewStateError ¶
NewStateError creates an error for invalid resource states
func NewUsageError ¶
NewUsageError creates a consistent usage error with command and example
func NewValidationError ¶
NewValidationError creates a validation error with field context
func NewVersionCommand ¶ added in v0.6.0
NewVersionCommand creates a new version command
func UserFriendlyError ¶
UserFriendlyError wraps errors with helpful guidance using Strategy Pattern (SOLID: Single Responsibility)
func WrapAPIError ¶
WrapAPIError wraps API errors with consistent context and formatting
func WrapDaemonError ¶
WrapDaemonError wraps daemon connection errors with standard recovery message
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 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 NewAppWithClient ¶
NewAppWithClient creates a new CLI application with a custom API client
func (*App) AMIDiscover ¶
AMIDiscover demonstrates AMI auto-discovery functionality
func (*App) Apply ¶
Apply handles the apply command using Command Pattern (SOLID: Single Responsibility)
func (*App) DeleteWithWait ¶ added in v0.6.0
DeleteWithWait deletes an instance with optional blocking (Phase 1: backward compatible, always blocks)
func (*App) Diff ¶
Diff handles the diff command using Command Pattern (SOLID: Single Responsibility)
func (*App) GenerateComplianceReport ¶
GenerateComplianceReport generates detailed compliance report
func (*App) GetAWSManager ¶ added in v0.5.11
GetAWSManager creates an AWS manager using the current profile settings
func (*App) HibernateWithWait ¶ added in v0.6.0
HibernateWithWait hibernates an instance with optional blocking (Phase 1: backward compatible, always blocks)
func (*App) Invitation ¶ added in v0.5.11
Invitation handles user-facing invitation commands (accept, decline, list)
func (*App) ListComplianceFrameworks ¶
ListComplianceFrameworks lists supported compliance frameworks
func (*App) Marketplace ¶
Marketplace processes marketplace-related commands
func (*App) NewRootCommand ¶
NewRootCommand creates the root command for the CLI
func (*App) ResumeWithWait ¶ added in v0.6.0
ResumeWithWait resumes an instance with optional blocking (Phase 1: backward compatible, always blocks)
func (*App) Rightsizing ¶
Rightsizing handles rightsizing analysis and recommendations
func (*App) SecurityCommand ¶
Security command handles all security-related operations
func (*App) SecurityConfig ¶
SecurityConfig displays security configuration
func (*App) SecurityCorrelations ¶
SecurityCorrelations displays security event correlations
func (*App) SecurityDashboard ¶
SecurityDashboard displays the security dashboard
func (*App) SecurityHealth ¶
SecurityHealth performs and displays security health check
func (*App) SecurityKeychain ¶
SecurityKeychain displays keychain information using Strategy Pattern (SOLID: Single Responsibility)
func (*App) SecurityStatus ¶
SecurityStatus displays comprehensive security status
func (*App) StartWithWait ¶ added in v0.6.0
StartWithWait starts an instance with optional blocking (Phase 1: backward compatible, always blocks)
func (*App) StopWithWait ¶ added in v0.6.0
StopWithWait stops an instance with optional blocking (Phase 1: backward compatible, always blocks)
func (*App) ValidateAWSCompliance ¶
ValidateAWSCompliance validates Prism against AWS compliance framework using Strategy Pattern (SOLID: Single Responsibility)
func (*App) ValidateSCPs ¶
ValidateSCPs validates Service Control Policies
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 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 CapacityErrorHandler ¶
type CapacityErrorHandler struct{}
CapacityErrorHandler handles AWS capacity errors
func (*CapacityErrorHandler) CanHandle ¶
func (h *CapacityErrorHandler) CanHandle(errorMsg string) bool
type CommandFactory ¶
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 ComplianceActionsRenderer ¶
type ComplianceActionsRenderer struct{}
ComplianceActionsRenderer renders recommended actions section using Strategy Pattern (SOLID: Single Responsibility)
func NewComplianceActionsRenderer ¶
func NewComplianceActionsRenderer() *ComplianceActionsRenderer
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
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
type ComplianceServicesRenderer ¶
type ComplianceServicesRenderer struct{}
ComplianceServicesRenderer renders AWS services section using Strategy Pattern (SOLID: Single Responsibility)
func NewComplianceServicesRenderer ¶
func NewComplianceServicesRenderer() *ComplianceServicesRenderer
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
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 ¶
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
type CostAnalysis ¶
type CostAnalysis struct {
DailyCost float64
ListDailyCost float64
ActualSpend float64
CurrentCostPerMin float64
ListCostPerMin float64
RunningTime string
TypeIndicator string
Savings float64
SavingsPercent float64
}
CostAnalysis holds the result of cost calculations
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 CredentialsErrorHandler ¶
type CredentialsErrorHandler struct{}
CredentialsErrorHandler handles AWS credential errors
func (*CredentialsErrorHandler) CanHandle ¶
func (h *CredentialsErrorHandler) CanHandle(errorMsg string) bool
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
type DefaultErrorHandler ¶
type DefaultErrorHandler struct{}
DefaultErrorHandler handles unknown errors
func (*DefaultErrorHandler) CanHandle ¶
func (h *DefaultErrorHandler) CanHandle(errorMsg string) bool
type DefaultStateHandler ¶
type DefaultStateHandler struct{}
DefaultStateHandler handles unknown states
func (*DefaultStateHandler) CanHandle ¶
func (h *DefaultStateHandler) CanHandle(state string) bool
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 DryRunStateHandler ¶
type DryRunStateHandler struct{}
DryRunStateHandler handles dry-run state
func (*DryRunStateHandler) CanHandle ¶
func (h *DryRunStateHandler) CanHandle(state string) bool
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
type ErrorStateHandler ¶
type ErrorStateHandler struct{}
ErrorStateHandler handles error states (stopped, terminated)
func (*ErrorStateHandler) CanHandle ¶
func (h *ErrorStateHandler) CanHandle(state string) bool
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 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 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
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 IdleConfig ¶
IdleConfig represents the idle detection configuration
type IdleConfigParams ¶
type IdleConfigRetriever ¶
type IdleConfigRetriever struct{}
IdleConfigRetriever handles configuration retrieval using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleConfigRetriever ¶
func NewIdleConfigRetriever() *IdleConfigRetriever
func (*IdleConfigRetriever) GetConfiguration ¶
func (r *IdleConfigRetriever) GetConfiguration(publicIP string) (*IdleConfig, error)
type IdleConfigurationCommand ¶
type IdleConfigurationCommand struct {
// contains filtered or unexported fields
}
IdleConfigurationCommand handles idle detection configuration using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleConfigurationCommand ¶
func NewIdleConfigurationCommand(apiClient interface{}) *IdleConfigurationCommand
NewIdleConfigurationCommand creates a new idle configuration command
type IdleDisplayService ¶
type IdleDisplayService struct{}
IdleDisplayService handles configuration display using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleDisplayService ¶
func NewIdleDisplayService() *IdleDisplayService
func (*IdleDisplayService) ShowConfiguration ¶
func (s *IdleDisplayService) ShowConfiguration(instanceName string, instanceService *IdleInstanceService) error
type IdleInstanceInfo ¶
type IdleInstanceService ¶
type IdleInstanceService struct {
// contains filtered or unexported fields
}
IdleInstanceService handles instance operations using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleInstanceService ¶
func NewIdleInstanceService(apiClient interface{}) *IdleInstanceService
func (*IdleInstanceService) FindAndValidateInstance ¶
func (s *IdleInstanceService) FindAndValidateInstance(instanceName string) (*IdleInstanceInfo, error)
type IdleParameterService ¶
type IdleParameterService struct{}
IdleParameterService handles parameter conversion using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleParameterService ¶
func NewIdleParameterService() *IdleParameterService
func (*IdleParameterService) ConvertToConfigParams ¶
func (s *IdleParameterService) ConvertToConfigParams(enable, disable bool, idleMinutes, hibernateMinutes, checkInterval int) *IdleConfigParams
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 IdleScriptBuilder ¶
type IdleScriptBuilder struct{}
IdleScriptBuilder builds update scripts using Builder Pattern (SOLID: Single Responsibility)
func NewIdleScriptBuilder ¶
func NewIdleScriptBuilder() *IdleScriptBuilder
func (*IdleScriptBuilder) BuildUpdateScript ¶
func (b *IdleScriptBuilder) BuildUpdateScript(params *IdleConfigParams) string
type IdleUpdateService ¶
type IdleUpdateService struct{}
IdleUpdateService handles configuration updates using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleUpdateService ¶
func NewIdleUpdateService() *IdleUpdateService
func (*IdleUpdateService) UpdateConfiguration ¶
func (s *IdleUpdateService) UpdateConfiguration(publicIP string, params *IdleConfigParams) error
type IdleValidationService ¶
type IdleValidationService struct{}
IdleValidationService handles parameter validation using Strategy Pattern (SOLID: Single Responsibility)
func NewIdleValidationService ¶
func NewIdleValidationService() *IdleValidationService
func (*IdleValidationService) ShouldShowConfig ¶
func (s *IdleValidationService) ShouldShowConfig(enable, disable bool, idleMinutes, hibernateMinutes, checkInterval int) bool
func (*IdleValidationService) ValidateFlags ¶
func (s *IdleValidationService) ValidateFlags(enable, disable bool) 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 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 InitWizard ¶ added in v0.6.0
type InitWizard struct {
// contains filtered or unexported fields
}
InitWizard provides interactive first-time setup for Prism
func NewInitWizard ¶ added in v0.6.0
func NewInitWizard(config *Config) *InitWizard
NewInitWizard creates a new initialization wizard
func (*InitWizard) Run ¶ added in v0.6.0
func (iw *InitWizard) Run() error
Run executes the complete initialization wizard
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 InstanceStateHandler ¶
type InstanceStateHandler interface {
CanHandle(state string) bool
Handle(state string, elapsed int, instanceName string) (bool, error) // returns (shouldContinue, error)
}
InstanceStateHandler interface for handling different instance states (Strategy Pattern - SOLID)
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
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
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
type LaunchProgressMonitor ¶
type LaunchProgressMonitor struct {
// contains filtered or unexported fields
}
LaunchProgressMonitor manages package launch monitoring (Strategy Pattern - SOLID)
func NewLaunchProgressMonitor ¶
func NewLaunchProgressMonitor(apiClient client.PrismAPI, ctx context.Context) *LaunchProgressMonitor
NewLaunchProgressMonitor creates launch progress monitor
func (*LaunchProgressMonitor) Monitor ¶
func (m *LaunchProgressMonitor) Monitor(instanceName string) error
Monitor handles instance state monitoring using strategies
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
// Mock data
Instances []types.Instance
Templates map[string]types.Template
StorageVolumes []types.StorageVolume // Unified storage (EFS, EBS, S3)
Projects []types.Project
// Legacy idle fields removed - using new hibernation policy system
DaemonStatus *types.DaemonStatus
HibernationStatus *types.HibernationStatus
// Call tracking
LaunchCalls []types.LaunchRequest
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 (*MockAPIClient) AddProjectMember ¶
func (m *MockAPIClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) 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) AnalyzeRightsizing ¶
func (m *MockAPIClient) AnalyzeRightsizing(ctx context.Context, req types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
func (*MockAPIClient) ApplyIdlePolicy ¶
func (m *MockAPIClient) ApplyIdlePolicy(ctx context.Context, instanceName, policyID string) error
func (*MockAPIClient) ApplyTemplate ¶
func (m *MockAPIClient) ApplyTemplate(ctx context.Context, req templates.ApplyRequest) (*templates.ApplyResponse, error)
Template application operations
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 (*MockAPIClient) CloseInstanceTunnels ¶
func (m *MockAPIClient) CloseInstanceTunnels(_ context.Context, _ string) error
CloseInstanceTunnels closes all tunnels for a given instance
func (*MockAPIClient) CloseTunnel ¶
CloseTunnel closes a specific tunnel
func (*MockAPIClient) ConfigureThrottling ¶ added in v0.6.0
Throttling operations
func (*MockAPIClient) ConnectInstance ¶
func (*MockAPIClient) CreateAMI ¶
func (m *MockAPIClient) CreateAMI(ctx context.Context, request types.AMICreationRequest) (map[string]interface{}, error)
func (*MockAPIClient) CreateAMISnapshot ¶
func (*MockAPIClient) CreateAllocation ¶ added in v0.7.2
func (m *MockAPIClient) CreateAllocation(ctx context.Context, req project.CreateAllocationRequest) (*types.ProjectBudgetAllocation, error)
CreateAllocation creates a budget allocation for a project (mock)
func (*MockAPIClient) CreateBackup ¶
func (m *MockAPIClient) CreateBackup(ctx context.Context, req types.BackupCreateRequest) (*types.BackupCreateResult, error)
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 (m *MockAPIClient) CreateInstanceSnapshot(ctx context.Context, req types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
func (*MockAPIClient) CreateProject ¶
func (m *MockAPIClient) CreateProject(ctx context.Context, req project.CreateProjectRequest) (*types.Project, error)
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 ¶
func (m *MockAPIClient) CreateStorage(ctx context.Context, req types.StorageCreateRequest) (*types.StorageVolume, error)
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 ¶
func (m *MockAPIClient) CreateVolume(ctx context.Context, req types.VolumeCreateRequest) (*types.StorageVolume, error)
Volume operations (EFS)
func (*MockAPIClient) DeclineInvitation ¶ added in v0.5.11
func (m *MockAPIClient) DeclineInvitation(ctx context.Context, token string, reason string) (*client.InvitationActionResponse, error)
func (*MockAPIClient) DeleteAMISnapshot ¶
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) 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) DeleteProject ¶
func (m *MockAPIClient) DeleteProject(ctx context.Context, id string) error
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) 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 (m *MockAPIClient) DiffTemplate(ctx context.Context, req templates.DiffRequest) (*templates.TemplateDiff, error)
func (*MockAPIClient) DisableProjectBudget ¶
func (*MockAPIClient) DisableThrottling ¶ added in v0.6.0
func (m *MockAPIClient) DisableThrottling(ctx context.Context, scope string) 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 (*MockAPIClient) ForkMarketplaceTemplate ¶
func (*MockAPIClient) GetAMICosts ¶
func (*MockAPIClient) GetAMIStatus ¶
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) GetBackup ¶
func (m *MockAPIClient) GetBackup(ctx context.Context, backupID string) (*types.BackupInfo, error)
func (*MockAPIClient) GetBackupContents ¶
func (m *MockAPIClient) GetBackupContents(ctx context.Context, req types.BackupContentsRequest) (*types.BackupContentsResponse, error)
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 (*MockAPIClient) GetIdleHistory ¶
func (m *MockAPIClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)
func (*MockAPIClient) GetIdlePendingActions ¶
func (*MockAPIClient) GetIdlePolicy ¶
func (m *MockAPIClient) GetIdlePolicy(ctx context.Context, policyID string) (*idle.PolicyTemplate, error)
func (*MockAPIClient) GetIdleSavingsReport ¶
func (*MockAPIClient) GetInstance ¶
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 (*MockAPIClient) GetMarketplaceTrending ¶
func (m *MockAPIClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)
func (*MockAPIClient) GetPolicyStatus ¶
func (m *MockAPIClient) GetPolicyStatus(ctx context.Context) (*client.PolicyStatusResponse, error)
func (*MockAPIClient) GetProject ¶
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) 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) 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) GetProjectMembers ¶
func (m *MockAPIClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, 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) GetSharedToken ¶ added in v0.5.11
func (m *MockAPIClient) GetSharedToken(ctx context.Context, tokenID string) (*types.SharedInvitationToken, 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 (*MockAPIClient) GetThrottlingRemaining ¶ added in v0.6.0
func (*MockAPIClient) GetThrottlingStatus ¶ added in v0.6.0
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) HibernateInstance ¶
func (m *MockAPIClient) HibernateInstance(ctx context.Context, name string) error
func (*MockAPIClient) LaunchInstance ¶
func (m *MockAPIClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)
Instance operations
func (*MockAPIClient) ListAMISnapshots ¶
func (*MockAPIClient) ListBackups ¶
func (m *MockAPIClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)
func (*MockAPIClient) ListBudgets ¶ added in v0.7.2
ListBudgets lists all budgets (mock)
func (*MockAPIClient) ListIdlePolicies ¶
func (m *MockAPIClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)
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) ListPolicySets ¶
func (m *MockAPIClient) ListPolicySets(ctx context.Context) (*client.PolicySetsResponse, error)
func (*MockAPIClient) ListProjectThrottleOverrides ¶ added in v0.6.0
func (*MockAPIClient) ListProjects ¶
func (m *MockAPIClient) ListProjects(ctx context.Context, filter *project.ProjectFilter) (*project.ProjectListResponse, error)
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 ¶
Template operations
func (*MockAPIClient) ListTransfers ¶ added in v0.5.13
func (m *MockAPIClient) ListTransfers(ctx context.Context) ([]*storage.TransferProgress, error)
func (*MockAPIClient) ListTunnels ¶
func (m *MockAPIClient) ListTunnels(_ context.Context, _ string) (*client.ListTunnelsResponse, error)
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) 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) 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 (*MockAPIClient) PublishMarketplaceTemplate ¶
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 (m *MockAPIClient) RedeemSharedToken(ctx context.Context, req *types.RedeemSharedTokenRequest) (*types.RedeemSharedTokenResponse, error)
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) 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 (*MockAPIClient) RestoreAMIFromSnapshot ¶
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) SearchMarketplace ¶
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 (m *MockAPIClient) SendInvitation(ctx context.Context, projectID string, req client.SendInvitationRequest) (*client.SendInvitationResponse, 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) SetProjectThrottleOverride ¶ added in v0.6.0
func (*MockAPIClient) SetRegistryStatus ¶
func (m *MockAPIClient) SetRegistryStatus(ctx context.Context, active bool) error
func (*MockAPIClient) StartInstance ¶
func (m *MockAPIClient) StartInstance(ctx context.Context, name string) error
func (*MockAPIClient) StartTransfer ¶ added in v0.5.13
func (m *MockAPIClient) StartTransfer(ctx context.Context, req client.TransferRequest) (*client.TransferResponse, error)
Transfer operations (S3-backed file transfer)
func (*MockAPIClient) StopInstance ¶
func (m *MockAPIClient) StopInstance(ctx context.Context, name string) error
func (*MockAPIClient) TestAMIAvailability ¶
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) UpdateProjectMember ¶
func (m *MockAPIClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error
func (*MockAPIClient) VerifyBackup ¶
func (m *MockAPIClient) VerifyBackup(ctx context.Context, req types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
type NetworkConfigErrorHandler ¶
type NetworkConfigErrorHandler struct{}
NetworkConfigErrorHandler handles VPC/subnet errors
func (*NetworkConfigErrorHandler) CanHandle ¶
func (h *NetworkConfigErrorHandler) CanHandle(errorMsg string) bool
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
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 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 PendingStateHandler ¶
type PendingStateHandler struct{}
PendingStateHandler handles pending instance state
func (*PendingStateHandler) CanHandle ¶
func (h *PendingStateHandler) CanHandle(state string) bool
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
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
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
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 ¶
func (p *RepositoryConfigParser) Parse(args []string) (*RepositoryAddRequest, error)
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 ResearchArea ¶ added in v0.6.0
type ResearchArea struct {
Name string
Description string
RecommendedPolicy string // Idle detection policy
RecommendedTemplates []string // Template names to suggest
}
ResearchArea represents a research domain
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
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 RunningStateHandler ¶
type RunningStateHandler struct {
// contains filtered or unexported fields
}
RunningStateHandler handles running instance state with setup monitoring
func (*RunningStateHandler) CanHandle ¶
func (h *RunningStateHandler) CanHandle(state string) bool
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 SecurityGroupErrorHandler ¶
type SecurityGroupErrorHandler struct{}
SecurityGroupErrorHandler handles security group access errors
func (*SecurityGroupErrorHandler) CanHandle ¶
func (h *SecurityGroupErrorHandler) CanHandle(errorMsg string) bool
type ServiceDiff ¶
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 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 ¶
NewSpinner creates a new spinner with the given message
func (*Spinner) StopWithMessage ¶
StopWithMessage stops the spinner and prints a final message
func (*Spinner) UpdateMessage ¶
UpdateMessage updates the spinner message while it's running
func (*Spinner) WithFrames ¶
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 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 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 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 ¶
func (p *TemplateApplyArgParser) Parse(args []string) (*TemplateApplyConfig, error)
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 ¶
func (p *TemplateDiffArgParser) Parse(args []string) (*TemplateDiffConfig, error)
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 ¶
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
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 ¶
func (p *TemplateSnapshotArgParser) Parse(args []string) (*TemplateSnapshotConfig, error)
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 ¶
func (s *TemplateSnapshotValidationService) ValidateInstance(config *TemplateSnapshotConfig) (*types.Instance, error)
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
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 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 ValidationErrorHandler ¶
type ValidationErrorHandler struct{}
ValidationErrorHandler handles validation errors
func (*ValidationErrorHandler) CanHandle ¶
func (h *ValidationErrorHandler) CanHandle(errorMsg string) bool
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
type WebAccessErrorHandler ¶
type WebAccessErrorHandler struct{}
WebAccessErrorHandler handles web interface access issues
func (*WebAccessErrorHandler) CanHandle ¶
func (h *WebAccessErrorHandler) CanHandle(errorMsg string) bool
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 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 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
Source Files
¶
- about.go
- admin_commands.go
- ami.go
- ami_cobra.go
- app.go
- backup_impl.go
- batch_config.go
- budget_commands.go
- commands.go
- config.go
- constants.go
- daemon_cobra.go
- errors.go
- export.go
- gui.go
- health_commands.go
- idle_cobra.go
- idle_configure.go
- init_cobra.go
- init_wizard.go
- instance_impl.go
- invitation_cobra.go
- invitation_impl.go
- keys_cobra.go
- logs_commands.go
- marketplace.go
- marketplace_cobra.go
- mock_api_client.go
- policy_cobra.go
- profile_wizard.go
- profiles.go
- progress.go
- project_cobra.go
- quota_commands.go
- rate_limit_cobra.go
- repo.go
- repo_cobra.go
- research_user_cobra.go
- rightsizing_cobra.go
- root_command.go
- scaling_impl.go
- security.go
- shared_token_cobra.go
- shared_token_impl.go
- sleepwake_cobra.go
- snapshot_impl.go
- storage_cobra.go
- storage_impl.go
- system_impl.go
- template.go
- template_apply.go
- template_impl.go
- templates_cobra.go
- throttling_cobra.go
- tui.go
- user_commands.go
- version.go
- web_commands.go
- workspace_commands.go
- zombies_cobra.go