daytona

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SandboxHomeDir = "/home/daytona"
	SandboxBaseDir = "/home/daytona/.superplane"
)
View Source
const (
	CreateRepositorySandboxPayloadType    = "daytona.repository.sandbox"
	CreateRepositorySandboxPollInterval   = 5 * time.Second
	CreateRepositorySandboxDefaultTimeout = 5 * time.Minute

	SandboxBootstrapFromInline = "inline"
	SandboxBootstrapFromFile   = "file"
)
View Source
const (
	SandboxPayloadType        = "daytona.sandbox"
	CreateSandboxPollInterval = 5 * time.Second
	CreateSandboxTimeout      = 5 * time.Minute
)
View Source
const (
	ExecuteCodePayloadType          = "daytona.execute.response"
	ExecuteCodePollInterval         = 5 * time.Second
	ExecuteCodeOutputChannelSuccess = "success"
	ExecuteCodeOutputChannelFailed  = "failed"
)
View Source
const (
	ExecuteCommandPayloadType          = "daytona.command.response"
	ExecuteCommandPollInterval         = 5 * time.Second
	ExecuteCommandOutputChannelSuccess = "success"
	ExecuteCommandOutputChannelFailed  = "failed"
)
View Source
const (
	SandboxSecretTypeFile   = "file"
	SandboxSecretTypeEnvVar = "env-var"
)
View Source
const DeleteSandboxPayloadType = "daytona.delete.response"
View Source
const (
	PreviewURLPayloadType = "daytona.preview.response"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	ProxyToolboxURL string `json:"proxyToolboxUrl"`
}

APIConfig represents the relevant fields from the /api/config endpoint

type APIError

type APIError struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

APIError represents an error response from the Daytona API

type BootstrapMetadata added in v0.10.0

type BootstrapMetadata struct {
	CmdID      string  `json:"cmdId" mapstructure:"cmdId"`
	StartedAt  string  `json:"startedAt" mapstructure:"startedAt"`
	FinishedAt string  `json:"finishedAt" mapstructure:"finishedAt"`
	ExitCode   int     `json:"exitCode" mapstructure:"exitCode"`
	Result     string  `json:"result" mapstructure:"result"`
	From       string  `json:"from" mapstructure:"from"`
	Script     *string `json:"script,omitempty" mapstructure:"script,omitempty"`
	Path       *string `json:"path,omitempty" mapstructure:"path,omitempty"`
	URL        *string `json:"url,omitempty" mapstructure:"url,omitempty"`
}

type Client

type Client struct {
	APIKey  string
	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CloneRepository added in v0.10.0

func (c *Client) CloneRepository(sandboxID string, req *CloneRepositoryRequest) error

CloneRepository clones a repository into the sandbox using the toolbox Git API.

func (*Client) CreateFolder added in v0.10.0

func (c *Client) CreateFolder(sandboxID, folderPath string) error

CreateFolder creates a folder in the sandbox filesystem.

func (*Client) CreateSandbox

func (c *Client) CreateSandbox(req *CreateSandboxRequest) (*Sandbox, error)

CreateSandbox creates a new sandbox environment

func (*Client) CreateSession added in v0.9.0

func (c *Client) CreateSession(sandboxID, sessionID string) error

CreateSession creates a new session on the sandbox toolbox

func (*Client) DeleteSandbox

func (c *Client) DeleteSandbox(sandboxID string, force bool) error

DeleteSandbox deletes a sandbox

func (*Client) ExecuteCode

func (c *Client) ExecuteCode(sandboxID string, req *ExecuteCodeRequest) (*ExecuteCodeResponse, error)

ExecuteCode executes code in a sandbox (uses the execute command endpoint)

func (*Client) ExecuteCommand

func (c *Client) ExecuteCommand(sandboxID string, req *ExecuteCommandRequest) (*ExecuteCommandResponse, error)

ExecuteCommand executes a shell command in a sandbox

func (*Client) ExecuteSessionCommand added in v0.9.0

func (c *Client) ExecuteSessionCommand(sandboxID, sessionID, command string) (*SessionExecuteResponse, error)

ExecuteSessionCommand executes a command asynchronously in a session

func (*Client) FetchConfig

func (c *Client) FetchConfig() (*APIConfig, error)

FetchConfig fetches the API configuration from the /api/config endpoint

func (*Client) GetPreviewURL added in v0.10.0

func (c *Client) GetPreviewURL(sandboxID string, port int) (*PreviewURL, error)

func (*Client) GetSandbox added in v0.9.0

func (c *Client) GetSandbox(sandboxID string) (*Sandbox, error)

GetSandbox retrieves the current state of a sandbox

func (*Client) GetSession added in v0.9.0

func (c *Client) GetSession(sandboxID, sessionID string) (*Session, error)

GetSession retrieves the session state including command statuses

func (*Client) GetSessionCommandLogs added in v0.9.0

func (c *Client) GetSessionCommandLogs(sandboxID, sessionID, commandID string) (string, error)

GetSessionCommandLogs retrieves the logs for a specific command in a session

func (*Client) GetSignedPreviewURL added in v0.10.0

func (c *Client) GetSignedPreviewURL(sandboxID string, port int, expiresInSeconds int) (*SignedPreviewURL, error)

func (*Client) ListSandboxes added in v0.10.0

func (c *Client) ListSandboxes() ([]Sandbox, error)

ListSandboxes lists available sandboxes

func (*Client) ListSnapshots

func (c *Client) ListSnapshots() ([]Snapshot, error)

ListSnapshots lists available snapshots

func (*Client) UploadFile added in v0.10.0

func (c *Client) UploadFile(sandboxID, filePath string, content []byte) error

UploadFile uploads a file to the sandbox filesystem.

func (*Client) Verify

func (c *Client) Verify() error

Verify checks if the API key is valid by listing sandboxes

type CloneMetadata added in v0.10.0

type CloneMetadata struct {
	StartedAt  string  `json:"startedAt" mapstructure:"startedAt"`
	FinishedAt string  `json:"finishedAt" mapstructure:"finishedAt"`
	Error      *string `json:"error,omitempty" mapstructure:"error,omitempty"`
}

type CloneRepositoryRequest added in v0.10.0

type CloneRepositoryRequest struct {
	URL      string `json:"url"`
	Path     string `json:"path"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

CloneRepositoryRequest is the request body for cloning a repository with the toolbox Git API.

type Configuration

type Configuration struct {
	APIKey  string `json:"apiKey"`
	BaseURL string `json:"baseURL"`
}

type CreateRepositorySandbox added in v0.10.0

type CreateRepositorySandbox struct{}

func (*CreateRepositorySandbox) Cancel added in v0.10.0

func (*CreateRepositorySandbox) Cleanup added in v0.10.0

func (*CreateRepositorySandbox) Color added in v0.10.0

func (c *CreateRepositorySandbox) Color() string

func (*CreateRepositorySandbox) Configuration added in v0.10.0

func (c *CreateRepositorySandbox) Configuration() []configuration.Field

func (*CreateRepositorySandbox) Description added in v0.10.0

func (c *CreateRepositorySandbox) Description() string

func (*CreateRepositorySandbox) Documentation added in v0.10.0

func (c *CreateRepositorySandbox) Documentation() string

func (*CreateRepositorySandbox) ExampleOutput added in v0.10.0

func (c *CreateRepositorySandbox) ExampleOutput() map[string]any

func (*CreateRepositorySandbox) Execute added in v0.10.0

func (*CreateRepositorySandbox) HandleHook added in v0.18.0

func (*CreateRepositorySandbox) HandleWebhook added in v0.10.0

func (*CreateRepositorySandbox) Hooks added in v0.18.0

func (c *CreateRepositorySandbox) Hooks() []core.Hook

func (*CreateRepositorySandbox) Icon added in v0.10.0

func (c *CreateRepositorySandbox) Icon() string

func (*CreateRepositorySandbox) Label added in v0.10.0

func (c *CreateRepositorySandbox) Label() string

func (*CreateRepositorySandbox) Name added in v0.10.0

func (c *CreateRepositorySandbox) Name() string

func (*CreateRepositorySandbox) OutputChannels added in v0.10.0

func (c *CreateRepositorySandbox) OutputChannels(configuration any) []core.OutputChannel

func (*CreateRepositorySandbox) ProcessQueueItem added in v0.10.0

func (c *CreateRepositorySandbox) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateRepositorySandbox) Setup added in v0.10.0

type CreateRepositorySandboxBootstrapSpec added in v0.10.0

type CreateRepositorySandboxBootstrapSpec struct {
	From   string `json:"from,omitempty"`
	Script string `json:"script,omitempty"`
	Path   string `json:"path,omitempty"`
	URL    string `json:"url,omitempty"`
}

type CreateRepositorySandboxMetadata added in v0.10.0

type CreateRepositorySandboxMetadata struct {
	Stage            string             `json:"stage" mapstructure:"stage"`
	SandboxID        string             `json:"sandboxId" mapstructure:"sandboxId"`
	SandboxStartedAt string             `json:"sandboxStartedAt" mapstructure:"sandboxStartedAt"`
	SessionID        string             `json:"sessionId" mapstructure:"sessionId"`
	Timeout          int                `json:"timeout" mapstructure:"timeout"`
	Repository       string             `json:"repository" mapstructure:"repository"`
	Directory        string             `json:"directory" mapstructure:"directory"`
	Secrets          []SandboxSecret    `json:"secrets,omitempty" mapstructure:"secrets,omitempty"`
	Clone            *CloneMetadata     `json:"clone,omitempty" mapstructure:"clone,omitempty"`
	Bootstrap        *BootstrapMetadata `json:"bootstrap,omitempty" mapstructure:"bootstrap,omitempty"`
}

type CreateRepositorySandboxSpec added in v0.10.0

type CreateRepositorySandboxSpec struct {
	Snapshot         string                                `json:"snapshot,omitempty"`
	Target           string                                `json:"target,omitempty"`
	AutoStopInterval int                                   `json:"autoStopInterval,omitempty"`
	Env              []EnvVariable                         `json:"env,omitempty"`
	Secrets          []SandboxSecret                       `json:"secrets,omitempty"`
	Repository       string                                `json:"repository"`
	Bootstrap        *CreateRepositorySandboxBootstrapSpec `json:"bootstrap"`
}

type CreateSandbox

type CreateSandbox struct{}

func (*CreateSandbox) Cancel

func (c *CreateSandbox) Cancel(ctx core.ExecutionContext) error

func (*CreateSandbox) Cleanup added in v0.7.0

func (c *CreateSandbox) Cleanup(ctx core.SetupContext) error

func (*CreateSandbox) Color

func (c *CreateSandbox) Color() string

func (*CreateSandbox) Configuration

func (c *CreateSandbox) Configuration() []configuration.Field

func (*CreateSandbox) Description

func (c *CreateSandbox) Description() string

func (*CreateSandbox) Documentation

func (c *CreateSandbox) Documentation() string

func (*CreateSandbox) ExampleOutput

func (c *CreateSandbox) ExampleOutput() map[string]any

func (*CreateSandbox) Execute

func (c *CreateSandbox) Execute(ctx core.ExecutionContext) error

func (*CreateSandbox) HandleHook added in v0.18.0

func (c *CreateSandbox) HandleHook(ctx core.ActionHookContext) error

func (*CreateSandbox) HandleWebhook

func (*CreateSandbox) Hooks added in v0.18.0

func (c *CreateSandbox) Hooks() []core.Hook

func (*CreateSandbox) Icon

func (c *CreateSandbox) Icon() string

func (*CreateSandbox) Label

func (c *CreateSandbox) Label() string

func (*CreateSandbox) Name

func (c *CreateSandbox) Name() string

func (*CreateSandbox) OutputChannels

func (c *CreateSandbox) OutputChannels(configuration any) []core.OutputChannel

func (*CreateSandbox) ProcessQueueItem

func (c *CreateSandbox) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateSandbox) Setup

func (c *CreateSandbox) Setup(ctx core.SetupContext) error

type CreateSandboxMetadata added in v0.9.0

type CreateSandboxMetadata struct {
	SandboxID string          `json:"sandboxId" mapstructure:"sandboxId"`
	StartedAt int64           `json:"startedAt" mapstructure:"startedAt"`
	Secrets   []SandboxSecret `json:"secrets,omitempty" mapstructure:"secrets,omitempty"`
}

type CreateSandboxRequest

type CreateSandboxRequest struct {
	Snapshot         string            `json:"snapshot,omitempty"`
	Target           string            `json:"target,omitempty"`
	Env              map[string]string `json:"env,omitempty"`
	Labels           map[string]string `json:"labels,omitempty"`
	AutoStopInterval int               `json:"autoStopInterval,omitempty"`
}

CreateSandboxRequest represents the request to create a sandbox

type CreateSandboxSpec

type CreateSandboxSpec struct {
	Snapshot         string          `json:"snapshot,omitempty"`
	Target           string          `json:"target,omitempty"`
	AutoStopInterval int             `json:"autoStopInterval,omitempty"`
	Env              []EnvVariable   `json:"env,omitempty"`
	Secrets          []SandboxSecret `json:"secrets,omitempty"`
}

type Daytona

type Daytona struct{}

func (*Daytona) Actions

func (d *Daytona) Actions() []core.Action

func (*Daytona) Cleanup

func (d *Daytona) Cleanup(ctx core.IntegrationCleanupContext) error

func (*Daytona) Configuration

func (d *Daytona) Configuration() []configuration.Field

func (*Daytona) Description

func (d *Daytona) Description() string

func (*Daytona) HandleHook added in v0.18.0

func (d *Daytona) HandleHook(ctx core.IntegrationHookContext) error

func (*Daytona) HandleRequest

func (d *Daytona) HandleRequest(ctx core.HTTPRequestContext)

func (*Daytona) Hooks added in v0.18.0

func (d *Daytona) Hooks() []core.Hook

func (*Daytona) Icon

func (d *Daytona) Icon() string

func (*Daytona) Instructions

func (d *Daytona) Instructions() string

func (*Daytona) Label

func (d *Daytona) Label() string

func (*Daytona) ListResources

func (d *Daytona) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Daytona) Name

func (d *Daytona) Name() string

func (*Daytona) Sync

func (d *Daytona) Sync(ctx core.SyncContext) error

func (*Daytona) Triggers

func (d *Daytona) Triggers() []core.Trigger

type DeleteSandbox

type DeleteSandbox struct{}

func (*DeleteSandbox) Cancel

func (d *DeleteSandbox) Cancel(ctx core.ExecutionContext) error

func (*DeleteSandbox) Cleanup added in v0.7.0

func (d *DeleteSandbox) Cleanup(ctx core.SetupContext) error

func (*DeleteSandbox) Color

func (d *DeleteSandbox) Color() string

func (*DeleteSandbox) Configuration

func (d *DeleteSandbox) Configuration() []configuration.Field

func (*DeleteSandbox) Description

func (d *DeleteSandbox) Description() string

func (*DeleteSandbox) Documentation

func (d *DeleteSandbox) Documentation() string

func (*DeleteSandbox) ExampleOutput

func (d *DeleteSandbox) ExampleOutput() map[string]any

func (*DeleteSandbox) Execute

func (d *DeleteSandbox) Execute(ctx core.ExecutionContext) error

func (*DeleteSandbox) HandleHook added in v0.18.0

func (d *DeleteSandbox) HandleHook(ctx core.ActionHookContext) error

func (*DeleteSandbox) HandleWebhook

func (*DeleteSandbox) Hooks added in v0.18.0

func (d *DeleteSandbox) Hooks() []core.Hook

func (*DeleteSandbox) Icon

func (d *DeleteSandbox) Icon() string

func (*DeleteSandbox) Label

func (d *DeleteSandbox) Label() string

func (*DeleteSandbox) Name

func (d *DeleteSandbox) Name() string

func (*DeleteSandbox) OutputChannels

func (d *DeleteSandbox) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteSandbox) ProcessQueueItem

func (d *DeleteSandbox) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteSandbox) Setup

func (d *DeleteSandbox) Setup(ctx core.SetupContext) error

type DeleteSandboxPayload

type DeleteSandboxPayload struct {
	Deleted bool   `json:"deleted"`
	ID      string `json:"id"`
}

type DeleteSandboxSpec

type DeleteSandboxSpec struct {
	Sandbox string `json:"sandbox"`
	Force   bool   `json:"force,omitempty"`
}

type EnvVariable

type EnvVariable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ExecuteCode

type ExecuteCode struct{}

func (*ExecuteCode) Cancel

func (e *ExecuteCode) Cancel(ctx core.ExecutionContext) error

func (*ExecuteCode) Cleanup added in v0.7.0

func (e *ExecuteCode) Cleanup(ctx core.SetupContext) error

func (*ExecuteCode) Color

func (e *ExecuteCode) Color() string

func (*ExecuteCode) Configuration

func (e *ExecuteCode) Configuration() []configuration.Field

func (*ExecuteCode) Description

func (e *ExecuteCode) Description() string

func (*ExecuteCode) Documentation

func (e *ExecuteCode) Documentation() string

func (*ExecuteCode) ExampleOutput

func (e *ExecuteCode) ExampleOutput() map[string]any

func (*ExecuteCode) Execute

func (e *ExecuteCode) Execute(ctx core.ExecutionContext) error

func (*ExecuteCode) HandleHook added in v0.18.0

func (e *ExecuteCode) HandleHook(ctx core.ActionHookContext) error

func (*ExecuteCode) HandleWebhook

func (*ExecuteCode) Hooks added in v0.18.0

func (e *ExecuteCode) Hooks() []core.Hook

func (*ExecuteCode) Icon

func (e *ExecuteCode) Icon() string

func (*ExecuteCode) Label

func (e *ExecuteCode) Label() string

func (*ExecuteCode) Name

func (e *ExecuteCode) Name() string

func (*ExecuteCode) OutputChannels

func (e *ExecuteCode) OutputChannels(configuration any) []core.OutputChannel

func (*ExecuteCode) ProcessQueueItem

func (e *ExecuteCode) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*ExecuteCode) Setup

func (e *ExecuteCode) Setup(ctx core.SetupContext) error

type ExecuteCodeMetadata added in v0.9.0

type ExecuteCodeMetadata struct {
	SandboxID string `json:"sandboxId" mapstructure:"sandboxId"`
	SessionID string `json:"sessionId" mapstructure:"sessionId"`
	CmdID     string `json:"cmdId" mapstructure:"cmdId"`
	StartedAt int64  `json:"startedAt" mapstructure:"startedAt"`
	Timeout   int    `json:"timeout" mapstructure:"timeout"`
}

type ExecuteCodeRequest

type ExecuteCodeRequest struct {
	Code     string `json:"code"`
	Language string `json:"language"`
	Timeout  int    `json:"timeout,omitempty"`
}

ExecuteCodeRequest represents the request to execute code in a sandbox

type ExecuteCodeResponse

type ExecuteCodeResponse struct {
	ExitCode int    `json:"exitCode"`
	Result   string `json:"result"`
}

ExecuteCodeResponse represents the response from code execution

type ExecuteCodeSpec

type ExecuteCodeSpec struct {
	Sandbox  string `json:"sandbox"`
	Code     string `json:"code"`
	Language string `json:"language"`
	Timeout  int    `json:"timeout,omitempty"`
}

type ExecuteCommand

type ExecuteCommand struct{}

func (*ExecuteCommand) Cancel

func (e *ExecuteCommand) Cancel(ctx core.ExecutionContext) error

func (*ExecuteCommand) Cleanup added in v0.7.0

func (e *ExecuteCommand) Cleanup(ctx core.SetupContext) error

func (*ExecuteCommand) Color

func (e *ExecuteCommand) Color() string

func (*ExecuteCommand) Configuration

func (e *ExecuteCommand) Configuration() []configuration.Field

func (*ExecuteCommand) Description

func (e *ExecuteCommand) Description() string

func (*ExecuteCommand) Documentation

func (e *ExecuteCommand) Documentation() string

func (*ExecuteCommand) ExampleOutput

func (e *ExecuteCommand) ExampleOutput() map[string]any

func (*ExecuteCommand) Execute

func (e *ExecuteCommand) Execute(ctx core.ExecutionContext) error

func (*ExecuteCommand) HandleHook added in v0.18.0

func (e *ExecuteCommand) HandleHook(ctx core.ActionHookContext) error

func (*ExecuteCommand) HandleWebhook

func (*ExecuteCommand) Hooks added in v0.18.0

func (e *ExecuteCommand) Hooks() []core.Hook

func (*ExecuteCommand) Icon

func (e *ExecuteCommand) Icon() string

func (*ExecuteCommand) Label

func (e *ExecuteCommand) Label() string

func (*ExecuteCommand) Name

func (e *ExecuteCommand) Name() string

func (*ExecuteCommand) OutputChannels

func (e *ExecuteCommand) OutputChannels(configuration any) []core.OutputChannel

func (*ExecuteCommand) ProcessQueueItem

func (e *ExecuteCommand) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*ExecuteCommand) Setup

func (e *ExecuteCommand) Setup(ctx core.SetupContext) error

type ExecuteCommandMetadata added in v0.9.0

type ExecuteCommandMetadata struct {
	SandboxID string `json:"sandboxId" mapstructure:"sandboxId"`
	SessionID string `json:"sessionId" mapstructure:"sessionId"`
	CmdID     string `json:"cmdId" mapstructure:"cmdId"`
	StartedAt int64  `json:"startedAt" mapstructure:"startedAt"`
	Timeout   int    `json:"timeout" mapstructure:"timeout"`
}

type ExecuteCommandRequest

type ExecuteCommandRequest struct {
	Command string `json:"command"`
	Cwd     string `json:"cwd,omitempty"`
	Timeout int    `json:"timeout,omitempty"`
}

ExecuteCommandRequest represents the request to execute a command in a sandbox

type ExecuteCommandResponse

type ExecuteCommandResponse struct {
	ExitCode int    `json:"exitCode"`
	Timeout  bool   `json:"timeout"`
	Result   string `json:"result"`
}

ExecuteCommandResponse represents the response from command execution

func (*ExecuteCommandResponse) ShortResult added in v0.10.0

func (e *ExecuteCommandResponse) ShortResult() string

type ExecuteCommandSpec

type ExecuteCommandSpec struct {
	Sandbox string        `json:"sandbox"`
	Command string        `json:"command"`
	Cwd     string        `json:"cwd,omitempty"`
	Env     []EnvVariable `json:"env,omitempty"`
	Timeout int           `json:"timeout,omitempty"`
}

type GetPreviewURLComponent added in v0.10.0

type GetPreviewURLComponent struct{}

func (*GetPreviewURLComponent) Cancel added in v0.10.0

func (*GetPreviewURLComponent) Cleanup added in v0.10.0

func (*GetPreviewURLComponent) Color added in v0.10.0

func (p *GetPreviewURLComponent) Color() string

func (*GetPreviewURLComponent) Configuration added in v0.10.0

func (p *GetPreviewURLComponent) Configuration() []configuration.Field

func (*GetPreviewURLComponent) Description added in v0.10.0

func (p *GetPreviewURLComponent) Description() string

func (*GetPreviewURLComponent) Documentation added in v0.10.0

func (p *GetPreviewURLComponent) Documentation() string

func (*GetPreviewURLComponent) ExampleOutput added in v0.10.0

func (p *GetPreviewURLComponent) ExampleOutput() map[string]any

func (*GetPreviewURLComponent) Execute added in v0.10.0

func (*GetPreviewURLComponent) HandleHook added in v0.18.0

func (*GetPreviewURLComponent) HandleWebhook added in v0.10.0

func (*GetPreviewURLComponent) Hooks added in v0.18.0

func (p *GetPreviewURLComponent) Hooks() []core.Hook

func (*GetPreviewURLComponent) Icon added in v0.10.0

func (p *GetPreviewURLComponent) Icon() string

func (*GetPreviewURLComponent) Label added in v0.10.0

func (p *GetPreviewURLComponent) Label() string

func (*GetPreviewURLComponent) Name added in v0.10.0

func (p *GetPreviewURLComponent) Name() string

func (*GetPreviewURLComponent) OutputChannels added in v0.10.0

func (p *GetPreviewURLComponent) OutputChannels(configuration any) []core.OutputChannel

func (*GetPreviewURLComponent) ProcessQueueItem added in v0.10.0

func (p *GetPreviewURLComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetPreviewURLComponent) Setup added in v0.10.0

type Metadata

type Metadata struct {
}

type PaginatedSandboxes added in v0.10.0

type PaginatedSandboxes struct {
	Items []Sandbox `json:"items"`
}

type PaginatedSnapshots

type PaginatedSnapshots struct {
	Items []Snapshot `json:"items"`
}

PaginatedSnapshots represents a paginated list of snapshots

type PreviewURL added in v0.10.0

type PreviewURL struct {
	SandboxID string `json:"sandboxId"`
	URL       string `json:"url"`
	Token     string `json:"token"`
}

type PreviewURLPayload added in v0.10.0

type PreviewURLPayload struct {
	Sandbox          string `json:"sandbox"`
	Port             int    `json:"port"`
	Signed           bool   `json:"signed"`
	URL              string `json:"url"`
	Token            string `json:"token"`
	ExpiresInSeconds int    `json:"expiresInSeconds,omitempty"`
}

type PreviewURLSpec added in v0.10.0

type PreviewURLSpec struct {
	Sandbox          string `json:"sandbox"`
	Port             int    `json:"port,omitempty"`
	Signed           *bool  `json:"signed,omitempty"`
	ExpiresInSeconds int    `json:"expiresInSeconds,omitempty"`
}

type Sandbox

type Sandbox struct {
	ID    string `json:"id"`
	State string `json:"state"`
}

Sandbox represents a Daytona sandbox environment

type SandboxSecret added in v0.10.0

type SandboxSecret struct {
	Type  string                     `json:"type" mapstructure:"type"`
	Path  string                     `json:"path,omitempty" mapstructure:"path"`
	Name  string                     `json:"name,omitempty" mapstructure:"name"`
	Value configuration.SecretKeyRef `json:"value" mapstructure:"value"`
}

type Session added in v0.9.0

type Session struct {
	SessionID string           `json:"sessionId"`
	Commands  []SessionCommand `json:"commands"`
}

Session represents a Daytona session with its commands

func (*Session) FindCommand added in v0.9.0

func (s *Session) FindCommand(cmdID string) *SessionCommand

FindCommand returns the command with the given ID, or nil if not found

type SessionCommand added in v0.9.0

type SessionCommand struct {
	ID       string `json:"id"`
	ExitCode *int   `json:"exitCode"`
}

SessionCommand represents a command within a session

type SessionExecuteRequest added in v0.9.0

type SessionExecuteRequest struct {
	Command  string `json:"command"`
	RunAsync bool   `json:"runAsync"`
}

SessionExecuteRequest is the request body for executing a command in a session

type SessionExecuteResponse added in v0.9.0

type SessionExecuteResponse struct {
	CmdID string `json:"cmdId"`
}

SessionExecuteResponse is the response from executing a command in a session

type SignedPreviewURL added in v0.10.0

type SignedPreviewURL struct {
	SandboxID string `json:"sandboxId"`
	Port      int    `json:"port"`
	Token     string `json:"token"`
	URL       string `json:"url"`
}

type Snapshot

type Snapshot struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Snapshot represents a Daytona snapshot

Jump to

Keyboard shortcuts

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