dagindag
No long description provided.
Installation
dagger install github.com/Excoriate/daggerverse/dagindag@v1.15.0
Entrypoint
Return Type
Dagindag !
Arguments
Name | Type | Description |
---|---|---|
daggerVersion | String | daggerVersion is the version of the Dagger engine to use, e.g., "v0.11.5 |
dockerVersion | String | dockerVersion is the version of the Docker engine to use, e.g., "24.0 |
ctr | Container | ctr is the container to use as a base container. |
src | Directory | src is the directory that contains all the source code, including the module directory. |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
func (m *myModule) example() *Dagindag {
return dag.
Dagindag()
}
@function
def example() -> dag.Dagindag:
return (
dag.dagindag()
)
@func()
example(): Dagindag {
return dag
.dagindag()
}
Types
Dagindag 🔗
ctr() 🔗
Ctr is the container to use as a base container.
Return Type
Container !
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
ctr
func (m *myModule) example() *Container {
return dag.
Dagindag().
Ctr()
}
@function
def example() -> dagger.Container:
return (
dag.dagindag()
.ctr()
)
@func()
example(): Container {
return dag
.dagindag()
.ctr()
}
src() 🔗
Src is the directory that contains all the source code, including the module directory.
Return Type
Directory !
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
src
func (m *myModule) example() *Directory {
return dag.
Dagindag().
Src()
}
@function
def example() -> dagger.Directory:
return (
dag.dagindag()
.src()
)
@func()
example(): Directory {
return dag
.dagindag()
.src()
}
base() 🔗
Base sets the base container for the Dagindag module.
The base container is set to the Ubuntu container with the “lunar” tag. This container is used as the base container for all the other containers
Return Type
Dagindag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
daggerVersion | String | - | daggerVersion is the version of the Dagger engine to use, e.g., "v0.11.5 |
dockerVersion | String | - | dockerVersion is the version of the Docker engine to use, e.g., "24.0 |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
base
func (m *myModule) example() *Dagindag {
return dag.
Dagindag().
Base()
}
@function
def example() -> dag.Dagindag:
return (
dag.dagindag()
.base()
)
@func()
example(): Dagindag {
return dag
.dagindag()
.base()
}
terminal() 🔗
Terminal returns a terminal for the container.
It returns a terminal for the container. It’s meant to be used as a terminal for the module. Arguments: - None. Returns: - *Terminal: The terminal for the container.
Return Type
Terminal !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory | - | src is the directory that contains all the source code, including the module directory. |
envVars | [String ! ] | - | envVars is a set of strings (e.g., "KEY=value,KEY=value") to use as environment variables. They're used to set the environment variables for the container when it's required to pass multiple environment variables in a single argument. E.g.: "GITHUB_TOKEN=token,GO_VERSION=1.22.0,MYVAR=myvar" |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
terminal
func (m *myModule) example() *Terminal {
return dag.
Dagindag().
Terminal()
}
@function
def example() -> dag.Terminal:
return (
dag.dagindag()
.terminal()
)
@func()
example(): Terminal {
return dag
.dagindag()
.terminal()
}
dagCli() 🔗
DagCLI Allows to execute the Dagger CLI with the given flags.
It allows to execute the Dagger CLI with the given flags. Arguments: - src is the directory that contains all the source code, including the module directory. - envVars is a set of strings (e.g., “KEY=value,KEY=value”) to use as environment variables. They’re used to set the environment variables for the container when it’s required to pass multiple environment variables - flags is a set of string representing the flags to pass to the Dagger CLI. Returns: - string: The output of the function. - error: An error if the function fails.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory | - | src is the directory that contains all the source code, including the module directory. |
envVars | [String ! ] | - | envVars is a set of strings (e.g., "KEY=value,KEY=value") to use as environment variables. They're used to set the environment variables for the container when it's required to pass multiple environment variables in a single argument. E.g.: "GITHUB_TOKEN=token,GO_VERSION=1.22.0,MYVAR=myvar" |
dagCmds | String | - | dagCMDs is a set of string representing the flags to pass to the Dagger CLI. It must be set in a single string, such as "--dag-cmds="call -m module"" |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
dag-cli
func (m *myModule) example(ctx context.Context) string {
return dag.
Dagindag().
DagCli(ctx)
}
@function
async def example() -> str:
return await (
dag.dagindag()
.dag_cli()
)
@func()
async example(): Promise<string> {
return dag
.dagindag()
.dagCli()
}
useFn() 🔗
UseFn calls a module with the given function and arguments.
It calls a module with the given function and arguments. Arguments: - module: The name of the module, normally it’s represented by the github repository name. E.g., “github.com///module@” - version: The version of the module to use, e.g., “v0.11.5” If it’s not specified, the latest version is used. - fn: The function to call in the module. If it’s not specified, the default –help function is called. - args: The arguments to pass to the function. It receives a slice of strings. E.g., []string{“arg1”, “arg2”} Returns: - string: The output of the function. - error: An error if the function fails.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
modName | String ! | - | modName is the name of the module, normally it's represented by the github repository name. E.g., "github.com/<owner>/<repo>/module@<version>" |
modArgs | [String ! ] | - | modArgs are the arguments that the module's constructor requires. It receives a single slice of strings separated by commas. E.g., "arg1,arg2,arg3=value" |
modVersion | String | - | modVersion is the version of the module to use, e.g., "v0.11.5" If it's not specified, the latest version is used. |
fn | String | - | fn is the function to call in the module. If it's not specified, the default --help function is called. |
fnArgs | [String ! ] | - | fnArgs is the arguments to pass to the function. It receives a single string separated by commas. E.g., "arg1,arg2,arg3=value" |
src | Directory | - | src is the directory that contains all the source code, including the module directory. |
envVars | [String ! ] | - | envVars is a set of strings (e.g., "KEY=value,KEY=value") to use as environment variables. They're used to set the environment variables for the container when it's required to pass multiple environment variables in a single argument. E.g.: "GITHUB_TOKEN=token,GO_VERSION=1.22.0,MYVAR=myvar" |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
use-fn --mod-name string
func (m *myModule) example(ctx context.Context, modName string) string {
return dag.
Dagindag().
UseFn(ctx, modName)
}
@function
async def example(mod_name: str) -> str:
return await (
dag.dagindag()
.use_fn(mod_name)
)
@func()
async example(modName: string): Promise<string> {
return dag
.dagindag()
.useFn(modName)
}
withEnvVariable() 🔗
WithEnvVariable sets an environment variable.
The name of the environment variable (e.g., “HOST”).
The value of the environment variable (e.g., “localhost”).
Replace ${VAR}
or \(VAR in the value according to the current environment
variables defined in the container (e.g., "/opt/bin:\)PATH”).
+optional
Return Type
Dagindag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | The name of the environment variable (e.g., "HOST"). |
value | String ! | - | The value of the environment variable (e.g., "localhost"). |
expand | Boolean | - | Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH"). |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
with-env-variable --name string --value string
func (m *myModule) example(name string, value string) *Dagindag {
return dag.
Dagindag().
WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dag.Dagindag:
return (
dag.dagindag()
.with_env_variable(name, value)
)
@func()
example(name: string, value: string): Dagindag {
return dag
.dagindag()
.withEnvVariable(name, value)
}
withSource() 🔗
WithSource sets the source directory.
The source directory is the directory that contains all the source code, including the module directory.
Return Type
Dagindag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | src is the directory that contains all the source code, including the module directory. |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
with-source --src DIR_PATH
func (m *myModule) example(src *Directory) *Dagindag {
return dag.
Dagindag().
WithSource(src)
}
@function
def example(src: dagger.Directory) -> dag.Dagindag:
return (
dag.dagindag()
.with_source(src)
)
@func()
example(src: Directory): Dagindag {
return dag
.dagindag()
.withSource(src)
}
withEnvVarsFromStrs() 🔗
WithEnvVarsFromStrs sets the environment variables for the container.
It sets the environment variables for the container. It’s meant to be used as a terminal for the module. Arguments: - envVars: A set of strings (e.g., “KEY=value,KEY=value”) to use as environment variables. They’re used to set the environment variables for the container when it’s required to pass multiple environment variables in a single argument. E.g.: “GITHUB=token,GO_VERSION=1.22.0,MYVAR=myvar”
Return Type
Dagindag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
envVars | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
with-env-vars-from-strs --env-vars string1 --env-vars string2
func (m *myModule) example(envVars []string) *Dagindag {
return dag.
Dagindag().
WithEnvVarsFromStrs(envVars)
}
@function
def example(env_vars: List[str]) -> dag.Dagindag:
return (
dag.dagindag()
.with_env_vars_from_strs(env_vars)
)
@func()
example(envVars: string[]): Dagindag {
return dag
.dagindag()
.withEnvVarsFromStrs(envVars)
}
withDaggerSetup() 🔗
WithDaggerSetup sets up the container with the Dagger engine.
It sets up the container with the Dagger engine. Arguments: - daggerVersion: The version of the Dagger engine to use, e.g., “v0.11.6
Return Type
Dagindag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
daggerVersion | String ! | - | daggerVersion is the version of the Dagger engine to use, e.g., "v0.11.6 |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
with-dagger-setup --dagger-version string
func (m *myModule) example(daggerVersion string) *Dagindag {
return dag.
Dagindag().
WithDaggerSetup(daggerVersion)
}
@function
def example(dagger_version: str) -> dag.Dagindag:
return (
dag.dagindag()
.with_dagger_setup(dagger_version)
)
@func()
example(daggerVersion: string): Dagindag {
return dag
.dagindag()
.withDaggerSetup(daggerVersion)
}
withDaggerEntryPoint() 🔗
WithDaggerEntryPoint sets the Dagger CLI entry point.
It sets the Dagger CLI entry point to /bin/dagger. Arguments: - daggerCLIEntryPoint is the Dagger CLI entry point.
Return Type
Dagindag !
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
with-dagger-entry-point
func (m *myModule) example() *Dagindag {
return dag.
Dagindag().
WithDaggerEntryPoint()
}
@function
def example() -> dag.Dagindag:
return (
dag.dagindag()
.with_dagger_entry_point()
)
@func()
example(): Dagindag {
return dag
.dagindag()
.withDaggerEntryPoint()
}
withDockerService() 🔗
WithDockerService sets up the container with the Docker service.
It sets up the container with the Docker service. Arguments: - dockerVersion: The version of the Docker engine to use, e.g., “v20.10.17
Return Type
Service !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dockerVersion | String | - | dockerVersion is the version of the Docker engine to use, e.g., "v20.10.17" |
Example
dagger -m github.com/Excoriate/daggerverse/dagindag@9783ed1cc5a3c50165c861895d113f4c8612ef47 call \
with-docker-service
func (m *myModule) example() *Service {
return dag.
Dagindag().
WithDockerService()
}
@function
def example() -> dagger.Service:
return (
dag.dagindag()
.with_docker_service()
)
@func()
example(): Service {
return dag
.dagindag()
.withDockerService()
}