go-sdk
No long description provided.
Installation
dagger install github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fcEntrypoint
Return Type
GoSdkModDeps !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of the module root. |
| workspacePath | String ! | - | Workspace-relative path where changesets should be rooted. |
| daggerJson | File ! | - | This module's dagger.json. |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
--path string --workspace-path string --dagger-json file:pathfunc (m *MyModule) Example(path string, workspacePath string, daggerJson *dagger.File) *dagger.GoSdkModDeps {
return dag.
GoSdk(path, workspacePath, daggerJson)
}@function
def example(path: str, workspace_path: str, dagger_json: dagger.File) -> dagger.GoSdkModDeps:
return (
dag.go_sdk(path, workspace_path, dagger_json)
)@func()
example(path: string, workspacePath: string, daggerJson: File): GoSdkModDeps {
return dag
.goSdk(path, workspacePath, daggerJson)
}Entrypoint
Return Type
GoSdkModuleConfig !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | No description provided |
Example
Function GoSdkModuleConfig.Constructor is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.Constructor is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.Constructor is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.Constructor is not accessible from the go-sdk moduleEntrypoint
Return Type
GoSdkMod !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of this module root. |
| workspacePath | String ! | - | Workspace-relative path where changesets should be rooted. |
| daggerJson | File ! | - | This module's dagger.json. |
| skipGenerateFilename | String ! | - | Marker filename that skips generate when found at or above this module root. |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
--path string --workspace-path string --dagger-json file:path --skip-generate-filename stringfunc (m *MyModule) Example(path string, workspacePath string, daggerJson *dagger.File, skipGenerateFilename string) *dagger.GoSdkMod {
return dag.
GoSdk(path, workspacePath, daggerJson, skipGenerateFilename)
}@function
def example(path: str, workspace_path: str, dagger_json: dagger.File, skip_generate_filename: str) -> dagger.GoSdkMod:
return (
dag.go_sdk(path, workspace_path, dagger_json, skip_generate_filename)
)@func()
example(path: string, workspacePath: string, daggerJson: File, skipGenerateFilename: string): GoSdkMod {
return dag
.goSdk(path, workspacePath, daggerJson, skipGenerateFilename)
}Entrypoint
Return Type
GoSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| skipGenerateFilename | String | - | Marker filename that skips generate when found at or above a Go SDK module root. |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
func (m *MyModule) Example() *dagger.GoSdk {
return dag.
GoSdk()
}@function
def example() -> dagger.GoSdk:
return (
dag.go_sdk()
)@func()
example(): GoSdk {
return dag
.goSdk()
}Entrypoint
Return Type
GoSdkTemplate !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | Template name passed to init. |
| source | Directory ! | - | Template source files materialized into the new module before generation. |
Example
Function GoSdkTemplate.Constructor is not accessible from the go-sdk moduleFunction GoSdkTemplate.Constructor is not accessible from the go-sdk moduleFunction GoSdkTemplate.Constructor is not accessible from the go-sdk moduleFunction GoSdkTemplate.Constructor is not accessible from the go-sdk moduleEntrypoint
Return Type
GoSdkModEngine !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of the module root. |
| workspacePath | String ! | - | Workspace-relative path where changesets should be rooted. |
| daggerJson | File ! | - | This module's dagger.json. |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
--path string --workspace-path string --dagger-json file:pathfunc (m *MyModule) Example(path string, workspacePath string, daggerJson *dagger.File) *dagger.GoSdkModEngine {
return dag.
GoSdk(path, workspacePath, daggerJson)
}@function
def example(path: str, workspace_path: str, dagger_json: dagger.File) -> dagger.GoSdkModEngine:
return (
dag.go_sdk(path, workspace_path, dagger_json)
)@func()
example(path: string, workspacePath: string, daggerJson: File): GoSdkModEngine {
return dag
.goSdk(path, workspacePath, daggerJson)
}Entrypoint
Return Type
GoSdkNestedDaggerQuery !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
| varsJson | String ! | - | No description provided |
| mountedDirectoryPath | String ! | - | No description provided |
| mountedDirectory | Directory ! | - | No description provided |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
--name string --vars-json string --mounted-directory-path string --mounted-directory DIR_PATHfunc (m *MyModule) Example(name string, varsJson string, mountedDirectoryPath string, mountedDirectory *dagger.Directory) *dagger.GoSdkNestedDaggerQuery {
return dag.
GoSdk(name, varsJson, mountedDirectoryPath, mountedDirectory)
}@function
def example(name: str, vars_json: str, mounted_directory_path: str, mounted_directory: dagger.Directory) -> dagger.GoSdkNestedDaggerQuery:
return (
dag.go_sdk(name, vars_json, mounted_directory_path, mounted_directory)
)@func()
example(name: string, varsJson: string, mountedDirectoryPath: string, mountedDirectory: Directory): GoSdkNestedDaggerQuery {
return dag
.goSdk(name, varsJson, mountedDirectoryPath, mountedDirectory)
}Entrypoint
Return Type
GoSdkDaggerQueryHelpers ! Example
Function GoSdkDaggerQueryHelpers.Constructor is not accessible from the go-sdk moduleFunction GoSdkDaggerQueryHelpers.Constructor is not accessible from the go-sdk moduleFunction GoSdkDaggerQueryHelpers.Constructor is not accessible from the go-sdk moduleFunction GoSdkDaggerQueryHelpers.Constructor is not accessible from the go-sdk moduleTypes
GoSdkModDeps 🔗
Dagger dependencies for a Go SDK module.
add() 🔗
Add a Dagger dependency to dagger.json.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| source | String ! | - | No description provided |
| name | String | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(source string) *dagger.Changeset {
return dag.
GoSdk().
Mod().
Deps().
Add(source)
}@function
def example(source: str) -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.deps()
.add(source)
)@func()
example(source: string): Changeset {
return dag
.goSdk()
.mod()
.deps()
.add(source)
}remove() 🔗
Remove a Dagger dependency from dagger.json by name or source.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| name | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(name string) *dagger.Changeset {
return dag.
GoSdk().
Mod().
Deps().
Remove(name)
}@function
def example(name: str) -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.deps()
.remove(name)
)@func()
example(name: string): Changeset {
return dag
.goSdk()
.mod()
.deps()
.remove(name)
}update() 🔗
Update one dependency by name or source, or update all remote dependencies in dagger.json.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| name | String | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
GoSdk().
Mod().
Deps().
Update()
}@function
def example() -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.deps()
.update()
)@func()
example(): Changeset {
return dag
.goSdk()
.mod()
.deps()
.update()
}list() 🔗
Return dependency names when present, otherwise dependency sources.
Return Type
[String ! ] ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) []string {
return dag.
GoSdk().
Mod().
Deps().
List(ctx)
}@function
async def example() -> List[str]:
return await (
dag.go_sdk()
.mod()
.deps()
.list()
)@func()
async example(): Promise<string[]> {
return dag
.goSdk()
.mod()
.deps()
.list()
}GoSdkModuleConfig 🔗
Read and edit a module's dagger.json file.
withUpdatedDependencies() 🔗
Return dagger.json after updating one dependency, or all remote dependencies.
This uses a dagger.json-only mock workspace because the Dagger update API currently requires a local module source.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| modulePath | String ! | - | No description provided |
| name | String | - | No description provided |
Example
Function GoSdkModuleConfig.withUpdatedDependencies is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withUpdatedDependencies is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withUpdatedDependencies is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withUpdatedDependencies is not accessible from the go-sdk moduledependencies() 🔗
Return dependency names when present, otherwise dependency sources.
Return Type
[String ! ] ! Example
Function GoSdkModuleConfig.dependencies is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.dependencies is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.dependencies is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.dependencies is not accessible from the go-sdk modulewithoutDependency() 🔗
Return dagger.json with dependencies matching the given name or source removed.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
Example
Function GoSdkModuleConfig.withoutDependency is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withoutDependency is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withoutDependency is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withoutDependency is not accessible from the go-sdk modulewithDependency() 🔗
Return dagger.json with one dependency appended.
Named dependencies are written as objects. Unnamed dependencies are written as strings to match the existing dagger.json format.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | String ! | - | No description provided |
| name | String | - | No description provided |
Example
Function GoSdkModuleConfig.withDependency is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withDependency is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withDependency is not accessible from the go-sdk moduleFunction GoSdkModuleConfig.withDependency is not accessible from the go-sdk moduleGoSdkMod 🔗
A Dagger module that uses the Go SDK.
path() 🔗
Workspace-relative path of this module root.
Return Type
String ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) string {
return dag.
GoSdk().
Mod().
Path(ctx)
}@function
async def example() -> str:
return await (
dag.go_sdk()
.mod()
.path()
)@func()
async example(): Promise<string> {
return dag
.goSdk()
.mod()
.path()
}engine() 🔗
Manage the Dagger engine version required by this module.
Return Type
GoSdkModEngine ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.GoSdkModEngine {
return dag.
GoSdk().
Mod().
Engine()
}@function
def example() -> dagger.GoSdkModEngine:
return (
dag.go_sdk()
.mod()
.engine()
)@func()
example(): GoSdkModEngine {
return dag
.goSdk()
.mod()
.engine()
}generate() 🔗
Generate this module. If the generate skip marker is present, the changeset is empty.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
GoSdk().
Mod().
Generate()
}@function
def example() -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.generate()
)@func()
example(): Changeset {
return dag
.goSdk()
.mod()
.generate()
}skipGenerate() 🔗
Whether this module or an ancestor contains the configured generate skip marker.
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) bool {
return dag.
GoSdk().
Mod().
SkipGenerate(ctx)
}@function
async def example() -> bool:
return await (
dag.go_sdk()
.mod()
.skip_generate()
)@func()
async example(): Promise<boolean> {
return dag
.goSdk()
.mod()
.skipGenerate()
}deps() 🔗
Manage this module’s Dagger dependencies.
Return Type
GoSdkModDeps ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.GoSdkModDeps {
return dag.
GoSdk().
Mod().
Deps()
}@function
def example() -> dagger.GoSdkModDeps:
return (
dag.go_sdk()
.mod()
.deps()
)@func()
example(): GoSdkModDeps {
return dag
.goSdk()
.mod()
.deps()
}GoSdk 🔗
Manage Dagger modules that use the Go SDK.
skipGenerateFilename() 🔗
Marker filename that skips generate when found at or above a Go SDK module root.
Return Type
String ! Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
skip-generate-filenamefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
GoSdk().
SkipGenerateFilename(ctx)
}@function
async def example() -> str:
return await (
dag.go_sdk()
.skip_generate_filename()
)@func()
async example(): Promise<string> {
return dag
.goSdk()
.skipGenerateFilename()
}nestedDaggerQuery() 🔗
Run a checked-in GraphQL query through a nested Dagger client.
name is the query path under queries without the .graphql suffix. varsJSON
is the query variables object encoded as JSON text.
Use this only when the same Dagger API call cannot be made directly in Dang.
Return Type
GoSdkNestedDaggerQuery !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
| varsJson | String ! | - | No description provided |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
nested-dagger-query --name string --vars-json stringfunc (m *MyModule) Example(name string, varsJson string) *dagger.GoSdkNestedDaggerQuery {
return dag.
GoSdk().
NestedDaggerQuery(name, varsJson)
}@function
def example(name: str, vars_json: str) -> dagger.GoSdkNestedDaggerQuery:
return (
dag.go_sdk()
.nested_dagger_query(name, vars_json)
)@func()
example(name: string, varsJson: string): GoSdkNestedDaggerQuery {
return dag
.goSdk()
.nestedDaggerQuery(name, varsJson)
}modules() 🔗
Return every Dagger module whose sdk.source is “go”.
Return Type
[GoSdkMod ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() []*dagger.GoSdkMod {
return dag.
GoSdk().
Modules()
}@function
def example() -> List[dagger.GoSdkMod]:
return (
dag.go_sdk()
.modules()
)@func()
example(): GoSdkMod[] {
return dag
.goSdk()
.modules()
}templates() 🔗
Return init templates tracked by this module.
Templates live under templates/ and are materialized into the new module before generation. Passing an empty template to init uses the module default.
Return Type
[GoSdkTemplate ! ] ! Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
templatesfunc (m *MyModule) Example() []*dagger.GoSdkTemplate {
return dag.
GoSdk().
Templates()
}@function
def example() -> List[dagger.GoSdkTemplate]:
return (
dag.go_sdk()
.templates()
)@func()
example(): GoSdkTemplate[] {
return dag
.goSdk()
.templates()
}generateAll() 🔗
Generate all discovered Go SDK modules. Modules with the generate skip marker are skipped.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
GoSdk().
GenerateAll()
}@function
def example() -> dagger.Changeset:
return (
dag.go_sdk()
.generate_all()
)@func()
example(): Changeset {
return dag
.goSdk()
.generateAll()
}mod() 🔗
Return the Go SDK module at or above a workspace path.
When findUp is true, path may point inside the module.
Return Type
GoSdkMod !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String | - | No description provided |
| findUp | Boolean | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.GoSdkMod {
return dag.
GoSdk().
Mod()
}@function
def example() -> dagger.GoSdkMod:
return (
dag.go_sdk()
.mod()
)@func()
example(): GoSdkMod {
return dag
.goSdk()
.mod()
}init() 🔗
Create a new Go SDK Dagger module and return the files to write.
By default, the new module is created under the nearest .dagger directory
visible from the current workspace path:
/modules/
Pass path to choose a different module location. The target path must not
already contain a Dagger module.
Pass template to materialize files from templates/ before
generation. The empty default uses this module’s minimal template.
By default, generated SDK files are checked into version control. Pass
ignoreGenerated to add generated SDK paths to .gitignore instead.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| name | String ! | - | No description provided |
| path | String | - | No description provided |
| template | String | - | No description provided |
| generate | Boolean | - | No description provided |
| ignoreGenerated | Boolean | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(name string) *dagger.Changeset {
return dag.
GoSdk().
Init(name)
}@function
def example(name: str) -> dagger.Changeset:
return (
dag.go_sdk()
.init(name)
)@func()
example(name: string): Changeset {
return dag
.goSdk()
.init(name)
}GoSdkTemplate 🔗
An init template tracked by this module.
name() 🔗
Template name passed to init.
Return Type
String ! Example
Function GoSdkTemplate.name is not accessible from the go-sdk moduleFunction GoSdkTemplate.name is not accessible from the go-sdk moduleFunction GoSdkTemplate.name is not accessible from the go-sdk moduleFunction GoSdkTemplate.name is not accessible from the go-sdk modulesource() 🔗
Template source files materialized into the new module before generation.
Return Type
Directory ! Example
Function GoSdkTemplate.source is not accessible from the go-sdk moduleFunction GoSdkTemplate.source is not accessible from the go-sdk moduleFunction GoSdkTemplate.source is not accessible from the go-sdk moduleFunction GoSdkTemplate.source is not accessible from the go-sdk moduleGoSdkModEngine 🔗
Required Dagger engine version for a Go SDK module.
required() 🔗
The Dagger engine version required by this module, without a leading “v”.
Return Type
String ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) string {
return dag.
GoSdk().
Mod().
Engine().
Required(ctx)
}@function
async def example() -> str:
return await (
dag.go_sdk()
.mod()
.engine()
.required()
)@func()
async example(): Promise<string> {
return dag
.goSdk()
.mod()
.engine()
.required()
}require() 🔗
Configure this module to require the given Dagger engine version.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(version string) *dagger.Changeset {
return dag.
GoSdk().
Mod().
Engine().
Require(version)
}@function
def example(version: str) -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.engine()
.require(version)
)@func()
example(version: string): Changeset {
return dag
.goSdk()
.mod()
.engine()
.require(version)
}requireCurrent() 🔗
Configure this module to require the current Dagger engine version.
Return Type
Changeset ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
GoSdk().
Mod().
Engine().
RequireCurrent()
}@function
def example() -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.engine()
.require_current()
)@func()
example(): Changeset {
return dag
.goSdk()
.mod()
.engine()
.requireCurrent()
}requireLatest() 🔗
Configure this module to require the latest stable Dagger engine version.
Return Type
Changeset ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
GoSdk().
Mod().
Engine().
RequireLatest()
}@function
def example() -> dagger.Changeset:
return (
dag.go_sdk()
.mod()
.engine()
.require_latest()
)@func()
example(): Changeset {
return dag
.goSdk()
.mod()
.engine()
.requireLatest()
}GoSdkNestedDaggerQuery 🔗
A checked-in GraphQL query run by a nested Dagger client. This is a workaround for Dagger API calls that currently fail when made directly from Dang.
inputContainer() 🔗
Return the helper container before the query runs.
Return Type
Container ! Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
nested-dagger-query --name string --vars-json string \
input-containerfunc (m *MyModule) Example(name string, varsJson string) *dagger.Container {
return dag.
GoSdk().
NestedDaggerQuery(name, varsJson).
InputContainer()
}@function
def example(name: str, vars_json: str) -> dagger.Container:
return (
dag.go_sdk()
.nested_dagger_query(name, vars_json)
.input_container()
)@func()
example(name: string, varsJson: string): Container {
return dag
.goSdk()
.nestedDaggerQuery(name, varsJson)
.inputContainer()
}response() 🔗
Return the full GraphQL response as JSON.
Return Type
String ! Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
nested-dagger-query --name string --vars-json string \
responsefunc (m *MyModule) Example(ctx context.Context, name string, varsJson string) string {
return dag.
GoSdk().
NestedDaggerQuery(name, varsJson).
Response(ctx)
}@function
async def example(name: str, vars_json: str) -> str:
return await (
dag.go_sdk()
.nested_dagger_query(name, vars_json)
.response()
)@func()
async example(name: string, varsJson: string): Promise<string> {
return dag
.goSdk()
.nestedDaggerQuery(name, varsJson)
.response()
}outputDir() 🔗
Return a directory from the helper container after the query runs.
Use this to retrieve files written by the query, such as exported changesets.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String | - | No description provided |
| include | [String ! ] | - | No description provided |
| exclude | [String ! ] | - | No description provided |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
nested-dagger-query --name string --vars-json string \
output-dirfunc (m *MyModule) Example(name string, varsJson string) *dagger.Directory {
return dag.
GoSdk().
NestedDaggerQuery(name, varsJson).
OutputDir()
}@function
def example(name: str, vars_json: str) -> dagger.Directory:
return (
dag.go_sdk()
.nested_dagger_query(name, vars_json)
.output_dir()
)@func()
example(name: string, varsJson: string): Directory {
return dag
.goSdk()
.nestedDaggerQuery(name, varsJson)
.outputDir()
}outputContainer() 🔗
Return the helper container after the query runs.
Return Type
Container ! Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
nested-dagger-query --name string --vars-json string \
output-containerfunc (m *MyModule) Example(name string, varsJson string) *dagger.Container {
return dag.
GoSdk().
NestedDaggerQuery(name, varsJson).
OutputContainer()
}@function
def example(name: str, vars_json: str) -> dagger.Container:
return (
dag.go_sdk()
.nested_dagger_query(name, vars_json)
.output_container()
)@func()
example(name: string, varsJson: string): Container {
return dag
.goSdk()
.nestedDaggerQuery(name, varsJson)
.outputContainer()
}responseString() 🔗
Return a string from the GraphQL response at the given object path.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/shykes/dagger-go-sdk@349f01fdf005db0c47eaef3b9585c1f1abf6a0fc call \
nested-dagger-query --name string --vars-json string \
response-string --path string1 --path string2func (m *MyModule) Example(ctx context.Context, name string, varsJson string, path []string) string {
return dag.
GoSdk().
NestedDaggerQuery(name, varsJson).
ResponseString(ctx, path)
}@function
async def example(name: str, vars_json: str, path: List[str]) -> str:
return await (
dag.go_sdk()
.nested_dagger_query(name, vars_json)
.response_string(path)
)@func()
async example(name: string, varsJson: string, path: string[]): Promise<string> {
return dag
.goSdk()
.nestedDaggerQuery(name, varsJson)
.responseString(path)
}GoSdkDaggerQueryHelpers 🔗
Internal helpers for building source IDs and running checked-in queries.