Dagger
Search

workspace

Basic workspace module for Daggerverse QA Agent

Installation

dagger install github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8

Entrypoint

Return Type
Workspace !
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
func (m *myModule) example() *Workspace  {
	return dag.
			Workspace()
}
@function
def example() -> dag.Workspace:
	return (
		dag.workspace()
	)
@func()
example(): Workspace {
	return dag
		.workspace()
}

Types

Workspace 🔗

container() 🔗

Workspace container state

Return Type
Container !
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Workspace().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.workspace()
		.container()
	)
@func()
example(): Container {
	return dag
		.workspace()
		.container()
}

read() 🔗

Read a file

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pathString !-No description provided
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
 read --path string
func (m *myModule) example(ctx context.Context, path string) string  {
	return dag.
			Workspace().
			Read(ctx, path)
}
@function
async def example(path: str) -> str:
	return await (
		dag.workspace()
		.read(path)
	)
@func()
async example(path: string): Promise<string> {
	return dag
		.workspace()
		.read(path)
}

write() 🔗

Write a file

Return Type
Workspace !
Arguments
NameTypeDefault ValueDescription
pathString !-No description provided
contentString !-No description provided
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
 write --path string --content string
func (m *myModule) example(path string, content string) *Workspace  {
	return dag.
			Workspace().
			Write(path, content)
}
@function
def example(path: str, content: str) -> dag.Workspace:
	return (
		dag.workspace()
		.write(path, content)
	)
@func()
example(path: string, content: string): Workspace {
	return dag
		.workspace()
		.write(path, content)
}

install() 🔗

Install a module

Return Type
Workspace !
Arguments
NameTypeDefault ValueDescription
moduleString !-No description provided
versionString !-No description provided
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
 install --module string --version string
func (m *myModule) example(module string, version string) *Workspace  {
	return dag.
			Workspace().
			Install(module, version)
}
@function
def example(module: str, version: str) -> dag.Workspace:
	return (
		dag.workspace()
		.install(module, version)
	)
@func()
example(module: string, version: string): Workspace {
	return dag
		.workspace()
		.install(module, version)
}

build() 🔗

Build a module

Return Type
Workspace !
Arguments
NameTypeDefault ValueDescription
moduleString !-No description provided
versionString !-No description provided
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
 build --module string --version string
func (m *myModule) example(module string, version string) *Workspace  {
	return dag.
			Workspace().
			Build(module, version)
}
@function
def example(module: str, version: str) -> dag.Workspace:
	return (
		dag.workspace()
		.build(module, version)
	)
@func()
example(module: string, version: string): Workspace {
	return dag
		.workspace()
		.build(module, version)
}

version() 🔗

Get Dagger Version

Return Type
String !
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
 version
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Workspace().
			Version(ctx)
}
@function
async def example() -> str:
	return await (
		dag.workspace()
		.version()
	)
@func()
async example(): Promise<string> {
	return dag
		.workspace()
		.version()
}