View Source Dagger.Client (dagger v0.9.6)

Query

Link to this section Summary

Functions

Constructs a cache volume for a given cache key.

Checks if the current Dagger Engine is compatible with an SDK's required version.

Creates a scratch container or loads one by ID.

The FunctionCall context that the SDK caller is currently executing in. If the caller is not currently executing in a function, this will return an error.

The module currently being served in the session, if any.

The TypeDef representations of the objects currently being served in the session.

The default platform of the builder.

Creates an empty directory or loads one by ID.

file(query, file) deprecated

Loads a file by ID.

Create a code generation result, given a directory containing the generated code.

Queries a git repository.

Queries the host environment.

Returns a file containing an http remote url content.

Load a CacheVolume from its ID.

Loads a container from an ID.

Load a Directory from its ID.

Load a File from its ID.

Load a function argument by ID.

Load a function by ID.

Load a GeneratedCode by ID.

Load a git ref from its ID.

Load a git repository from its ID.

Load a module by ID.

Load a Secret from its ID.

Loads a service from ID.

Load a Socket from its ID.

Load a TypeDef by ID.

Create a new module.

Load the static configuration for a module from the given source directory and optional subpath.

Creates a named sub-pipeline.

Loads a secret from its ID.

Sets a secret given a user defined name to its plaintext and returns the secret. The plaintext value is limited to a size of 128000 bytes.

Loads a socket by its ID.

Create a new TypeDef.

Link to this section Types

@type t() :: %Dagger.Client{client: term(), selection: term()}

Link to this section Functions

Link to this function

cache_volume(query, key)

View Source
@spec cache_volume(t(), Dagger.String.t()) :: Dagger.CacheVolume.t()

Constructs a cache volume for a given cache key.

required-arguments

Required Arguments

  • key - A string identifier to target this cache volume (e.g., "modules-cache").
Link to this function

check_version_compatibility(query, version)

View Source
@spec check_version_compatibility(t(), Dagger.String.t()) ::
  {:ok, Dagger.Boolean.t()} | {:error, term()}

Checks if the current Dagger Engine is compatible with an SDK's required version.

required-arguments

Required Arguments

  • version - The SDK's required version.
Link to this function

container(query, optional_args \\ [])

View Source
@spec container(
  t(),
  keyword()
) :: Dagger.Container.t()

Creates a scratch container or loads one by ID.

Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.

optional-arguments

Optional Arguments

  • id -
  • platform -
Link to this function

current_function_call(query)

View Source
@spec current_function_call(t()) :: Dagger.FunctionCall.t()

The FunctionCall context that the SDK caller is currently executing in. If the caller is not currently executing in a function, this will return an error.

@spec current_module(t()) :: {:ok, Dagger.Module.t() | nil} | {:error, term()}

The module currently being served in the session, if any.

Link to this function

current_type_defs(query)

View Source
@spec current_type_defs(t()) :: {:ok, [Dagger.TypeDef.t()] | nil} | {:error, term()}

The TypeDef representations of the objects currently being served in the session.

@spec default_platform(t()) :: {:ok, Dagger.Platform.t()} | {:error, term()}

The default platform of the builder.

Link to this function

directory(query, optional_args \\ [])

View Source
@spec directory(
  t(),
  keyword()
) :: Dagger.Directory.t()

Creates an empty directory or loads one by ID.

optional-arguments

Optional Arguments

  • id -
This function is deprecated. Use `load_file_from_id` instead.
@spec file(t(), Dagger.FileID.t()) :: {:ok, Dagger.File.t() | nil} | {:error, term()}

Loads a file by ID.

required-arguments

Required Arguments

  • id -
Link to this function

function(query, name, return_type)

View Source
@spec function(t(), Dagger.String.t(), Dagger.TypeDef.t()) :: Dagger.Function.t()

Create a function.

required-arguments

Required Arguments

  • name -
  • return_type -
Link to this function

generated_code(query, code)

View Source
@spec generated_code(t(), Dagger.Directory.t()) :: Dagger.GeneratedCode.t()

Create a code generation result, given a directory containing the generated code.

required-arguments

Required Arguments

  • code -
Link to this function

git(query, url, optional_args \\ [])

View Source

Queries a git repository.

required-arguments

Required Arguments

  • url - Url of the git repository. Can be formatted as https://{host}/{owner}/{repo}, git@{host}:{owner}/{repo} Suffix ".git" is optional.

optional-arguments

Optional Arguments

  • keep_git_dir - Set to true to keep .git directory.
  • ssh_known_hosts - Set SSH known hosts
  • ssh_auth_socket - Set SSH auth socket
  • experimental_service_host - A service which must be started before the repo is fetched.
@spec host(t()) :: Dagger.Host.t()

Queries the host environment.

Link to this function

http(query, url, optional_args \\ [])

View Source
@spec http(t(), Dagger.String.t(), keyword()) :: Dagger.File.t()

Returns a file containing an http remote url content.

required-arguments

Required Arguments

optional-arguments

Optional Arguments

  • experimental_service_host - A service which must be started before the URL is fetched.
Link to this function

load_cache_volume_from_id(query, cache_volume)

View Source
@spec load_cache_volume_from_id(t(), Dagger.CacheVolume.t()) :: Dagger.CacheVolume.t()

Load a CacheVolume from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_container_from_id(query, container)

View Source
@spec load_container_from_id(t(), Dagger.Container.t()) :: Dagger.Container.t()

Loads a container from an ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_directory_from_id(query, directory)

View Source
@spec load_directory_from_id(t(), Dagger.Directory.t()) :: Dagger.Directory.t()

Load a Directory from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_file_from_id(query, file)

View Source
@spec load_file_from_id(t(), Dagger.File.t()) :: Dagger.File.t()

Load a File from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_function_arg_from_id(query, id)

View Source
@spec load_function_arg_from_id(t(), Dagger.FunctionArg.t()) :: Dagger.FunctionArg.t()

Load a function argument by ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_function_from_id(query, id)

View Source
@spec load_function_from_id(t(), Dagger.Function.t()) :: Dagger.Function.t()

Load a function by ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_generated_code_from_id(query, id)

View Source
@spec load_generated_code_from_id(t(), Dagger.GeneratedCode.t()) ::
  Dagger.GeneratedCode.t()

Load a GeneratedCode by ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_git_ref_from_id(query, id)

View Source
@spec load_git_ref_from_id(t(), Dagger.GitRef.t()) :: Dagger.GitRef.t()

Load a git ref from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_git_repository_from_id(query, id)

View Source
@spec load_git_repository_from_id(t(), Dagger.GitRepository.t()) ::
  Dagger.GitRepository.t()

Load a git repository from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_module_from_id(query, id)

View Source
@spec load_module_from_id(t(), Dagger.Module.t()) :: Dagger.Module.t()

Load a module by ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_secret_from_id(query, secret)

View Source
@spec load_secret_from_id(t(), Dagger.Secret.t()) :: Dagger.Secret.t()

Load a Secret from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_service_from_id(query, service)

View Source
@spec load_service_from_id(t(), Dagger.Service.t()) :: Dagger.Service.t()

Loads a service from ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_socket_from_id(query, socket)

View Source
@spec load_socket_from_id(t(), Dagger.Socket.t()) :: Dagger.Socket.t()

Load a Socket from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_type_def_from_id(query, id)

View Source
@spec load_type_def_from_id(t(), Dagger.TypeDef.t()) :: Dagger.TypeDef.t()

Load a TypeDef by ID.

required-arguments

Required Arguments

  • id -
@spec module(t()) :: Dagger.Module.t()

Create a new module.

Link to this function

module_config(query, source_directory, optional_args \\ [])

View Source
@spec module_config(t(), Dagger.Directory.t(), keyword()) :: Dagger.ModuleConfig.t()

Load the static configuration for a module from the given source directory and optional subpath.

required-arguments

Required Arguments

  • source_directory -

optional-arguments

Optional Arguments

  • subpath -
Link to this function

pipeline(query, name, optional_args \\ [])

View Source
@spec pipeline(t(), Dagger.String.t(), keyword()) :: t()

Creates a named sub-pipeline.

required-arguments

Required Arguments

  • name - Pipeline name.

optional-arguments

Optional Arguments

  • description - Pipeline description.
  • labels - Pipeline labels.
This function is deprecated. Use `load_secret_from_id` instead.
@spec secret(t(), Dagger.SecretID.t()) :: Dagger.Secret.t()

Loads a secret from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

set_secret(query, name, plaintext)

View Source
@spec set_secret(t(), Dagger.String.t(), Dagger.String.t()) :: Dagger.Secret.t()

Sets a secret given a user defined name to its plaintext and returns the secret. The plaintext value is limited to a size of 128000 bytes.

required-arguments

Required Arguments

  • name - The user defined name for this secret
  • plaintext - The plaintext of the secret
Link to this function

socket(query, optional_args \\ [])

View Source
This function is deprecated. Use `load_socket_from_id` instead.
@spec socket(
  t(),
  keyword()
) :: Dagger.Socket.t()

Loads a socket by its ID.

optional-arguments

Optional Arguments

  • id -
@spec type_def(t()) :: Dagger.TypeDef.t()

Create a new TypeDef.