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

client

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var ProfileContextKey = profileContextKey{}

ProfileContextKey is used to access profile information in context

Functions

func GetProfileFromContext

func GetProfileFromContext(ctx context.Context) (string, bool)

GetProfileFromContext extracts profile information from context

func SetProfileInContext

func SetProfileInContext(ctx context.Context, profileID string) context.Context

SetProfileInContext adds profile information to 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 AllocationStatus added in v0.6.2

type AllocationStatus struct {
	Exhausted bool    `json:"exhausted"`
	Remaining float64 `json:"remaining"`
}

AllocationStatus represents the status of a budget allocation

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) AddCourseTemplate added in v0.14.0

func (c *HTTPClient) AddCourseTemplate(ctx context.Context, courseID, templateSlug string) error

AddCourseTemplate adds an approved template to a course.

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) AddOnboardingTemplate added in v0.12.0

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

AddOnboardingTemplate adds or updates an onboarding template for a project (#154).

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) AddWorkshopParticipant added in v0.20.0

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

AddWorkshopParticipant adds a participant to a workshop.

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

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 (*HTTPClient) ApproveRequest added in v0.12.0

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

ApproveRequest approves a pending approval request (#153).

func (*HTTPClient) ArchiveCourse added in v0.17.0

func (c *HTTPClient) ArchiveCourse(ctx context.Context, courseID string) (map[string]interface{}, error)

ArchiveCourse archives a course and stops its instances (#162).

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) CancelCapacityBlock added in v0.20.0

func (c *HTTPClient) CancelCapacityBlock(ctx context.Context, id string) error

func (*HTTPClient) CancelTransfer added in v0.5.13

func (c *HTTPClient) CancelTransfer(ctx context.Context, transferID string) error

CancelTransfer cancels a transfer in progress

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) CheckAllocationStatus added in v0.6.2

func (c *HTTPClient) CheckAllocationStatus(ctx context.Context, allocationID string) (*AllocationStatus, error)

CheckAllocationStatus checks if an allocation is exhausted

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) CloseCourse added in v0.14.0

func (c *HTTPClient) CloseCourse(ctx context.Context, courseID string) error

CloseCourse closes a course (POST /api/v1/courses/{id}/close).

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) ConfigureThrottling added in v0.5.13

func (c *HTTPClient) ConfigureThrottling(ctx context.Context, config throttle.Config) error

ConfigureThrottling updates the throttling configuration

func (*HTTPClient) ConnectInstance

func (c *HTTPClient) ConnectInstance(ctx context.Context, name string) (string, error)

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) CreateAllocation added in v0.6.2

CreateAllocation creates a new budget allocation to a project

func (*HTTPClient) CreateBackup

CreateBackup creates a data backup from an instance.

When req.StorageType is "s3", the request is routed to /api/v1/backups (S3 file-level backup via SSM). All other storage types (or the default empty string) route to /api/v1/snapshots (AMI snapshot backup).

func (*HTTPClient) CreateBudget added in v0.6.2

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

CreateBudget creates a new budget pool

func (*HTTPClient) CreateCourse added in v0.14.0

func (c *HTTPClient) CreateCourse(ctx context.Context, req map[string]interface{}) (map[string]interface{}, error)

CreateCourse creates a new course.

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 (*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 (*HTTPClient) CreateWorkshop added in v0.20.0

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

CreateWorkshop creates a new workshop.

func (*HTTPClient) CreateWorkshopFromConfig added in v0.20.0

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

CreateWorkshopFromConfig creates a workshop from a saved config (#183).

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) DeleteAllocation added in v0.6.2

func (c *HTTPClient) DeleteAllocation(ctx context.Context, allocationID string) error

DeleteAllocation deletes an allocation

func (*HTTPClient) DeleteBackup

func (c *HTTPClient) DeleteBackup(ctx context.Context, backupName string) (*types.BackupDeleteResult, error)

DeleteBackup deletes a backup.

It first tries /api/v1/snapshots (AMI backups) and falls back to /api/v1/backups (S3 file backups) on 404.

func (*HTTPClient) DeleteBudget added in v0.6.2

func (c *HTTPClient) DeleteBudget(ctx context.Context, budgetID string) error

DeleteBudget deletes a budget pool

func (*HTTPClient) DeleteCourse added in v0.14.0

func (c *HTTPClient) DeleteCourse(ctx context.Context, courseID string) error

DeleteCourse deletes a course.

func (*HTTPClient) DeleteGrantPeriod added in v0.12.0

func (c *HTTPClient) DeleteGrantPeriod(ctx context.Context, projectID string) error

DeleteGrantPeriod removes the grant period configuration from a project (#152).

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) DeleteOnboardingTemplate added in v0.12.0

func (c *HTTPClient) DeleteOnboardingTemplate(ctx context.Context, projectID, nameOrID string) error

DeleteOnboardingTemplate removes an onboarding template from a project (#154).

func (*HTTPClient) DeleteProject

func (c *HTTPClient) DeleteProject(ctx context.Context, projectID string) error

DeleteProject deletes a project

func (*HTTPClient) DeleteProjectBudgetShare added in v0.12.0

func (c *HTTPClient) DeleteProjectBudgetShare(ctx context.Context, projectID, shareID string) error

DeleteProjectBudgetShare reverses a budget share (#156 cross-project borrow).

func (*HTTPClient) DeleteProjectCushion added in v0.11.0

func (c *HTTPClient) DeleteProjectCushion(ctx context.Context, projectID string) error

DeleteProjectCushion removes the budget cushion configuration for 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) DeleteWorkshop added in v0.20.0

func (c *HTTPClient) DeleteWorkshop(ctx context.Context, workshopID string) error

DeleteWorkshop deletes a workshop.

func (*HTTPClient) DenyRequest added in v0.12.0

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

DenyRequest denies a pending approval request.

func (*HTTPClient) DescribeCapacityBlock added in v0.20.0

func (c *HTTPClient) DescribeCapacityBlock(ctx context.Context, id string) (map[string]interface{}, 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 (*HTTPClient) DisableProjectBudget

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

DisableProjectBudget disables budget tracking for a project

func (*HTTPClient) DistributeCourseBudget added in v0.14.0

func (c *HTTPClient) DistributeCourseBudget(ctx context.Context, courseID string, amountPerStudent float64) (map[string]interface{}, error)

DistributeCourseBudget sets per-student budget for a course.

func (*HTTPClient) EndWorkshop added in v0.20.0

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

EndWorkshop ends a workshop and stops all participant instances (#135).

func (*HTTPClient) EnrollCourseMember added in v0.14.0

func (c *HTTPClient) EnrollCourseMember(ctx context.Context, courseID string, req map[string]interface{}) (map[string]interface{}, error)

EnrollCourseMember enrolls a member in a course.

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

func (c *HTTPClient) ExtendSharedToken(ctx context.Context, token string, addDays int) error

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) GetAllStorageAnalytics added in v0.20.0

func (c *HTTPClient) GetAllStorageAnalytics(ctx context.Context, period string) (map[string]interface{}, error)

func (*HTTPClient) GetAllocation added in v0.6.2

func (c *HTTPClient) GetAllocation(ctx context.Context, allocationID string) (*types.ProjectBudgetAllocation, error)

GetAllocation retrieves a specific allocation by ID

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.

It first checks /api/v1/snapshots (AMI backups) and falls back to /api/v1/backups (S3 file backups) when the name is not found.

func (*HTTPClient) GetBackupContents

GetBackupContents lists the contents of a backup NOTE: AMI snapshots don't support content listing - this returns a stub response

func (*HTTPClient) GetBudget added in v0.6.2

func (c *HTTPClient) GetBudget(ctx context.Context, budgetID string) (*types.Budget, error)

GetBudget retrieves a specific budget by ID

func (*HTTPClient) GetBudgetAllocations added in v0.6.2

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

GetBudgetAllocations retrieves all allocations for a budget

func (*HTTPClient) GetBudgetSummary added in v0.6.2

func (c *HTTPClient) GetBudgetSummary(ctx context.Context, budgetID string) (*types.BudgetSummary, error)

GetBudgetSummary retrieves a budget summary with allocation details

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) GetCourse added in v0.14.0

func (c *HTTPClient) GetCourse(ctx context.Context, courseID string) (map[string]interface{}, error)

GetCourse fetches a single course by ID.

func (*HTTPClient) GetCourseAuditLog added in v0.17.0

func (c *HTTPClient) GetCourseAuditLog(ctx context.Context, courseID, studentID, since string, limit int) (map[string]interface{}, error)

GetCourseAuditLog returns audit log entries for a course (#165).

func (*HTTPClient) GetCourseBudget added in v0.14.0

func (c *HTTPClient) GetCourseBudget(ctx context.Context, courseID string) (map[string]interface{}, error)

GetCourseBudget returns the budget summary for a course.

func (*HTTPClient) GetCourseOverview added in v0.17.0

func (c *HTTPClient) GetCourseOverview(ctx context.Context, courseID string) (map[string]interface{}, error)

GetCourseOverview returns the TA dashboard overview for a course (#168).

func (*HTTPClient) GetCourseReport added in v0.17.0

func (c *HTTPClient) GetCourseReport(ctx context.Context, courseID, format string) (map[string]interface{}, error)

GetCourseReport returns the usage report for a course (#173). format may be "" (JSON) or "csv".

func (*HTTPClient) GetGrantPeriod added in v0.12.0

func (c *HTTPClient) GetGrantPeriod(ctx context.Context, projectID string) (*types.GrantPeriod, error)

GetGrantPeriod returns the grant period for a project (#152).

func (*HTTPClient) GetIdleHistory

func (c *HTTPClient) GetIdleHistory(ctx context.Context) ([]types.IdleHistoryEntry, error)

func (*HTTPClient) GetIdlePendingActions

func (c *HTTPClient) GetIdlePendingActions(ctx context.Context) ([]types.IdleState, error)

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

func (c *HTTPClient) GetInstance(ctx context.Context, name string) (*types.Instance, error)

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) GetInvitationByID added in v0.6.2

func (c *HTTPClient) GetInvitationByID(ctx context.Context, invitationID string) (*GetInvitationResponse, error)

GetInvitationByID retrieves an invitation by its ID GET /api/v1/invitations/by-id/{invitationID}

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) GetMonthlyReport added in v0.12.0

func (c *HTTPClient) GetMonthlyReport(ctx context.Context, projectID, month, format string) (string, error)

GetMonthlyReport retrieves a monthly budget report (#141).

func (*HTTPClient) GetPolicyStatus

func (c *HTTPClient) GetPolicyStatus(ctx context.Context) (*PolicyStatusResponse, error)

GetPolicyStatus returns the current policy enforcement status

func (*HTTPClient) GetProgress added in v0.7.2

func (c *HTTPClient) GetProgress(ctx context.Context, name string) (*types.ProgressResponse, error)

GetProgress returns the current setup progress for an instance (v0.7.2 - Issue #453)

func (*HTTPClient) GetProject

func (c *HTTPClient) GetProject(ctx context.Context, projectID string) (*types.Project, error)

GetProject retrieves a specific project

func (*HTTPClient) GetProjectAllocations added in v0.6.2

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

GetProjectAllocations retrieves all allocations for a project

func (*HTTPClient) GetProjectBudgetHistory added in v0.8.0

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

GetProjectBudgetHistory returns daily cost history for a project (Issue #482)

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) GetProjectCredits added in v0.12.0

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

GetProjectCredits retrieves AWS credit balances for a project (Issue #207).

func (*HTTPClient) GetProjectCushion added in v0.11.0

func (c *HTTPClient) GetProjectCushion(ctx context.Context, projectID string) (map[string]interface{}, error)

GetProjectCushion retrieves the budget cushion configuration for a project.

func (*HTTPClient) GetProjectDiscounts added in v0.12.0

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

GetProjectDiscounts retrieves discount/credit discovery results for a project (Issue #207).

func (*HTTPClient) GetProjectFundingSummary added in v0.6.2

func (c *HTTPClient) GetProjectFundingSummary(ctx context.Context, projectID string) (*types.ProjectFundingSummary, error)

GetProjectFundingSummary retrieves a summary of all project funding

func (*HTTPClient) GetProjectGDEW added in v0.12.0

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

GetProjectGDEW retrieves the GDEW credit status for a project (Issue #206).

func (*HTTPClient) GetProjectMembers

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

GetProjectMembers retrieves project members

func (*HTTPClient) GetProjectQuotas added in v0.12.0

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

GetProjectQuotas returns the role quotas for a project (#151).

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 NOTE: For AMI snapshots, use GetInstance() to check the restored instance status

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) GetStorageAnalytics added in v0.20.0

func (c *HTTPClient) GetStorageAnalytics(ctx context.Context, name, period string) (map[string]interface{}, error)

func (*HTTPClient) GetTemplate

func (c *HTTPClient) GetTemplate(ctx context.Context, name string) (*types.Template, error)

GetTemplate gets details of a specific template

func (*HTTPClient) GetThrottlingRemaining added in v0.5.13

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

GetThrottlingRemaining retrieves remaining launch tokens for a scope

func (*HTTPClient) GetThrottlingStatus added in v0.5.13

func (c *HTTPClient) GetThrottlingStatus(ctx context.Context, scope string) (*throttle.Status, error)

GetThrottlingStatus retrieves the current throttling status for a scope

func (*HTTPClient) GetTransferStatus added in v0.5.13

func (c *HTTPClient) GetTransferStatus(ctx context.Context, transferID string) (*storage.TransferProgress, error)

GetTransferStatus retrieves the current status of a transfer

func (*HTTPClient) GetVolume

func (c *HTTPClient) GetVolume(ctx context.Context, name string) (*types.StorageVolume, error)

func (*HTTPClient) GetWorkshop added in v0.20.0

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

GetWorkshop fetches a single workshop by ID.

func (*HTTPClient) GetWorkshopDashboard added in v0.20.0

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

GetWorkshopDashboard returns the live dashboard for a workshop (#179).

func (*HTTPClient) GetWorkshopDownload added in v0.20.0

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

GetWorkshopDownload returns the download manifest for participant work (#180).

func (*HTTPClient) HibernateInstance

func (c *HTTPClient) HibernateInstance(ctx context.Context, name string) error

HibernateInstance hibernates a running instance

func (*HTTPClient) ImportCourseRoster added in v0.17.0

func (c *HTTPClient) ImportCourseRoster(ctx context.Context, courseID string, csvBytes []byte, format string) (map[string]interface{}, error)

ImportCourseRoster imports a CSV roster with optional LMS format (#166).

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) ListAllApprovals added in v0.12.0

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

ListAllApprovals lists approval requests across all owned projects (#153 dashboard).

func (*HTTPClient) ListApprovals added in v0.12.0

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

ListApprovals lists approval requests for a project (#153).

func (*HTTPClient) ListBackups

func (c *HTTPClient) ListBackups(ctx context.Context) (*types.BackupListResponse, error)

ListBackups lists all data backups, merging AMI snapshots and S3 file backups.

func (*HTTPClient) ListBudgets added in v0.6.2

func (c *HTTPClient) ListBudgets(ctx context.Context) ([]*types.Budget, error)

ListBudgets lists all budget pools

func (*HTTPClient) ListCapacityBlocks added in v0.20.0

func (c *HTTPClient) ListCapacityBlocks(ctx context.Context) ([]interface{}, error)

func (*HTTPClient) ListCourseMembers added in v0.14.0

func (c *HTTPClient) ListCourseMembers(ctx context.Context, courseID string, role string) (map[string]interface{}, error)

ListCourseMembers lists members of a course.

func (*HTTPClient) ListCourseTemplates added in v0.14.0

func (c *HTTPClient) ListCourseTemplates(ctx context.Context, courseID string) (map[string]interface{}, error)

ListCourseTemplates lists approved templates for a course.

func (*HTTPClient) ListCourses added in v0.14.0

func (c *HTTPClient) ListCourses(ctx context.Context, params string) (map[string]interface{}, error)

ListCourses lists courses with optional query params.

func (*HTTPClient) ListIdlePolicies

func (c *HTTPClient) ListIdlePolicies(ctx context.Context) ([]*idle.PolicyTemplate, error)

ListIdlePolicies returns all available idle policy templates

func (*HTTPClient) ListInstanceFiles added in v0.20.0

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

func (*HTTPClient) ListInstanceS3Mounts added in v0.20.0

func (c *HTTPClient) ListInstanceS3Mounts(ctx context.Context, instanceName string) ([]interface{}, error)

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) ListOnboardingTemplates added in v0.12.0

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

ListOnboardingTemplates returns the onboarding templates for a project (#154).

func (*HTTPClient) ListPolicySets

func (c *HTTPClient) ListPolicySets(ctx context.Context) (*PolicySetsResponse, error)

ListPolicySets returns available policy sets

func (*HTTPClient) ListProjectBudgetShares added in v0.12.0

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

ListProjectBudgetShares returns all budget share records for a project.

func (*HTTPClient) ListProjectInvitations added in v0.8.0

func (c *HTTPClient) ListProjectInvitations(ctx context.Context, projectID string, status string) (*ListProjectInvitationsResponse, error)

ListProjectInvitations lists all invitations for a project GET /api/v1/projects/{projectID}/invitations?status={status}

func (*HTTPClient) ListProjectThrottleOverrides added in v0.5.13

func (c *HTTPClient) ListProjectThrottleOverrides(ctx context.Context) ([]throttle.Override, error)

ListProjectThrottleOverrides lists all project throttling overrides

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 NOTE: For AMI snapshots, this returns instances that were restored from snapshots

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

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

ListTemplates lists all available templates

func (*HTTPClient) ListTransfers added in v0.5.13

func (c *HTTPClient) ListTransfers(ctx context.Context) ([]*storage.TransferProgress, error)

ListTransfers lists all active transfers

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) ListWorkshopConfigs added in v0.20.0

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

ListWorkshopConfigs lists saved workshop config templates (#183).

func (*HTTPClient) ListWorkshops added in v0.20.0

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

ListWorkshops lists workshops with optional query params.

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) MountS3Bucket added in v0.20.0

func (c *HTTPClient) MountS3Bucket(ctx context.Context, instanceName, bucket, mountPath, method string, readOnly bool) (map[string]interface{}, error)

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) ProvisionStudent added in v0.17.0

func (c *HTTPClient) ProvisionStudent(ctx context.Context, courseID, studentID string, req map[string]interface{}) (map[string]interface{}, error)

ProvisionStudent provisions a workspace for a student (#172).

func (*HTTPClient) ProvisionWorkshop added in v0.20.0

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

ProvisionWorkshop bulk-provisions participant workspaces (#178).

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) PullFileFromInstance added in v0.20.0

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

func (*HTTPClient) PushFileToInstance added in v0.20.0

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

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) RecordSpending added in v0.6.2

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

RecordSpending records spending against an allocation

func (*HTTPClient) RedeemSharedToken added in v0.5.11

RedeemSharedToken redeems a shared token POST /api/v1/invitations/shared/redeem

func (*HTTPClient) RemoveCourseTemplate added in v0.14.0

func (c *HTTPClient) RemoveCourseTemplate(ctx context.Context, courseID, templateSlug string) error

RemoveCourseTemplate removes an approved template from a course.

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) RemoveProjectThrottleOverride added in v0.5.13

func (c *HTTPClient) RemoveProjectThrottleOverride(ctx context.Context, projectID string) error

RemoveProjectThrottleOverride removes a project-specific override

func (*HTTPClient) RemoveWorkshopParticipant added in v0.20.0

func (c *HTTPClient) RemoveWorkshopParticipant(ctx context.Context, workshopID, userID string) error

RemoveWorkshopParticipant removes a participant from a workshop.

func (*HTTPClient) ResendInvitation added in v0.6.2

func (c *HTTPClient) ResendInvitation(ctx context.Context, invitationID string) error

ResendInvitation resends an invitation email POST /api/v1/invitations/{invitationID}/resend

func (*HTTPClient) ReserveCapacityBlock added in v0.20.0

func (c *HTTPClient) ReserveCapacityBlock(ctx context.Context, req map[string]interface{}) (map[string]interface{}, error)

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 NOTE: AMI snapshot restore creates a NEW instance from the snapshot This differs from file-level restore which would restore to an existing instance

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) RevokeInvitation added in v0.6.2

func (c *HTTPClient) RevokeInvitation(ctx context.Context, invitationID string) error

RevokeInvitation revokes a pending invitation DELETE /api/v1/invitations/{invitationID}

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) SaveWorkshopConfig added in v0.20.0

func (c *HTTPClient) SaveWorkshopConfig(ctx context.Context, workshopID, configName string) (map[string]interface{}, error)

SaveWorkshopConfig saves a workshop's settings as a reusable config (#183).

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) SetGrantPeriod added in v0.12.0

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

SetGrantPeriod sets the grant period for a project (#152).

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) SetProjectCushion added in v0.11.0

func (c *HTTPClient) SetProjectCushion(ctx context.Context, projectID string, cfg map[string]interface{}) (map[string]interface{}, error)

SetProjectCushion sets the budget cushion configuration for a project.

func (*HTTPClient) SetProjectQuota added in v0.12.0

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

SetProjectQuota upserts a role quota for a project (#151).

func (*HTTPClient) SetProjectThrottleOverride added in v0.5.13

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

SetProjectThrottleOverride sets a project-specific throttling override

func (*HTTPClient) SetRegistryStatus

func (c *HTTPClient) SetRegistryStatus(ctx context.Context, active bool) error

func (*HTTPClient) ShareProjectBudget added in v0.12.0

func (c *HTTPClient) ShareProjectBudget(ctx context.Context, req types.BudgetShareRequest) (*types.BudgetShareRecord, error)

ShareProjectBudget transfers budget between projects or to a member (#145, #155, #156).

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) StartTransfer added in v0.5.13

func (c *HTTPClient) StartTransfer(ctx context.Context, req TransferRequest) (*TransferResponse, error)

StartTransfer initiates a file transfer (upload or download)

func (*HTTPClient) StopInstance

func (c *HTTPClient) StopInstance(ctx context.Context, name string) error

StopInstance stops a running instance

func (*HTTPClient) SubmitApproval added in v0.12.0

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

SubmitApproval creates a new approval request (#149).

func (*HTTPClient) TADebugStudent added in v0.14.0

func (c *HTTPClient) TADebugStudent(ctx context.Context, courseID, studentID string) (map[string]interface{}, error)

TADebugStudent returns debug info for a student (TA/instructor only).

func (*HTTPClient) TAResetStudent added in v0.14.0

func (c *HTTPClient) TAResetStudent(ctx context.Context, courseID string, req map[string]interface{}) (map[string]interface{}, error)

TAResetStudent resets a student's instance (TA/instructor only).

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) UnenrollCourseMember added in v0.14.0

func (c *HTTPClient) UnenrollCourseMember(ctx context.Context, courseID, userID string) error

UnenrollCourseMember removes a member from a course.

func (*HTTPClient) UnmountS3Bucket added in v0.20.0

func (c *HTTPClient) UnmountS3Bucket(ctx context.Context, instanceName, mountPath string) error

func (*HTTPClient) UnmountVolume

func (c *HTTPClient) UnmountVolume(ctx context.Context, volumeName, instanceName string) error

func (*HTTPClient) UpdateAllocation added in v0.6.2

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

UpdateAllocation updates an existing allocation

func (*HTTPClient) UpdateBudget added in v0.6.2

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

UpdateBudget updates an existing budget

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) UpdateProjectGDEW added in v0.12.0

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

UpdateProjectGDEW posts spend/egress figures and returns updated GDEW status (Issue #206).

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) UpdateWorkshop added in v0.20.0

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

UpdateWorkshop updates a workshop.

func (*HTTPClient) VerifyBackup

VerifyBackup verifies backup integrity NOTE: For AMI snapshots, verification checks if the snapshot exists and is in a valid state

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 ListProjectInvitationsResponse added in v0.8.0

type ListProjectInvitationsResponse struct {
	Invitations []*types.Invitation `json:"invitations"`
	Total       int                 `json:"total"`
}

ListProjectInvitationsResponse represents the response from listing project invitations

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) AddCourseTemplate added in v0.17.0

func (m *MockClient) AddCourseTemplate(ctx context.Context, courseID, templateSlug string) error

func (*MockClient) AddInstance

func (m *MockClient) AddInstance(name string, instance *types.Instance)

func (*MockClient) AddMarketplaceReview

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

func (*MockClient) AddOnboardingTemplate added in v0.12.0

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

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) AddWorkshopParticipant added in v0.20.0

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

func (*MockClient) AnalyzeRightsizing

Rightsizing analysis operations

func (*MockClient) ApplyIdlePolicy

func (m *MockClient) ApplyIdlePolicy(ctx context.Context, instanceID, policyID string) error

func (*MockClient) ApplyTemplate

Template application operations

func (*MockClient) ApproveRequest added in v0.12.0

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

func (*MockClient) ArchiveCourse added in v0.17.0

func (m *MockClient) ArchiveCourse(ctx context.Context, courseID string) (map[string]interface{}, error)

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) CancelTransfer added in v0.5.13

func (m *MockClient) CancelTransfer(ctx context.Context, transferID 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 (m *MockClient) CleanupAMIs(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

func (*MockClient) CloseCourse added in v0.17.0

func (m *MockClient) CloseCourse(ctx context.Context, courseID string) error

func (*MockClient) ConnectInstance

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

func (*MockClient) CreateAMI

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

func (*MockClient) CreateAMISnapshot

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

func (*MockClient) CreateBackup

Backup operations

func (*MockClient) CreateCourse added in v0.17.0

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

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

Storage operations

func (*MockClient) CreateVolume

Volume operations

func (*MockClient) CreateWorkshop added in v0.20.0

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

func (*MockClient) CreateWorkshopFromConfig added in v0.20.0

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

func (*MockClient) DeleteAMI

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

func (*MockClient) DeleteAMISnapshot

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

func (*MockClient) DeleteBackup

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

func (*MockClient) DeleteCourse added in v0.17.0

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

func (*MockClient) DeleteGrantPeriod added in v0.12.0

func (m *MockClient) DeleteGrantPeriod(ctx context.Context, projectID string) 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) DeleteOnboardingTemplate added in v0.12.0

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

func (*MockClient) DeleteProject

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

func (*MockClient) DeleteProjectBudgetShare added in v0.12.0

func (m *MockClient) DeleteProjectBudgetShare(ctx context.Context, projectID, shareID 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) DeleteWorkshop added in v0.20.0

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

func (*MockClient) DenyRequest added in v0.12.0

func (m *MockClient) DenyRequest(ctx context.Context, projectID, requestID, note string) (*project.ApprovalRequest, 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 (*MockClient) DisableProjectBudget

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

func (*MockClient) DistributeCourseBudget added in v0.17.0

func (m *MockClient) DistributeCourseBudget(ctx context.Context, courseID string, amountPerStudent float64) (map[string]interface{}, error)

func (*MockClient) EndWorkshop added in v0.20.0

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

func (*MockClient) EnrollCourseMember added in v0.17.0

func (m *MockClient) EnrollCourseMember(ctx context.Context, courseID string, req map[string]interface{}) (map[string]interface{}, error)

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 (m *MockClient) ForkMarketplaceTemplate(ctx context.Context, templateID string, fork map[string]interface{}) (map[string]interface{}, error)

func (*MockClient) GetAMICosts

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

func (*MockClient) GetAMIStatus

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

func (*MockClient) GetBackup

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

func (*MockClient) GetBackupContents

func (*MockClient) GetCourse added in v0.17.0

func (m *MockClient) GetCourse(ctx context.Context, courseID string) (map[string]interface{}, error)

func (*MockClient) GetCourseAuditLog added in v0.17.0

func (m *MockClient) GetCourseAuditLog(ctx context.Context, courseID, studentID, since string, limit int) (map[string]interface{}, error)

func (*MockClient) GetCourseBudget added in v0.17.0

func (m *MockClient) GetCourseBudget(ctx context.Context, courseID string) (map[string]interface{}, error)

func (*MockClient) GetCourseOverview added in v0.17.0

func (m *MockClient) GetCourseOverview(ctx context.Context, courseID string) (map[string]interface{}, error)

func (*MockClient) GetCourseReport added in v0.17.0

func (m *MockClient) GetCourseReport(ctx context.Context, courseID, format string) (map[string]interface{}, error)

func (*MockClient) GetGrantPeriod added in v0.12.0

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

func (*MockClient) GetIdleHistory

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

func (*MockClient) GetIdlePendingActions

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

Idle detection operations

func (*MockClient) GetIdlePolicy

func (m *MockClient) GetIdlePolicy(ctx context.Context, id string) (*idle.PolicyTemplate, error)

func (*MockClient) GetIdleSavingsReport

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

func (*MockClient) GetInstance

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

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 (m *MockClient) GetMarketplaceTemplate(ctx context.Context, templateID string) (map[string]interface{}, error)

func (*MockClient) GetMarketplaceTrending

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

func (*MockClient) GetMonthlyReport added in v0.12.0

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

func (*MockClient) GetPolicyStatus

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

Policy management operations

func (*MockClient) GetProject

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

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) GetProjectQuotas added in v0.12.0

func (m *MockClient) GetProjectQuotas(ctx context.Context, projectID string) ([]types.RoleQuota, 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 (m *MockClient) GetTemplate(ctx context.Context, name string) (*types.Template, error)

func (*MockClient) GetTransferStatus added in v0.5.13

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

func (*MockClient) GetVolume

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

func (*MockClient) GetWorkshop added in v0.20.0

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

func (*MockClient) GetWorkshopDashboard added in v0.20.0

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

func (*MockClient) GetWorkshopDownload added in v0.20.0

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

func (*MockClient) HibernateInstance

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

Hibernation operations

func (*MockClient) ImportCourseRoster added in v0.17.0

func (m *MockClient) ImportCourseRoster(ctx context.Context, courseID string, csvBytes []byte, format string) (map[string]interface{}, error)

func (*MockClient) LaunchInstance

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

Instance operations

func (*MockClient) ListAMISnapshots

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

func (*MockClient) ListAllApprovals added in v0.12.0

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

func (*MockClient) ListApprovals added in v0.12.0

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

func (*MockClient) ListBackups

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

func (*MockClient) ListCourseMembers added in v0.17.0

func (m *MockClient) ListCourseMembers(ctx context.Context, courseID string, role string) (map[string]interface{}, error)

func (*MockClient) ListCourseTemplates added in v0.17.0

func (m *MockClient) ListCourseTemplates(ctx context.Context, courseID string) (map[string]interface{}, error)

func (*MockClient) ListCourses added in v0.17.0

func (m *MockClient) ListCourses(ctx context.Context, params string) (map[string]interface{}, 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) ListOnboardingTemplates added in v0.12.0

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

func (*MockClient) ListPolicySets

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

func (*MockClient) ListProjectBudgetShares added in v0.12.0

func (m *MockClient) ListProjectBudgetShares(ctx context.Context, projectID string) ([]*types.BudgetShareRecord, 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

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

Template operations

func (*MockClient) ListTransfers added in v0.5.13

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

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) ListWorkshopConfigs added in v0.20.0

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

func (*MockClient) ListWorkshops added in v0.20.0

func (m *MockClient) ListWorkshops(ctx context.Context, params string) (map[string]interface{}, 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) Ping

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

func (*MockClient) PreviewAMIResolution

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

func (*MockClient) ProvisionStudent added in v0.17.0

func (m *MockClient) ProvisionStudent(ctx context.Context, courseID, studentID string, req map[string]interface{}) (map[string]interface{}, error)

func (*MockClient) ProvisionWorkshop added in v0.20.0

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

func (*MockClient) PublishMarketplaceTemplate

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

func (*MockClient) RecommendIdlePolicy

func (m *MockClient) RecommendIdlePolicy(ctx context.Context, instanceID string) (*idle.PolicyTemplate, error)

func (*MockClient) RemoveCourseTemplate added in v0.17.0

func (m *MockClient) RemoveCourseTemplate(ctx context.Context, courseID, templateSlug string) 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) RemoveWorkshopParticipant added in v0.20.0

func (m *MockClient) RemoveWorkshopParticipant(ctx context.Context, workshopID, 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 (m *MockClient) RestoreAMIFromSnapshot(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)

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) SaveWorkshopConfig added in v0.20.0

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

func (*MockClient) SearchMarketplace

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

func (*MockClient) SetGrantPeriod added in v0.12.0

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

func (*MockClient) SetOptions

func (m *MockClient) SetOptions(opts Options)

Configuration

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) SetProjectQuota added in v0.12.0

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

func (*MockClient) SetRegistryStatus

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

func (*MockClient) ShareProjectBudget added in v0.12.0

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

func (*MockClient) Shutdown

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

func (*MockClient) StartInstance

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

func (*MockClient) StartTransfer added in v0.5.13

func (m *MockClient) StartTransfer(ctx context.Context, req TransferRequest) (*TransferResponse, error)

Transfer operations (S3-backed file transfer)

func (*MockClient) StopInstance

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

func (*MockClient) SubmitApproval added in v0.12.0

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

func (*MockClient) TADebugStudent added in v0.17.0

func (m *MockClient) TADebugStudent(ctx context.Context, courseID, studentID string) (map[string]interface{}, error)

func (*MockClient) TAResetStudent added in v0.17.0

func (m *MockClient) TAResetStudent(ctx context.Context, courseID string, req map[string]interface{}) (map[string]interface{}, error)

func (*MockClient) TestAMIAvailability

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

func (*MockClient) UnenrollCourseMember added in v0.17.0

func (m *MockClient) UnenrollCourseMember(ctx context.Context, courseID, userID string) error

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) UpdateWorkshop added in v0.20.0

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

func (*MockClient) VerifyBackup

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)
	GetProgress(context.Context, string) (*types.ProgressResponse, error) // Launch progress (v0.7.2)
	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)
	GetProjectBudgetHistory(context.Context, string, int) ([]float64, error) // Issue #482
	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)
	GetProjectCushion(context.Context, string) (map[string]interface{}, error)
	SetProjectCushion(context.Context, string, map[string]interface{}) (map[string]interface{}, error)
	DeleteProjectCushion(context.Context, string) error
	GetProjectGDEW(context.Context, string) (map[string]interface{}, error)
	UpdateProjectGDEW(context.Context, string, float64, float64) (map[string]interface{}, error)
	GetProjectDiscounts(context.Context, string) (map[string]interface{}, error)
	GetProjectCredits(context.Context, string) (map[string]interface{}, error)

	// Budget management operations (v0.6.2)
	CreateBudget(context.Context, project.CreateBudgetRequest) (*types.Budget, error)
	GetBudget(context.Context, string) (*types.Budget, error)
	ListBudgets(context.Context) ([]*types.Budget, error)
	UpdateBudget(context.Context, string, project.UpdateBudgetRequest) (*types.Budget, error)
	DeleteBudget(context.Context, string) error
	GetBudgetSummary(context.Context, string) (*types.BudgetSummary, error)
	GetBudgetAllocations(context.Context, string) ([]*types.ProjectBudgetAllocation, error)

	// Allocation management operations (v0.6.2)
	CreateAllocation(context.Context, project.CreateAllocationRequest) (*types.ProjectBudgetAllocation, error)
	GetAllocation(context.Context, string) (*types.ProjectBudgetAllocation, error)
	GetProjectAllocations(context.Context, string) ([]*types.ProjectBudgetAllocation, error)
	UpdateAllocation(context.Context, string, project.UpdateAllocationRequest) (*types.ProjectBudgetAllocation, error)
	DeleteAllocation(context.Context, string) error
	RecordSpending(context.Context, string, float64) (*project.SpendingResult, error)
	CheckAllocationStatus(context.Context, string) (*AllocationStatus, error)
	GetProjectFundingSummary(context.Context, string) (*types.ProjectFundingSummary, error)

	// Invitation operations (v0.5.11)
	GetInvitationByToken(context.Context, string) (*GetInvitationResponse, error)
	GetInvitationByID(context.Context, string) (*GetInvitationResponse, error) // v0.6.2 (Issue #383)
	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)
	RevokeInvitation(context.Context, string) error                                                  // v0.6.2 (Issue #383)
	ResendInvitation(context.Context, string) error                                                  // v0.6.2 (Issue #383)
	ListProjectInvitations(context.Context, string, string) (*ListProjectInvitationsResponse, error) // projectID, status (Issue #50)

	// Shared token operations (v0.5.13)
	CreateSharedToken(context.Context, string, *types.CreateSharedTokenRequest) (*types.SharedInvitationToken, error)
	RedeemSharedToken(context.Context, *types.RedeemSharedTokenRequest) (*types.RedeemSharedTokenResponse, error)
	GetSharedToken(context.Context, string) (*types.SharedInvitationToken, error)
	ListSharedTokens(context.Context, string) ([]*types.SharedInvitationToken, error)
	ExtendSharedToken(context.Context, string, int) error
	RevokeSharedToken(context.Context, string) error

	// 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)

	// Transfer operations (S3-backed file transfer)
	StartTransfer(context.Context, TransferRequest) (*TransferResponse, error)
	GetTransferStatus(context.Context, string) (*storage.TransferProgress, error)
	ListTransfers(context.Context) ([]*storage.TransferProgress, error)
	CancelTransfer(context.Context, string) error

	// Throttling operations (v0.6.0 - Issue #90)
	GetThrottlingStatus(context.Context, string) (*throttle.Status, error)
	ConfigureThrottling(context.Context, throttle.Config) error
	GetThrottlingRemaining(context.Context, string) (map[string]interface{}, error)
	SetProjectThrottleOverride(context.Context, string, throttle.Override) error
	RemoveProjectThrottleOverride(context.Context, string) error
	ListProjectThrottleOverrides(context.Context) ([]throttle.Override, 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

	// Resource quota management (#151)
	GetProjectQuotas(ctx context.Context, projectID string) ([]types.RoleQuota, error)
	SetProjectQuota(ctx context.Context, projectID string, quota types.RoleQuota) error

	// Grant period management (#152, #144)
	GetGrantPeriod(ctx context.Context, projectID string) (*types.GrantPeriod, error)
	SetGrantPeriod(ctx context.Context, projectID string, gp types.GrantPeriod) error
	DeleteGrantPeriod(ctx context.Context, projectID string) error

	// Budget sharing / reallocation (#143, #145, #155, #156)
	ShareProjectBudget(ctx context.Context, req types.BudgetShareRequest) (*types.BudgetShareRecord, error)
	ListProjectBudgetShares(ctx context.Context, projectID string) ([]*types.BudgetShareRecord, error)
	DeleteProjectBudgetShare(ctx context.Context, projectID, shareID string) error

	// Approval workflow (#148, #149, #153, #157)
	SubmitApproval(ctx context.Context, projectID string, approvalType project.ApprovalType, details map[string]interface{}, reason string) (*project.ApprovalRequest, error)
	ListApprovals(ctx context.Context, projectID string, status project.ApprovalStatus) ([]*project.ApprovalRequest, error)
	ListAllApprovals(ctx context.Context, status project.ApprovalStatus) ([]*project.ApprovalRequest, error)
	ApproveRequest(ctx context.Context, projectID, requestID, note string) (*project.ApprovalRequest, error)
	DenyRequest(ctx context.Context, projectID, requestID, note string) (*project.ApprovalRequest, error)

	// Monthly budget reports (#141)
	GetMonthlyReport(ctx context.Context, projectID, month, format string) (string, error)

	// Onboarding templates (#154)
	ListOnboardingTemplates(ctx context.Context, projectID string) ([]types.OnboardingTemplate, error)
	AddOnboardingTemplate(ctx context.Context, projectID string, tmpl types.OnboardingTemplate) error
	DeleteOnboardingTemplate(ctx context.Context, projectID, nameOrID string) error

	// v0.14.0 — University Education System (core CRUD, in interface for fixture cleanup)
	DeleteCourse(ctx context.Context, courseID string) error

	// v0.18.0 — Workshop & Event Management (#135, #176-#184)
	ListWorkshops(ctx context.Context, params string) (map[string]interface{}, error)
	CreateWorkshop(ctx context.Context, req map[string]interface{}) (map[string]interface{}, error)
	GetWorkshop(ctx context.Context, workshopID string) (map[string]interface{}, error)
	UpdateWorkshop(ctx context.Context, workshopID string, req map[string]interface{}) (map[string]interface{}, error)
	DeleteWorkshop(ctx context.Context, workshopID string) error
	ProvisionWorkshop(ctx context.Context, workshopID string) (map[string]interface{}, error)
	GetWorkshopDashboard(ctx context.Context, workshopID string) (map[string]interface{}, error)
	EndWorkshop(ctx context.Context, workshopID string) (map[string]interface{}, error)
	GetWorkshopDownload(ctx context.Context, workshopID string) (map[string]interface{}, error)
	ListWorkshopConfigs(ctx context.Context) (map[string]interface{}, error)
	SaveWorkshopConfig(ctx context.Context, workshopID, name string) (map[string]interface{}, error)
	CreateWorkshopFromConfig(ctx context.Context, configName string, req map[string]interface{}) (map[string]interface{}, error)
	AddWorkshopParticipant(ctx context.Context, workshopID string, req map[string]interface{}) (map[string]interface{}, error)
	RemoveWorkshopParticipant(ctx context.Context, workshopID, userID string) error
}

PrismAPI defines the interface for interacting with the Prism API

func ApplyClientOptions

func ApplyClientOptions(client PrismAPI, options Options) PrismAPI

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 NewClient

func NewClient(baseURL string) PrismAPI

NewClient creates a new HTTP API client

func NewClientWithOptions

func NewClientWithOptions(baseURL string, opts Options) PrismAPI

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 TransferRequest added in v0.5.13

type TransferRequest struct {
	Type      string                   `json:"type"`
	LocalPath string                   `json:"local_path"`
	S3Bucket  string                   `json:"s3_bucket"`
	S3Key     string                   `json:"s3_key"`
	Options   *storage.TransferOptions `json:"options,omitempty"`
}

TransferRequest represents a request to start a file transfer

type TransferResponse added in v0.5.13

type TransferResponse struct {
	TransferID string                    `json:"transfer_id"`
	Status     storage.TransferStatus    `json:"status"`
	Progress   *storage.TransferProgress `json:"progress,omitempty"`
	Error      string                    `json:"error,omitempty"`
}

TransferResponse represents the response from a transfer request

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"`
	// v0.12.0 rollover fields (#143)
	RolloverEnabled *bool    `json:"rollover_enabled,omitempty"`
	RolloverCap     *float64 `json:"rollover_cap,omitempty"`
}

UpdateProjectBudgetRequest represents a request to update a project budget

Jump to

Keyboard shortcuts

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