View Source Dagger.Client (dagger v0.13.6)

The root of the DAG.

Summary

Functions

Retrieves a content-addressed blob.

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 Dagger engine container configuration and state

The default platform of the engine.

Creates an empty directory.

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

Load a DaggerEngineCacheEntrySet from its ID.

Load a DaggerEngineCache from its ID.

Load a DaggerEngine from its ID.

Load a Directory from its ID.

Load a EnumTypeDef from its ID.

Load a EnumValueTypeDef 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 FunctionCallArgValue 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 ModuleSourceView from its ID.

Load a ObjectTypeDef from its ID.

Load a Port from its ID.

Load a ScalarTypeDef 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.

Reference a secret by name.

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

Create a new TypeDef.

Get the current Dagger Engine version.

Types

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

Functions

Link to this function

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

View Source
@spec blob(t(), String.t(), integer(), String.t(), String.t()) :: Dagger.Directory.t()

Retrieves a content-addressed blob.

Link to this function

builtin_container(client, digest)

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

Retrieves a container builtin to the engine.

Link to this function

cache_volume(client, key)

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

Constructs a cache volume for a given cache key.

Link to this function

container(client, optional_args \\ [])

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

Link to this function

current_function_call(client)

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

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 dagger_engine(t()) :: Dagger.DaggerEngine.t()

The Dagger engine container configuration and state

Link to this function

default_platform(client)

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

The default platform of the engine.

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

Creates an empty directory.

Link to this function

function(client, name, return_type)

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

Creates a function.

Link to this function

generated_code(client, 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.

Link to this function

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

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

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

Queries the host environment.

Link to this function

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

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

Returns a file containing an http remote url content.

Link to this function

load_cache_volume_from_id(client, id)

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

Load a CacheVolume from its ID.

Link to this function

load_container_from_id(client, id)

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

Load a Container from its ID.

Link to this function

load_current_module_from_id(client, id)

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

Load a CurrentModule from its ID.

Link to this function

load_dagger_engine_cache_entry_from_id(client, id)

View Source
@spec load_dagger_engine_cache_entry_from_id(t(), Dagger.DaggerEngineCacheEntryID.t()) ::
  Dagger.DaggerEngineCacheEntry.t()

Load a DaggerEngineCacheEntry from its ID.

Link to this function

load_dagger_engine_cache_entry_set_from_id(client, id)

View Source
@spec load_dagger_engine_cache_entry_set_from_id(
  t(),
  Dagger.DaggerEngineCacheEntrySetID.t()
) ::
  Dagger.DaggerEngineCacheEntrySet.t()

Load a DaggerEngineCacheEntrySet from its ID.

Link to this function

load_dagger_engine_cache_from_id(client, id)

View Source
@spec load_dagger_engine_cache_from_id(t(), Dagger.DaggerEngineCacheID.t()) ::
  Dagger.DaggerEngineCache.t()

Load a DaggerEngineCache from its ID.

Link to this function

load_dagger_engine_from_id(client, id)

View Source
@spec load_dagger_engine_from_id(t(), Dagger.DaggerEngineID.t()) ::
  Dagger.DaggerEngine.t()

Load a DaggerEngine from its ID.

Link to this function

load_directory_from_id(client, id)

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

Load a Directory from its ID.

Link to this function

load_enum_type_def_from_id(client, id)

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

Load a EnumTypeDef from its ID.

Link to this function

load_enum_value_type_def_from_id(client, id)

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

Load a EnumValueTypeDef from its ID.

Link to this function

load_env_variable_from_id(client, id)

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

Load a EnvVariable from its ID.

Link to this function

load_field_type_def_from_id(client, id)

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

Load a FieldTypeDef from its ID.

Link to this function

load_file_from_id(client, id)

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

Load a File from its ID.

Link to this function

load_function_arg_from_id(client, id)

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

Load a FunctionArg from its ID.

Link to this function

load_function_call_arg_value_from_id(client, id)

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

Load a FunctionCallArgValue from its ID.

Link to this function

load_function_call_from_id(client, id)

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

Load a FunctionCall from its ID.

Link to this function

load_function_from_id(client, id)

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

Load a Function from its ID.

Link to this function

load_generated_code_from_id(client, id)

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

Load a GeneratedCode from its ID.

Link to this function

load_git_module_source_from_id(client, id)

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

Load a GitModuleSource from its ID.

Link to this function

load_git_ref_from_id(client, id)

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

Load a GitRef from its ID.

Link to this function

load_git_repository_from_id(client, id)

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

Load a GitRepository from its ID.

Link to this function

load_host_from_id(client, id)

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

Load a Host from its ID.

Link to this function

load_input_type_def_from_id(client, id)

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

Load a InputTypeDef from its ID.

Link to this function

load_interface_type_def_from_id(client, id)

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

Load a InterfaceTypeDef from its ID.

Link to this function

load_label_from_id(client, id)

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

Load a Label from its ID.

Link to this function

load_list_type_def_from_id(client, id)

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

Load a ListTypeDef from its ID.

Link to this function

load_local_module_source_from_id(client, id)

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

Load a LocalModuleSource from its ID.

Link to this function

load_module_dependency_from_id(client, id)

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

Load a ModuleDependency from its ID.

Link to this function

load_module_from_id(client, id)

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

Load a Module from its ID.

Link to this function

load_module_source_from_id(client, id)

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

Load a ModuleSource from its ID.

Link to this function

load_module_source_view_from_id(client, id)

View Source
@spec load_module_source_view_from_id(t(), Dagger.ModuleSourceViewID.t()) ::
  Dagger.ModuleSourceView.t()

Load a ModuleSourceView from its ID.

Link to this function

load_object_type_def_from_id(client, id)

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

Load a ObjectTypeDef from its ID.

Link to this function

load_port_from_id(client, id)

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

Load a Port from its ID.

Link to this function

load_scalar_type_def_from_id(client, id)

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

Load a ScalarTypeDef from its ID.

Link to this function

load_secret_from_id(client, id)

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

Load a Secret from its ID.

Link to this function

load_service_from_id(client, id)

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

Load a Service from its ID.

Link to this function

load_socket_from_id(client, id)

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

Load a Socket from its ID.

Link to this function

load_terminal_from_id(client, id)

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

Load a Terminal from its ID.

Link to this function

load_type_def_from_id(client, id)

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

Load a TypeDef from its ID.

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

Create a new module.

Link to this function

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

View Source
@spec module_dependency(t(), Dagger.ModuleSource.t(), [{:name, String.t() | nil}]) ::
  Dagger.ModuleDependency.t()

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

Link to this function

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

View Source
@spec module_source(t(), String.t(),
  ref_pin: String.t() | nil,
  stable: boolean() | nil,
  rel_host_path: String.t() | nil
) :: Dagger.ModuleSource.t()

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

Link to this function

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

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

Reference a secret by name.

Link to this function

set_secret(client, name, plaintext)

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

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

Create a new TypeDef.

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

Get the current Dagger Engine version.