moduleWorkspace
A generated module for DagWorkspace functions
Installation
dagger install github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279Entrypoint
Return Type
ModuleWorkspace !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| sdk | String ! | - | No description provided | 
| name | String ! | - | No description provided | 
| dependencies | [Directory ! ] | - | No description provided | 
| daggerVersion | String ! | "latest" | No description provided | 
| workspace | Directory | - | No description provided | 
Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version stringfunc (m *MyModule) Example(sdk string, name string, daggerVersion string) *dagger.ModuleWorkspace  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion)
}@function
def example(sdk: str, name: str, dagger_version: str, ) -> dagger.ModuleWorkspace:
	return (
		dag.module_workspace(sdk, name, dagger_version)
	)@func()
example(sdk: string, name: string, daggerVersion: string, ): ModuleWorkspace {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
}Types
ModuleWorkspace 🔗
workspace() 🔗
Return Type
Directory !Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version string workspacefunc (m *MyModule) Example(sdk string, name string, daggerVersion string) *dagger.Directory  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion).
			Workspace()
}@function
def example(sdk: str, name: str, dagger_version: str, ) -> dagger.Directory:
	return (
		dag.module_workspace(sdk, name, dagger_version)
		.workspace()
	)@func()
example(sdk: string, name: string, daggerVersion: string, ): Directory {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
		.workspace()
}write() 🔗
Writes the module code to the workspace
Return Type
ModuleWorkspace !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| content | String ! | - | The updated module code | 
Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version string write --content stringfunc (m *MyModule) Example(sdk string, name string, daggerVersion string, content string) *dagger.ModuleWorkspace  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion).
			Write(content)
}@function
def example(sdk: str, name: str, dagger_version: str, content: str) -> dagger.ModuleWorkspace:
	return (
		dag.module_workspace(sdk, name, dagger_version)
		.write(content)
	)@func()
example(sdk: string, name: string, daggerVersion: string, content: string): ModuleWorkspace {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
		.write(content)
}read() 🔗
Reads the module code from the workspace
Return Type
String !Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version string readfunc (m *MyModule) Example(ctx context.Context, sdk string, name string, daggerVersion string) string  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion).
			Read(ctx)
}@function
async def example(sdk: str, name: str, dagger_version: str, ) -> str:
	return await (
		dag.module_workspace(sdk, name, dagger_version)
		.read()
	)@func()
async example(sdk: string, name: string, daggerVersion: string, ): Promise<string> {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
		.read()
}test() 🔗
Test if a module works by outputting the module functions
Return Type
String !Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version string testfunc (m *MyModule) Example(ctx context.Context, sdk string, name string, daggerVersion string) string  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion).
			Test(ctx)
}@function
async def example(sdk: str, name: str, dagger_version: str, ) -> str:
	return await (
		dag.module_workspace(sdk, name, dagger_version)
		.test()
	)@func()
async example(sdk: string, name: string, daggerVersion: string, ): Promise<string> {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
		.test()
}getSdkReference() 🔗
Get SDK reference information for developing with a Dagger SDK
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| sdk | String ! | - | Dagger SDK language to get reference for | 
Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version string get-sdk-reference --sdk stringfunc (m *MyModule) Example(ctx context.Context, sdk string, name string, daggerVersion string, sdk1 string) string  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion).
			GetSdkReference(ctx, sdk1)
}@function
async def example(sdk: str, name: str, dagger_version: str, sdk1: str) -> str:
	return await (
		dag.module_workspace(sdk, name, dagger_version)
		.get_sdk_reference(sdk1)
	)@func()
async example(sdk: string, name: string, daggerVersion: string, sdk1: string): Promise<string> {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
		.getSdkReference(sdk1)
}getExamplesReference() 🔗
Get reference information on writing an example module for a dagger module
Return Type
String !Example
dagger -m github.com/kpenfound/dagger-programmer/moduleWorkspace@56f0c3010c10d94bc61d7e4abe693617e2606279 call \
 --sdk string --name string --dagger-version string get-examples-referencefunc (m *MyModule) Example(ctx context.Context, sdk string, name string, daggerVersion string) string  {
	return dag.
			ModuleWorkspace(sdk, name, daggerVersion).
			GetExamplesReference(ctx)
}@function
async def example(sdk: str, name: str, dagger_version: str, ) -> str:
	return await (
		dag.module_workspace(sdk, name, dagger_version)
		.get_examples_reference()
	)@func()
async example(sdk: string, name: string, daggerVersion: string, ): Promise<string> {
	return dag
		.moduleWorkspace(sdk, name, daggerVersion)
		.getExamplesReference()
}