Documentation
¶
Overview ¶
Package client provides the Prism API client implementation
Package client provides the Prism API client interface and implementation.
Package client provides invitation API methods for Prism v0.5.11+
Index ¶
- Variables
- func GetProfileFromContext(ctx context.Context) (string, bool)
- func SetProfileInContext(ctx context.Context, profileID string) context.Context
- type AMIReferenceResponse
- type AuthStatusResponse
- type CreateTunnelsRequest
- type CreateTunnelsResponse
- type ExtendedOptions
- type GetInvitationResponse
- type HTTPClient
- func (c *HTTPClient) AcceptInvitation(ctx context.Context, token string) (*InvitationActionResponse, error)
- func (c *HTTPClient) AddMarketplaceReview(ctx context.Context, templateID string, review map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) error
- func (c *HTTPClient) AllowProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (c *HTTPClient) AnalyzeRightsizing(ctx context.Context, req types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
- func (c *HTTPClient) ApplyIdlePolicy(ctx context.Context, instanceName string, policyID string) error
- func (c *HTTPClient) ApplyTemplate(ctx context.Context, req templates.ApplyRequest) (*templates.ApplyResponse, error)
- func (c *HTTPClient) AssignPolicySet(ctx context.Context, policySet string) (*PolicyAssignResponse, error)
- func (c *HTTPClient) AttachStorage(ctx context.Context, storageName, instanceName string) error
- func (c *HTTPClient) AttachVolume(ctx context.Context, volumeName, instanceName string) error
- func (c *HTTPClient) CheckAMIFreshness(ctx context.Context) (map[string]interface{}, error)
- func (c *HTTPClient) CheckTemplateAccess(ctx context.Context, templateName string) (*PolicyCheckResponse, error)
- func (c *HTTPClient) CheckVersionCompatibility(ctx context.Context, clientVersion string) error
- func (c *HTTPClient) CleanupAMIs(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) CloseInstanceTunnels(ctx context.Context, instanceName string) error
- func (c *HTTPClient) CloseTunnel(ctx context.Context, instanceName string, serviceName string) error
- func (c *HTTPClient) ConnectInstance(ctx context.Context, name string) (string, error)
- func (c *HTTPClient) CreateAMI(ctx context.Context, request types.AMICreationRequest) (map[string]interface{}, error)
- func (c *HTTPClient) CreateAMISnapshot(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) CreateBackup(ctx context.Context, req types.BackupCreateRequest) (*types.BackupCreateResult, error)
- func (c *HTTPClient) CreateInstanceSnapshot(ctx context.Context, req types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
- func (c *HTTPClient) CreateProject(ctx context.Context, req project.CreateProjectRequest) (*types.Project, error)
- func (c *HTTPClient) CreateSharedToken(ctx context.Context, projectID string, req *types.CreateSharedTokenRequest) (*types.SharedInvitationToken, error)
- func (c *HTTPClient) CreateStorage(ctx context.Context, req types.StorageCreateRequest) (*types.StorageVolume, error)
- func (c *HTTPClient) CreateTunnels(ctx context.Context, instanceName string, services []string) (*CreateTunnelsResponse, error)
- func (c *HTTPClient) CreateVolume(ctx context.Context, req types.VolumeCreateRequest) (*types.StorageVolume, error)
- func (c *HTTPClient) DeclineInvitation(ctx context.Context, token string, reason string) (*InvitationActionResponse, error)
- func (c *HTTPClient) DeleteAMI(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) DeleteAMISnapshot(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) DeleteBackup(ctx context.Context, backupName string) (*types.BackupDeleteResult, error)
- func (c *HTTPClient) DeleteInstance(ctx context.Context, name string) error
- func (c *HTTPClient) DeleteInstanceSnapshot(ctx context.Context, snapshotName string) (*types.InstanceSnapshotDeleteResult, error)
- func (c *HTTPClient) DeleteProject(ctx context.Context, projectID string) error
- func (c *HTTPClient) DeleteStorage(ctx context.Context, name string) error
- func (c *HTTPClient) DeleteVolume(ctx context.Context, name string) error
- func (c *HTTPClient) DetachStorage(ctx context.Context, storageName string) error
- func (c *HTTPClient) DetachVolume(ctx context.Context, volumeName string) error
- func (c *HTTPClient) DiffTemplate(ctx context.Context, req templates.DiffRequest) (*templates.TemplateDiff, error)
- func (c *HTTPClient) DisableProjectBudget(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (c *HTTPClient) ExecInstance(ctx context.Context, instanceName string, execRequest types.ExecRequest) (*types.ExecResult, error)
- func (c *HTTPClient) ExecuteIdleActions(ctx context.Context) (*types.IdleExecutionResponse, error)
- func (c *HTTPClient) ExportRightsizingData(ctx context.Context, instanceName string) ([]types.InstanceMetrics, error)
- func (c *HTTPClient) ExtendSharedToken(ctx context.Context, token string, addDays int) error
- func (c *HTTPClient) ForkMarketplaceTemplate(ctx context.Context, templateID string, fork map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) GenerateAPIKey(ctx context.Context) (*types.AuthResponse, error)
- func (c *HTTPClient) GetAMICosts(ctx context.Context, templateName string) (map[string]interface{}, error)
- func (c *HTTPClient) GetAMIStatus(ctx context.Context, creationID string) (map[string]interface{}, error)
- func (c *HTTPClient) GetAPIKey() string
- func (c *HTTPClient) GetAuthStatus(ctx context.Context) (*AuthStatusResponse, error)
- func (c *HTTPClient) GetBackup(ctx context.Context, backupName string) (*types.BackupInfo, error)
- func (c *HTTPClient) GetBackupContents(ctx context.Context, req types.BackupContentsRequest) (*types.BackupContentsResponse, error)
- func (c *HTTPClient) GetCostTrends(ctx context.Context, projectID, period string) (map[string]interface{}, error)
- func (c *HTTPClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)
- func (c *HTTPClient) GetIdlePendingActions(ctx context.Context) ([]types.IdleState, error)
- func (c *HTTPClient) GetIdlePolicy(ctx context.Context, policyID string) (*idle.PolicyTemplate, error)
- func (c *HTTPClient) GetIdleSavingsReport(ctx context.Context, period string) (map[string]interface{}, error)
- func (c *HTTPClient) GetInstance(ctx context.Context, name string) (*types.Instance, error)
- func (c *HTTPClient) GetInstanceHibernationStatus(ctx context.Context, name string) (*types.HibernationStatus, error)
- func (c *HTTPClient) GetInstanceIdlePolicies(ctx context.Context, instanceName string) ([]*idle.PolicyTemplate, error)
- func (c *HTTPClient) GetInstanceLayers(ctx context.Context, instanceName string) ([]templates.AppliedTemplate, error)
- func (c *HTTPClient) GetInstanceLogTypes(ctx context.Context, instanceName string) (*types.LogTypesResponse, error)
- func (c *HTTPClient) GetInstanceLogs(ctx context.Context, instanceName string, logRequest types.LogRequest) (*types.LogResponse, error)
- func (c *HTTPClient) GetInstanceMetrics(ctx context.Context, instanceName string, limit int) ([]types.InstanceMetrics, error)
- func (c *HTTPClient) GetInstanceSnapshot(ctx context.Context, snapshotName string) (*types.InstanceSnapshotInfo, error)
- func (c *HTTPClient) GetInvitationByToken(ctx context.Context, token string) (*GetInvitationResponse, error)
- func (c *HTTPClient) GetLogsSummary(ctx context.Context) (*types.LogSummaryResponse, error)
- func (c *HTTPClient) GetMarketplaceFeatured(ctx context.Context) (map[string]interface{}, error)
- func (c *HTTPClient) GetMarketplaceTemplate(ctx context.Context, templateID string) (map[string]interface{}, error)
- func (c *HTTPClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)
- func (c *HTTPClient) GetPolicyStatus(ctx context.Context) (*PolicyStatusResponse, error)
- func (c *HTTPClient) GetProject(ctx context.Context, projectID string) (*types.Project, error)
- func (c *HTTPClient) GetProjectBudgetStatus(ctx context.Context, projectID string) (*project.BudgetStatus, error)
- func (c *HTTPClient) GetProjectCostBreakdown(ctx context.Context, projectID string, startDate, endDate time.Time) (*types.ProjectCostBreakdown, error)
- func (c *HTTPClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, error)
- func (c *HTTPClient) GetProjectResourceUsage(ctx context.Context, projectID string, period time.Duration) (*types.ProjectResourceUsage, error)
- func (c *HTTPClient) GetRegistryStatus(ctx context.Context) (*RegistryStatusResponse, error)
- func (c *HTTPClient) GetRestoreStatus(ctx context.Context, restoreID string) (*types.RestoreResult, error)
- func (c *HTTPClient) GetRightsizingRecommendations(ctx context.Context) (*types.RightsizingRecommendationsResponse, error)
- func (c *HTTPClient) GetRightsizingStats(ctx context.Context, instanceName string) (*types.RightsizingStatsResponse, error)
- func (c *HTTPClient) GetRightsizingSummary(ctx context.Context) (*types.RightsizingSummaryResponse, error)
- func (c *HTTPClient) GetSharedToken(ctx context.Context, token string) (*types.SharedInvitationToken, error)
- func (c *HTTPClient) GetStatus(ctx context.Context) (*types.DaemonStatus, error)
- func (c *HTTPClient) GetStorage(ctx context.Context, name string) (*types.StorageVolume, error)
- func (c *HTTPClient) GetTemplate(ctx context.Context, name string) (*types.Template, error)
- func (c *HTTPClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)
- func (c *HTTPClient) HibernateInstance(ctx context.Context, name string) error
- func (c *HTTPClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)
- func (c *HTTPClient) ListAMISnapshots(ctx context.Context, filters map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)
- func (c *HTTPClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)
- func (c *HTTPClient) ListInstanceSnapshots(ctx context.Context) (*types.InstanceSnapshotListResponse, error)
- func (c *HTTPClient) ListInstances(ctx context.Context) (*types.ListResponse, error)
- func (c *HTTPClient) ListInstancesWithRefresh(ctx context.Context, refresh bool) (*types.ListResponse, error)
- func (c *HTTPClient) ListPolicySets(ctx context.Context) (*PolicySetsResponse, error)
- func (c *HTTPClient) ListProjects(ctx context.Context, filter *project.ProjectFilter) (*project.ProjectListResponse, error)
- func (c *HTTPClient) ListRestoreOperations(ctx context.Context) ([]types.RestoreResult, error)
- func (c *HTTPClient) ListSharedTokens(ctx context.Context, projectID string) ([]*types.SharedInvitationToken, error)
- func (c *HTTPClient) ListStorage(ctx context.Context) ([]*types.StorageVolume, error)
- func (c *HTTPClient) ListTemplateAMIs(ctx context.Context, templateName string) ([]AMIReferenceResponse, error)
- func (c *HTTPClient) ListTemplates(ctx context.Context) (map[string]types.Template, error)
- func (c *HTTPClient) ListTunnels(ctx context.Context, instanceName string) (*ListTunnelsResponse, error)
- func (c *HTTPClient) ListUserAMIs(ctx context.Context) (map[string]interface{}, error)
- func (c *HTTPClient) ListVolumes(ctx context.Context) ([]*types.StorageVolume, error)
- func (c *HTTPClient) LookupAMI(ctx context.Context, templateName, region, architecture string) (*AMIReferenceResponse, error)
- func (c *HTTPClient) MakeRequest(method, path string, body interface{}) ([]byte, error)
- func (c *HTTPClient) MountVolume(ctx context.Context, volumeName, instanceName, mountPoint string) error
- func (c *HTTPClient) Ping(ctx context.Context) error
- func (c *HTTPClient) PreventProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (c *HTTPClient) PreviewAMIResolution(ctx context.Context, templateName string) (map[string]interface{}, error)
- func (c *HTTPClient) PublishMarketplaceTemplate(ctx context.Context, template map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) RecommendIdlePolicy(ctx context.Context, instanceName string) (*idle.PolicyTemplate, error)
- func (c *HTTPClient) RedeemSharedToken(ctx context.Context, req *types.RedeemSharedTokenRequest) (*types.RedeemSharedTokenResponse, error)
- func (c *HTTPClient) RemoveIdlePolicy(ctx context.Context, instanceName string, policyID string) error
- func (c *HTTPClient) RemoveProjectMember(ctx context.Context, projectID, userID string) error
- func (c *HTTPClient) ResizeInstance(ctx context.Context, resizeRequest types.ResizeRequest) (*types.ResizeResponse, error)
- func (c *HTTPClient) ResolveAMI(ctx context.Context, templateName string, params map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) RestoreAMIFromSnapshot(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) RestoreBackup(ctx context.Context, req types.RestoreRequest) (*types.RestoreResult, error)
- func (c *HTTPClient) RestoreInstanceFromSnapshot(ctx context.Context, snapshotName string, req types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)
- func (c *HTTPClient) ResumeInstance(ctx context.Context, name string) error
- func (c *HTTPClient) RevokeAPIKey(ctx context.Context) error
- func (c *HTTPClient) RevokeSharedToken(ctx context.Context, token string) error
- func (c *HTTPClient) RollbackInstance(ctx context.Context, req types.RollbackRequest) error
- func (c *HTTPClient) SearchMarketplace(ctx context.Context, query map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) SendBulkInvitation(ctx context.Context, projectID string, req *types.BulkInvitationRequest) (*types.BulkInvitationResponse, error)
- func (c *HTTPClient) SendInvitation(ctx context.Context, projectID string, req SendInvitationRequest) (*SendInvitationResponse, error)
- func (c *HTTPClient) SetAPIKey(apiKey string)
- func (c *HTTPClient) SetOptions(opts Options)
- func (c *HTTPClient) SetPolicyEnforcement(ctx context.Context, enabled bool) (*PolicyEnforcementResponse, error)
- func (c *HTTPClient) SetProjectBudget(ctx context.Context, projectID string, req SetProjectBudgetRequest) (map[string]interface{}, error)
- func (c *HTTPClient) SetRegistryStatus(ctx context.Context, active bool) error
- func (c *HTTPClient) Shutdown(ctx context.Context) error
- func (c *HTTPClient) StartInstance(ctx context.Context, name string) error
- func (c *HTTPClient) StopInstance(ctx context.Context, name string) error
- func (c *HTTPClient) TestAMIAvailability(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
- func (c *HTTPClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error
- func (c *HTTPClient) UpdateProject(ctx context.Context, projectID string, req project.UpdateProjectRequest) (*types.Project, error)
- func (c *HTTPClient) UpdateProjectBudget(ctx context.Context, projectID string, req UpdateProjectBudgetRequest) (map[string]interface{}, error)
- func (c *HTTPClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error
- func (c *HTTPClient) VerifyBackup(ctx context.Context, req types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
- type InvitationActionResponse
- type ListTunnelsResponse
- type MockClient
- func (m *MockClient) AddInstance(name string, instance *types.Instance)
- func (m *MockClient) AddMarketplaceReview(ctx context.Context, templateID string, review map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) error
- func (m *MockClient) AddTemplate(name string, template types.Template)
- func (m *MockClient) AnalyzeRightsizing(ctx context.Context, req types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
- func (m *MockClient) ApplyIdlePolicy(ctx context.Context, instanceID, policyID string) error
- func (m *MockClient) ApplyTemplate(ctx context.Context, req templates.ApplyRequest) (*templates.ApplyResponse, error)
- func (m *MockClient) AssignPolicySet(ctx context.Context, setID string) (*PolicyAssignResponse, error)
- func (m *MockClient) AttachStorage(ctx context.Context, storageName, instanceName string) error
- func (m *MockClient) AttachVolume(ctx context.Context, volumeName, instanceName string) error
- func (m *MockClient) CheckTemplateAccess(ctx context.Context, templateName string) (*PolicyCheckResponse, error)
- func (m *MockClient) CheckVersionCompatibility(ctx context.Context, version string) error
- func (m *MockClient) CleanupAMIs(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) ConnectInstance(ctx context.Context, name string) (string, error)
- func (m *MockClient) CreateAMI(ctx context.Context, req types.AMICreationRequest) (map[string]interface{}, error)
- func (m *MockClient) CreateAMISnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) CreateBackup(ctx context.Context, req types.BackupCreateRequest) (*types.BackupCreateResult, error)
- func (m *MockClient) CreateInstanceSnapshot(ctx context.Context, req types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
- func (m *MockClient) CreateProject(ctx context.Context, req project.CreateProjectRequest) (*types.Project, error)
- func (m *MockClient) CreateStorage(ctx context.Context, req types.StorageCreateRequest) (*types.StorageVolume, error)
- func (m *MockClient) CreateVolume(ctx context.Context, req types.VolumeCreateRequest) (*types.StorageVolume, error)
- func (m *MockClient) DeleteAMI(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) DeleteAMISnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) DeleteBackup(ctx context.Context, backupID string) (*types.BackupDeleteResult, error)
- func (m *MockClient) DeleteInstance(ctx context.Context, name string) error
- func (m *MockClient) DeleteInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotDeleteResult, error)
- func (m *MockClient) DeleteProject(ctx context.Context, id string) error
- func (m *MockClient) DeleteStorage(ctx context.Context, name string) error
- func (m *MockClient) DeleteVolume(ctx context.Context, name string) error
- func (m *MockClient) DetachStorage(ctx context.Context, storageName string) error
- func (m *MockClient) DetachVolume(ctx context.Context, volumeName string) error
- func (m *MockClient) DiffTemplate(ctx context.Context, req templates.DiffRequest) (*templates.TemplateDiff, error)
- func (m *MockClient) DisableProjectBudget(ctx context.Context, projectID string) (map[string]interface{}, error)
- func (m *MockClient) ExecInstance(ctx context.Context, instanceName string, execRequest types.ExecRequest) (*types.ExecResult, error)
- func (m *MockClient) ExecuteIdleActions(ctx context.Context) (*types.IdleExecutionResponse, error)
- func (m *MockClient) ExportRightsizingData(ctx context.Context, format string) ([]types.InstanceMetrics, error)
- func (m *MockClient) ForkMarketplaceTemplate(ctx context.Context, templateID string, fork map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) GetAMICosts(ctx context.Context, amiID string) (map[string]interface{}, error)
- func (m *MockClient) GetAMIStatus(ctx context.Context, amiID string) (map[string]interface{}, error)
- func (m *MockClient) GetBackup(ctx context.Context, backupID string) (*types.BackupInfo, error)
- func (m *MockClient) GetBackupContents(ctx context.Context, req types.BackupContentsRequest) (*types.BackupContentsResponse, error)
- func (m *MockClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)
- func (m *MockClient) GetIdlePendingActions(ctx context.Context) ([]types.IdleState, error)
- func (m *MockClient) GetIdlePolicy(ctx context.Context, id string) (*idle.PolicyTemplate, error)
- func (m *MockClient) GetIdleSavingsReport(ctx context.Context, instanceID string) (map[string]interface{}, error)
- func (m *MockClient) GetInstance(ctx context.Context, name string) (*types.Instance, error)
- func (m *MockClient) GetInstanceHibernationStatus(ctx context.Context, name string) (*types.HibernationStatus, error)
- func (m *MockClient) GetInstanceIdlePolicies(ctx context.Context, instanceID string) ([]*idle.PolicyTemplate, error)
- func (m *MockClient) GetInstanceLayers(ctx context.Context, name string) ([]templates.AppliedTemplate, error)
- func (m *MockClient) GetInstanceLogTypes(ctx context.Context, name string) (*types.LogTypesResponse, error)
- func (m *MockClient) GetInstanceLogs(ctx context.Context, name string, req types.LogRequest) (*types.LogResponse, error)
- func (m *MockClient) GetInstanceMetrics(ctx context.Context, instanceID string, days int) ([]types.InstanceMetrics, error)
- func (m *MockClient) GetInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotInfo, error)
- func (m *MockClient) GetLogsSummary(ctx context.Context) (*types.LogSummaryResponse, error)
- func (m *MockClient) GetMarketplaceFeatured(ctx context.Context) (map[string]interface{}, error)
- func (m *MockClient) GetMarketplaceTemplate(ctx context.Context, templateID string) (map[string]interface{}, error)
- func (m *MockClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)
- func (m *MockClient) GetPolicyStatus(ctx context.Context) (*PolicyStatusResponse, error)
- func (m *MockClient) GetProject(ctx context.Context, id string) (*types.Project, error)
- func (m *MockClient) GetProjectBudgetStatus(ctx context.Context, projectID string) (*project.BudgetStatus, error)
- func (m *MockClient) GetProjectCostBreakdown(ctx context.Context, projectID string, start, end time.Time) (*types.ProjectCostBreakdown, error)
- func (m *MockClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, error)
- func (m *MockClient) GetProjectResourceUsage(ctx context.Context, projectID string, duration time.Duration) (*types.ProjectResourceUsage, error)
- func (m *MockClient) GetRegistryStatus(ctx context.Context) (*RegistryStatusResponse, error)
- func (m *MockClient) GetRestoreStatus(ctx context.Context, restoreID string) (*types.RestoreResult, error)
- func (m *MockClient) GetRightsizingRecommendations(ctx context.Context) (*types.RightsizingRecommendationsResponse, error)
- func (m *MockClient) GetRightsizingStats(ctx context.Context, instanceID string) (*types.RightsizingStatsResponse, error)
- func (m *MockClient) GetRightsizingSummary(ctx context.Context) (*types.RightsizingSummaryResponse, error)
- func (m *MockClient) GetStatus(ctx context.Context) (*types.DaemonStatus, error)
- func (m *MockClient) GetStorage(ctx context.Context, name string) (*types.StorageVolume, error)
- func (m *MockClient) GetTemplate(ctx context.Context, name string) (*types.Template, error)
- func (m *MockClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)
- func (m *MockClient) HibernateInstance(ctx context.Context, name string) error
- func (m *MockClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)
- func (m *MockClient) ListAMISnapshots(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)
- func (m *MockClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)
- func (m *MockClient) ListInstanceSnapshots(ctx context.Context) (*types.InstanceSnapshotListResponse, error)
- func (m *MockClient) ListInstances(ctx context.Context) (*types.ListResponse, error)
- func (m *MockClient) ListInstancesWithRefresh(ctx context.Context, refresh bool) (*types.ListResponse, error)
- func (m *MockClient) ListPolicySets(ctx context.Context) (*PolicySetsResponse, error)
- func (m *MockClient) ListProjects(ctx context.Context, filter *project.ProjectFilter) (*project.ProjectListResponse, error)
- func (m *MockClient) ListRestoreOperations(ctx context.Context) ([]types.RestoreResult, error)
- func (m *MockClient) ListStorage(ctx context.Context) ([]*types.StorageVolume, error)
- func (m *MockClient) ListTemplateAMIs(ctx context.Context, templateName string) ([]AMIReferenceResponse, error)
- func (m *MockClient) ListTemplates(ctx context.Context) (map[string]types.Template, error)
- func (m *MockClient) ListUserAMIs(ctx context.Context) (map[string]interface{}, error)
- func (m *MockClient) ListVolumes(ctx context.Context) ([]*types.StorageVolume, error)
- func (m *MockClient) LookupAMI(ctx context.Context, templateName, region, architecture string) (*AMIReferenceResponse, error)
- func (m *MockClient) MakeRequest(method, path string, body interface{}) ([]byte, error)
- func (m *MockClient) MountVolume(ctx context.Context, volumeName, instanceName, mountPoint string) error
- func (m *MockClient) Ping(ctx context.Context) error
- func (m *MockClient) PreviewAMIResolution(ctx context.Context, templateName string) (map[string]interface{}, error)
- func (m *MockClient) PublishMarketplaceTemplate(ctx context.Context, template map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) RecommendIdlePolicy(ctx context.Context, instanceID string) (*idle.PolicyTemplate, error)
- func (m *MockClient) RemoveIdlePolicy(ctx context.Context, instanceID, policyID string) error
- func (m *MockClient) RemoveProjectMember(ctx context.Context, projectID, userID string) error
- func (m *MockClient) ResizeInstance(ctx context.Context, req types.ResizeRequest) (*types.ResizeResponse, error)
- func (m *MockClient) ResolveAMI(ctx context.Context, templateName string, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) RestoreAMIFromSnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) RestoreBackup(ctx context.Context, req types.RestoreRequest) (*types.RestoreResult, error)
- func (m *MockClient) RestoreInstanceFromSnapshot(ctx context.Context, snapshotID string, req types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)
- func (m *MockClient) ResumeInstance(ctx context.Context, name string) error
- func (m *MockClient) RollbackInstance(ctx context.Context, req types.RollbackRequest) error
- func (m *MockClient) SearchMarketplace(ctx context.Context, query map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) SetOptions(opts Options)
- func (m *MockClient) SetPingError(err error)
- func (m *MockClient) SetPolicyEnforcement(ctx context.Context, enabled bool) (*PolicyEnforcementResponse, error)
- func (m *MockClient) SetProjectBudget(ctx context.Context, projectID string, req SetProjectBudgetRequest) (map[string]interface{}, error)
- func (m *MockClient) SetRegistryStatus(ctx context.Context, active bool) error
- func (m *MockClient) Shutdown(ctx context.Context) error
- func (m *MockClient) StartInstance(ctx context.Context, name string) error
- func (m *MockClient) StopInstance(ctx context.Context, name string) error
- func (m *MockClient) TestAMIAvailability(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (m *MockClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error
- func (m *MockClient) UpdateProject(ctx context.Context, id string, req project.UpdateProjectRequest) (*types.Project, error)
- func (m *MockClient) UpdateProjectBudget(ctx context.Context, projectID string, req UpdateProjectBudgetRequest) (map[string]interface{}, error)
- func (m *MockClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error
- func (m *MockClient) VerifyBackup(ctx context.Context, req types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
- type Options
- type PerformanceOptions
- type PolicyAssignResponse
- type PolicyCheckResponse
- type PolicyEnforcementResponse
- type PolicySetInfo
- type PolicySetsResponse
- type PolicyStatusResponse
- type PrismAPI
- type RegistryStatusResponse
- type SendInvitationRequest
- type SendInvitationResponse
- type SetProjectBudgetRequest
- type TunnelInfo
- type UpdateProjectBudgetRequest
Constants ¶
This section is empty.
Variables ¶
var ProfileContextKey = profileContextKey{}
ProfileContextKey is used to access profile information in context
Functions ¶
func GetProfileFromContext ¶
GetProfileFromContext extracts profile information from context
Types ¶
type AMIReferenceResponse ¶
type AMIReferenceResponse struct {
// AMIID is the AMI identifier
AMIID string `json:"ami_id"`
// Region is the AWS region where the AMI is located
Region string `json:"region"`
// Architecture is the AMI architecture (x86_64 or arm64)
Architecture string `json:"architecture"`
// TemplateName is the name of the template this AMI was built from
TemplateName string `json:"template_name"`
// Version is the semantic version of the template
Version string `json:"version"`
// BuildDate is when the AMI was built
BuildDate time.Time `json:"build_date"`
// Status is the current status of the AMI
Status string `json:"status"`
// Tags contains metadata tags for the AMI
Tags map[string]string `json:"tags,omitempty"`
}
AMIReferenceResponse represents an AMI reference response
type AuthStatusResponse ¶
type AuthStatusResponse struct {
AuthEnabled bool `json:"auth_enabled"`
Authenticated bool `json:"authenticated"`
CreatedAt time.Time `json:"created_at"`
}
AuthStatusResponse represents the authentication status response
type CreateTunnelsRequest ¶
type CreateTunnelsRequest struct {
InstanceName string `json:"instance_name"`
Services []string `json:"services,omitempty"` // If empty, create all
}
CreateTunnelsRequest is the request to create tunnels
type CreateTunnelsResponse ¶
type CreateTunnelsResponse struct {
Tunnels []TunnelInfo `json:"tunnels"`
Message string `json:"message"`
}
CreateTunnelsResponse is the response from creating tunnels
type ExtendedOptions ¶
type ExtendedOptions struct {
// AWS configuration
AWSProfile string
AWSRegion string
// Invitation details
InvitationToken string
OwnerAccount string
S3ConfigPath string
// Profile information
ProfileID string
}
ExtendedOptions extends the basic Options with additional fields
type GetInvitationResponse ¶ added in v0.5.11
type GetInvitationResponse struct {
Invitation *types.Invitation `json:"invitation"`
Project *types.Project `json:"project"`
}
GetInvitationResponse represents the response from GetInvitationByToken
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient provides an HTTP-based implementation of PrismAPI
func (*HTTPClient) AcceptInvitation ¶ added in v0.5.11
func (c *HTTPClient) AcceptInvitation(ctx context.Context, token string) (*InvitationActionResponse, error)
AcceptInvitation accepts an invitation POST /api/v1/invitations/{token}/accept
func (*HTTPClient) AddMarketplaceReview ¶
func (c *HTTPClient) AddMarketplaceReview(ctx context.Context, templateID string, review map[string]interface{}) (map[string]interface{}, error)
AddMarketplaceReview adds a review for a marketplace template
func (*HTTPClient) AddProjectMember ¶
func (c *HTTPClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) error
AddProjectMember adds a member to a project
func (*HTTPClient) AllowProjectLaunches ¶ added in v0.5.9
func (c *HTTPClient) AllowProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)
AllowProjectLaunches allows instance launches for a project
func (*HTTPClient) AnalyzeRightsizing ¶
func (c *HTTPClient) AnalyzeRightsizing(ctx context.Context, req types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
AnalyzeRightsizing performs rightsizing analysis for a specific instance
func (*HTTPClient) ApplyIdlePolicy ¶
func (c *HTTPClient) ApplyIdlePolicy(ctx context.Context, instanceName string, policyID string) error
ApplyIdlePolicy applies an idle policy to an instance
func (*HTTPClient) ApplyTemplate ¶
func (c *HTTPClient) ApplyTemplate(ctx context.Context, req templates.ApplyRequest) (*templates.ApplyResponse, error)
func (*HTTPClient) AssignPolicySet ¶
func (c *HTTPClient) AssignPolicySet(ctx context.Context, policySet string) (*PolicyAssignResponse, error)
AssignPolicySet assigns a policy set to the current user
func (*HTTPClient) AttachStorage ¶
func (c *HTTPClient) AttachStorage(ctx context.Context, storageName, instanceName string) error
func (*HTTPClient) AttachVolume ¶
func (c *HTTPClient) AttachVolume(ctx context.Context, volumeName, instanceName string) error
func (*HTTPClient) CheckAMIFreshness ¶
func (c *HTTPClient) CheckAMIFreshness(ctx context.Context) (map[string]interface{}, error)
CheckAMIFreshness checks static AMI IDs against latest SSM versions (v0.5.4 - Universal Version System)
func (*HTTPClient) CheckTemplateAccess ¶
func (c *HTTPClient) CheckTemplateAccess(ctx context.Context, templateName string) (*PolicyCheckResponse, error)
CheckTemplateAccess checks if a template is accessible under current policies
func (*HTTPClient) CheckVersionCompatibility ¶
func (c *HTTPClient) CheckVersionCompatibility(ctx context.Context, clientVersion string) error
CheckVersionCompatibility verifies that the client and daemon versions are compatible
func (*HTTPClient) CleanupAMIs ¶
func (c *HTTPClient) CleanupAMIs(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
CleanupAMIs removes old and unused AMIs
func (*HTTPClient) CloseInstanceTunnels ¶
func (c *HTTPClient) CloseInstanceTunnels(ctx context.Context, instanceName string) error
CloseInstanceTunnels closes all tunnels for an instance (convenience method)
func (*HTTPClient) CloseTunnel ¶
func (c *HTTPClient) CloseTunnel(ctx context.Context, instanceName string, serviceName string) error
CloseTunnel closes a specific tunnel or all tunnels for an instance
func (*HTTPClient) ConnectInstance ¶
ConnectInstance gets connection information for an instance
func (*HTTPClient) CreateAMI ¶
func (c *HTTPClient) CreateAMI(ctx context.Context, request types.AMICreationRequest) (map[string]interface{}, error)
CreateAMI creates an AMI from a running instance
func (*HTTPClient) CreateAMISnapshot ¶
func (c *HTTPClient) CreateAMISnapshot(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
CreateAMISnapshot creates a snapshot from an instance
func (*HTTPClient) CreateBackup ¶
func (c *HTTPClient) CreateBackup(ctx context.Context, req types.BackupCreateRequest) (*types.BackupCreateResult, error)
CreateBackup creates a data backup from an instance
func (*HTTPClient) CreateInstanceSnapshot ¶
func (c *HTTPClient) CreateInstanceSnapshot(ctx context.Context, req types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
CreateInstanceSnapshot creates a snapshot from an instance
func (*HTTPClient) CreateProject ¶
func (c *HTTPClient) CreateProject(ctx context.Context, req project.CreateProjectRequest) (*types.Project, error)
CreateProject creates a new project
func (*HTTPClient) CreateSharedToken ¶ added in v0.5.11
func (c *HTTPClient) CreateSharedToken(ctx context.Context, projectID string, req *types.CreateSharedTokenRequest) (*types.SharedInvitationToken, error)
CreateSharedToken creates a shared invitation token POST /api/v1/projects/{projectID}/invitations/shared
func (*HTTPClient) CreateStorage ¶
func (c *HTTPClient) CreateStorage(ctx context.Context, req types.StorageCreateRequest) (*types.StorageVolume, error)
func (*HTTPClient) CreateTunnels ¶
func (c *HTTPClient) CreateTunnels(ctx context.Context, instanceName string, services []string) (*CreateTunnelsResponse, error)
CreateTunnels creates SSH tunnels for an instance's web services
func (*HTTPClient) CreateVolume ¶
func (c *HTTPClient) CreateVolume(ctx context.Context, req types.VolumeCreateRequest) (*types.StorageVolume, error)
func (*HTTPClient) DeclineInvitation ¶ added in v0.5.11
func (c *HTTPClient) DeclineInvitation(ctx context.Context, token string, reason string) (*InvitationActionResponse, error)
DeclineInvitation declines an invitation POST /api/v1/invitations/{token}/decline
func (*HTTPClient) DeleteAMI ¶
func (c *HTTPClient) DeleteAMI(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
DeleteAMI deletes a specific AMI by ID
func (*HTTPClient) DeleteAMISnapshot ¶
func (c *HTTPClient) DeleteAMISnapshot(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
DeleteAMISnapshot deletes a specific snapshot
func (*HTTPClient) DeleteBackup ¶
func (c *HTTPClient) DeleteBackup(ctx context.Context, backupName string) (*types.BackupDeleteResult, error)
DeleteBackup deletes a backup
func (*HTTPClient) DeleteInstance ¶
func (c *HTTPClient) DeleteInstance(ctx context.Context, name string) error
DeleteInstance deletes an instance
func (*HTTPClient) DeleteInstanceSnapshot ¶
func (c *HTTPClient) DeleteInstanceSnapshot(ctx context.Context, snapshotName string) (*types.InstanceSnapshotDeleteResult, error)
DeleteInstanceSnapshot deletes a snapshot
func (*HTTPClient) DeleteProject ¶
func (c *HTTPClient) DeleteProject(ctx context.Context, projectID string) error
DeleteProject deletes a project
func (*HTTPClient) DeleteStorage ¶
func (c *HTTPClient) DeleteStorage(ctx context.Context, name string) error
func (*HTTPClient) DeleteVolume ¶
func (c *HTTPClient) DeleteVolume(ctx context.Context, name string) error
func (*HTTPClient) DetachStorage ¶
func (c *HTTPClient) DetachStorage(ctx context.Context, storageName string) error
func (*HTTPClient) DetachVolume ¶
func (c *HTTPClient) DetachVolume(ctx context.Context, volumeName string) error
func (*HTTPClient) DiffTemplate ¶
func (c *HTTPClient) DiffTemplate(ctx context.Context, req templates.DiffRequest) (*templates.TemplateDiff, error)
func (*HTTPClient) DisableProjectBudget ¶
func (c *HTTPClient) DisableProjectBudget(ctx context.Context, projectID string) (map[string]interface{}, error)
DisableProjectBudget disables budget tracking for a project
func (*HTTPClient) ExecInstance ¶
func (c *HTTPClient) ExecInstance(ctx context.Context, instanceName string, execRequest types.ExecRequest) (*types.ExecResult, error)
ExecInstance executes a command on an instance
func (*HTTPClient) ExecuteIdleActions ¶
func (c *HTTPClient) ExecuteIdleActions(ctx context.Context) (*types.IdleExecutionResponse, error)
func (*HTTPClient) ExportRightsizingData ¶
func (c *HTTPClient) ExportRightsizingData(ctx context.Context, instanceName string) ([]types.InstanceMetrics, error)
ExportRightsizingData exports usage data for a specific instance
func (*HTTPClient) ExtendSharedToken ¶ added in v0.5.11
ExtendSharedToken extends the expiration of a shared token PATCH /api/v1/invitations/shared/{token}/extend
func (*HTTPClient) ForkMarketplaceTemplate ¶
func (c *HTTPClient) ForkMarketplaceTemplate(ctx context.Context, templateID string, fork map[string]interface{}) (map[string]interface{}, error)
ForkMarketplaceTemplate forks a marketplace template for customization
func (*HTTPClient) GenerateAPIKey ¶
func (c *HTTPClient) GenerateAPIKey(ctx context.Context) (*types.AuthResponse, error)
GenerateAPIKey requests a new API key from the server
func (*HTTPClient) GetAMICosts ¶
func (c *HTTPClient) GetAMICosts(ctx context.Context, templateName string) (map[string]interface{}, error)
GetAMICosts provides cost analysis for AMI vs script deployment
func (*HTTPClient) GetAMIStatus ¶
func (c *HTTPClient) GetAMIStatus(ctx context.Context, creationID string) (map[string]interface{}, error)
GetAMIStatus checks the status of AMI creation
func (*HTTPClient) GetAPIKey ¶
func (c *HTTPClient) GetAPIKey() string
GetAPIKey returns the current API key
func (*HTTPClient) GetAuthStatus ¶
func (c *HTTPClient) GetAuthStatus(ctx context.Context) (*AuthStatusResponse, error)
GetAuthStatus returns the current authentication status
func (*HTTPClient) GetBackup ¶
func (c *HTTPClient) GetBackup(ctx context.Context, backupName string) (*types.BackupInfo, error)
GetBackup gets detailed information about a backup
func (*HTTPClient) GetBackupContents ¶
func (c *HTTPClient) GetBackupContents(ctx context.Context, req types.BackupContentsRequest) (*types.BackupContentsResponse, error)
GetBackupContents lists the contents of a backup
func (*HTTPClient) GetCostTrends ¶
func (c *HTTPClient) GetCostTrends(ctx context.Context, projectID, period string) (map[string]interface{}, error)
GetCostTrends retrieves cost trends for analysis
func (*HTTPClient) GetIdleHistory ¶
func (c *HTTPClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)
func (*HTTPClient) GetIdlePendingActions ¶
func (*HTTPClient) GetIdlePolicy ¶
func (c *HTTPClient) GetIdlePolicy(ctx context.Context, policyID string) (*idle.PolicyTemplate, error)
GetIdlePolicy returns a specific idle policy template
func (*HTTPClient) GetIdleSavingsReport ¶
func (c *HTTPClient) GetIdleSavingsReport(ctx context.Context, period string) (map[string]interface{}, error)
GetIdleSavingsReport returns the idle cost savings report
func (*HTTPClient) GetInstance ¶
GetInstance gets details of a specific instance
func (*HTTPClient) GetInstanceHibernationStatus ¶
func (c *HTTPClient) GetInstanceHibernationStatus(ctx context.Context, name string) (*types.HibernationStatus, error)
GetInstanceHibernationStatus gets hibernation status for an instance
func (*HTTPClient) GetInstanceIdlePolicies ¶
func (c *HTTPClient) GetInstanceIdlePolicies(ctx context.Context, instanceName string) ([]*idle.PolicyTemplate, error)
GetInstanceIdlePolicies returns all idle policies applied to an instance
func (*HTTPClient) GetInstanceLayers ¶
func (c *HTTPClient) GetInstanceLayers(ctx context.Context, instanceName string) ([]templates.AppliedTemplate, error)
func (*HTTPClient) GetInstanceLogTypes ¶
func (c *HTTPClient) GetInstanceLogTypes(ctx context.Context, instanceName string) (*types.LogTypesResponse, error)
GetInstanceLogTypes retrieves available log types for a specific instance
func (*HTTPClient) GetInstanceLogs ¶
func (c *HTTPClient) GetInstanceLogs(ctx context.Context, instanceName string, logRequest types.LogRequest) (*types.LogResponse, error)
GetInstanceLogs retrieves logs for a specific instance
func (*HTTPClient) GetInstanceMetrics ¶
func (c *HTTPClient) GetInstanceMetrics(ctx context.Context, instanceName string, limit int) ([]types.InstanceMetrics, error)
GetInstanceMetrics retrieves metrics for a specific instance
func (*HTTPClient) GetInstanceSnapshot ¶
func (c *HTTPClient) GetInstanceSnapshot(ctx context.Context, snapshotName string) (*types.InstanceSnapshotInfo, error)
GetInstanceSnapshot gets information about a specific snapshot
func (*HTTPClient) GetInvitationByToken ¶ added in v0.5.11
func (c *HTTPClient) GetInvitationByToken(ctx context.Context, token string) (*GetInvitationResponse, error)
GetInvitationByToken retrieves an invitation by token GET /api/v1/invitations/{token}
func (*HTTPClient) GetLogsSummary ¶
func (c *HTTPClient) GetLogsSummary(ctx context.Context) (*types.LogSummaryResponse, error)
GetLogsSummary retrieves log availability summary for all instances
func (*HTTPClient) GetMarketplaceFeatured ¶
func (c *HTTPClient) GetMarketplaceFeatured(ctx context.Context) (map[string]interface{}, error)
GetMarketplaceFeatured gets featured templates from the marketplace
func (*HTTPClient) GetMarketplaceTemplate ¶
func (c *HTTPClient) GetMarketplaceTemplate(ctx context.Context, templateID string) (map[string]interface{}, error)
GetMarketplaceTemplate gets a specific template from the marketplace
func (*HTTPClient) GetMarketplaceTrending ¶
func (c *HTTPClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)
GetMarketplaceTrending gets trending templates from the marketplace
func (*HTTPClient) GetPolicyStatus ¶
func (c *HTTPClient) GetPolicyStatus(ctx context.Context) (*PolicyStatusResponse, error)
GetPolicyStatus returns the current policy enforcement status
func (*HTTPClient) GetProject ¶
GetProject retrieves a specific project
func (*HTTPClient) GetProjectBudgetStatus ¶
func (c *HTTPClient) GetProjectBudgetStatus(ctx context.Context, projectID string) (*project.BudgetStatus, error)
GetProjectBudgetStatus retrieves budget status for a project
func (*HTTPClient) GetProjectCostBreakdown ¶
func (c *HTTPClient) GetProjectCostBreakdown(ctx context.Context, projectID string, startDate, endDate time.Time) (*types.ProjectCostBreakdown, error)
GetProjectCostBreakdown retrieves detailed cost analysis for a project
func (*HTTPClient) GetProjectMembers ¶
func (c *HTTPClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, error)
GetProjectMembers retrieves project members
func (*HTTPClient) GetProjectResourceUsage ¶
func (c *HTTPClient) GetProjectResourceUsage(ctx context.Context, projectID string, period time.Duration) (*types.ProjectResourceUsage, error)
GetProjectResourceUsage retrieves resource utilization metrics for a project
func (*HTTPClient) GetRegistryStatus ¶
func (c *HTTPClient) GetRegistryStatus(ctx context.Context) (*RegistryStatusResponse, error)
func (*HTTPClient) GetRestoreStatus ¶
func (c *HTTPClient) GetRestoreStatus(ctx context.Context, restoreID string) (*types.RestoreResult, error)
GetRestoreStatus gets the status of a restore operation
func (*HTTPClient) GetRightsizingRecommendations ¶
func (c *HTTPClient) GetRightsizingRecommendations(ctx context.Context) (*types.RightsizingRecommendationsResponse, error)
GetRightsizingRecommendations retrieves rightsizing recommendations for all instances
func (*HTTPClient) GetRightsizingStats ¶
func (c *HTTPClient) GetRightsizingStats(ctx context.Context, instanceName string) (*types.RightsizingStatsResponse, error)
GetRightsizingStats retrieves detailed rightsizing statistics for an instance
func (*HTTPClient) GetRightsizingSummary ¶
func (c *HTTPClient) GetRightsizingSummary(ctx context.Context) (*types.RightsizingSummaryResponse, error)
GetRightsizingSummary retrieves fleet-wide rightsizing summary
func (*HTTPClient) GetSharedToken ¶ added in v0.5.11
func (c *HTTPClient) GetSharedToken(ctx context.Context, token string) (*types.SharedInvitationToken, error)
GetSharedToken retrieves shared token information GET /api/v1/invitations/shared/{token}
func (*HTTPClient) GetStatus ¶
func (c *HTTPClient) GetStatus(ctx context.Context) (*types.DaemonStatus, error)
GetStatus gets the daemon status
func (*HTTPClient) GetStorage ¶
func (c *HTTPClient) GetStorage(ctx context.Context, name string) (*types.StorageVolume, error)
func (*HTTPClient) GetTemplate ¶
GetTemplate gets details of a specific template
func (*HTTPClient) GetVolume ¶
func (c *HTTPClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)
func (*HTTPClient) HibernateInstance ¶
func (c *HTTPClient) HibernateInstance(ctx context.Context, name string) error
HibernateInstance hibernates a running instance
func (*HTTPClient) LaunchInstance ¶
func (c *HTTPClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)
LaunchInstance launches a new instance
func (*HTTPClient) ListAMISnapshots ¶
func (c *HTTPClient) ListAMISnapshots(ctx context.Context, filters map[string]interface{}) (map[string]interface{}, error)
ListAMISnapshots lists available snapshots
func (*HTTPClient) ListBackups ¶
func (c *HTTPClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)
ListBackups lists all data backups
func (*HTTPClient) ListIdlePolicies ¶
func (c *HTTPClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)
ListIdlePolicies returns all available idle policy templates
func (*HTTPClient) ListInstanceSnapshots ¶
func (c *HTTPClient) ListInstanceSnapshots(ctx context.Context) (*types.InstanceSnapshotListResponse, error)
ListInstanceSnapshots lists all instance snapshots
func (*HTTPClient) ListInstances ¶
func (c *HTTPClient) ListInstances(ctx context.Context) (*types.ListResponse, error)
ListInstances lists all instances
func (*HTTPClient) ListInstancesWithRefresh ¶
func (c *HTTPClient) ListInstancesWithRefresh(ctx context.Context, refresh bool) (*types.ListResponse, error)
ListInstancesWithRefresh lists all instances with optional AWS refresh
func (*HTTPClient) ListPolicySets ¶
func (c *HTTPClient) ListPolicySets(ctx context.Context) (*PolicySetsResponse, error)
ListPolicySets returns available policy sets
func (*HTTPClient) ListProjects ¶
func (c *HTTPClient) ListProjects(ctx context.Context, filter *project.ProjectFilter) (*project.ProjectListResponse, error)
ListProjects lists projects with optional filtering
func (*HTTPClient) ListRestoreOperations ¶
func (c *HTTPClient) ListRestoreOperations(ctx context.Context) ([]types.RestoreResult, error)
ListRestoreOperations lists all restore operations
func (*HTTPClient) ListSharedTokens ¶ added in v0.5.11
func (c *HTTPClient) ListSharedTokens(ctx context.Context, projectID string) ([]*types.SharedInvitationToken, error)
ListSharedTokens lists all shared tokens for a project GET /api/v1/projects/{projectID}/invitations/shared
func (*HTTPClient) ListStorage ¶
func (c *HTTPClient) ListStorage(ctx context.Context) ([]*types.StorageVolume, error)
func (*HTTPClient) ListTemplateAMIs ¶
func (c *HTTPClient) ListTemplateAMIs(ctx context.Context, templateName string) ([]AMIReferenceResponse, error)
func (*HTTPClient) ListTemplates ¶
ListTemplates lists all available templates
func (*HTTPClient) ListTunnels ¶
func (c *HTTPClient) ListTunnels(ctx context.Context, instanceName string) (*ListTunnelsResponse, error)
ListTunnels lists all active tunnels, optionally filtered by instance
func (*HTTPClient) ListUserAMIs ¶
func (c *HTTPClient) ListUserAMIs(ctx context.Context) (map[string]interface{}, error)
ListUserAMIs lists AMIs created by the user
func (*HTTPClient) ListVolumes ¶
func (c *HTTPClient) ListVolumes(ctx context.Context) ([]*types.StorageVolume, error)
func (*HTTPClient) LookupAMI ¶
func (c *HTTPClient) LookupAMI(ctx context.Context, templateName, region, architecture string) (*AMIReferenceResponse, error)
func (*HTTPClient) MakeRequest ¶
func (c *HTTPClient) MakeRequest(method, path string, body interface{}) ([]byte, error)
MakeRequest makes a generic HTTP request to any API endpoint
func (*HTTPClient) MountVolume ¶
func (c *HTTPClient) MountVolume(ctx context.Context, volumeName, instanceName, mountPoint string) error
func (*HTTPClient) Ping ¶
func (c *HTTPClient) Ping(ctx context.Context) error
Ping checks if the daemon is running
func (*HTTPClient) PreventProjectLaunches ¶ added in v0.5.9
func (c *HTTPClient) PreventProjectLaunches(ctx context.Context, projectID string) (map[string]interface{}, error)
PreventProjectLaunches prevents new instance launches for a project
func (*HTTPClient) PreviewAMIResolution ¶
func (c *HTTPClient) PreviewAMIResolution(ctx context.Context, templateName string) (map[string]interface{}, error)
PreviewAMIResolution shows what would happen during AMI resolution
func (*HTTPClient) PublishMarketplaceTemplate ¶
func (c *HTTPClient) PublishMarketplaceTemplate(ctx context.Context, template map[string]interface{}) (map[string]interface{}, error)
PublishMarketplaceTemplate publishes a template to the marketplace
func (*HTTPClient) RecommendIdlePolicy ¶
func (c *HTTPClient) RecommendIdlePolicy(ctx context.Context, instanceName string) (*idle.PolicyTemplate, error)
RecommendIdlePolicy recommends an idle policy for an instance
func (*HTTPClient) RedeemSharedToken ¶ added in v0.5.11
func (c *HTTPClient) RedeemSharedToken(ctx context.Context, req *types.RedeemSharedTokenRequest) (*types.RedeemSharedTokenResponse, error)
RedeemSharedToken redeems a shared token POST /api/v1/invitations/shared/redeem
func (*HTTPClient) RemoveIdlePolicy ¶
func (c *HTTPClient) RemoveIdlePolicy(ctx context.Context, instanceName string, policyID string) error
RemoveIdlePolicy removes an idle policy from an instance
func (*HTTPClient) RemoveProjectMember ¶
func (c *HTTPClient) RemoveProjectMember(ctx context.Context, projectID, userID string) error
RemoveProjectMember removes a member from a project
func (*HTTPClient) ResizeInstance ¶
func (c *HTTPClient) ResizeInstance(ctx context.Context, resizeRequest types.ResizeRequest) (*types.ResizeResponse, error)
ResizeInstance resizes an instance to a new instance type
func (*HTTPClient) ResolveAMI ¶
func (c *HTTPClient) ResolveAMI(ctx context.Context, templateName string, params map[string]interface{}) (map[string]interface{}, error)
ResolveAMI resolves AMI for a template
func (*HTTPClient) RestoreAMIFromSnapshot ¶
func (c *HTTPClient) RestoreAMIFromSnapshot(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
RestoreAMIFromSnapshot creates an AMI from a snapshot
func (*HTTPClient) RestoreBackup ¶
func (c *HTTPClient) RestoreBackup(ctx context.Context, req types.RestoreRequest) (*types.RestoreResult, error)
RestoreBackup restores data from a backup
func (*HTTPClient) RestoreInstanceFromSnapshot ¶
func (c *HTTPClient) RestoreInstanceFromSnapshot(ctx context.Context, snapshotName string, req types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)
RestoreInstanceFromSnapshot restores a new instance from a snapshot
func (*HTTPClient) ResumeInstance ¶
func (c *HTTPClient) ResumeInstance(ctx context.Context, name string) error
ResumeInstance resumes a hibernated instance
func (*HTTPClient) RevokeAPIKey ¶
func (c *HTTPClient) RevokeAPIKey(ctx context.Context) error
RevokeAPIKey revokes the current API key
func (*HTTPClient) RevokeSharedToken ¶ added in v0.5.11
func (c *HTTPClient) RevokeSharedToken(ctx context.Context, token string) error
RevokeSharedToken revokes a shared token DELETE /api/v1/invitations/shared/{token}
func (*HTTPClient) RollbackInstance ¶
func (c *HTTPClient) RollbackInstance(ctx context.Context, req types.RollbackRequest) error
func (*HTTPClient) SearchMarketplace ¶
func (c *HTTPClient) SearchMarketplace(ctx context.Context, query map[string]interface{}) (map[string]interface{}, error)
SearchMarketplace searches the marketplace for templates
func (*HTTPClient) SendBulkInvitation ¶ added in v0.5.11
func (c *HTTPClient) SendBulkInvitation(ctx context.Context, projectID string, req *types.BulkInvitationRequest) (*types.BulkInvitationResponse, error)
SendBulkInvitation sends bulk invitations to multiple users POST /api/v1/projects/{projectID}/invitations/bulk
func (*HTTPClient) SendInvitation ¶ added in v0.5.11
func (c *HTTPClient) SendInvitation(ctx context.Context, projectID string, req SendInvitationRequest) (*SendInvitationResponse, error)
SendInvitation sends an invitation to collaborate on a project POST /api/v1/projects/{projectID}/invitations
func (*HTTPClient) SetAPIKey ¶
func (c *HTTPClient) SetAPIKey(apiKey string)
SetAPIKey sets the API key for authentication
func (*HTTPClient) SetOptions ¶
func (c *HTTPClient) SetOptions(opts Options)
SetOptions configures the client with the provided options
func (*HTTPClient) SetPolicyEnforcement ¶
func (c *HTTPClient) SetPolicyEnforcement(ctx context.Context, enabled bool) (*PolicyEnforcementResponse, error)
SetPolicyEnforcement enables or disables policy enforcement
func (*HTTPClient) SetProjectBudget ¶
func (c *HTTPClient) SetProjectBudget(ctx context.Context, projectID string, req SetProjectBudgetRequest) (map[string]interface{}, error)
SetProjectBudget sets or enables budget tracking for a project
func (*HTTPClient) SetRegistryStatus ¶
func (c *HTTPClient) SetRegistryStatus(ctx context.Context, active bool) error
func (*HTTPClient) Shutdown ¶
func (c *HTTPClient) Shutdown(ctx context.Context) error
Shutdown gracefully shuts down the daemon
func (*HTTPClient) StartInstance ¶
func (c *HTTPClient) StartInstance(ctx context.Context, name string) error
StartInstance starts a stopped instance
func (*HTTPClient) StopInstance ¶
func (c *HTTPClient) StopInstance(ctx context.Context, name string) error
StopInstance stops a running instance
func (*HTTPClient) TestAMIAvailability ¶
func (c *HTTPClient) TestAMIAvailability(ctx context.Context, request map[string]interface{}) (map[string]interface{}, error)
TestAMIAvailability tests AMI availability across regions
func (*HTTPClient) UnmountVolume ¶
func (c *HTTPClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error
func (*HTTPClient) UpdateProject ¶
func (c *HTTPClient) UpdateProject(ctx context.Context, projectID string, req project.UpdateProjectRequest) (*types.Project, error)
UpdateProject updates a project
func (*HTTPClient) UpdateProjectBudget ¶
func (c *HTTPClient) UpdateProjectBudget(ctx context.Context, projectID string, req UpdateProjectBudgetRequest) (map[string]interface{}, error)
UpdateProjectBudget updates an existing project budget
func (*HTTPClient) UpdateProjectMember ¶
func (c *HTTPClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error
UpdateProjectMember updates a project member's role
func (*HTTPClient) VerifyBackup ¶
func (c *HTTPClient) VerifyBackup(ctx context.Context, req types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
VerifyBackup verifies backup integrity
type InvitationActionResponse ¶ added in v0.5.11
type InvitationActionResponse struct {
Invitation *types.Invitation `json:"invitation"`
Project *types.Project `json:"project,omitempty"`
Message string `json:"message"`
}
InvitationActionResponse represents the response from accept/decline operations
type ListTunnelsResponse ¶
type ListTunnelsResponse struct {
Tunnels []TunnelInfo `json:"tunnels"`
Count int `json:"count"`
}
ListTunnelsResponse is the response from listing tunnels
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient provides a mock implementation of PrismAPI for testing
func NewMockClient ¶
func NewMockClient() *MockClient
NewMockClient creates a new mock client for testing
func (*MockClient) AddInstance ¶
func (m *MockClient) AddInstance(name string, instance *types.Instance)
func (*MockClient) AddMarketplaceReview ¶
func (*MockClient) AddProjectMember ¶
func (m *MockClient) AddProjectMember(ctx context.Context, projectID string, req project.AddMemberRequest) error
func (*MockClient) AddTemplate ¶
func (m *MockClient) AddTemplate(name string, template types.Template)
func (*MockClient) AnalyzeRightsizing ¶
func (m *MockClient) AnalyzeRightsizing(ctx context.Context, req types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
Rightsizing analysis operations
func (*MockClient) ApplyIdlePolicy ¶
func (m *MockClient) ApplyIdlePolicy(ctx context.Context, instanceID, policyID string) error
func (*MockClient) ApplyTemplate ¶
func (m *MockClient) ApplyTemplate(ctx context.Context, req templates.ApplyRequest) (*templates.ApplyResponse, error)
Template application operations
func (*MockClient) AssignPolicySet ¶
func (m *MockClient) AssignPolicySet(ctx context.Context, setID string) (*PolicyAssignResponse, error)
func (*MockClient) AttachStorage ¶
func (m *MockClient) AttachStorage(ctx context.Context, storageName, instanceName string) error
func (*MockClient) AttachVolume ¶
func (m *MockClient) AttachVolume(ctx context.Context, volumeName, instanceName string) error
func (*MockClient) CheckTemplateAccess ¶
func (m *MockClient) CheckTemplateAccess(ctx context.Context, templateName string) (*PolicyCheckResponse, error)
func (*MockClient) CheckVersionCompatibility ¶
func (m *MockClient) CheckVersionCompatibility(ctx context.Context, version string) error
Version compatibility
func (*MockClient) CleanupAMIs ¶
func (*MockClient) ConnectInstance ¶
func (*MockClient) CreateAMI ¶
func (m *MockClient) CreateAMI(ctx context.Context, req types.AMICreationRequest) (map[string]interface{}, error)
func (*MockClient) CreateAMISnapshot ¶
func (*MockClient) CreateBackup ¶
func (m *MockClient) CreateBackup(ctx context.Context, req types.BackupCreateRequest) (*types.BackupCreateResult, error)
Backup operations
func (*MockClient) CreateInstanceSnapshot ¶
func (m *MockClient) CreateInstanceSnapshot(ctx context.Context, req types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
Instance Snapshot operations
func (*MockClient) CreateProject ¶
func (m *MockClient) CreateProject(ctx context.Context, req project.CreateProjectRequest) (*types.Project, error)
Project management operations - Stubs
func (*MockClient) CreateStorage ¶
func (m *MockClient) CreateStorage(ctx context.Context, req types.StorageCreateRequest) (*types.StorageVolume, error)
Storage operations
func (*MockClient) CreateVolume ¶
func (m *MockClient) CreateVolume(ctx context.Context, req types.VolumeCreateRequest) (*types.StorageVolume, error)
Volume operations
func (*MockClient) DeleteAMISnapshot ¶
func (*MockClient) DeleteBackup ¶
func (m *MockClient) DeleteBackup(ctx context.Context, backupID string) (*types.BackupDeleteResult, error)
func (*MockClient) DeleteInstance ¶
func (m *MockClient) DeleteInstance(ctx context.Context, name string) error
func (*MockClient) DeleteInstanceSnapshot ¶
func (m *MockClient) DeleteInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotDeleteResult, error)
func (*MockClient) DeleteProject ¶
func (m *MockClient) DeleteProject(ctx context.Context, id string) error
func (*MockClient) DeleteStorage ¶
func (m *MockClient) DeleteStorage(ctx context.Context, name string) error
func (*MockClient) DeleteVolume ¶
func (m *MockClient) DeleteVolume(ctx context.Context, name string) error
func (*MockClient) DetachStorage ¶
func (m *MockClient) DetachStorage(ctx context.Context, storageName string) error
func (*MockClient) DetachVolume ¶
func (m *MockClient) DetachVolume(ctx context.Context, volumeName string) error
func (*MockClient) DiffTemplate ¶
func (m *MockClient) DiffTemplate(ctx context.Context, req templates.DiffRequest) (*templates.TemplateDiff, error)
func (*MockClient) DisableProjectBudget ¶
func (*MockClient) ExecInstance ¶
func (m *MockClient) ExecInstance(ctx context.Context, instanceName string, execRequest types.ExecRequest) (*types.ExecResult, error)
func (*MockClient) ExecuteIdleActions ¶
func (m *MockClient) ExecuteIdleActions(ctx context.Context) (*types.IdleExecutionResponse, error)
func (*MockClient) ExportRightsizingData ¶
func (m *MockClient) ExportRightsizingData(ctx context.Context, format string) ([]types.InstanceMetrics, error)
func (*MockClient) ForkMarketplaceTemplate ¶
func (*MockClient) GetAMICosts ¶
func (*MockClient) GetAMIStatus ¶
func (*MockClient) GetBackup ¶
func (m *MockClient) GetBackup(ctx context.Context, backupID string) (*types.BackupInfo, error)
func (*MockClient) GetBackupContents ¶
func (m *MockClient) GetBackupContents(ctx context.Context, req types.BackupContentsRequest) (*types.BackupContentsResponse, error)
func (*MockClient) GetIdleHistory ¶
func (m *MockClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)
func (*MockClient) GetIdlePendingActions ¶
Idle detection operations
func (*MockClient) GetIdlePolicy ¶
func (m *MockClient) GetIdlePolicy(ctx context.Context, id string) (*idle.PolicyTemplate, error)
func (*MockClient) GetIdleSavingsReport ¶
func (*MockClient) GetInstance ¶
func (*MockClient) GetInstanceHibernationStatus ¶
func (m *MockClient) GetInstanceHibernationStatus(ctx context.Context, name string) (*types.HibernationStatus, error)
func (*MockClient) GetInstanceIdlePolicies ¶
func (m *MockClient) GetInstanceIdlePolicies(ctx context.Context, instanceID string) ([]*idle.PolicyTemplate, error)
func (*MockClient) GetInstanceLayers ¶
func (m *MockClient) GetInstanceLayers(ctx context.Context, name string) ([]templates.AppliedTemplate, error)
func (*MockClient) GetInstanceLogTypes ¶
func (m *MockClient) GetInstanceLogTypes(ctx context.Context, name string) (*types.LogTypesResponse, error)
func (*MockClient) GetInstanceLogs ¶
func (m *MockClient) GetInstanceLogs(ctx context.Context, name string, req types.LogRequest) (*types.LogResponse, error)
Log operations
func (*MockClient) GetInstanceMetrics ¶
func (m *MockClient) GetInstanceMetrics(ctx context.Context, instanceID string, days int) ([]types.InstanceMetrics, error)
func (*MockClient) GetInstanceSnapshot ¶
func (m *MockClient) GetInstanceSnapshot(ctx context.Context, snapshotID string) (*types.InstanceSnapshotInfo, error)
func (*MockClient) GetLogsSummary ¶
func (m *MockClient) GetLogsSummary(ctx context.Context) (*types.LogSummaryResponse, error)
func (*MockClient) GetMarketplaceFeatured ¶
func (m *MockClient) GetMarketplaceFeatured(ctx context.Context) (map[string]interface{}, error)
func (*MockClient) GetMarketplaceTemplate ¶
func (*MockClient) GetMarketplaceTrending ¶
func (m *MockClient) GetMarketplaceTrending(ctx context.Context) (map[string]interface{}, error)
func (*MockClient) GetPolicyStatus ¶
func (m *MockClient) GetPolicyStatus(ctx context.Context) (*PolicyStatusResponse, error)
Policy management operations
func (*MockClient) GetProject ¶
func (*MockClient) GetProjectBudgetStatus ¶
func (m *MockClient) GetProjectBudgetStatus(ctx context.Context, projectID string) (*project.BudgetStatus, error)
func (*MockClient) GetProjectCostBreakdown ¶
func (m *MockClient) GetProjectCostBreakdown(ctx context.Context, projectID string, start, end time.Time) (*types.ProjectCostBreakdown, error)
func (*MockClient) GetProjectMembers ¶
func (m *MockClient) GetProjectMembers(ctx context.Context, projectID string) ([]types.ProjectMember, error)
func (*MockClient) GetProjectResourceUsage ¶
func (m *MockClient) GetProjectResourceUsage(ctx context.Context, projectID string, duration time.Duration) (*types.ProjectResourceUsage, error)
func (*MockClient) GetRegistryStatus ¶
func (m *MockClient) GetRegistryStatus(ctx context.Context) (*RegistryStatusResponse, error)
Registry operations
func (*MockClient) GetRestoreStatus ¶
func (m *MockClient) GetRestoreStatus(ctx context.Context, restoreID string) (*types.RestoreResult, error)
func (*MockClient) GetRightsizingRecommendations ¶
func (m *MockClient) GetRightsizingRecommendations(ctx context.Context) (*types.RightsizingRecommendationsResponse, error)
func (*MockClient) GetRightsizingStats ¶
func (m *MockClient) GetRightsizingStats(ctx context.Context, instanceID string) (*types.RightsizingStatsResponse, error)
func (*MockClient) GetRightsizingSummary ¶
func (m *MockClient) GetRightsizingSummary(ctx context.Context) (*types.RightsizingSummaryResponse, error)
func (*MockClient) GetStatus ¶
func (m *MockClient) GetStatus(ctx context.Context) (*types.DaemonStatus, error)
Status operations
func (*MockClient) GetStorage ¶
func (m *MockClient) GetStorage(ctx context.Context, name string) (*types.StorageVolume, error)
func (*MockClient) GetTemplate ¶
func (*MockClient) GetVolume ¶
func (m *MockClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)
func (*MockClient) HibernateInstance ¶
func (m *MockClient) HibernateInstance(ctx context.Context, name string) error
Hibernation operations
func (*MockClient) LaunchInstance ¶
func (m *MockClient) LaunchInstance(ctx context.Context, req types.LaunchRequest) (*types.LaunchResponse, error)
Instance operations
func (*MockClient) ListAMISnapshots ¶
func (*MockClient) ListBackups ¶
func (m *MockClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)
func (*MockClient) ListIdlePolicies ¶
func (m *MockClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)
Idle policy operations
func (*MockClient) ListInstanceSnapshots ¶
func (m *MockClient) ListInstanceSnapshots(ctx context.Context) (*types.InstanceSnapshotListResponse, error)
func (*MockClient) ListInstances ¶
func (m *MockClient) ListInstances(ctx context.Context) (*types.ListResponse, error)
func (*MockClient) ListInstancesWithRefresh ¶
func (m *MockClient) ListInstancesWithRefresh(ctx context.Context, refresh bool) (*types.ListResponse, error)
func (*MockClient) ListPolicySets ¶
func (m *MockClient) ListPolicySets(ctx context.Context) (*PolicySetsResponse, error)
func (*MockClient) ListProjects ¶
func (m *MockClient) ListProjects(ctx context.Context, filter *project.ProjectFilter) (*project.ProjectListResponse, error)
func (*MockClient) ListRestoreOperations ¶
func (m *MockClient) ListRestoreOperations(ctx context.Context) ([]types.RestoreResult, error)
func (*MockClient) ListStorage ¶
func (m *MockClient) ListStorage(ctx context.Context) ([]*types.StorageVolume, error)
func (*MockClient) ListTemplateAMIs ¶
func (m *MockClient) ListTemplateAMIs(ctx context.Context, templateName string) ([]AMIReferenceResponse, error)
func (*MockClient) ListTemplates ¶
Template operations
func (*MockClient) ListUserAMIs ¶
func (m *MockClient) ListUserAMIs(ctx context.Context) (map[string]interface{}, error)
func (*MockClient) ListVolumes ¶
func (m *MockClient) ListVolumes(ctx context.Context) ([]*types.StorageVolume, error)
func (*MockClient) LookupAMI ¶
func (m *MockClient) LookupAMI(ctx context.Context, templateName, region, architecture string) (*AMIReferenceResponse, error)
func (*MockClient) MakeRequest ¶
func (m *MockClient) MakeRequest(method, path string, body interface{}) ([]byte, error)
MakeRequest for generic endpoint access
func (*MockClient) MountVolume ¶
func (m *MockClient) MountVolume(ctx context.Context, volumeName, instanceName, mountPoint string) error
func (*MockClient) PreviewAMIResolution ¶
func (*MockClient) PublishMarketplaceTemplate ¶
func (*MockClient) RecommendIdlePolicy ¶
func (m *MockClient) RecommendIdlePolicy(ctx context.Context, instanceID string) (*idle.PolicyTemplate, error)
func (*MockClient) RemoveIdlePolicy ¶
func (m *MockClient) RemoveIdlePolicy(ctx context.Context, instanceID, policyID string) error
func (*MockClient) RemoveProjectMember ¶
func (m *MockClient) RemoveProjectMember(ctx context.Context, projectID, userID string) error
func (*MockClient) ResizeInstance ¶
func (m *MockClient) ResizeInstance(ctx context.Context, req types.ResizeRequest) (*types.ResizeResponse, error)
Resize operations
func (*MockClient) ResolveAMI ¶
func (m *MockClient) ResolveAMI(ctx context.Context, templateName string, params map[string]interface{}) (map[string]interface{}, error)
AMI operations
func (*MockClient) RestoreAMIFromSnapshot ¶
func (*MockClient) RestoreBackup ¶
func (m *MockClient) RestoreBackup(ctx context.Context, req types.RestoreRequest) (*types.RestoreResult, error)
Restore operations
func (*MockClient) RestoreInstanceFromSnapshot ¶
func (m *MockClient) RestoreInstanceFromSnapshot(ctx context.Context, snapshotID string, req types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)
func (*MockClient) ResumeInstance ¶
func (m *MockClient) ResumeInstance(ctx context.Context, name string) error
func (*MockClient) RollbackInstance ¶
func (m *MockClient) RollbackInstance(ctx context.Context, req types.RollbackRequest) error
func (*MockClient) SearchMarketplace ¶
func (*MockClient) SetPingError ¶
func (m *MockClient) SetPingError(err error)
func (*MockClient) SetPolicyEnforcement ¶
func (m *MockClient) SetPolicyEnforcement(ctx context.Context, enabled bool) (*PolicyEnforcementResponse, error)
func (*MockClient) SetProjectBudget ¶
func (m *MockClient) SetProjectBudget(ctx context.Context, projectID string, req SetProjectBudgetRequest) (map[string]interface{}, error)
func (*MockClient) SetRegistryStatus ¶
func (m *MockClient) SetRegistryStatus(ctx context.Context, active bool) error
func (*MockClient) StartInstance ¶
func (m *MockClient) StartInstance(ctx context.Context, name string) error
func (*MockClient) StopInstance ¶
func (m *MockClient) StopInstance(ctx context.Context, name string) error
func (*MockClient) TestAMIAvailability ¶
func (*MockClient) UnmountVolume ¶
func (m *MockClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error
func (*MockClient) UpdateProject ¶
func (m *MockClient) UpdateProject(ctx context.Context, id string, req project.UpdateProjectRequest) (*types.Project, error)
func (*MockClient) UpdateProjectBudget ¶
func (m *MockClient) UpdateProjectBudget(ctx context.Context, projectID string, req UpdateProjectBudgetRequest) (map[string]interface{}, error)
func (*MockClient) UpdateProjectMember ¶
func (m *MockClient) UpdateProjectMember(ctx context.Context, projectID, userID string, req project.UpdateMemberRequest) error
func (*MockClient) VerifyBackup ¶
func (m *MockClient) VerifyBackup(ctx context.Context, req types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
type Options ¶
type Options struct {
AWSProfile string
AWSRegion string
InvitationToken string
OwnerAccount string
S3ConfigPath string
APIKey string // API key for daemon authentication
}
Options represents configuration options for the API client
type PerformanceOptions ¶
type PerformanceOptions struct {
Timeout time.Duration
MaxConnections int
KeepAlive time.Duration
RequestRetries int
MaxIdleConns int
}
PerformanceOptions represents HTTP client performance configuration
func DefaultPerformanceOptions ¶
func DefaultPerformanceOptions() PerformanceOptions
DefaultPerformanceOptions returns sensible defaults for HTTP client performance
type PolicyAssignResponse ¶
type PolicyAssignResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
AssignedPolicySet string `json:"assigned_policy_set"`
EnforcementStatus string `json:"enforcement_status"`
}
PolicyAssignResponse represents the response to a policy assignment
type PolicyCheckResponse ¶
type PolicyCheckResponse struct {
Allowed bool `json:"allowed"`
TemplateName string `json:"template_name"`
Reason string `json:"reason"`
MatchedPolicies []string `json:"matched_policies,omitempty"`
Suggestions []string `json:"suggestions,omitempty"`
}
PolicyCheckResponse represents the result of a policy check
type PolicyEnforcementResponse ¶
type PolicyEnforcementResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Enabled bool `json:"enabled"`
Status string `json:"status"`
}
PolicyEnforcementResponse represents the response to enforcement changes
type PolicySetInfo ¶
type PolicySetInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Policies int `json:"policies"`
Status string `json:"status"`
Tags map[string]string `json:"tags,omitempty"`
}
PolicySetInfo provides information about a policy set
type PolicySetsResponse ¶
type PolicySetsResponse struct {
PolicySets map[string]PolicySetInfo `json:"policy_sets"`
}
PolicySetsResponse represents available policy sets
type PolicyStatusResponse ¶
type PolicyStatusResponse struct {
Enabled bool `json:"enabled"`
Status string `json:"status"`
StatusIcon string `json:"status_icon"`
AssignedPolicies []string `json:"assigned_policies"`
Message string `json:"message,omitempty"`
}
PolicyStatusResponse represents the policy enforcement status
type PrismAPI ¶
type PrismAPI interface {
// Configuration
SetOptions(Options)
// Instance operations
LaunchInstance(context.Context, types.LaunchRequest) (*types.LaunchResponse, error)
ListInstances(context.Context) (*types.ListResponse, error)
ListInstancesWithRefresh(context.Context, bool) (*types.ListResponse, error)
GetInstance(context.Context, string) (*types.Instance, error)
StartInstance(context.Context, string) error
StopInstance(context.Context, string) error
HibernateInstance(context.Context, string) error
ResumeInstance(context.Context, string) error
GetInstanceHibernationStatus(context.Context, string) (*types.HibernationStatus, error)
DeleteInstance(context.Context, string) error
ConnectInstance(context.Context, string) (string, error)
ExecInstance(context.Context, string, types.ExecRequest) (*types.ExecResult, error)
ResizeInstance(context.Context, types.ResizeRequest) (*types.ResizeResponse, error)
// Tunnel operations
CreateTunnels(context.Context, string, []string) (*CreateTunnelsResponse, error)
ListTunnels(context.Context, string) (*ListTunnelsResponse, error)
CloseTunnel(context.Context, string, string) error
CloseInstanceTunnels(context.Context, string) error
// Log operations
GetInstanceLogs(context.Context, string, types.LogRequest) (*types.LogResponse, error)
GetInstanceLogTypes(context.Context, string) (*types.LogTypesResponse, error)
GetLogsSummary(context.Context) (*types.LogSummaryResponse, error)
// Template operations
ListTemplates(context.Context) (map[string]types.Template, error)
GetTemplate(context.Context, string) (*types.Template, error)
// Template application operations
ApplyTemplate(context.Context, templates.ApplyRequest) (*templates.ApplyResponse, error)
DiffTemplate(context.Context, templates.DiffRequest) (*templates.TemplateDiff, error)
GetInstanceLayers(context.Context, string) ([]templates.AppliedTemplate, error)
RollbackInstance(context.Context, types.RollbackRequest) error
// Idle detection operations (new system)
GetIdlePendingActions(context.Context) ([]types.IdleState, error)
ExecuteIdleActions(context.Context) (*types.IdleExecutionResponse, error)
GetIdleHistory(context.Context) ([]types.IdleHistoryEntry, error)
// Volume operations (EFS - shared storage)
CreateVolume(context.Context, types.VolumeCreateRequest) (*types.StorageVolume, error)
ListVolumes(context.Context) ([]*types.StorageVolume, error)
GetVolume(context.Context, string) (*types.StorageVolume, error)
DeleteVolume(context.Context, string) error
AttachVolume(context.Context, string, string) error
DetachVolume(context.Context, string) error
MountVolume(context.Context, string, string, string) error
UnmountVolume(context.Context, string, string) error
// Storage operations (EBS - local storage)
CreateStorage(context.Context, types.StorageCreateRequest) (*types.StorageVolume, error)
ListStorage(context.Context) ([]*types.StorageVolume, error)
GetStorage(context.Context, string) (*types.StorageVolume, error)
DeleteStorage(context.Context, string) error
AttachStorage(context.Context, string, string) error
DetachStorage(context.Context, string) error
// Project management operations
CreateProject(context.Context, project.CreateProjectRequest) (*types.Project, error)
ListProjects(context.Context, *project.ProjectFilter) (*project.ProjectListResponse, error)
GetProject(context.Context, string) (*types.Project, error)
UpdateProject(context.Context, string, project.UpdateProjectRequest) (*types.Project, error)
DeleteProject(context.Context, string) error
AddProjectMember(context.Context, string, project.AddMemberRequest) error
UpdateProjectMember(context.Context, string, string, project.UpdateMemberRequest) error
RemoveProjectMember(context.Context, string, string) error
GetProjectMembers(context.Context, string) ([]types.ProjectMember, error)
GetProjectBudgetStatus(context.Context, string) (*project.BudgetStatus, error)
SetProjectBudget(context.Context, string, SetProjectBudgetRequest) (map[string]interface{}, error)
UpdateProjectBudget(context.Context, string, UpdateProjectBudgetRequest) (map[string]interface{}, error)
DisableProjectBudget(context.Context, string) (map[string]interface{}, error)
GetProjectCostBreakdown(context.Context, string, time.Time, time.Time) (*types.ProjectCostBreakdown, error)
GetProjectResourceUsage(context.Context, string, time.Duration) (*types.ProjectResourceUsage, error)
GetCostTrends(context.Context, string, string) (map[string]interface{}, error)
PreventProjectLaunches(context.Context, string) (map[string]interface{}, error)
AllowProjectLaunches(context.Context, string) (map[string]interface{}, error)
// Invitation operations (v0.5.11)
GetInvitationByToken(context.Context, string) (*GetInvitationResponse, error)
AcceptInvitation(context.Context, string) (*InvitationActionResponse, error)
DeclineInvitation(context.Context, string, string) (*InvitationActionResponse, error)
SendInvitation(context.Context, string, SendInvitationRequest) (*SendInvitationResponse, error)
SendBulkInvitation(context.Context, string, *types.BulkInvitationRequest) (*types.BulkInvitationResponse, error)
// Shared token operations (v0.5.13)
// Policy management operations (Phase 5A.5)
GetPolicyStatus(context.Context) (*PolicyStatusResponse, error)
ListPolicySets(context.Context) (*PolicySetsResponse, error)
AssignPolicySet(context.Context, string) (*PolicyAssignResponse, error)
SetPolicyEnforcement(context.Context, bool) (*PolicyEnforcementResponse, error)
CheckTemplateAccess(context.Context, string) (*PolicyCheckResponse, error)
// Idle policy operations
ListIdlePolicies(context.Context) ([]*idle.PolicyTemplate, error)
GetIdlePolicy(context.Context, string) (*idle.PolicyTemplate, error)
ApplyIdlePolicy(context.Context, string, string) error
RemoveIdlePolicy(context.Context, string, string) error
GetInstanceIdlePolicies(context.Context, string) ([]*idle.PolicyTemplate, error)
RecommendIdlePolicy(context.Context, string) (*idle.PolicyTemplate, error)
GetIdleSavingsReport(context.Context, string) (map[string]interface{}, error)
// Rightsizing analysis operations
AnalyzeRightsizing(context.Context, types.RightsizingAnalysisRequest) (*types.RightsizingAnalysisResponse, error)
GetRightsizingRecommendations(context.Context) (*types.RightsizingRecommendationsResponse, error)
GetRightsizingStats(context.Context, string) (*types.RightsizingStatsResponse, error)
ExportRightsizingData(context.Context, string) ([]types.InstanceMetrics, error)
GetRightsizingSummary(context.Context) (*types.RightsizingSummaryResponse, error)
GetInstanceMetrics(context.Context, string, int) ([]types.InstanceMetrics, error)
// Status operations
GetStatus(context.Context) (*types.DaemonStatus, error)
Ping(context.Context) error
Shutdown(context.Context) error
// Raw API request method for generic endpoint access
MakeRequest(method, path string, body interface{}) ([]byte, error)
// Registry operations
GetRegistryStatus(context.Context) (*RegistryStatusResponse, error)
SetRegistryStatus(context.Context, bool) error
LookupAMI(context.Context, string, string, string) (*AMIReferenceResponse, error)
ListTemplateAMIs(context.Context, string) ([]AMIReferenceResponse, error)
// Universal AMI System operations (Phase 5.1 Week 2)
ResolveAMI(context.Context, string, map[string]interface{}) (map[string]interface{}, error)
TestAMIAvailability(context.Context, map[string]interface{}) (map[string]interface{}, error)
GetAMICosts(context.Context, string) (map[string]interface{}, error)
PreviewAMIResolution(context.Context, string) (map[string]interface{}, error)
// AMI Creation operations (Phase 5.1 AMI Creation)
CreateAMI(context.Context, types.AMICreationRequest) (map[string]interface{}, error)
GetAMIStatus(context.Context, string) (map[string]interface{}, error)
ListUserAMIs(context.Context) (map[string]interface{}, error)
// AMI Lifecycle Management operations
CleanupAMIs(context.Context, map[string]interface{}) (map[string]interface{}, error)
DeleteAMI(context.Context, map[string]interface{}) (map[string]interface{}, error)
// AMI Snapshot operations
ListAMISnapshots(context.Context, map[string]interface{}) (map[string]interface{}, error)
CreateAMISnapshot(context.Context, map[string]interface{}) (map[string]interface{}, error)
RestoreAMIFromSnapshot(context.Context, map[string]interface{}) (map[string]interface{}, error)
DeleteAMISnapshot(context.Context, map[string]interface{}) (map[string]interface{}, error)
// AMI Freshness Checking (v0.5.4 - Universal Version System)
CheckAMIFreshness(context.Context) (map[string]interface{}, error)
// Instance Snapshot operations
CreateInstanceSnapshot(context.Context, types.InstanceSnapshotRequest) (*types.InstanceSnapshotResult, error)
ListInstanceSnapshots(context.Context) (*types.InstanceSnapshotListResponse, error)
GetInstanceSnapshot(context.Context, string) (*types.InstanceSnapshotInfo, error)
DeleteInstanceSnapshot(context.Context, string) (*types.InstanceSnapshotDeleteResult, error)
RestoreInstanceFromSnapshot(context.Context, string, types.InstanceRestoreRequest) (*types.InstanceRestoreResult, error)
// Template Marketplace operations (Phase 5.2)
SearchMarketplace(context.Context, map[string]interface{}) (map[string]interface{}, error)
GetMarketplaceTemplate(context.Context, string) (map[string]interface{}, error)
PublishMarketplaceTemplate(context.Context, map[string]interface{}) (map[string]interface{}, error)
AddMarketplaceReview(context.Context, string, map[string]interface{}) (map[string]interface{}, error)
ForkMarketplaceTemplate(context.Context, string, map[string]interface{}) (map[string]interface{}, error)
GetMarketplaceFeatured(context.Context) (map[string]interface{}, error)
GetMarketplaceTrending(context.Context) (map[string]interface{}, error)
// Data Backup operations
CreateBackup(context.Context, types.BackupCreateRequest) (*types.BackupCreateResult, error)
ListBackups(context.Context) (*types.BackupListResponse, error)
GetBackup(context.Context, string) (*types.BackupInfo, error)
DeleteBackup(context.Context, string) (*types.BackupDeleteResult, error)
GetBackupContents(context.Context, types.BackupContentsRequest) (*types.BackupContentsResponse, error)
VerifyBackup(context.Context, types.BackupVerifyRequest) (*types.BackupVerifyResult, error)
// Data Restore operations
RestoreBackup(context.Context, types.RestoreRequest) (*types.RestoreResult, error)
GetRestoreStatus(context.Context, string) (*types.RestoreResult, error)
ListRestoreOperations(context.Context) ([]types.RestoreResult, error)
// Version compatibility checking
CheckVersionCompatibility(context.Context, string) error
}
PrismAPI defines the interface for interacting with the Prism API
func ApplyClientOptions ¶
ApplyClientOptions applies configuration options to a client
func ApplyExtendedClientOptions ¶
func ApplyExtendedClientOptions(client PrismAPI, options ExtendedOptions) PrismAPI
ApplyExtendedClientOptions applies extended configuration options to a client
func NewClientWithOptions ¶
NewClientWithOptions creates a new HTTP API client with specific options
type RegistryStatusResponse ¶
type RegistryStatusResponse struct {
// Active indicates if the registry is active
Active bool `json:"active"`
// LastSync is when the registry was last synchronized
LastSync *time.Time `json:"last_sync,omitempty"`
// TemplateCount is the number of templates in the registry
TemplateCount int `json:"template_count"`
// AMICount is the total number of AMIs in the registry
AMICount int `json:"ami_count"`
// Status provides additional status information
Status string `json:"status"`
}
RegistryStatusResponse represents the response from GetRegistryStatus
type SendInvitationRequest ¶ added in v0.5.11
type SendInvitationRequest struct {
Email string `json:"email"`
Role types.ProjectRole `json:"role"`
Message string `json:"message,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
SendInvitationRequest represents a request to send an invitation
type SendInvitationResponse ¶ added in v0.5.11
type SendInvitationResponse struct {
Invitation *types.Invitation `json:"invitation"`
Project *types.Project `json:"project"`
Message string `json:"message"`
}
SendInvitationResponse represents the response from sending an invitation
type SetProjectBudgetRequest ¶
type SetProjectBudgetRequest struct {
TotalBudget float64 `json:"total_budget"`
MonthlyLimit *float64 `json:"monthly_limit,omitempty"`
DailyLimit *float64 `json:"daily_limit,omitempty"`
AlertThresholds []types.BudgetAlert `json:"alert_thresholds,omitempty"`
AutoActions []types.BudgetAutoAction `json:"auto_actions,omitempty"`
BudgetPeriod types.BudgetPeriod `json:"budget_period"`
EndDate *time.Time `json:"end_date,omitempty"`
}
SetProjectBudgetRequest represents a request to set or enable a project budget
type TunnelInfo ¶
type TunnelInfo struct {
InstanceName string `json:"instance_name"`
ServiceName string `json:"service_name"`
ServiceDesc string `json:"service_description"`
RemotePort int `json:"remote_port"`
LocalPort int `json:"local_port"`
LocalURL string `json:"local_url"`
AuthToken string `json:"auth_token,omitempty"` // Authentication token (e.g., Jupyter)
Status string `json:"status"`
StartTime string `json:"start_time,omitempty"`
}
TunnelInfo represents tunnel information from the API
type UpdateProjectBudgetRequest ¶
type UpdateProjectBudgetRequest struct {
TotalBudget *float64 `json:"total_budget,omitempty"`
MonthlyLimit *float64 `json:"monthly_limit,omitempty"`
DailyLimit *float64 `json:"daily_limit,omitempty"`
AlertThresholds []types.BudgetAlert `json:"alert_thresholds,omitempty"`
AutoActions []types.BudgetAutoAction `json:"auto_actions,omitempty"`
EndDate *time.Time `json:"end_date,omitempty"`
}
UpdateProjectBudgetRequest represents a request to update a project budget