go-sdk
No long description provided.
Installation
dagger install github.com/shykes/dagger-go-sdk@970ac04587f94d08b9496c4b7c3beb8e95448a51Entrypoint
Return Type
GoSdkMod !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of this module root. |
| skipGenerateFilename | String ! | - | Marker filename that skips generate when found at or above this module root. |
Example
dagger -m github.com/shykes/dagger-go-sdk@970ac04587f94d08b9496c4b7c3beb8e95448a51 call \
--path string --skip-generate-filename stringfunc (m *MyModule) Example(path string, skipGenerateFilename string) *dagger.GoSdkMod {
return dag.
GoSdk(path, skipGenerateFilename)
}@function
def example(path: str, skip_generate_filename: str) -> dagger.GoSdkMod:
return (
dag.go_sdk(path, skip_generate_filename)
)@func()
example(path: string, skipGenerateFilename: string): GoSdkMod {
return dag
.goSdk(path, 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@970ac04587f94d08b9496c4b7c3beb8e95448a51 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
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@970ac04587f94d08b9496c4b7c3beb8e95448a51 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)
}Types
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()
}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()
}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@970ac04587f94d08b9496c4b7c3beb8e95448a51 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()
}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. 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()
}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()
}GoSdkModDeps 🔗
Dagger dependencies for a Go SDK module.
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)
}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()
}