go-sdk
No long description provided.
Installation
dagger install github.com/shykes/dagger-go-sdk@0941ec7bbf10dd955acabafc0cabc35a126c2d24Entrypoint
Return Type
GoSdk ! Example
dagger -m github.com/shykes/dagger-go-sdk@0941ec7bbf10dd955acabafc0cabc35a126c2d24 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
GoSdkMod !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of this module root. |
Example
dagger -m github.com/shykes/dagger-go-sdk@0941ec7bbf10dd955acabafc0cabc35a126c2d24 call \
--path stringfunc (m *MyModule) Example(path string) *dagger.GoSdkMod {
return dag.
GoSdk(path)
}@function
def example(path: str) -> dagger.GoSdkMod:
return (
dag.go_sdk(path)
)@func()
example(path: string): GoSdkMod {
return dag
.goSdk(path)
}Types
GoSdk 🔗
A Dagger module for Go SDK modules.
mod() 🔗
Return the Go SDK module containing a workspace path.
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.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| name | String ! | - | No description provided |
| path | 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().
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)
}workspaceModuleSource() 🔗
Return a module source backed by the narrowest workspace directory this shim can compute from dagger.json.
Return Type
ModuleSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.ModuleSource {
return dag.
GoSdk().
WorkspaceModuleSource()
}@function
def example() -> dagger.ModuleSource:
return (
dag.go_sdk()
.workspace_module_source()
)@func()
example(): ModuleSource {
return dag
.goSdk()
.workspaceModuleSource()
}workspaceModuleSourceInclude() 🔗
Workspace-root include patterns needed to load a module source and its local module source references.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, path string) []string {
return dag.
GoSdk().
WorkspaceModuleSourceInclude(ctxpath)
}@function
async def example(path: str) -> List[str]:
return await (
dag.go_sdk()
.workspace_module_source_include(path)
)@func()
async example(path: string): Promise<string[]> {
return dag
.goSdk()
.workspaceModuleSourceInclude(path)
}generateAll() 🔗
Generate all discovered Go SDK modules.
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()
}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()
}GoSdkMod 🔗
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()
}generate() 🔗
Generate this module.
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()
}