Dagger
Search

bar

An example of using another module from different in SDK

Installation

dagger install github.com/jpadams/bar@36fc7a9ea60282f46fe3297a368afef7685ad3f1

Entrypoint

Return Type
Bar !
Example
func (m *myModule) example() *Bar  {
	return dag.
			Bar()
}
@function
def example() -> dag.Bar:
	return (
		dag.bar()
	)
@func()
example(): Bar {
	return dag
		.bar()
}

Types

Bar

goBuild()

Builds and containerizes my go app

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-A directory.
Example
dagger -m github.com/jpadams/bar@36fc7a9ea60282f46fe3297a368afef7685ad3f1 call \
 go-build --source DIR_PATH
func (m *myModule) example(source *Directory) *Container  {
	return dag.
			Bar().
			GoBuild(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.bar()
		.go_build(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.bar()
		.goBuild(source)
}

run()

Emits stdout of my go app container

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-A directory.
Example
dagger -m github.com/jpadams/bar@36fc7a9ea60282f46fe3297a368afef7685ad3f1 call \
 run --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string  {
	return dag.
			Bar().
			Run(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.bar()
		.run(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.bar()
		.run(source)
}