View Source Dagger.Client (dagger v0.17.0)

The root of the DAG.

Summary

Functions

Retrieves a container builtin to the engine.

Constructs a cache volume for a given cache key.

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.

The Dagger engine container configuration and state

Create a new error.

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.

Initialize a Large Language Model (LLM)

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 EngineCacheEntry from its ID.

Load a EngineCacheEntrySet from its ID.

Load a EngineCache from its ID.

Load a Engine from its ID.

Load a EnumTypeDef from its ID.

Load a EnumValueTypeDef from its ID.

Load a EnvVariable from its ID.

Load a Error from its ID.

Load a ErrorValue from its ID.

Load a FieldTypeDef from its ID.

Load a File from its ID.

Load a FunctionArg from its ID.

Load a FunctionCallArgValue from its ID.

Load a FunctionCall from its ID.

Load a Function from its ID.

Load a GeneratedCode 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 LLM from its ID.

Load a LLMVariable from its ID.

Load a ModuleConfigClient 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 ScalarTypeDef from its ID.

Load a SDKConfig from its ID.

Load a Secret from its ID.

Load a Service from its ID.

Load a Socket from its ID.

Load a SourceMap from its ID.

Load a Terminal from its ID.

Load a TypeDef from its ID.

Create a new module.

Create a new module source instance from a source ref string

Creates a new secret.

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

Creates source map metadata.

Create a new TypeDef.

Get the current Dagger Engine version.

Types

t()

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

Functions

builtin_container(client, digest)

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

Retrieves a container builtin to the engine.

cache_volume(client, key, optional_args \\ [])

@spec cache_volume(t(), String.t(), [{:namespace, String.t() | nil}]) ::
  Dagger.CacheVolume.t()

Constructs a cache volume for a given cache key.

container(client, optional_args \\ [])

@spec container(t(), [{:platform, Dagger.Platform.t() | nil}]) :: 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.

current_function_call(client)

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

current_module(client)

@spec current_module(t()) :: Dagger.CurrentModule.t()

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

current_type_defs(client)

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

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

default_platform(client)

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

The default platform of the engine.

directory(client)

@spec directory(t()) :: Dagger.Directory.t()

Creates an empty directory.

engine(client)

@spec engine(t()) :: Dagger.Engine.t()

The Dagger engine container configuration and state

error(client, message)

@spec error(t(), String.t()) :: Dagger.Error.t()

Create a new error.

function(client, name, return_type)

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

Creates a function.

generated_code(client, code)

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

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

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

@spec git(t(), String.t(),
  keep_git_dir: boolean() | nil,
  experimental_service_host: Dagger.ServiceID.t() | nil,
  ssh_known_hosts: String.t() | nil,
  ssh_auth_socket: Dagger.SocketID.t() | nil
) :: Dagger.GitRepository.t()

Queries a Git repository.

host(client)

@spec host(t()) :: Dagger.Host.t()

Queries the host environment.

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

@spec http(t(), String.t(), [{:experimental_service_host, Dagger.ServiceID.t() | nil}]) ::
  Dagger.File.t()

Returns a file containing an http remote url content.

llm(client, optional_args \\ [])

@spec llm(t(), model: String.t() | nil, max_api_calls: integer() | nil) ::
  Dagger.LLM.t()

Initialize a Large Language Model (LLM)

load_cache_volume_from_id(client, id)

@spec load_cache_volume_from_id(t(), Dagger.CacheVolumeID.t()) ::
  Dagger.CacheVolume.t()

Load a CacheVolume from its ID.

load_container_from_id(client, id)

@spec load_container_from_id(t(), Dagger.ContainerID.t()) :: Dagger.Container.t()

Load a Container from its ID.

load_current_module_from_id(client, id)

@spec load_current_module_from_id(t(), Dagger.CurrentModuleID.t()) ::
  Dagger.CurrentModule.t()

Load a CurrentModule from its ID.

load_directory_from_id(client, id)

@spec load_directory_from_id(t(), Dagger.DirectoryID.t()) :: Dagger.Directory.t()

Load a Directory from its ID.

load_engine_cache_entry_from_id(client, id)

@spec load_engine_cache_entry_from_id(t(), Dagger.EngineCacheEntryID.t()) ::
  Dagger.EngineCacheEntry.t()

Load a EngineCacheEntry from its ID.

load_engine_cache_entry_set_from_id(client, id)

@spec load_engine_cache_entry_set_from_id(t(), Dagger.EngineCacheEntrySetID.t()) ::
  Dagger.EngineCacheEntrySet.t()

Load a EngineCacheEntrySet from its ID.

load_engine_cache_from_id(client, id)

@spec load_engine_cache_from_id(t(), Dagger.EngineCacheID.t()) ::
  Dagger.EngineCache.t()

Load a EngineCache from its ID.

load_engine_from_id(client, id)

@spec load_engine_from_id(t(), Dagger.EngineID.t()) :: Dagger.Engine.t()

Load a Engine from its ID.

load_enum_type_def_from_id(client, id)

@spec load_enum_type_def_from_id(t(), Dagger.EnumTypeDefID.t()) ::
  Dagger.EnumTypeDef.t()

Load a EnumTypeDef from its ID.

load_enum_value_type_def_from_id(client, id)

@spec load_enum_value_type_def_from_id(t(), Dagger.EnumValueTypeDefID.t()) ::
  Dagger.EnumValueTypeDef.t()

Load a EnumValueTypeDef from its ID.

load_env_variable_from_id(client, id)

@spec load_env_variable_from_id(t(), Dagger.EnvVariableID.t()) ::
  Dagger.EnvVariable.t()

Load a EnvVariable from its ID.

load_error_from_id(client, id)

@spec load_error_from_id(t(), Dagger.ErrorID.t()) :: Dagger.Error.t()

Load a Error from its ID.

load_error_value_from_id(client, id)

@spec load_error_value_from_id(t(), Dagger.ErrorValueID.t()) :: Dagger.ErrorValue.t()

Load a ErrorValue from its ID.

load_field_type_def_from_id(client, id)

@spec load_field_type_def_from_id(t(), Dagger.FieldTypeDefID.t()) ::
  Dagger.FieldTypeDef.t()

Load a FieldTypeDef from its ID.

load_file_from_id(client, id)

@spec load_file_from_id(t(), Dagger.FileID.t()) :: Dagger.File.t()

Load a File from its ID.

load_function_arg_from_id(client, id)

@spec load_function_arg_from_id(t(), Dagger.FunctionArgID.t()) ::
  Dagger.FunctionArg.t()

Load a FunctionArg from its ID.

load_function_call_arg_value_from_id(client, id)

@spec load_function_call_arg_value_from_id(t(), Dagger.FunctionCallArgValueID.t()) ::
  Dagger.FunctionCallArgValue.t()

Load a FunctionCallArgValue from its ID.

load_function_call_from_id(client, id)

@spec load_function_call_from_id(t(), Dagger.FunctionCallID.t()) ::
  Dagger.FunctionCall.t()

Load a FunctionCall from its ID.

load_function_from_id(client, id)

@spec load_function_from_id(t(), Dagger.FunctionID.t()) :: Dagger.Function.t()

Load a Function from its ID.

load_generated_code_from_id(client, id)

@spec load_generated_code_from_id(t(), Dagger.GeneratedCodeID.t()) ::
  Dagger.GeneratedCode.t()

Load a GeneratedCode from its ID.

load_git_ref_from_id(client, id)

@spec load_git_ref_from_id(t(), Dagger.GitRefID.t()) :: Dagger.GitRef.t()

Load a GitRef from its ID.

load_git_repository_from_id(client, id)

@spec load_git_repository_from_id(t(), Dagger.GitRepositoryID.t()) ::
  Dagger.GitRepository.t()

Load a GitRepository from its ID.

load_host_from_id(client, id)

@spec load_host_from_id(t(), Dagger.HostID.t()) :: Dagger.Host.t()

Load a Host from its ID.

load_input_type_def_from_id(client, id)

@spec load_input_type_def_from_id(t(), Dagger.InputTypeDefID.t()) ::
  Dagger.InputTypeDef.t()

Load a InputTypeDef from its ID.

load_interface_type_def_from_id(client, id)

@spec load_interface_type_def_from_id(t(), Dagger.InterfaceTypeDefID.t()) ::
  Dagger.InterfaceTypeDef.t()

Load a InterfaceTypeDef from its ID.

load_label_from_id(client, id)

@spec load_label_from_id(t(), Dagger.LabelID.t()) :: Dagger.Label.t()

Load a Label from its ID.

load_list_type_def_from_id(client, id)

@spec load_list_type_def_from_id(t(), Dagger.ListTypeDefID.t()) ::
  Dagger.ListTypeDef.t()

Load a ListTypeDef from its ID.

load_llm_from_id(client, id)

@spec load_llm_from_id(t(), Dagger.LLMID.t()) :: Dagger.LLM.t()

Load a LLM from its ID.

load_llm_variable_from_id(client, id)

@spec load_llm_variable_from_id(t(), Dagger.LLMVariableID.t()) ::
  Dagger.LLMVariable.t()

Load a LLMVariable from its ID.

load_module_config_client_from_id(client, id)

@spec load_module_config_client_from_id(t(), Dagger.ModuleConfigClientID.t()) ::
  Dagger.ModuleConfigClient.t()

Load a ModuleConfigClient from its ID.

load_module_from_id(client, id)

@spec load_module_from_id(t(), Dagger.ModuleID.t()) :: Dagger.Module.t()

Load a Module from its ID.

load_module_source_from_id(client, id)

@spec load_module_source_from_id(t(), Dagger.ModuleSourceID.t()) ::
  Dagger.ModuleSource.t()

Load a ModuleSource from its ID.

load_object_type_def_from_id(client, id)

@spec load_object_type_def_from_id(t(), Dagger.ObjectTypeDefID.t()) ::
  Dagger.ObjectTypeDef.t()

Load a ObjectTypeDef from its ID.

load_port_from_id(client, id)

@spec load_port_from_id(t(), Dagger.PortID.t()) :: Dagger.Port.t()

Load a Port from its ID.

load_scalar_type_def_from_id(client, id)

@spec load_scalar_type_def_from_id(t(), Dagger.ScalarTypeDefID.t()) ::
  Dagger.ScalarTypeDef.t()

Load a ScalarTypeDef from its ID.

load_sdk_config_from_id(client, id)

@spec load_sdk_config_from_id(t(), Dagger.SDKConfigID.t()) ::
  Dagger.SDKConfig.t() | nil

Load a SDKConfig from its ID.

load_secret_from_id(client, id)

@spec load_secret_from_id(t(), Dagger.SecretID.t()) :: Dagger.Secret.t()

Load a Secret from its ID.

load_secret_from_name(client, name, optional_args \\ [])

@spec load_secret_from_name(t(), String.t(), [{:accessor, String.t() | nil}]) ::
  Dagger.Secret.t()

Load a Secret from its Name.

load_service_from_id(client, id)

@spec load_service_from_id(t(), Dagger.ServiceID.t()) :: Dagger.Service.t()

Load a Service from its ID.

load_socket_from_id(client, id)

@spec load_socket_from_id(t(), Dagger.SocketID.t()) :: Dagger.Socket.t()

Load a Socket from its ID.

load_source_map_from_id(client, id)

@spec load_source_map_from_id(t(), Dagger.SourceMapID.t()) :: Dagger.SourceMap.t()

Load a SourceMap from its ID.

load_terminal_from_id(client, id)

@spec load_terminal_from_id(t(), Dagger.TerminalID.t()) :: Dagger.Terminal.t()

Load a Terminal from its ID.

load_type_def_from_id(client, id)

@spec load_type_def_from_id(t(), Dagger.TypeDefID.t()) :: Dagger.TypeDef.t()

Load a TypeDef from its ID.

module(client)

@spec module(t()) :: Dagger.Module.t()

Create a new module.

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

@spec module_source(t(), String.t(),
  ref_pin: String.t() | nil,
  disable_find_up: boolean() | nil,
  allow_not_exists: boolean() | nil,
  require_kind: Dagger.ModuleSourceKind.t() | nil
) :: Dagger.ModuleSource.t()

Create a new module source instance from a source ref string

secret(client, uri)

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

Creates a new secret.

set_secret(client, name, plaintext)

@spec set_secret(t(), String.t(), 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.

source_map(client, filename, line, column)

@spec source_map(t(), String.t(), integer(), integer()) :: Dagger.SourceMap.t()

Creates source map metadata.

type_def(client)

@spec type_def(t()) :: Dagger.TypeDef.t()

Create a new TypeDef.

version(client)

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

Get the current Dagger Engine version.