View Source Dagger.Module (dagger v0.12.3)

A Dagger module.

Summary

Functions

Modules used by this module.

The dependencies as configured by the module.

The doc string of the module, if any

Enumerations served by this module.

The generated files and directories made on top of the module source's context directory.

The module source's context plus any configuration and source files created by codegen.

A unique identifier for this Module.

Retrieves the module with the objects loaded via its SDK.

Interfaces served by this module.

The name of the module

Objects served by this module.

The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.

The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.

Serve a module's API in the current session.

The source for the module.

Retrieves the module with the given description

This module plus the given Enum type and associated values

This module plus the given Interface type and associated functions

This module plus the given Object type and associated functions.

Retrieves the module with basic configuration loaded if present.

Types

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

Functions

@spec dependencies(t()) :: {:ok, [t()]} | {:error, term()}

Modules used by this module.

Link to this function

dependency_config(module)

View Source
@spec dependency_config(t()) ::
  {:ok, [Dagger.ModuleDependency.t()]} | {:error, term()}

The dependencies as configured by the module.

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

The doc string of the module, if any

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

Enumerations served by this module.

Link to this function

generated_context_diff(module)

View Source
@spec generated_context_diff(t()) :: Dagger.Directory.t()

The generated files and directories made on top of the module source's context directory.

Link to this function

generated_context_directory(module)

View Source
@spec generated_context_directory(t()) :: Dagger.Directory.t()

The module source's context plus any configuration and source files created by codegen.

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

A unique identifier for this Module.

@spec initialize(t()) :: t()

Retrieves the module with the objects loaded via its SDK.

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

Interfaces served by this module.

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

The name of the module

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

Objects served by this module.

@spec runtime(t()) :: Dagger.Container.t()

The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.

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

The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.

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

Serve a module's API in the current session.

Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.

@spec source(t()) :: Dagger.ModuleSource.t()

The source for the module.

Link to this function

with_description(module, description)

View Source
@spec with_description(t(), String.t()) :: t()

Retrieves the module with the given description

@spec with_enum(t(), Dagger.TypeDef.t()) :: t()

This module plus the given Enum type and associated values

Link to this function

with_interface(module, iface)

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

This module plus the given Interface type and associated functions

Link to this function

with_object(module, object)

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

This module plus the given Object type and associated functions.

Link to this function

with_source(module, source, optional_args \\ [])

View Source
@spec with_source(t(), Dagger.ModuleSource.t(), [{:engine_version, String.t() | nil}]) ::
  t()

Retrieves the module with basic configuration loaded if present.