Dagger
Search

module-template

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger. The module demonstrates
usage of arguments and return types using simple echo and grep commands. The functions
can be called from the dagger CLI or from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Example (OpenTerminal)
no available example in current language
// ModuleTemplate_OpenTerminal demonstrates how to open an interactive terminal session
// within a ModuleTemplate module container.
//
// This function showcases the initialization and configuration of a
// ModuleTemplate module container using various options like enabling Cgo,
// utilizing build cache, and including a GCC compiler.
//
// Parameters:
//   - None
//
// Returns:
//   - *dagger.Container: A configured Dagger container with an open terminal.
//
// Usage:
//
//	This function can be used to interactively debug or inspect the
//	container environment during test execution.
func (m *Go) ModuleTemplate_OpenTerminal() *dagger.Container {
	// Configure the ModuleTemplate module container with necessary options
	targetModule := dag.ModuleTemplate()

	// Retrieve and discard standard output
	_, _ = targetModule.Ctr().
		Stdout(context.Background())

	// Open and return the terminal session in the configured container
	return targetModule.Ctr().
		Terminal()
}
no available example in current language
no available example in current language
Example (PassedEnvVars)
no available example in current language
// ModuleTemplate_PassedEnvVars demonstrates how to pass environment variables to the ModuleTemplate module.
//
// This method configures a ModuleTemplate module to use specific environment variables from the host.
func (m *Go) ModuleTemplate_PassedEnvVars(ctx context.Context) error {
	targetModule := dag.ModuleTemplate(dagger.ModuleTemplateOpts{
		EnvVarsFromHost: []string{"SOMETHING=SOMETHING,SOMETHING=SOMETHING"},
	})

	out, err := targetModule.Ctr().
		WithExec([]string{"printenv"}).
		Stdout(ctx)

	if err != nil {
		return fmt.Errorf("failed when executing printenv: %w", err)
	}

	if out == "" {
		return errEnvVarsEmpty
	}

	if !strings.Contains(out, "SOMETHING") {
		return errEnvVarsDontMatch
	}

	return nil
}
no available example in current language
no available example in current language
Example (CreateContainer)
no available example in current language
// ModuleTemplate_CreateContainer initializes and returns a configured Dagger container.
//
// This method exemplifies the setup of a container within the ModuleTemplate module using the source directory.
//
// Parameters:
//   - ctx: The context for controlling the function's timeout and cancellation.
//
// Returns:
//   - A configured Dagger container if successful, or an error if the process fails.
//
// Steps Involved:
//  1. Configure the ModuleTemplate module with the source directory.
//  2. Run a command inside the container to check the OS information.
func (m *Go) ModuleTemplate_CreateContainer(ctx context.Context) (*dagger.Container, error) {
	targetModule := dag.
		ModuleTemplate().
		BaseAlpine().
		WithUtilitiesInAlpineContainer(). // Install utilities
		WithGitInAlpineContainer().       // Install git
		WithSource(m.TestDir)

	// Get the OS or container information
	_, err := targetModule.
		Ctr().WithExec([]string{"uname"}).
		Stdout(ctx)

	if err != nil {
		return nil, fmt.Errorf("failed to get OS information: %w", err)
	}

	return targetModule.Ctr(), nil
}
no available example in current language
no available example in current language
Example (RunArbitraryCommand)
no available example in current language
// ModuleTemplate_RunArbitraryCommand runs an arbitrary shell command in the test container.
//
// This function demonstrates how to execute a shell command within the container
// using the ModuleTemplate module.
//
// Parameters:
//
//	ctx - context for controlling the function lifetime.
//
// Returns:
//
//	A string containing the output of the executed command, or an error if the command fails or if the output is empty.
func (m *Go) ModuleTemplate_RunArbitraryCommand(ctx context.Context) (string, error) {
	targetModule := dag.ModuleTemplate().WithSource(m.TestDir)

	// Execute the 'ls -l' command
	out, err := targetModule.
		Ctr().
		WithExec([]string{"ls", "-l"}).
		Stdout(ctx)

	if err != nil {
		return "", fmt.Errorf("failed to run shell command: %w", err)
	}

	if out == "" {
		return "", errExpectedFoldersNotFound
	}

	return out, nil
}
no available example in current language
no available example in current language
Example (CreateNetRcFileForGithub)
no available example in current language
// ModuleTemplate_CreateNetRcFileForGithub creates and configures a .netrc file for GitHub authentication.
//
// This method exemplifies the creation of a .netrc file with credentials for accessing GitHub,
// and demonstrates how to pass this file as a secret to the ModuleTemplate module.
//
// Parameters:
//   - ctx: The context for controlling the function's timeout and cancellation.
//
// Returns:
//   - A configured Container with the .netrc file set as a secret, or an error if the process fails.
//
// Steps Involved:
//  1. Define GitHub password as a secret.
//  2. Configure the ModuleTemplate module to use the .netrc file with the provided credentials.
//  3. Run a command inside the container to verify the .netrc file's contents.
func (m *Go) ModuleTemplate_CreateNetRcFileForGithub(ctx context.Context) (*dagger.Container, error) {
	passwordAsSecret := dag.SetSecret("mysecret", "ohboywhatapassword")

	// Configure it for GitHub
	targetModule := dag.ModuleTemplate().
		WithNewNetrcFileAsSecretGitHub("supersecretuser", passwordAsSecret)

	// Check if the .netrc file is created correctly
	out, err := targetModule.
		Ctr().
		WithExec([]string{"cat", "/root/.netrc"}).
		Stdout(ctx)

	if err != nil {
		return nil, fmt.Errorf("failed to get netrc file configured for github: %w", err)
	}

	expectedContent := "machine github.com\nlogin supersecretuser\npassword ohboywhatapassword"
	if !strings.Contains(out, expectedContent) {
		return nil, errNetRCFileNotFound
	}

	return targetModule.Ctr(), nil
}
no available example in current language
no available example in current language

Installation

dagger install github.com/Excoriate/daggerverse/module-template@v0.22.0

Entrypoint

Return Type
ModuleTemplate !
Arguments
NameTypeDescription
versionString version is the version of the container image to use.
imageString image is the container image to use.
ctrContainer ctr is the container to use as a base container.
envVarsFromHost[String ! ] envVarsFromHost is a list of environment variables to pass from the host to the container in a slice of strings.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
}

Types

ModuleTemplate 🔗

ModuleTemplate is a Dagger module. This module is used to create and manage containers.

ctr() 🔗

Ctr is the container to use as a base container.

Return Type
Container !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 ctr
func (m *myModule) example() *Container  {
	return dag.
			ModuleTemplate().
			Ctr()
}
@function
def example() -> dagger.Container:
	return (
		dag.module_template()
		.ctr()
	)
@func()
example(): Container {
	return dag
		.moduleTemplate()
		.ctr()
}

withNewNetrcFileGitHub() 🔗

WithNewNetrcFileGitHub creates a new .netrc file with the GitHub credentials.

The .netrc file is created in the root directory of the container.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-new-netrc-file-git-hub --username string --password string
func (m *myModule) example(username string, password string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithNewNetrcFileGitHub(username, password)
}
@function
def example(username: str, password: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_new_netrc_file_git_hub(username, password)
	)
@func()
example(username: string, password: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withNewNetrcFileGitHub(username, password)
}

withNewNetrcFileAsSecretGitHub() 🔗

WithNewNetrcFileAsSecretGitHub creates a new .netrc file with the GitHub credentials.

The .netrc file is created in the root directory of the container. The argument ‘password’ is a secret that is not exposed in the logs.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordSecret !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-new-netrc-file-as-secret-git-hub --username string --password env:MYSECRET
func (m *myModule) example(username string, password *Secret) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithNewNetrcFileAsSecretGitHub(username, password)
}
@function
def example(username: str, password: dagger.Secret) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_new_netrc_file_as_secret_git_hub(username, password)
	)
@func()
example(username: string, password: Secret): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withNewNetrcFileAsSecretGitHub(username, password)
}

withNewNetrcFileGitLab() 🔗

WithNewNetrcFileGitLab creates a new .netrc file with the GitLab credentials.

The .netrc file is created in the root directory of the container.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-new-netrc-file-git-lab --username string --password string
func (m *myModule) example(username string, password string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithNewNetrcFileGitLab(username, password)
}
@function
def example(username: str, password: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_new_netrc_file_git_lab(username, password)
	)
@func()
example(username: string, password: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withNewNetrcFileGitLab(username, password)
}

withNewNetrcFileAsSecretGitLab() 🔗

WithNewNetrcFileAsSecretGitLab creates a new .netrc file with the GitLab credentials.

The .netrc file is created in the root directory of the container. The argument ‘password’ is a secret that is not exposed in the logs.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordSecret !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-new-netrc-file-as-secret-git-lab --username string --password env:MYSECRET
func (m *myModule) example(username string, password *Secret) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithNewNetrcFileAsSecretGitLab(username, password)
}
@function
def example(username: str, password: dagger.Secret) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_new_netrc_file_as_secret_git_lab(username, password)
	)
@func()
example(username: string, password: Secret): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withNewNetrcFileAsSecretGitLab(username, password)
}

withGoPlatform() 🔗

WithGoPlatform sets the Go environment variables for the target platform.

platform is the target platform specified in the format “[os]/[platform]/[version]”. For example, “darwin/arm64/v7”, “windows/amd64”, “linux/arm64”. If the platform is not provided, it defaults to “linux/amd64”.

Params: - platform (dagger.Platform): The target platform.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
platformScalar -platform is the target platform specified in the format "[os]/[platform]/[version]". For example, "darwin/arm64/v7", "windows/amd64", "linux/arm64". If the platform is not provided, it defaults to "linux/amd64".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-platform
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoPlatform()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_platform()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoPlatform()
}

withGoCgoEnabled() 🔗

WithGoCgoEnabled enables CGO for the container environment.

When CGO is enabled, the Go toolchain will allow the use of cgo, which means it can link against C libraries and send code to the C compiler.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-cgo-enabled
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoCgoEnabled()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_cgo_enabled()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoCgoEnabled()
}

withCgoDisabled() 🔗

WithCgoDisabled disables CGO for the container environment.

When CGO is disabled, the Go toolchain will not permit the use of cgo, which means it will not link against C libraries or send code to the C compiler. This can be beneficial for creating fully static binaries or for environments where C dependencies are not available.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-cgo-disabled
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithCgoDisabled()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_cgo_disabled()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withCgoDisabled()
}

withGoBuildCache() 🔗

WithGoBuildCache configures a Go build cache for the container environment.

This method sets up the cache volume for Go build artifacts, which speeds up the build process by reusing previously compiled packages and dependencies.

Params: - cacheRoot (string) +optional: The path to the cache volume’s root. If not provided, it defaults to “/root/.cache/go-build”. - cache (*dagger.CacheVolume) +optional: The cache volume to use. If not provided, a default volume named “gobuildcache” is used. - source (*dagger.Directory) +optional: The directory to use as the source for the cache volume’s root. - sharing (dagger.CacheSharingMode) +optional: The sharing mode of the cache volume. If not provided, it defaults to “shared”.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
cacheRootString -cacheRoot is the path to the cache volume's root.
cacheCacheVolume -cache is the cache volume to use.
sourceDirectory -source is the identifier of the directory to use as the cache volume's root.
sharingEnum -sharing is the Sharing mode of the cache volume.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-build-cache
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoBuildCache()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_build_cache()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoBuildCache()
}

withGoModCache() 🔗

WithGoModCache configures a Go module cache for the container environment.

This method sets up the cache volume for Go modules, which speeds up the build process by reusing previously downloaded dependencies.

Params: - cacheRoot (string): The path to the cache volume’s root. If not provided, it defaults to “/go/pkg/mod”. - cache (*dagger.CacheVolume) +optional: The cache volume to use. If not provided, a default volume named “gomodcache” is used. - source (*dagger.Directory) +optional: The directory to use as the source for the cache volume’s root. - sharing (dagger.CacheSharingMode) +optional: The sharing mode of the cache volume. If not provided, it defaults to “shared”.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
cacheRootString -cacheRoot is the path to the cache volume's root.
cacheCacheVolume -cache is the cache volume to use.
sourceDirectory -source is the identifier of the directory to use as the cache volume's root.
sharingEnum -sharing is the Sharing mode of the cache volume.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-mod-cache
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoModCache()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_mod_cache()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoModCache()
}

withGoInstall() 🔗

WithGoInstall installs Go packages in the container environment.

This method uses the Go toolchain to install packages from specified URLs. It performs the equivalent of running “go install [url]” inside the container.

Params: - pkgs ([]string): A slice of URLs for the Go packages to install. These should be valid package URLs that the go install command can use.

Example:

ModuleTemplate.WithGoInstall([]string{"github.com/Excoriate/daggerverse@latest", "github.com/another/package@v1.0"})

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
pkgs[String ! ] !-pkgs are the URLs of the packages to install.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-install --pkgs string1 --pkgs string2
func (m *myModule) example(pkgs []string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoInstall(pkgs)
}
@function
def example(pkgs: List[str]) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_install(pkgs)
	)
@func()
example(pkgs: string[]): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoInstall(pkgs)
}

withGoExec() 🔗

WithGoExec runs a Go command in the container environment.

This method allows you to execute arbitrary Go commands, such as “go build” or “go test”, for a specified platform. If no platform is provided, it defaults to “linux/amd64”.

Params: - args ([]string): The arguments to pass to the Go command. For example, [“build”, “./…”] to run a Go build command on all packages. - platform (dagger.Platform) +optional: The target platform specified in the format “[os]/[platform]/[version]”. For example, “darwin/arm64/v7”, “windows/amd64”, “linux/arm64”. If the platform is not provided, it defaults to “linux/amd64”.

Example:

ModuleTemplate.WithGoExec([]string{"build", "./..."}, "linux/amd64")

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-args are the arguments to pass to the Go command.
platformScalar -platform is the target platform specified in the format "[os]/[platform]/[version]". For example, "darwin/arm64/v7", "windows/amd64", "linux/arm64". If the platform is not provided, it defaults to "linux/amd64".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-exec --args string1 --args string2
func (m *myModule) example(args []string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoExec(args)
}
@function
def example(args: List[str]) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_exec(args)
	)
@func()
example(args: string[]): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoExec(args)
}

withGoBuild() 🔗

WithGoBuild configures and executes a Go build command within the container environment.

This method builds a Go package based on specified parameters such as package name, race detection, build flags, tags, and output binary name.

Params: - pkg (string) +optional: The Go package to compile. If empty, the package in the current directory is compiled. - race (bool) +optional: Enable data race detection if true. - ldflags ([]string) +optional: Arguments to pass on each go tool link invocation. - tags ([]string) +optional: A list of additional build tags to consider satisfied during the build. - trimpath (bool) +optional: Remove all file system paths from the resulting executable if true. - rawArgs ([]string) +optional: Additional arguments to pass to the build command. - platform (dagger.Platform) +optional: Target platform in “[os]/[platform]/[version]” format, defaults to “linux/amd64”. - output (string) +optional: The output binary name or path. - optimizeSize (bool) +optional: Optimize for size if true. - verbose (bool) +optional: Verbose output if true. - buildMode (string) +optional: Specify the build mode.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
pkgString -pkg is the Go package to compile.
raceBoolean -race enables data race detection.
ldflags[String ! ] -ldflags are arguments to pass on each go tool link invocation.
tags[String ! ] -tags are additional build tags to consider satisfied during the build.
trimpathBoolean -trimpath removes all file system paths from the resulting executable.
rawArgs[String ! ] -rawArgs are additional arguments to pass to the build command.
platformScalar -platform is the target platform in "[os]/[platform]/[version]" format, defaults to "linux/amd64".
outputString -output specifies the output binary name or path.
optimizeSizeBoolean -optimizeSize optimizes for size.
verboseBoolean -verbose enables verbose output.
buildModeString -buildMode specifies the build mode.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-build
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoBuild()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_build()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoBuild()
}

withGoPrivate() 🔗

WithGoPrivate configures the GOPRIVATE environment variable for the container environment.

This method sets the GOPRIVATE variable, which is used by the Go toolchain to identify private modules or repositories that should not be fetched from public proxies.

Parameters: - privateHost (string): The hostname of the private host for the Go packages or modules.

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
privateHostString !-privateHost is the hostname of the private host for the Go packages or modules.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-private --private-host string
func (m *myModule) example(privateHost string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoPrivate(privateHost)
}
@function
def example(private_host: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_private(private_host)
	)
@func()
example(privateHost: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoPrivate(privateHost)
}

withGoGcccompiler() 🔗

WithGoGCCCompiler installs the GCC compiler and development tools in the container environment.

This method uses the Alpine package manager (apk) to install the GCC compiler along with musl-dev, which is the development package of the standard C library on Alpine.

Example usage:

ModuleTemplate.WithGCCCompiler()

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-gcccompiler
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoGcccompiler()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_gcccompiler()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoGcccompiler()
}

withGoTestSum() 🔗

WithGoTestSum installs the GoTestSum tool and optionally its dependency tparse in the container environment.

This method installs gotest.tools/gotestsum using the specified version, and optionally installs github.com/mfridman/tparse using a specified version, unless the skipTParse flag is set to true.

Parameters: - goTestSumVersion (string) +optional: The version of GoTestSum to use, e.g., “v0.8.0”. If empty, it defaults to “latest”. - tParseVersion (string) +optional: The version of TParse to use, e.g., “v0.8.0”. If empty, it defaults to the same version as goTestSumVersion. - skipTParse (bool) +optional: If true, TParse will not be installed. Default is false.

Example:

m := &ModuleTemplate{}
m.WithGoTestSum("v0.8.0", "v0.7.0", false)   // Install specific versions
m.WithGoTestSum("", "", true)                // Install latest version of GoTestSum and skip TParse

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
goTestSumVersionString -goTestSumVersion is the version of GoTestSum to use, e.g., "v0.8.0".
tParseVersionString -tParseVersion is the version of TParse to use, e.g., "v0.8.0".
skipTparseBoolean -skipTParse is a flag to indicate whether TParse should be skipped.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-test-sum
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoTestSum()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_test_sum()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoTestSum()
}

withGoReleaser() 🔗

WithGoReleaser installs the GoReleaser tool in the container environment.

This method installs goreleaser using the specified version. Check https://goreleaser.com/install/

Parameters: - version (string): The version of GoReleaser to use, e.g., “v2@latest”.

Example:

m := &ModuleTemplate{}
m.WithGoReleaser("v2.2.0")  // Install GoReleaser version 2.2.0

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of GoReleaser to use, e.g., By default, it's set "v2@latest".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-releaser
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoReleaser()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_releaser()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoReleaser()
}

withGoLint() 🔗

WithGoLint installs the GoLint tool in the container environment.

This method installs golangci-lint using the specified version.

Parameters: - version (string): The version of GoLint to use, e.g., “v1.60.1”.

Example:

m := &ModuleTemplate{}
m.WithGoLint("v1.60.1")  // Install GoLint version 1.60.1

Returns: - *ModuleTemplate: A pointer to the updated ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString !-version is the version of GoLint to use, e.g., "v1.60.1".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-go-lint --version string
func (m *myModule) example(version string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGoLint(version)
}
@function
def example(version: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_go_lint(version)
	)
@func()
example(version: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGoLint(version)
}

withTerragruntUbuntu() 🔗

WithTerragruntUbuntu sets up the container with Terragrunt and optionally Terraform on Ubuntu. It updates the package list, installs required dependencies, and then installs the specified versions of Terragrunt and Terraform.

Parameters: version - The version of Terragrunt to install. If empty, “latest” will be installed. tfVersion - The version of Terraform to install. If empty, “latest” will be installed. skipTerraform - If true, Terraform installation will be skipped.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of Terragrunt to install. If empty, it will be installed as "latest".
tfVersionString -tfVersion is the version of Terraform to install. If empty, it will be installed as "latest".
skipTerraformBoolean -skipTerraform if true, Terraform installation will be skipped.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-terragrunt-ubuntu
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithTerragruntUbuntu()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_terragrunt_ubuntu()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withTerragruntUbuntu()
}

withTerragruntAlpine() 🔗

WithTerragruntAlpine sets up the container with Terragrunt and optionally Terraform on Alpine Linux. It updates the package list, installs required dependencies, and then installs the specified versions of Terragrunt and Terraform.

Parameters: version - The version of Terragrunt to install. If empty, “latest” will be installed. tfVersion - The version of Terraform to install. If empty, “latest” will be installed. skipTerraform - If true, Terraform installation will be skipped.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of Terragrunt to install. If empty, it will be installed as "latest".
tfVersionString -tfVersion is the version of Terraform to install. If empty, it will be installed as "latest".
skipTerraformBoolean -skipTerraform if true, Terraform installation will be skipped.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-terragrunt-alpine
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithTerragruntAlpine()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_terragrunt_alpine()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withTerragruntAlpine()
}

withGitInAlpineContainer() 🔗

WithGitInAlpineContainer installs Git in the golang/alpine container.

It installs Git in the golang/alpine container.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-git-in-alpine-container
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGitInAlpineContainer()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_git_in_alpine_container()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGitInAlpineContainer()
}

withGitInUbuntuContainer() 🔗

WithGitInUbuntuContainer installs Git in the Ubuntu-based container.

This method installs Git in the Ubuntu-based container.

Returns: - *ModuleTemplate: The updated ModuleTemplate with Git installed in the container.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-git-in-ubuntu-container
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithGitInUbuntuContainer()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_git_in_ubuntu_container()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withGitInUbuntuContainer()
}

withUtilitiesInAlpineContainer() 🔗

WithUtilitiesInAlpineContainer installs common utilities in the golang/alpine container.

It installs utilities such as curl, wget, and others that are commonly used.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-utilities-in-alpine-container
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithUtilitiesInAlpineContainer()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_utilities_in_alpine_container()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withUtilitiesInAlpineContainer()
}

withUtilitiesInUbuntuContainer() 🔗

WithUtilitiesInUbuntuContainer installs common utilities in the Ubuntu-based container.

This method updates the package lists for upgrades and installs the specified utilities such as curl, wget, bash, jq, and vim in the Ubuntu-based container.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the utilities installed in the container.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-utilities-in-ubuntu-container
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithUtilitiesInUbuntuContainer()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_utilities_in_ubuntu_container()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withUtilitiesInUbuntuContainer()
}

withHttpcurl() 🔗

WithHTTPCurl sets up the HTTP client and configuration for the ModuleTemplate You can configure various options like headers, authentication, etc.

Example:

module := &ModuleTemplate{}
module = module.WithHTTP("https://api.example.com",
                         []string{"Content-Type=application/json"},
                         time.Second*30,
                         "basic", "username:password")

Parameters: - baseURL: The base URL for the HTTP requests. - headers: A slice of headers to include in the HTTP requests, formatted as “Header=Value” strings. - timeout: The timeout duration for the HTTP client. - authType: The type of authentication (e.g., “basic”, “bearer”). - authCredentials: The credentials for the specified authentication type.

Returns: - A pointer to the updated ModuleTemplate.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
baseUrlString !-baseURL is the base URL for the HTTP requests.
headers[String ! ] -headers is a slice of headers to include in the HTTP requests, formatted as "Header=Value" strings.
timeoutString -timeout is the timeout duration for the HTTP client.
authTypeString -authType is the type of authentication (e.g., "basic", "bearer").
authCredentialsString -authCredentials is the credentials for the specified authentication type.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-httpcurl --base-url string
func (m *myModule) example(baseUrl string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithHttpcurl(baseUrl)
}
@function
def example(base_url: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_httpcurl(base_url)
	)
@func()
example(baseUrl: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withHttpcurl(baseUrl)
}

doHttprequest() 🔗

DoHTTPRequest sets up the HTTP client and configuration for the ModuleTemplate You can configure various options like headers, authentication, etc.

Example:

module := &ModuleTemplate{}
module = module.DoHTTPRequest(ctx, "GET", "https://api.example.com",
                              []string{"Content-Type=application/json"},
                              time.Second*30,
                              "basic", "username:password", "")

Parameters: - ctx: The context for the HTTP request. - method: The HTTP method (e.g., “GET”, “POST”). - baseURL: The base URL for the HTTP requests. - headers: A slice of headers to include in the HTTP requests, formatted as “Header=Value” strings. - timeout: The timeout duration for the HTTP client. - authType: The type of authentication (e.g., “basic”, “bearer”). - authCredentials: The credentials for the specified authentication type. - body: The request body for POST requests (can be empty string for GET requests).

Returns: - A pointer to the updated ModuleTemplate.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
methodString !-method is the HTTP method (e.g., "GET", "POST").
baseUrlString !-baseURL is the base URL for the HTTP requests.
headers[String ! ] -headers is a slice of headers to include in the HTTP requests, formatted as "Header=Value" strings.
timeoutString -timeout is the timeout duration for the HTTP client.
authTypeString -authType is the type of authentication (e.g., "basic", "bearer").
authCredentialsString -authCredentials is the credentials for the specified authentication type.
bodyString -body is the request body for POST requests (can be empty string for GET requests).
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 do-httprequest --method string --base-url string
func (m *myModule) example(method string, baseUrl string) *Container  {
	return dag.
			ModuleTemplate().
			DoHttprequest(method, baseUrl)
}
@function
def example(method: str, base_url: str) -> dagger.Container:
	return (
		dag.module_template()
		.do_httprequest(method, base_url)
	)
@func()
example(method: string, baseUrl: string): Container {
	return dag
		.moduleTemplate()
		.doHttprequest(method, baseUrl)
}

doJsonapicall() 🔗

DoJSONAPICall performs an API call and returns the JSON response as a dagger.File.

Example:

module := &ModuleTemplate{}
jsonFile, err := module.DoJSONAPICall(ctx, "POST", "https://api.example.com/data",
                                      []string{"Content-Type=application/json"},
                                      time.Second*30,
                                      "bearer", "your-token-here",
                                      `{"key": "value"}`)

Parameters: - ctx: The context for the HTTP request. - method: The HTTP method (e.g., “GET”, “POST”). - baseURL: The base URL for the HTTP requests. - headers: A slice of headers to include in the HTTP requests, formatted as “Header=Value” strings. - timeout: The timeout duration for the HTTP client. - authType: The type of authentication (e.g., “basic”, “bearer”). - authCredentials: The credentials for the specified authentication type. - body: The JSON request body for POST requests (can be empty string for GET requests).

Returns: - A dagger.File containing the JSON response. - An error if the request fails or the response is not JSON.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
methodString !-method is the HTTP method (e.g., "GET", "POST").
baseUrlString !-baseURL is the base URL for the HTTP requests.
headers[String ! ] -headers is a slice of headers to include in the HTTP requests, formatted as "Header=Value" strings.
timeoutString -timeout is the timeout duration for the HTTP client.
authTypeString -authType is the type of authentication (e.g., "basic", "bearer").
authCredentialsString -authCredentials is the credentials for the specified authentication type.
bodyString -body is the JSON request body for POST requests (can be empty string for GET requests).
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 do-jsonapicall --method string --base-url string
func (m *myModule) example(method string, baseUrl string) *File  {
	return dag.
			ModuleTemplate().
			DoJsonapicall(method, baseUrl)
}
@function
def example(method: str, base_url: str) -> dagger.File:
	return (
		dag.module_template()
		.do_jsonapicall(method, base_url)
	)
@func()
example(method: string, baseUrl: string): File {
	return dag
		.moduleTemplate()
		.doJsonapicall(method, baseUrl)
}

base() 🔗

Base sets the base image and version, and creates the base container.

The default image is “alpine/latest” and the default version is “latest”.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
imageUrlString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 base --image-url string
func (m *myModule) example(imageUrl string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			Base(imageUrl)
}
@function
def example(image_url: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.base(image_url)
	)
@func()
example(imageUrl: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.base(imageUrl)
}

withEnvironmentVariable() 🔗

WithEnvironmentVariable sets an environment variable in the container.

Parameters: - name: The name of the environment variable (e.g., “HOST”). - value: The value of the environment variable (e.g., “localhost”). - expand: Whether to replace ${VAR} or \(VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:\)PATH”). Optional parameter.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
nameString !-name is the name of the environment variable.
valueString !-value is the value of the environment variable.
expandBoolean -expand is whether to replace `${VAR}` or $VAR in the value according to the current
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-environment-variable --name string --value string
func (m *myModule) example(name string, value string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithEnvironmentVariable(name, value)
}
@function
def example(name: str, value: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_environment_variable(name, value)
	)
@func()
example(name: string, value: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withEnvironmentVariable(name, value)
}

withSource() 🔗

WithSource sets the source directory for the container.

Parameters: - src: The directory that contains all the source code, including the module directory. - workdir: The working directory within the container. Optional parameter.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the directory that contains all the source code, including the module directory.
workdirString -workdir is the working directory within the container. If not set it'll default to /mnt
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-source --src DIR_PATH
func (m *myModule) example(src *Directory) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithSource(src)
}
@function
def example(src: dagger.Directory) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_source(src)
	)
@func()
example(src: Directory): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withSource(src)
}

withContainer() 🔗

WithContainer sets the container to be used.

Parameters: - ctr: The container to run the command in. If passed, it will override the container set in the Dagger instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-container --ctr IMAGE:TAG
func (m *myModule) example(ctr *Container) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithContainer(ctr)
}
@function
def example(ctr: dagger.Container) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_container(ctr)
	)
@func()
example(ctr: Container): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withContainer(ctr)
}

withDockerService() 🔗

WithDockerService sets up the container with the Docker service.

It sets up the container with the Docker service. Parameters: - dockerVersion: The version of the Docker engine to use, e.g., “v20.10.17”. Optional parameter. If not provided, a default version is used.

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
dockerVersionString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-docker-service --docker-version string
func (m *myModule) example(dockerVersion string) *Service  {
	return dag.
			ModuleTemplate().
			WithDockerService(dockerVersion)
}
@function
def example(docker_version: str) -> dagger.Service:
	return (
		dag.module_template()
		.with_docker_service(docker_version)
	)
@func()
example(dockerVersion: string): Service {
	return dag
		.moduleTemplate()
		.withDockerService(dockerVersion)
}

withFileMountedInContainer() 🔗

WithFileMountedInContainer adds a file to the container.

Parameters: - file: The file to add to the container. - dest: The destination path in the container. Optional parameter. - owner: The owner of the file. Optional parameter.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
fileFile !-No description provided
destString !-No description provided
ownerString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-file-mounted-in-container --file file:path --dest string --owner string
func (m *myModule) example(file *File, dest string, owner string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithFileMountedInContainer(file, dest, owner)
}
@function
def example(file: dagger.File, dest: str, owner: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_file_mounted_in_container(file, dest, owner)
	)
@func()
example(file: File, dest: string, owner: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withFileMountedInContainer(file, dest, owner)
}

withSecretAsEnvVar() 🔗

WithSecretAsEnvVar sets an environment variable in the container using a secret.

Parameters: - name: The name of the environment variable (e.g., “API_KEY”). - secret: The secret containing the value of the environment variable.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the environment variable set.

Behavior: - The secret value is expanded according to the current environment variables defined in the container.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
secretSecret !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-secret-as-env-var --name string --secret env:MYSECRET
func (m *myModule) example(name string, secret *Secret) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithSecretAsEnvVar(name, secret)
}
@function
def example(name: str, secret: dagger.Secret) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_secret_as_env_var(name, secret)
	)
@func()
example(name: string, secret: Secret): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withSecretAsEnvVar(name, secret)
}

withDownloadedFile() 🔗

WithDownloadedFile downloads a file from the specified URL and mounts it in the container.

Parameters: - url: The URL of the file to download. - destDir: The directory within the container where the file will be downloaded. Optional parameter. If not provided, it defaults to the predefined mount prefix.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the downloaded file mounted in the container.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
urlString !-url is the URL of the file to download.
destFileNameString -destFileName is the name of the file to download. If not set, it'll default to the basename of the URL.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-downloaded-file --url string
func (m *myModule) example(url string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithDownloadedFile(url)
}
@function
def example(url: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_downloaded_file(url)
	)
@func()
example(url: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withDownloadedFile(url)
}

withClonedGitRepo() 🔗

WithClonedGitRepo clones a Git repository and mounts it as a directory in the container.

This method downloads a Git repository and mounts it as a directory in the container. It supports optional authentication tokens for private repositories and can handle both GitHub and GitLab repositories.

Parameters: - repoURL: The URL of the git repository to clone (e.g., “https://github.com/user/repo”). - token: (Optional) The VCS token to use for authentication. If not provided, the repository will be cloned without authentication. - vcs: (Optional) The version control system (VCS) to use for authentication. Defaults to “github”. Supported values are “github” and “gitlab”.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the cloned repository mounted in the container.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
repoUrlString !-No description provided
tokenString -token is the VCS token to use for authentication. Optional parameter.
vcsString -vcs is the VCS to use for authentication. Optional parameter.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-cloned-git-repo --repo-url string
func (m *myModule) example(repoUrl string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithClonedGitRepo(repoUrl)
}
@function
def example(repo_url: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_cloned_git_repo(repo_url)
	)
@func()
example(repoUrl: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withClonedGitRepo(repoUrl)
}

withCacheBuster() 🔗

WithCacheBuster sets a cache-busting environment variable in the container.

This method sets an environment variable “CACHE_BUSTER” with a timestamp value in RFC3339Nano format. This can be useful for invalidating caches by providing a unique value.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the cache-busting environment variable set.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-cache-buster
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithCacheBuster()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_cache_buster()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withCacheBuster()
}

baseAlpine() 🔗

BaseAlpine sets the base image to an Alpine Linux image and creates the base container.

Parameters: - version: The version of the Alpine image to use. Optional parameter. Defaults to “latest”.

Returns a pointer to the ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of the Alpine image to use, e.g., "3.17.3".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 base-alpine
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			BaseAlpine()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.base_alpine()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.baseAlpine()
}

baseUbuntu() 🔗

BaseUbuntu sets the base image to an Ubuntu Linux image and creates the base container.

Parameters: - version: The version of the Ubuntu image to use. Optional parameter. Defaults to “latest”.

Returns a pointer to the ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of the Ubuntu image to use, e.g., "22.04".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 base-ubuntu
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			BaseUbuntu()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.base_ubuntu()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.baseUbuntu()
}

baseBusyBox() 🔗

BaseBusyBox sets the base image to a BusyBox Linux image and creates the base container.

Parameters: - version: The version of the BusyBox image to use. Optional parameter. Defaults to “latest”.

Returns a pointer to the ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of the BusyBox image to use, e.g., "1.35.0".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 base-busy-box
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			BaseBusyBox()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.base_busy_box()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.baseBusyBox()
}

baseWolfi() 🔗

BaseWolfi sets the base image to a Wolfi Linux image and creates the base container.

Parameters: - version: The version of the Wolfi image to use. Optional parameter. Defaults to “latest”. - packages: Additional packages to install. Optional parameter. - overlays: Overlay images to merge on top of the base. Optional parameter.

Returns a pointer to the ModuleTemplate instance.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of the Wolfi image to use, e.g., "latest".
packages[String ! ] -packages is the list of additional packages to install.
overlays[Container ! ] -overlays are images to merge on top of the base. See https://twitter.com/ibuildthecloud/status/1721306361999597884
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 base-wolfi
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			BaseWolfi()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.base_wolfi()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.baseWolfi()
}

withTerraformUbuntu() 🔗

WithTerraformUbuntu sets up the container with Terraform on Ubuntu. It updates the package list, installs required dependencies, and then installs the specified version of Terraform.

Parameters: version - The version of Terraform to install. If empty, “latest” will be installed.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of Terraform to install. If empty, it will be installed as "latest".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-terraform-ubuntu
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithTerraformUbuntu()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_terraform_ubuntu()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withTerraformUbuntu()
}

withTerraformAlpine() 🔗

WithTerraformAlpine sets up the container with Terraform on Alpine Linux. It updates the package list, installs required dependencies, and then installs the specified version of Terraform.

Parameters: version - The version of Terraform to install. If empty, “latest” will be installed.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString -version is the version of Terraform to install. If empty, it will be installed as "latest".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-terraform-alpine
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithTerraformAlpine()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_terraform_alpine()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withTerraformAlpine()
}

withDaggerClialpine() 🔗

WithDaggerCLIAlpine sets up the Dagger CLI entry point for Alpine within the ModuleTemplate.

Parameters: - version: The version of the Dagger Engine to use, e.g., “v0.12.1”.

This method performs the following steps: 1. Generates a shell command to install the Dagger CLI using the specified version. 2. Executes the installation command within the Alpine container context. 3. Sets the DAGGER_VERSION environment variable in the container.

Returns: - *ModuleTemplate: Returns the modified ModuleTemplate instance with the Dagger CLI configured.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-dagger-clialpine --version string
func (m *myModule) example(version string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithDaggerClialpine(version)
}
@function
def example(version: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_dagger_clialpine(version)
	)
@func()
example(version: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withDaggerClialpine(version)
}

withDaggerCliubuntu() 🔗

WithDaggerCLIUbuntu sets up the Dagger CLI entry point for Ubuntu within the ModuleTemplate.

Parameters: - version: The version of the Dagger Engine to use, e.g., “v0.12.1”.

This method performs the following steps: 1. Updates package lists and installs curl. 2. Generates a shell command to install the Dagger CLI using the specified version. 3. Executes the installation command within the Ubuntu container context. 4. Sets the DAGGER_VERSION environment variable in the container.

Returns: - *ModuleTemplate: Returns the modified ModuleTemplate instance with the Dagger CLI configured.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-dagger-cliubuntu --version string
func (m *myModule) example(version string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithDaggerCliubuntu(version)
}
@function
def example(version: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_dagger_cliubuntu(version)
	)
@func()
example(version: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withDaggerCliubuntu(version)
}

withDaggerDockerService() 🔗

WithDaggerDockerService sets up the container with the Docker service.

Arguments: - version: The version of the Docker engine to use, e.g., “v20.10.17”. If empty, a default version will be used.

Returns: - *dagger.Service: A Dagger service configured with Docker.

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-dagger-docker-service --version string
func (m *myModule) example(version string) *Service  {
	return dag.
			ModuleTemplate().
			WithDaggerDockerService(version)
}
@function
def example(version: str) -> dagger.Service:
	return (
		dag.module_template()
		.with_dagger_docker_service(version)
	)
@func()
example(version: string): Service {
	return dag
		.moduleTemplate()
		.withDaggerDockerService(version)
}

setupDaggerInDagger() 🔗

SetupDaggerInDagger sets up the Dagger CLI inside a Docker-in-Docker context.

This method validates the specified Dagger Engine version, installs the Dagger CLI in an Alpine-based container, replaces the existing container with a Docker-in-Docker container, and sets up the Docker service within the Dagger context.

Parameters: - dagVersion: The version of the Dagger Engine to use, e.g., “v0.12.5”. - dockerVersion: The version of the Docker Engine to use, e.g., “24.0”. This is optional.

Returns: - *ModuleTemplate: The modified ModuleTemplate instance with Dagger and Docker configured. - error: An error if the setup process fails at any step.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
dagVersionString !-The version of the Dagger Engine to use.
dockerVersionString -The version of the Docker Engine to use.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 setup-dagger-in-dagger --dag-version string
func (m *myModule) example(dagVersion string) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			SetupDaggerInDagger(dagVersion)
}
@function
def example(dag_version: str) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.setup_dagger_in_dagger(dag_version)
	)
@func()
example(dagVersion: string): ModuleTemplate {
	return dag
		.moduleTemplate()
		.setupDaggerInDagger(dagVersion)
}

withAwskeys() 🔗

WithAWSKeys sets AWS credentials as environment variables. awsKeyId is the AWS Access Key ID. awsSecretAccessKey is the AWS Secret Access Key. awsSessionToken is the AWS Session Token; optional. awsRegion is the AWS Region; optional. awsProfile is the AWS Profile; optional.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
awsKeyIdSecret !-awsKeyId is the AWS Access Key ID.
awsSecretAccessKeySecret !-awsSecretAccessKey is the AWS Secret Access Key.
awsSessionTokenSecret -awsSessionToken is the AWS Session Token; optional.
awsRegionSecret -awsRegion is the AWS Region; optional.
awsProfileSecret -awsProfile is the AWS Profile; optional.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-awskeys --aws-key-id env:MYSECRET --aws-secret-access-key env:MYSECRET
func (m *myModule) example(awsKeyId *Secret, awsSecretAccessKey *Secret) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithAwskeys(awsKeyId, awsSecretAccessKey)
}
@function
def example(aws_key_id: dagger.Secret, aws_secret_access_key: dagger.Secret) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_awskeys(aws_key_id, aws_secret_access_key)
	)
@func()
example(awsKeyId: Secret, awsSecretAccessKey: Secret): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withAwskeys(awsKeyId, awsSecretAccessKey)
}

withAzureCredentials() 🔗

WithAzureCredentials sets Azure credentials as environment variables. azureClientId is the Azure Client ID. azureClientSecret is the Azure Client Secret. azureTenantId is the Azure Tenant ID.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
azureClientIdSecret !-azureClientId is the Azure Client ID.
azureClientSecretSecret !-azureClientSecret is the Azure Client Secret.
azureTenantIdSecret !-azureTenantId is the Azure Tenant ID.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-azure-credentials --azure-client-id env:MYSECRET --azure-client-secret env:MYSECRET --azure-tenant-id env:MYSECRET
func (m *myModule) example(azureClientId *Secret, azureClientSecret *Secret, azureTenantId *Secret) *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithAzureCredentials(azureClientId, azureClientSecret, azureTenantId)
}
@function
def example(azure_client_id: dagger.Secret, azure_client_secret: dagger.Secret, azure_tenant_id: dagger.Secret) -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_azure_credentials(azure_client_id, azure_client_secret, azure_tenant_id)
	)
@func()
example(azureClientId: Secret, azureClientSecret: Secret, azureTenantId: Secret): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withAzureCredentials(azureClientId, azureClientSecret, azureTenantId)
}

withAwscliinAlpineContainer() 🔗

WithAWSCLIInAlpineContainer installs the AWS CLI in the Alpine-based container. This method installs the AWS CLI in a golang/alpine container using the ‘apk’ package manager. It is particularly useful for environments that need to interact with AWS services.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the AWS CLI installed in the container.

Return Type
ModuleTemplate !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-awscliin-alpine-container
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithAwscliinAlpineContainer()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_awscliin_alpine_container()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withAwscliinAlpineContainer()
}

withAwscliinUbuntuContainer() 🔗

WithAWSCLIInUbuntuContainer installs the AWS CLI in the Ubuntu-based container.

This method installs the AWS CLI in an Ubuntu-based container following the official AWS installation steps.

Args: - architecture (string): The architecture for which the AWS CLI should be downloaded. Valid values are “x86_64” and “aarch64”. Default is “x86_64”.

Returns: - *ModuleTemplate: The updated ModuleTemplate with the AWS CLI installed in the container.

Return Type
ModuleTemplate !
Arguments
NameTypeDefault ValueDescription
architectureString -architecture is the architecture for which the AWS CLI should be downloaded. Valid values are "x86_64" and "aarch64". Default is "x86_64".
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 with-awscliin-ubuntu-container
func (m *myModule) example() *ModuleTemplate  {
	return dag.
			ModuleTemplate().
			WithAwscliinUbuntuContainer()
}
@function
def example() -> dag.ModuleTemplate:
	return (
		dag.module_template()
		.with_awscliin_ubuntu_container()
	)
@func()
example(): ModuleTemplate {
	return dag
		.moduleTemplate()
		.withAwscliinUbuntuContainer()
}

openTerminal() 🔗

OpenTerminal returns a terminal

It returns a terminal for the container. Arguments: - None. Returns: - *Terminal: The terminal for the container.

Return Type
Container !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 open-terminal
func (m *myModule) example() *Container  {
	return dag.
			ModuleTemplate().
			OpenTerminal()
}
@function
def example() -> dagger.Container:
	return (
		dag.module_template()
		.open_terminal()
	)
@func()
example(): Container {
	return dag
		.moduleTemplate()
		.openTerminal()
}

runShell() 🔗

RunShell runs a shell command in the container.

It runs a shell command in the container and returns the output. Arguments: - cmd: The command to run in the container. Returns: - string: The output of the command. - error: An error if the command fails.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
cmdString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 run-shell --cmd string
func (m *myModule) example(ctx context.Context, cmd string) string  {
	return dag.
			ModuleTemplate().
			RunShell(ctx, cmd)
}
@function
async def example(cmd: str) -> str:
	return await (
		dag.module_template()
		.run_shell(cmd)
	)
@func()
async example(cmd: string): Promise<string> {
	return dag
		.moduleTemplate()
		.runShell(cmd)
}

printEnvVars() 🔗

PrintEnvVars retrieves and prints the environment variables of the container.

It executes the printenv command inside the container to get a list of all environment variables and their respective values.

Arguments: - None.

Returns: - string: A string containing all environment variables in the format “KEY=VALUE”, separated by newlines. - error: An error if the command fails, wrapped with additional context.

Usage example: “`go envVars, err := ModuleTemplateInstance.PrintEnvVars()

if err != nil {
    log.Fatalf("Error retrieving environment variables: %v", err)
}

fmt.Println(envVars).

Return Type
String !
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 print-env-vars
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ModuleTemplate().
			PrintEnvVars(ctx)
}
@function
async def example() -> str:
	return await (
		dag.module_template()
		.print_env_vars()
	)
@func()
async example(): Promise<string> {
	return dag
		.moduleTemplate()
		.printEnvVars()
}

inspectEnvVar() 🔗

InspectEnvVar inspects the value of an environment variable by its key Arguments: - key: The environment variable key to inspect. Returns: - string: The value of the environment variable. - error: An error if the key is invalid or the environment variable is not found.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
keyString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 inspect-env-var --key string
func (m *myModule) example(ctx context.Context, key string) string  {
	return dag.
			ModuleTemplate().
			InspectEnvVar(ctx, key)
}
@function
async def example(key: str) -> str:
	return await (
		dag.module_template()
		.inspect_env_var(key)
	)
@func()
async example(key: string): Promise<string> {
	return dag
		.moduleTemplate()
		.inspectEnvVar(key)
}

downloadFile() 🔗

DownloadFile downloads a file from the specified URL.

Parameters: - url: The URL of the file to download. - destFileName: The name of the file to download. Optional parameter. If not set, it’ll default to the basename of the URL.

Returns: - *dagger.File: The downloaded file.

Functionality:

This method downloads a file from the provided URL. If the destination file name is not specified, it defaults to the basename of the URL. The downloaded file is then returned as a *dagger.File.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
urlString !-url is the URL of the file to download.
destFileNameString -destFileName is the name of the file to download. If not set, it'll default to the basename of the URL.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 download-file --url string
func (m *myModule) example(url string) *File  {
	return dag.
			ModuleTemplate().
			DownloadFile(url)
}
@function
def example(url: str) -> dagger.File:
	return (
		dag.module_template()
		.download_file(url)
	)
@func()
example(url: string): File {
	return dag
		.moduleTemplate()
		.downloadFile(url)
}

cloneGitRepo() 🔗

CloneGitRepo clones a Git repository into a Dagger Directory.

Parameters: - repoURL: The URL of the git repository to clone (e.g., “https://github.com/user/repo”). - token: (Optional) The VCS token to use for authentication. If not provided, the repository will be cloned without authentication. - vcs: (Optional) The version control system (VCS) to use for authentication. Defaults to “github”. Supported values are “github” and “gitlab”.

Returns: - *dagger.Directory: A directory object representing the cloned repository.

If a token is provided, it will be securely set using Dagger’s secret mechanism and used for authentication during the clone operation.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
repoUrlString !-repoURL is the URL of the git repo to clone.
tokenString -token is the VCS token to use for authentication. Optional parameter.
vcsString -vcs is the VCS to use for authentication. Optional parameter.
Example
dagger -m github.com/Excoriate/daggerverse/module-template@cc541a67ea01a696d946e7a07c7eb2229c59ea6c call \
 clone-git-repo --repo-url string
func (m *myModule) example(repoUrl string) *Directory  {
	return dag.
			ModuleTemplate().
			CloneGitRepo(repoUrl)
}
@function
def example(repo_url: str) -> dagger.Directory:
	return (
		dag.module_template()
		.clone_git_repo(repo_url)
	)
@func()
example(repoUrl: string): Directory {
	return dag
		.moduleTemplate()
		.cloneGitRepo(repoUrl)
}