daytona

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteSandboxPayloadType = "daytona.delete.response"
View Source
const ExecuteCodePayloadType = "daytona.execute.response"
View Source
const ExecuteCommandPayloadType = "daytona.command.response"
View Source
const SandboxPayloadType = "daytona.sandbox"

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

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

CreateSandbox creates a new sandbox environment

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

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

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

func (*Client) ListSnapshots

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

ListSnapshots lists available snapshots

func (*Client) Verify

func (c *Client) Verify() error

Verify checks if the API key is valid by listing sandboxes

type Configuration

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

type CreateSandbox

type CreateSandbox struct{}

func (*CreateSandbox) Actions

func (c *CreateSandbox) Actions() []core.Action

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

func (c *CreateSandbox) HandleAction(ctx core.ActionContext) error

func (*CreateSandbox) HandleWebhook

func (c *CreateSandbox) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

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 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"`
}

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

func (d *Daytona) Components() []core.Component

func (*Daytona) Configuration

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

func (*Daytona) Description

func (d *Daytona) Description() string

func (*Daytona) HandleAction

func (d *Daytona) HandleAction(ctx core.IntegrationActionContext) error

func (*Daytona) HandleRequest

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

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

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

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

func (d *DeleteSandbox) HandleAction(ctx core.ActionContext) error

func (*DeleteSandbox) HandleWebhook

func (d *DeleteSandbox) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

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

func (e *ExecuteCode) Actions() []core.Action

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

func (e *ExecuteCode) HandleAction(ctx core.ActionContext) error

func (*ExecuteCode) HandleWebhook

func (e *ExecuteCode) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

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 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 {
	SandboxID string `json:"sandboxId"`
	Code      string `json:"code"`
	Language  string `json:"language"`
	Timeout   int    `json:"timeout,omitempty"`
}

type ExecuteCommand

type ExecuteCommand struct{}

func (*ExecuteCommand) Actions

func (e *ExecuteCommand) Actions() []core.Action

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

func (e *ExecuteCommand) HandleAction(ctx core.ActionContext) error

func (*ExecuteCommand) HandleWebhook

func (e *ExecuteCommand) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

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 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"`
	Result   string `json:"result"`
}

ExecuteCommandResponse represents the response from command execution

type ExecuteCommandSpec

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

type Metadata

type Metadata struct {
}

type PaginatedSnapshots

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

PaginatedSnapshots represents a paginated list of snapshots

type Sandbox

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

Sandbox represents a Daytona sandbox environment

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