View Source Dagger.ModuleSource (dagger v0.14.0)
The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
Summary
Functions
If the source is a of kind git, the git source representation of it.
If the source is of kind local, the local source representation of it.
Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
A human readable ref string representation of this module source.
Returns whether the module source has a configuration file.
The directory containing everything needed to load load and use the module.
The dependencies of the module source. Includes dependencies from the configuration and any extras from withDependencies calls.
Return the module source's content digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
The directory containing the module configuration and source code (source code may be in a subdir).
A unique identifier for this ModuleSource.
The kind of source (e.g. local, git, etc.)
If set, the name of the module this source references, including any overrides at runtime by callers.
The original name of the module this source references, as defined in the module configuration.
The path to the module source's context directory on the caller's filesystem. Only valid for local sources.
Resolve the provided module source arg as a dependency relative to this module source.
Load a directory from the caller optionally with a given view applied.
Load the source from its path on the caller's filesystem, including only needed+configured files and directories. Only valid for local sources.
The path relative to context of the root of the module source, which contains dagger.json. It also contains the module implementation source code, but that may or may not being a subdir of this root.
The path relative to context of the module implementation source code.
Retrieve a named view defined for this module source.
The named views defined for this module source, which are sets of directory filters that can be applied to directory arguments provided to functions.
Update the module source with a new context directory. Only valid for local sources.
Append the provided dependencies to the module source's dependency list.
Sets module init arguments
Update the module source with a new name.
Update the module source with a new SDK.
Update the module source with a new source subpath.
Update the module source with a new named view.
Types
Functions
@spec as_git_source(t()) :: Dagger.GitModuleSource.t() | nil
If the source is a of kind git, the git source representation of it.
@spec as_local_source(t()) :: Dagger.LocalModuleSource.t() | nil
If the source is of kind local, the local source representation of it.
@spec as_module(t(), [{:engine_version, String.t() | nil}]) :: Dagger.Module.t()
Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
A human readable ref string representation of this module source.
Returns whether the module source has a configuration file.
@spec context_directory(t()) :: Dagger.Directory.t()
The directory containing everything needed to load load and use the module.
@spec dependencies(t()) :: {:ok, [Dagger.ModuleDependency.t()]} | {:error, term()}
The dependencies of the module source. Includes dependencies from the configuration and any extras from withDependencies calls.
Return the module source's content digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
@spec directory(t(), String.t()) :: Dagger.Directory.t()
The directory containing the module configuration and source code (source code may be in a subdir).
@spec id(t()) :: {:ok, Dagger.ModuleSourceID.t()} | {:error, term()}
A unique identifier for this ModuleSource.
@spec kind(t()) :: {:ok, Dagger.ModuleSourceKind.t()} | {:error, term()}
The kind of source (e.g. local, git, etc.)
If set, the name of the module this source references, including any overrides at runtime by callers.
The original name of the module this source references, as defined in the module configuration.
The path to the module source's context directory on the caller's filesystem. Only valid for local sources.
Resolve the provided module source arg as a dependency relative to this module source.
resolve_directory_from_caller(module_source, path, optional_args \\ [])
View Source@spec resolve_directory_from_caller(t(), String.t(), view_name: String.t() | nil, ignore: [String.t()] ) :: Dagger.Directory.t()
Load a directory from the caller optionally with a given view applied.
Load the source from its path on the caller's filesystem, including only needed+configured files and directories. Only valid for local sources.
The path relative to context of the root of the module source, which contains dagger.json. It also contains the module implementation source code, but that may or may not being a subdir of this root.
The path relative to context of the module implementation source code.
@spec view(t(), String.t()) :: Dagger.ModuleSourceView.t()
Retrieve a named view defined for this module source.
@spec views(t()) :: {:ok, [Dagger.ModuleSourceView.t()]} | {:error, term()}
The named views defined for this module source, which are sets of directory filters that can be applied to directory arguments provided to functions.
@spec with_context_directory(t(), Dagger.Directory.t()) :: t()
Update the module source with a new context directory. Only valid for local sources.
@spec with_dependencies(t(), [Dagger.ModuleDependencyID.t()]) :: t()
Append the provided dependencies to the module source's dependency list.
Sets module init arguments
Update the module source with a new name.
Update the module source with a new SDK.
Update the module source with a new source subpath.
Update the module source with a new named view.