go-sdk
No long description provided.
Installation
dagger install github.com/shykes/dagger-go-sdk@bf7d49363715814a9f8db86d5aa5abebbe17835bEntrypoint
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@bf7d49363715814a9f8db86d5aa5abebbe17835b 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
GoSdkModDeps !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of the module root. |
Example
dagger -m github.com/shykes/dagger-go-sdk@bf7d49363715814a9f8db86d5aa5abebbe17835b call \
--path stringfunc (m *MyModule) Example(path string) *dagger.GoSdkModDeps {
return dag.
GoSdk(path)
}@function
def example(path: str) -> dagger.GoSdkModDeps:
return (
dag.go_sdk(path)
)@func()
example(path: string): GoSdkModDeps {
return dag
.goSdk(path)
}Entrypoint
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@bf7d49363715814a9f8db86d5aa5abebbe17835b 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@bf7d49363715814a9f8db86d5aa5abebbe17835b 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()
}Types
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.
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()
}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()
}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()
}GoSdkModDeps 🔗
Dagger dependencies for a Go SDK module.
remove() 🔗
Remove a Dagger dependency from this module 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 Dagger dependency by name or source, or all remote dependencies.
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()
}add() 🔗
Add a Dagger dependency to this module.
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)
}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()
}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()
}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()
}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()
}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()
}GoSdk 🔗
A Dagger module for Go SDK modules.
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@bf7d49363715814a9f8db86d5aa5abebbe17835b 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()
}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()
}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()
}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)
}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@bf7d49363715814a9f8db86d5aa5abebbe17835b 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()
}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.
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 |
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)
}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()
}