Documentation
¶
Index ¶
- Constants
- Variables
- func FormatEntityId(entityType EntityType, id string) string
- func FormatNodeId(uuid string) string
- type AccessType
- type Account
- type AccountResponse
- type AccountWithWorkspaces
- type AccountWorkspaceEnablement
- type CreateComputeNodeRequest
- type CreateStorageNodeRequest
- type DynamoDBHealthCheckLog
- type DynamoDBNode
- type DynamoDBStorageNode
- type DynamoDBStorageNodeWorkspace
- type EFSLayerInfo
- type EntityType
- type HealthCheckIssue
- type HealthCheckResources
- type HealthCheckResponse
- type LayerRecord
- type Node
- type NodeAccess
- type NodeAccessRequest
- type NodeAccessResponse
- type NodeAccessScope
- type NodeAccount
- type NodeAttachmentRequest
- type NodeResponse
- type NodeUpdateRequest
- type StorageNode
- type StorageNodeResponse
- type StorageNodeUpdateRequest
- type StorageNodeWorkspaceEnablement
Constants ¶
const ( HealthStatusHealthy = "HEALTHY" HealthStatusWarning = "WARNING" HealthStatusUnknown = "UNKNOWN" HealthStatusUnreachable = "UNREACHABLE" )
Variables ¶
var ErrCannotAttachNodeWithExistingOrganization = errors.New("cannot attach node that already belongs to an organization")
Permission-related errors
Functions ¶
func FormatEntityId ¶
func FormatEntityId(entityType EntityType, id string) string
FormatEntityId creates a properly formatted entity ID
func FormatNodeId ¶
FormatNodeId creates a properly formatted node ID
Types ¶
type AccessType ¶
type AccessType string
AccessType represents the type of access granted
const ( AccessTypeOwner AccessType = "owner" AccessTypeWorkspace AccessType = "workspace" )
type Account ¶
type Account struct {
Uuid string `json:"uuid"`
AccountId string `json:"accountId"`
AccountType string `json:"accountType"`
RoleName string `json:"roleName"`
ExternalId string `json:"externalId"`
UserId string `json:"userId"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty"` // "Enabled" or "Paused"
}
type AccountResponse ¶
type AccountResponse struct {
Uuid string `json:"uuid"`
}
type AccountWithWorkspaces ¶
type AccountWithWorkspaces struct {
Account
EnabledWorkspaces []AccountWorkspaceEnablement `json:"enabledWorkspaces,omitempty"`
}
type AccountWorkspaceEnablement ¶
type AccountWorkspaceEnablement struct {
AccountUuid string `json:"accountUuid"`
OrganizationId string `json:"organizationId"`
// IsPublic determines who can manage resources on this account:
// - true: workspace admins can manage resources (subject to EnableCompute/EnableStorage)
// - false: only the account owner can manage resources
IsPublic bool `json:"isPublic"`
EnableCompute bool `json:"enableCompute"` // If true and IsPublic, admins can create compute nodes
EnableStorage bool `json:"enableStorage"` // If true and IsPublic, admins can create storage nodes
EnabledBy string `json:"enabledBy"`
EnabledAt int64 `json:"enabledAt"`
}
AccountWorkspaceEnablement represents the enablement of a workspace on an account
type CreateComputeNodeRequest ¶
type CreateComputeNodeRequest struct {
AccountId string `json:"accountId"`
Name string `json:"name"`
Description string `json:"description"`
OrganizationId string `json:"organizationId,omitempty"`
ProvisionerImage string `json:"provisionerImage,omitempty"`
ProvisionerImageTag string `json:"provisionerImageTag,omitempty"`
DeploymentMode string `json:"deploymentMode,omitempty"`
EnableLLMAccess bool `json:"enableLLMAccess,omitempty"`
LlmBaaAcknowledged bool `json:"llmBaaAcknowledged,omitempty"`
MaxGpuInstances *int `json:"maxGpuInstances,omitempty"`
GpuTier *string `json:"gpuTier,omitempty"`
}
CreateComputeNodeRequest is the request body for POST /compute-nodes
type CreateStorageNodeRequest ¶
type CreateStorageNodeRequest struct {
AccountUuid string `json:"accountUuid"`
OrganizationId string `json:"organizationId,omitempty"` // Optional: if set, checks workspace enablement and auto-attaches the node to that workspace
Name string `json:"name"`
Description string `json:"description"`
StorageLocation string `json:"storageLocation"`
Region string `json:"region,omitempty"`
ProviderType string `json:"providerType"`
DeploymentMode string `json:"deploymentMode,omitempty"` // "basic" (default) or "compliant"
SkipProvisioning bool `json:"skipProvisioning,omitempty"` // true to register existing bucket without provisioning
}
CreateStorageNodeRequest is the request body for POST /storage-nodes
type DynamoDBHealthCheckLog ¶
type DynamoDBHealthCheckLog struct {
NodeId string `dynamodbav:"nodeId"`
Timestamp string `dynamodbav:"timestamp"`
Status string `dynamodbav:"status"`
Issues string `dynamodbav:"issues,omitempty"`
ResponseBody string `dynamodbav:"responseBody,omitempty"`
TTL int64 `dynamodbav:"ttl"`
}
DynamoDBHealthCheckLog is the DynamoDB record for a health check log entry.
type DynamoDBNode ¶
type DynamoDBNode struct {
Uuid string `dynamodbav:"uuid"`
Name string `dynamodbav:"name"`
Description string `dynamodbav:"description"`
ComputeNodeGatewayUrl string `dynamodbav:"computeNodeGatewayUrl"`
EfsId string `dynamodbav:"efsId"`
QueueUrl string `dynamodbav:"queueUrl"`
Env string `dynamodbav:"environment"`
AccountUuid string `dynamodbav:"accountUuid"`
AccountId string `dynamodbav:"accountId"`
AccountType string `dynamodbav:"accountType"`
CreatedAt string `dynamodbav:"createdAt"`
OrganizationId string `dynamodbav:"organizationId"`
UserId string `dynamodbav:"userId"`
Identifier string `dynamodbav:"identifier"`
WorkflowManagerTag string `dynamodbav:"workflowManagerTag"`
DeploymentMode string `dynamodbav:"deploymentMode"`
ProvisionerImage string `dynamodbav:"provisionerImage"`
ProvisionerImageTag string `dynamodbav:"provisionerImageTag"`
EnableLLMAccess bool `dynamodbav:"enableLLMAccess"`
LlmBaaAcknowledged bool `dynamodbav:"llmBaaAcknowledged"`
MaxGpuInstances int `dynamodbav:"maxGpuInstances"`
GpuTier string `dynamodbav:"gpuTier"`
Status string `dynamodbav:"status"`
HealthStatus string `dynamodbav:"healthStatus"`
LastHealthCheck string `dynamodbav:"lastHealthCheck"`
}
DynamoDBNode represents the DynamoDB storage structure for compute nodes
func (DynamoDBNode) GetKey ¶
func (i DynamoDBNode) GetKey() map[string]types.AttributeValue
type DynamoDBStorageNode ¶
type DynamoDBStorageNode struct {
Uuid string `dynamodbav:"uuid"`
Name string `dynamodbav:"name"`
Description string `dynamodbav:"description"`
AccountUuid string `dynamodbav:"accountUuid"`
StorageLocation string `dynamodbav:"storageLocation"`
Region string `dynamodbav:"region"`
ProviderType string `dynamodbav:"providerType"`
Status string `dynamodbav:"status"`
CreatedAt string `dynamodbav:"createdAt"`
CreatedBy string `dynamodbav:"createdBy"`
}
DynamoDBStorageNode represents the DynamoDB storage structure for storage nodes
func (DynamoDBStorageNode) GetKey ¶
func (i DynamoDBStorageNode) GetKey() map[string]types.AttributeValue
type DynamoDBStorageNodeWorkspace ¶
type DynamoDBStorageNodeWorkspace struct {
StorageNodeUuid string `dynamodbav:"storageNodeUuid"`
WorkspaceId string `dynamodbav:"workspaceId"`
IsDefault bool `dynamodbav:"isDefault"`
EnabledBy string `dynamodbav:"enabledBy"`
EnabledAt string `dynamodbav:"enabledAt"`
}
DynamoDBStorageNodeWorkspace represents the DynamoDB record for workspace enablement on a storage node
func (DynamoDBStorageNodeWorkspace) GetKey ¶
func (i DynamoDBStorageNodeWorkspace) GetKey() map[string]types.AttributeValue
type EFSLayerInfo ¶
type EFSLayerInfo struct {
Name string `json:"name"`
SizeBytes int64 `json:"sizeBytes"`
FileCount int `json:"fileCount"`
}
EFSLayerInfo describes a layer on EFS as reported by the gateway health check.
type EntityType ¶
type EntityType string
EntityType represents the type of entity that has access
const ( EntityTypeUser EntityType = "user" EntityTypeTeam EntityType = "team" EntityTypeWorkspace EntityType = "workspace" )
type HealthCheckIssue ¶
type HealthCheckIssue struct {
Component string `json:"component"`
Status string `json:"status"`
Message string `json:"message,omitempty"`
}
HealthCheckIssue represents a single issue reported by the health endpoint.
type HealthCheckResources ¶
type HealthCheckResources struct {
EFSLayers []EFSLayerInfo `json:"efsLayers,omitempty"`
}
HealthCheckResources contains resource inventories from the gateway.
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Status string `json:"status"`
Issues []HealthCheckIssue `json:"issues,omitempty"`
Resources HealthCheckResources `json:"resources,omitempty"`
}
HealthCheckResponse is the parsed response from a gateway's GET /health endpoint.
type LayerRecord ¶
type LayerRecord struct {
ComputeNodeId string `dynamodbav:"computeNodeId"`
LayerName string `dynamodbav:"layerName"`
Status string `dynamodbav:"status"`
SizeBytes int64 `dynamodbav:"sizeBytes"`
FileCount int `dynamodbav:"fileCount"`
Description string `dynamodbav:"description,omitempty"`
CreatedAt string `dynamodbav:"createdAt"`
CreatedBy string `dynamodbav:"createdBy"`
LastAccessed string `dynamodbav:"lastAccessed,omitempty"`
}
LayerRecord mirrors the workflow-service compute-node-layers DynamoDB schema.
type Node ¶
type Node struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
QueueUrl string `json:"queueUrl"`
Account NodeAccount `json:"account"`
CreatedAt string `json:"createdAt"`
OrganizationId string `json:"organizationId,omitempty"`
OwnerId string `json:"ownerId"`
Identifier string `json:"identifier"`
WorkflowManagerTag string `json:"workflowManagerTag"`
ProvisionerImage string `json:"provisionerImage,omitempty"`
ProvisionerImageTag string `json:"provisionerImageTag,omitempty"`
DeploymentMode string `json:"deploymentMode,omitempty"`
EnableLLMAccess bool `json:"enableLLMAccess,omitempty"`
LlmBaaAcknowledged bool `json:"llmBaaAcknowledged,omitempty"`
MaxGpuInstances int `json:"maxGpuInstances"`
GpuTier string `json:"gpuTier"`
AccessScope NodeAccessScope `json:"accessScope,omitempty"`
Status string `json:"status"`
HealthStatus string `json:"healthStatus,omitempty"`
LastHealthCheck string `json:"lastHealthCheck,omitempty"`
}
Node is the response representation of a compute node
type NodeAccess ¶
type NodeAccess struct {
EntityId string `dynamodbav:"entityId"` // Format: "user#123" or "team#456" or "workspace#789"
NodeId string `dynamodbav:"nodeId"` // Format: "node#uuid"
EntityType EntityType `dynamodbav:"entityType"` // user, team, or workspace
EntityRawId string `dynamodbav:"entityRawId"` // The actual ID without prefix
NodeUuid string `dynamodbav:"nodeUuid"` // The actual node UUID
AccessType AccessType `dynamodbav:"accessType"` // owner, shared, or workspace
OrganizationId string `dynamodbav:"organizationId,omitempty"` // Organization ID (optional for organization-independent nodes)
GrantedAt time.Time `dynamodbav:"grantedAt"` // When access was granted
GrantedBy string `dynamodbav:"grantedBy"` // User ID who granted access
}
NodeAccess represents an access permission entry in DynamoDB
func (NodeAccess) GetKey ¶
func (n NodeAccess) GetKey() map[string]types.AttributeValue
GetKey returns the DynamoDB key for this access entry
func (NodeAccess) IsOrganizationIndependent ¶
func (n NodeAccess) IsOrganizationIndependent() bool
IsOrganizationIndependent returns true if the node is not associated with any organization
type NodeAccessRequest ¶
type NodeAccessRequest struct {
NodeUuid string `json:"nodeUuid"`
AccessScope NodeAccessScope `json:"accessScope"`
}
NodeAccessRequest represents a request to grant/update node access
func (NodeAccessRequest) ValidateForOrganizationIndependent ¶
func (r NodeAccessRequest) ValidateForOrganizationIndependent() error
ValidateAccessScope validates that the access scope is allowed for the node type
type NodeAccessResponse ¶
type NodeAccessResponse struct {
NodeUuid string `json:"nodeUuid"`
AccessScope NodeAccessScope `json:"accessScope"`
Owner string `json:"owner"`
OrganizationId string `json:"organizationId,omitempty"`
OrganizationIndependent bool `json:"organizationIndependent"`
}
NodeAccessResponse represents the access settings for a node
func (NodeAccessResponse) IsOrganizationIndependent ¶
func (r NodeAccessResponse) IsOrganizationIndependent() bool
IsOrganizationIndependent returns true if the response represents an organization-independent node
type NodeAccessScope ¶
type NodeAccessScope string
NodeAccessScope represents the access scope level of a compute node
const ( AccessScopePrivate NodeAccessScope = "private" AccessScopeWorkspace NodeAccessScope = "workspace" )
type NodeAccount ¶
type NodeAttachmentRequest ¶
type NodeAttachmentRequest struct {
NodeUuid string `json:"nodeUuid"`
OrganizationId string `json:"organizationId"`
}
NodeAttachmentRequest represents a request to attach a node to an organization
type NodeResponse ¶
type NodeResponse struct {
Message string `json:"message"`
}
type NodeUpdateRequest ¶
type NodeUpdateRequest struct {
WorkflowManagerTag string `json:"workflowManagerTag,omitempty"` // Optional - only for legacy provisioner
WorkflowManagerCpu int `json:"workflowManagerCpu,omitempty"` // Optional - only for legacy provisioner
WorkflowManagerMemory int `json:"workflowManagerMemory,omitempty"` // Optional - only for legacy provisioner
AuthorizationType string `json:"authorizationType,omitempty"` // Optional - "NONE" or "AWS_IAM", only for legacy provisioner
ProvisionerImage string `json:"provisionerImage,omitempty"` // Optional - Docker image for the provisioner
ProvisionerImageTag string `json:"provisionerImageTag,omitempty"` // Optional - Docker tag for the provisioner image
}
type StorageNode ¶
type StorageNode struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
AccountUuid string `json:"accountUuid"`
AccountName string `json:"accountName,omitempty"`
AccountOwnerId string `json:"accountOwnerId,omitempty"`
StorageLocation string `json:"storageLocation"`
Region string `json:"region,omitempty"`
ProviderType string `json:"providerType"`
Status string `json:"status"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Workspaces []StorageNodeWorkspaceEnablement `json:"workspaces,omitempty"`
}
StorageNode is the API response representation of a storage node
type StorageNodeResponse ¶
type StorageNodeResponse struct {
Message string `json:"message"`
}
StorageNodeResponse is a simple message response for storage node operations
type StorageNodeUpdateRequest ¶
type StorageNodeUpdateRequest struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Status *string `json:"status,omitempty"`
}
StorageNodeUpdateRequest is the request body for PATCH /storage-nodes/{id}
type StorageNodeWorkspaceEnablement ¶
type StorageNodeWorkspaceEnablement struct {
StorageNodeUuid string `json:"storageNodeUuid"`
WorkspaceId string `json:"workspaceId"`
IsDefault bool `json:"isDefault"`
EnabledBy string `json:"enabledBy"`
EnabledAt string `json:"enabledAt"`
}
StorageNodeWorkspaceEnablement represents a workspace association for a storage node