moduleWorkspace
A generated module for DagWorkspace functions
Installation
dagger install github.com/kpenfound/dagger-programmer/moduleWorkspace@df1ced09304c4a18a20bc226b7c783293e74be84
Entrypoint
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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string
func (m *myModule) example(sdk string, name string, daggerVersion string) *ModuleWorkspace {
return dag.
ModuleWorkspace(sdk, name, daggerVersion)
}
@function
def example(sdk: str, name: str, dagger_version: str, ) -> dag.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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string workspace
func (m *myModule) example(sdk string, name string, daggerVersion string) *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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string write --content string
func (m *myModule) example(sdk string, name string, daggerVersion string, content string) *ModuleWorkspace {
return dag.
ModuleWorkspace(sdk, name, daggerVersion).
Write(content)
}
@function
def example(sdk: str, name: str, dagger_version: str, content: str) -> dag.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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string read
func (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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string test
func (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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string get-sdk-reference --sdk string
func (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@df1ced09304c4a18a20bc226b7c783293e74be84 call \
--sdk string --name string --dagger-version string get-examples-reference
func (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()
}