View Source Dagger.Client (dagger v0.10.0)

The root of the DAG.

Link to this section Summary

Functions

Retrieves a content-addressed blob.

Retrieves a container builtin to the engine.

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.

The FunctionCall context that the SDK caller is currently executing in.

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 engine.

Creates an empty directory.

file(query, file) deprecated

Required Arguments

  • 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.

Load a Container from its ID.

Load a CurrentModule from its ID.

Load a Directory from its ID.

Load a EnvVariable from its ID.

Load a FieldTypeDef from its ID.

Load a File from its ID.

Load a FunctionArg from its ID.

Load a FunctionCall from its ID.

Load a Function from its ID.

Load a GeneratedCode from its ID.

Load a GitModuleSource from its ID.

Load a GitRef from its ID.

Load a GitRepository from its ID.

Load a Host from its ID.

Load a InputTypeDef from its ID.

Load a InterfaceTypeDef from its ID.

Load a Label from its ID.

Load a ListTypeDef from its ID.

Load a LocalModuleSource from its ID.

Load a ModuleDependency from its ID.

Load a Module from its ID.

Load a ModuleSource from its ID.

Load a ObjectTypeDef from its ID.

Load a Port from its ID.

Load a Secret from its ID.

Load a Service from its ID.

Load a Socket from its ID.

Load a Terminal from its ID.

Load a TypeDef from its ID.

Create a new module.

Create a new module dependency configuration from a module source and name

Create a new module source instance from a source ref string.

Creates a named sub-pipeline.

Reference a secret by name.

Sets a secret given a user defined name to its plaintext and returns the secret.

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

blob(query, digest, size, media_type, uncompressed)

View Source

Retrieves a content-addressed blob.

required-arguments

Required Arguments

  • digest - Digest of the blob
  • size - Size of the blob
  • media_type - Media type of the blob
  • uncompressed - Digest of the uncompressed blob
Link to this function

builtin_container(query, digest)

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

Retrieves a container builtin to the engine.

required-arguments

Required Arguments

  • digest - Digest of the image manifest
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 - Version required by the SDK.
Link to this function

container(query, optional_args \\ [])

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

Creates a scratch container.

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 - DEPRECATED: Use loadContainerFromID instead.
  • platform - Platform to initialize the container with.
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()) :: Dagger.CurrentModule.t()

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()]} | {: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 engine.

Link to this function

directory(query, optional_args \\ [])

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

Creates an empty directory.

optional-arguments

Optional Arguments

  • id - DEPRECATED: Use loadDirectoryFromID isntead.
This function is deprecated. Use `load_file_from_id` instead.
@spec file(t(), Dagger.FileID.t()) :: Dagger.File.t()

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

Creates a function.

required-arguments

Required Arguments

  • name - Name of the function, in its original format from the implementation language.
  • return_type - Return type of the function.
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.
  • experimental_service_host - A service which must be started before the repo is fetched.
  • ssh_known_hosts - Set SSH known hosts
  • ssh_auth_socket - Set SSH auth socket
@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()

Load a Container from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_current_module_from_id(query, id)

View Source
@spec load_current_module_from_id(t(), Dagger.CurrentModule.t()) ::
  Dagger.CurrentModule.t()

Load a CurrentModule from its 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_env_variable_from_id(query, env_variable)

View Source
@spec load_env_variable_from_id(t(), Dagger.EnvVariable.t()) :: Dagger.EnvVariable.t()

Load a EnvVariable from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_field_type_def_from_id(query, field_type_def)

View Source
@spec load_field_type_def_from_id(t(), Dagger.FieldTypeDef.t()) ::
  Dagger.FieldTypeDef.t()

Load a FieldTypeDef 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, function_arg)

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

Load a FunctionArg from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_function_call_arg_value_from_id(query, function_call_arg_value)

View Source
@spec load_function_call_arg_value_from_id(t(), Dagger.FunctionCallArgValue.t()) ::
  Dagger.FunctionCallArgValue.t()

Load a FunctionCallArgValue from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_function_call_from_id(query, function_call)

View Source
@spec load_function_call_from_id(t(), Dagger.FunctionCall.t()) ::
  Dagger.FunctionCall.t()

Load a FunctionCall from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_function_from_id(query, function)

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

Load a Function from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_generated_code_from_id(query, generated_code)

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

Load a GeneratedCode from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_git_module_source_from_id(query, id)

View Source
@spec load_git_module_source_from_id(t(), Dagger.GitModuleSource.t()) ::
  Dagger.GitModuleSource.t()

Load a GitModuleSource from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_git_ref_from_id(query, git_ref)

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

Load a GitRef from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_git_repository_from_id(query, git_repository)

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

Load a GitRepository from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_host_from_id(query, host)

View Source
@spec load_host_from_id(t(), Dagger.Host.t()) :: Dagger.Host.t()

Load a Host from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_input_type_def_from_id(query, id)

View Source
@spec load_input_type_def_from_id(t(), Dagger.InputTypeDef.t()) ::
  Dagger.InputTypeDef.t()

Load a InputTypeDef from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_interface_type_def_from_id(query, interface_type_def)

View Source
@spec load_interface_type_def_from_id(t(), Dagger.InterfaceTypeDef.t()) ::
  Dagger.InterfaceTypeDef.t()

Load a InterfaceTypeDef from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_label_from_id(query, label)

View Source
@spec load_label_from_id(t(), Dagger.Label.t()) :: Dagger.Label.t()

Load a Label from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_list_type_def_from_id(query, list_type_def)

View Source
@spec load_list_type_def_from_id(t(), Dagger.ListTypeDef.t()) ::
  Dagger.ListTypeDef.t()

Load a ListTypeDef from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_local_module_source_from_id(query, id)

View Source
@spec load_local_module_source_from_id(t(), Dagger.LocalModuleSource.t()) ::
  Dagger.LocalModuleSource.t()

Load a LocalModuleSource from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_module_dependency_from_id(query, id)

View Source
@spec load_module_dependency_from_id(t(), Dagger.ModuleDependency.t()) ::
  Dagger.ModuleDependency.t()

Load a ModuleDependency from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_module_from_id(query, module)

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

Load a Module from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_module_source_from_id(query, id)

View Source
@spec load_module_source_from_id(t(), Dagger.ModuleSource.t()) ::
  Dagger.ModuleSource.t()

Load a ModuleSource from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_object_type_def_from_id(query, object_type_def)

View Source
@spec load_object_type_def_from_id(t(), Dagger.ObjectTypeDef.t()) ::
  Dagger.ObjectTypeDef.t()

Load a ObjectTypeDef from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_port_from_id(query, port)

View Source
@spec load_port_from_id(t(), Dagger.Port.t()) :: Dagger.Port.t()

Load a Port from its 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()

Load a Service from its 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_terminal_from_id(query, id)

View Source
@spec load_terminal_from_id(t(), Dagger.Terminal.t()) :: Dagger.Terminal.t()

Load a Terminal from its ID.

required-arguments

Required Arguments

  • id -
Link to this function

load_type_def_from_id(query, type_def)

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

Load a TypeDef from its ID.

required-arguments

Required Arguments

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

Create a new module.

Link to this function

module_dependency(query, source, optional_args \\ [])

View Source
@spec module_dependency(t(), Dagger.ModuleSource.t(), keyword()) ::
  Dagger.ModuleDependency.t()

Create a new module dependency configuration from a module source and name

required-arguments

Required Arguments

  • source - The source of the dependency

optional-arguments

Optional Arguments

  • name - If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default.
Link to this function

module_source(query, ref_string, optional_args \\ [])

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

Create a new module source instance from a source ref string.

required-arguments

Required Arguments

  • ref_string - The string ref representation of the module source

optional-arguments

Optional Arguments

  • stable - If true, enforce that the source is a stable version for source kinds that support versioning.
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 - Name of the sub-pipeline.

optional-arguments

Optional Arguments

  • description - Description of the sub-pipeline.
  • labels - Labels to apply to the sub-pipeline.
Link to this function

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

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

Reference a secret by name.

required-arguments

Required Arguments

  • name -

optional-arguments

Optional Arguments

  • accessor -
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
This function is deprecated. Use `load_socket_from_id` instead.
@spec socket(t(), Dagger.Socket.t()) :: Dagger.Socket.t()

Loads a socket by its ID.

required-arguments

Required Arguments

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

Create a new TypeDef.