dagger/dsl/module_source
Values
pub fn as_module(parent: types.ModuleSource) -> types.Module
Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
pub fn as_string(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
A human readable ref string representation of this module source.
pub fn blueprint(
parent: types.ModuleSource,
) -> types.ModuleSource
The blueprint referenced by the module source.
pub fn clone_ref(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The ref to clone the root of the git repo from. Only valid for git sources.
pub fn commit(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The resolved commit of the git repo this source points to.
pub fn config_clients(
parent: types.ModuleSource,
select select: fn(types.ModuleConfigClient) -> List(types.Field),
client client: types.Client,
then handler: fn(
Result(List(types.ModuleConfigClient), types.QueryError),
) -> a,
) -> a
The clients generated for the module.
pub fn config_exists(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(Bool, types.QueryError)) -> a,
) -> a
Whether an existing dagger.json for the module was found.
pub fn context_directory(
parent: types.ModuleSource,
) -> types.Directory
The full directory loaded for the module source, including the source code as a subdirectory.
pub fn dependencies(
parent: types.ModuleSource,
select select: fn(types.ModuleSource) -> List(types.Field),
client client: types.Client,
then handler: fn(
Result(List(types.ModuleSource), types.QueryError),
) -> a,
) -> a
The dependencies of the module source.
pub fn digest(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance.
pub fn directory(
parent: types.ModuleSource,
path path: String,
) -> types.Directory
The directory containing the module configuration and source code (source code may be in a subdir).
pub fn engine_version(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The engine version of the module.
pub fn generated_context_directory(
parent: types.ModuleSource,
) -> types.Directory
The generated files and directories made on top of the module source’s context directory.
pub fn html_repo_u_r_l(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
pub fn html_u_r_l(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The URL to the source’s git repo in a web browser. Only valid for git sources.
pub fn id(parent: types.ModuleSource) -> types.ModuleSource
A unique identifier for this ModuleSource.
pub fn introspection_schema_j_s_o_n(
parent: types.ModuleSource,
) -> types.File
The introspection schema JSON file for this module source. This file represents the schema visible to the module’s source code, including all core types and those from the dependencies. Note: this is in the context of a module, so some core types may be hidden.
pub fn kind(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(
Result(types.ModuleSourceKind, types.QueryError),
) -> a,
) -> a
The kind of module source (currently local, git or dir).
pub fn local_context_directory_path(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The full absolute path to the context directory on the caller’s host filesystem that this module source is loaded from. Only valid for local module sources.
pub fn module_name(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The name of the module, including any setting via the withName API.
pub fn module_original_name(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The original name of the module as read from the module’s dagger.json (or set for the first time with the withName API).
pub fn module_source(
id id: types.ModuleSource,
) -> types.ModuleSource
pub fn original_subpath(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The original subpath used when instantiating this module source, relative to the context directory.
pub fn pin(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The pinned version of this module source.
pub fn repo_root_path(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
pub fn sdk(parent: types.ModuleSource) -> types.SDKConfig
The SDK configuration of the module.
pub fn source_root_subpath(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The path, relative to the context directory, that contains the module’s dagger.json.
pub fn source_subpath(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The path to the directory containing the module’s source code, relative to the context directory.
pub fn sync(parent: types.ModuleSource) -> types.ModuleSource
Forces evaluation of the module source, including any loading into the engine and associated validation.
pub fn toolchains(
parent: types.ModuleSource,
select select: fn(types.ModuleSource) -> List(types.Field),
client client: types.Client,
then handler: fn(
Result(List(types.ModuleSource), types.QueryError),
) -> a,
) -> a
The toolchains referenced by the module source.
pub fn user_defaults(parent: types.ModuleSource) -> types.EnvFile
User-defined defaults read from local .env files
pub fn version(
parent: types.ModuleSource,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The specified version of the git repo this source points to.
pub fn with_blueprint(
parent: types.ModuleSource,
blueprint blueprint: types.ModuleSource,
) -> types.ModuleSource
Set a blueprint for the module source.
pub fn with_client(
parent: types.ModuleSource,
generator generator: String,
output_dir output_dir: String,
) -> types.ModuleSource
Update the module source with a new client to generate.
pub fn with_dependencies(
parent: types.ModuleSource,
dependencies dependencies: List(types.ModuleSource),
) -> types.ModuleSource
Append the provided dependencies to the module source’s dependency list.
pub fn with_engine_version(
parent: types.ModuleSource,
version version: String,
) -> types.ModuleSource
Upgrade the engine version of the module to the given value.
pub fn with_experimental_features(
parent: types.ModuleSource,
features features: List(types.ModuleSourceExperimentalFeature),
) -> types.ModuleSource
Enable the experimental features for the module source.
pub fn with_includes(
parent: types.ModuleSource,
patterns patterns: List(String),
) -> types.ModuleSource
Update the module source with additional include patterns for files+directories from its context that are required for building it
pub fn with_name(
parent: types.ModuleSource,
name name: String,
) -> types.ModuleSource
Update the module source with a new name.
pub fn with_s_d_k(
parent: types.ModuleSource,
source source: String,
) -> types.ModuleSource
Update the module source with a new SDK.
pub fn with_source_subpath(
parent: types.ModuleSource,
path path: String,
) -> types.ModuleSource
Update the module source with a new source subpath.
pub fn with_toolchains(
parent: types.ModuleSource,
toolchains toolchains: List(types.ModuleSource),
) -> types.ModuleSource
Add toolchains to the module source.
pub fn with_update_blueprint(
parent: types.ModuleSource,
) -> types.ModuleSource
Update the blueprint module to the latest version.
pub fn with_update_dependencies(
parent: types.ModuleSource,
dependencies dependencies: List(String),
) -> types.ModuleSource
Update one or more module dependencies.
pub fn with_update_toolchains(
parent: types.ModuleSource,
toolchains toolchains: List(String),
) -> types.ModuleSource
Update one or more toolchains.
pub fn with_updated_clients(
parent: types.ModuleSource,
clients clients: List(String),
) -> types.ModuleSource
Update one or more clients.
pub fn without_blueprint(
parent: types.ModuleSource,
) -> types.ModuleSource
Remove the current blueprint from the module source.
pub fn without_client(
parent: types.ModuleSource,
path path: String,
) -> types.ModuleSource
Remove a client from the module source.
pub fn without_dependencies(
parent: types.ModuleSource,
dependencies dependencies: List(String),
) -> types.ModuleSource
Remove the provided dependencies from the module source’s dependency list.
pub fn without_experimental_features(
parent: types.ModuleSource,
features features: List(types.ModuleSourceExperimentalFeature),
) -> types.ModuleSource
Disable experimental features for the module source.
pub fn without_toolchains(
parent: types.ModuleSource,
toolchains toolchains: List(String),
) -> types.ModuleSource
Remove the provided toolchains from the module source.