Dagger.Workspace (dagger v0.20.7)

Copy Markdown View Source

A Dagger workspace detected from the current working directory.

Summary

Functions

Canonical Dagger address of the workspace directory.

Return all checks from modules loaded in the workspace.

The client ID that owns this workspace's host filesystem.

Path to config.toml relative to the workspace boundary (empty if not initialized).

Returns a Directory from the workspace.

Returns a File from the workspace.

Search for a file or directory by walking up from the start path within the workspace.

Return all generators from modules loaded in the workspace.

Whether a config.toml file exists in the workspace.

A unique identifier for this Workspace.

Whether .dagger/config.toml exists.

Workspace directory path relative to the workspace boundary.

Return all services from modules loaded in the workspace.

Types

t()

@type t() :: %Dagger.Workspace{client: term(), query_builder: term()}

Functions

address(workspace)

@spec address(t()) :: {:ok, String.t()} | {:error, term()}

Canonical Dagger address of the workspace directory.

checks(workspace, optional_args \\ [])

@spec checks(t(), [{:include, [String.t()]}]) :: Dagger.CheckGroup.t()

Return all checks from modules loaded in the workspace.

client_id(workspace)

@spec client_id(t()) :: {:ok, String.t()} | {:error, term()}

The client ID that owns this workspace's host filesystem.

config_path(workspace)

@spec config_path(t()) :: {:ok, String.t()} | {:error, term()}

Path to config.toml relative to the workspace boundary (empty if not initialized).

directory(workspace, path, optional_args \\ [])

@spec directory(t(), String.t(),
  exclude: [String.t()],
  include: [String.t()],
  gitignore: boolean() | nil
) :: Dagger.Directory.t()

Returns a Directory from the workspace.

Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.

file(workspace, path)

@spec file(t(), String.t()) :: Dagger.File.t()

Returns a File from the workspace.

Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.

find_up(workspace, name, optional_args \\ [])

@spec find_up(t(), String.t(), [{:from, String.t() | nil}]) ::
  {:ok, String.t() | nil} | {:error, term()}

Search for a file or directory by walking up from the start path within the workspace.

Returns the absolute workspace path if found, or null if not found.

Relative start paths resolve from the workspace directory.

The search stops at the workspace boundary and will not traverse above it.

generators(workspace, optional_args \\ [])

@spec generators(t(), [{:include, [String.t()]}]) :: Dagger.GeneratorGroup.t()

Return all generators from modules loaded in the workspace.

has_config(workspace)

@spec has_config(t()) :: {:ok, boolean()} | {:error, term()}

Whether a config.toml file exists in the workspace.

id(workspace)

@spec id(t()) :: {:ok, Dagger.WorkspaceID.t()} | {:error, term()}

A unique identifier for this Workspace.

initialized(workspace)

@spec initialized(t()) :: {:ok, boolean()} | {:error, term()}

Whether .dagger/config.toml exists.

path(workspace)

@spec path(t()) :: {:ok, String.t()} | {:error, term()}

Workspace directory path relative to the workspace boundary.

services(workspace, optional_args \\ [])

@spec services(t(), [{:include, [String.t()]}]) :: Dagger.UpGroup.t()

Return all services from modules loaded in the workspace.