first
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate 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.
Installation
dagger install github.com/clembo590/daggerverse/first@f899b29230900d542b6e5fa50d8de01acbf7c5af
Entrypoint
Return Type
First
Example
dagger -m github.com/clembo590/daggerverse/first@f899b29230900d542b6e5fa50d8de01acbf7c5af call \
func (m *myModule) example() *First {
return dag.
First()
}
@function
def example() -> dag.First:
return (
dag.first()
)
@func()
example(): First {
return dag
.first()
}
Types
First 🔗
myFirstFunction() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
stringArg | String ! | - | No description provided |
Example
dagger -m github.com/clembo590/daggerverse/first@f899b29230900d542b6e5fa50d8de01acbf7c5af call \
my-first-function --string-arg string
func (m *myModule) example(stringArg string) *Container {
return dag.
First().
MyFirstFunction(stringArg)
}
@function
def example(string_arg: str) -> dagger.Container:
return (
dag.first()
.my_first_function(string_arg)
)
@func()
example(stringArg: string): Container {
return dag
.first()
.myFirstFunction(stringArg)
}
myAsyncFunction() 🔗
Returns lines that match a pattern in the files of the provided Directory
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
workingDirectory | Directory ! | - | No description provided |
Example
dagger -m github.com/clembo590/daggerverse/first@f899b29230900d542b6e5fa50d8de01acbf7c5af call \
my-async-function --working-directory DIR_PATH
func (m *myModule) example(ctx context.Context, workingDirectory *Directory) string {
return dag.
First().
MyAsyncFunction(ctx, workingDirectory)
}
@function
async def example(working_directory: dagger.Directory) -> str:
return await (
dag.first()
.my_async_function(working_directory)
)
@func()
async example(workingDirectory: Directory): Promise<string> {
return dag
.first()
.myAsyncFunction(workingDirectory)
}