workspace
Basic workspace module for Daggerverse QA Agent
Installation
dagger install github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8Entrypoint
Return Type
Workspace ! Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
func (m *MyModule) Example() *dagger.Workspace {
return dag.
Workspace()
}@function
def example() -> dagger.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 \
containerfunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | No description provided |
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
read --path stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | No description provided |
| content | String ! | - | No description provided |
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
write --path string --content stringfunc (m *MyModule) Example(path string, content string) *dagger.Workspace {
return dag.
Workspace().
Write(path, content)
}@function
def example(path: str, content: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| module | String ! | - | No description provided |
| version | String ! | - | No description provided |
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
install --module string --version stringfunc (m *MyModule) Example(module string, version string) *dagger.Workspace {
return dag.
Workspace().
Install(module, version)
}@function
def example(module: str, version: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| module | String ! | - | No description provided |
| version | String ! | - | No description provided |
Example
dagger -m github.com/levlaz/agent-playground/daggerverse-qa/workspace@52fe2183366a84abf1d878fff0fb1f20e79f68d8 call \
build --module string --version stringfunc (m *MyModule) Example(module string, version string) *dagger.Workspace {
return dag.
Workspace().
Build(module, version)
}@function
def example(module: str, version: str) -> dagger.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 \
versionfunc (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()
}