import "github.com/daytonaio/daytona/libs/sdk-go/pkg/types"- Constants
- type Chart
- type CodeLanguage
- type CodeRunParams
- type CreateSnapshotParams
- type DaytonaConfig
- type ExecuteResponse
- type ExecutionArtifacts
- type ExecutionError
- type ExecutionResult
- type ExperimentalConfig
- type FileDownloadRequest
- type FileDownloadResponse
- type FileInfo
- type FileStatus
- type FileUpload
- type GitCommitResponse
- type GitStatus
- type ImageParams
- type LspLanguageID
- type OutputMessage
- type PaginatedSnapshots
- type Position
- type PreviewLink
- type PtyResult
- type PtySessionInfo
- type PtySize
- type Resources
- type SandboxBaseParams
- type ScreenshotOptions
- type ScreenshotRegion
- type ScreenshotResponse
- type SignedPreviewLink
- type Snapshot
- type SnapshotParams
- type Volume
- type VolumeMount
Constants
Section titled “Constants”const CodeToolboxLanguageLabel = "code-toolbox-language"type Chart
Section titled “type Chart”type Chart = toolbox.Charttype CodeLanguage
Section titled “type CodeLanguage”CodeLanguage
type CodeLanguage stringconst ( CodeLanguagePython CodeLanguage = "python" CodeLanguageJavaScript CodeLanguage = "javascript" CodeLanguageTypeScript CodeLanguage = "typescript")type CodeRunParams
Section titled “type CodeRunParams”CodeRunParams represents parameters for code execution
type CodeRunParams struct { Argv []string Env map[string]string}type CreateSnapshotParams
Section titled “type CreateSnapshotParams”CreateSnapshotParams represents parameters for creating a snapshot
type CreateSnapshotParams struct { Name string Image any // string or *Image Resources *Resources Entrypoint []string SkipValidation *bool}type DaytonaConfig
Section titled “type DaytonaConfig”DaytonaConfig represents the configuration for the Daytona client. When a field is nil, the client will fall back to environment variables or defaults.
type DaytonaConfig struct { APIKey string JWTToken string OrganizationID string APIUrl string Target string Experimental *ExperimentalConfig}type ExecuteResponse
Section titled “type ExecuteResponse”ExecuteResponse represents a command execution response
type ExecuteResponse struct { ExitCode int Result string Artifacts *ExecutionArtifacts // nil when no artifacts available}type ExecutionArtifacts
Section titled “type ExecutionArtifacts”ExecutionArtifacts represents execution output artifacts
type ExecutionArtifacts struct { Stdout string Charts []Chart}type ExecutionError
Section titled “type ExecutionError”ExecutionError represents a code execution error
type ExecutionError struct { Name string Value string Traceback *string // Optional stack trace; nil when not available}type ExecutionResult
Section titled “type ExecutionResult”ExecutionResult represents code interpreter execution result
type ExecutionResult struct { Stdout string Stderr string Charts []Chart // Optional charts from matplotlib Error *ExecutionError // nil = success, non-nil = execution failed}type ExperimentalConfig
Section titled “type ExperimentalConfig”ExperimentalConfig holds experimental feature flags for the Daytona client.
type ExperimentalConfig struct { OtelEnabled bool // Enable OpenTelemetry tracing and metrics}type FileDownloadRequest
Section titled “type FileDownloadRequest”FileDownloadRequest
type FileDownloadRequest struct { Source string Destination *string // nil = download to memory (return []byte), non-nil = save to file path}type FileDownloadResponse
Section titled “type FileDownloadResponse”FileDownloadResponse represents a file download response
type FileDownloadResponse struct { Source string Result any // []byte or string (path) Error *string // nil = success, non-nil = error message}type FileInfo
Section titled “type FileInfo”FileInfo represents file metadata
type FileInfo struct { Name string Size int64 Mode string ModifiedTime time.Time IsDirectory bool}type FileStatus
Section titled “type FileStatus”FileStatus represents the status of a file in git
type FileStatus struct { Path string Status string}type FileUpload
Section titled “type FileUpload”FileUpload represents a file to upload
type FileUpload struct { Source any // []byte or string (path) Destination string}type GitCommitResponse
Section titled “type GitCommitResponse”GitCommitResponse
type GitCommitResponse struct { SHA string}type GitStatus
Section titled “type GitStatus”GitStatus represents git repository status
type GitStatus struct { CurrentBranch string Ahead int Behind int BranchPublished bool FileStatus []FileStatus}type ImageParams
Section titled “type ImageParams”ImageParams represents parameters for creating a sandbox from an image
type ImageParams struct { SandboxBaseParams Image any // string or *Image Resources *Resources}type LspLanguageID
Section titled “type LspLanguageID”type LspLanguageID stringconst ( LspLanguagePython LspLanguageID = "python" LspLanguageJavaScript LspLanguageID = "javascript" LspLanguageTypeScript LspLanguageID = "typescript")type OutputMessage
Section titled “type OutputMessage”OutputMessage represents an output message
type OutputMessage struct { Type string `json:"type"` Text string `json:"text"` Name string `json:"name"` Value string `json:"value"` Traceback string `json:"traceback"`}type PaginatedSnapshots
Section titled “type PaginatedSnapshots”PaginatedSnapshots represents a paginated list of snapshots
type PaginatedSnapshots struct { Items []*Snapshot Total int Page int TotalPages int}type Position
Section titled “type Position”Position represents a position in a document
type Position struct { Line int // zero-based Character int // zero-based}type PreviewLink
Section titled “type PreviewLink”PreviewLink contains the URL and authentication token for a sandbox preview.
type PreviewLink struct { URL string Token string}type PtyResult
Section titled “type PtyResult”PtyResult represents PTY session exit information
type PtyResult struct { ExitCode *int // nil = process still running, non-nil = exit code Error *string // nil = success, non-nil = error message}type PtySessionInfo
Section titled “type PtySessionInfo”PtySessionInfo represents PTY session information
type PtySessionInfo struct { ID string Active bool CWD string // Current working directory; may be empty unavailable Cols int Rows int ProcessID *int // Process ID; may be nil if unavailable CreatedAt time.Time}type PtySize
Section titled “type PtySize”PtySize represents terminal dimensions
type PtySize struct { Rows int Cols int}type Resources
Section titled “type Resources”Resources represents resource allocation for a sandbox.
type Resources struct { CPU int GPU int Memory int Disk int}type SandboxBaseParams
Section titled “type SandboxBaseParams”SandboxBaseParams contains common parameters for sandbox creation.
type SandboxBaseParams struct { Name string User string Language CodeLanguage EnvVars map[string]string Labels map[string]string Public bool AutoStopInterval *int // nil = no auto-stop, 0 = immediate stop AutoArchiveInterval *int // nil = no auto-archive, 0 = immediate archive AutoDeleteInterval *int // nil = no auto-delete, 0 = immediate delete Volumes []VolumeMount NetworkBlockAll bool NetworkAllowList *string Ephemeral bool}type ScreenshotOptions
Section titled “type ScreenshotOptions”type ScreenshotOptions struct { ShowCursor *bool // nil = default, true = show, false = hide Format *string // nil = default format (PNG), or "jpeg", "webp", etc. Quality *int // nil = default quality, 0-100 for JPEG/WebP Scale *float64 // nil = 1.0, scaling factor for the screenshot}type ScreenshotRegion
Section titled “type ScreenshotRegion”ScreenshotRegion represents a screenshot region
type ScreenshotRegion struct { X int Y int Width int Height int}type ScreenshotResponse
Section titled “type ScreenshotResponse”type ScreenshotResponse struct { Image string // base64-encoded image data Width int Height int SizeBytes *int // Size in bytes}type SignedPreviewLink
Section titled “type SignedPreviewLink”SignedPreviewLink contains the signed URL, authentication token, port, and sandbox ID for a sandbox preview.
type SignedPreviewLink struct { SandboxID string Port int Token string URL string}type Snapshot
Section titled “type Snapshot”Snapshot represents a Daytona snapshot
type Snapshot struct { ID string `json:"id"` OrganizationID string `json:"organizationId,omitempty"` General bool `json:"general"` Name string `json:"name"` ImageName string `json:"imageName,omitempty"` State string `json:"state"` Size *float64 `json:"size,omitempty"` Entrypoint []string `json:"entrypoint,omitempty"` CPU int `json:"cpu"` GPU int `json:"gpu"` Memory int `json:"mem"` // API uses "mem" not "memory" Disk int `json:"disk"` ErrorReason *string `json:"errorReason,omitempty"` // nil = success, non-nil = error reason if snapshot failed SkipValidation bool `json:"skipValidation"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`}type SnapshotParams
Section titled “type SnapshotParams”SnapshotParams represents parameters for creating a sandbox from a snapshot
type SnapshotParams struct { SandboxBaseParams Snapshot string}type Volume
Section titled “type Volume”Volume represents a Daytona volume
type Volume struct { ID string `json:"id"` Name string `json:"name"` OrganizationID string `json:"organizationId"` State string `json:"state"` ErrorReason *string `json:"errorReason,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` LastUsedAt time.Time `json:"lastUsedAt,omitempty"`}type VolumeMount
Section titled “type VolumeMount”VolumeMount represents a volume mount configuration
type VolumeMount struct { VolumeID string MountPath string Subpath *string // Optional subpath within the volume; nil = mount entire volume}