earthly-sdk
Earthly runtime for Dagger. 🚀
Installation
dagger install github.com/wingyplus/dagger-earthly-sdk@v0.1.0
Entrypoint
Return Type
EarthlySdk !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
sdkSourceDir | Directory | - | No description provided |
Example
dagger -m github.com/wingyplus/dagger-earthly-sdk@aa6b6907bd8949a49e3a9d057e9dd3bd3fd52231 call \
func (m *MyModule) Example() *dagger.EarthlySdk {
return dag.
EarthlySdk()
}
@function
def example() -> dagger.EarthlySdk:
return (
dag.earthly_sdk()
)
@func()
example(): EarthlySdk {
return dag
.earthlySdk()
}
Types
EarthlySdk 🔗
runtimeSourceDir() 🔗
Return Type
Directory !
Example
dagger -m github.com/wingyplus/dagger-earthly-sdk@aa6b6907bd8949a49e3a9d057e9dd3bd3fd52231 call \
runtime-source-dir
func (m *MyModule) Example() *dagger.Directory {
return dag.
EarthlySdk().
RuntimeSourceDir()
}
@function
def example() -> dagger.Directory:
return (
dag.earthly_sdk()
.runtime_source_dir()
)
@func()
example(): Directory {
return dag
.earthlySdk()
.runtimeSourceDir()
}
moduleRuntime() 🔗
ModuleRuntime implements runtime api.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
modSource | ModuleSource ! | - | No description provided |
introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
EarthlySdk().
ModuleRuntime(modSource, introspectionJson)
}
@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.earthly_sdk()
.module_runtime(mod_source, introspection_json)
)
@func()
example(modSource: ModuleSource, introspectionJson: File): Container {
return dag
.earthlySdk()
.moduleRuntime(modSource, introspectionJson)
}
codegen() 🔗
Codegen implements runtime api.
Return Type
GeneratedCode !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
modSource | ModuleSource ! | - | No description provided |
introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.GeneratedCode {
return dag.
EarthlySdk().
Codegen(modSource, introspectionJson)
}
@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.GeneratedCode:
return (
dag.earthly_sdk()
.codegen(mod_source, introspection_json)
)
@func()
example(modSource: ModuleSource, introspectionJson: File): GeneratedCode {
return dag
.earthlySdk()
.codegen(modSource, introspectionJson)
}
runtime() 🔗
Runtime create a runtime binary for running the a function.
Return Type
File !
Example
dagger -m github.com/wingyplus/dagger-earthly-sdk@aa6b6907bd8949a49e3a9d057e9dd3bd3fd52231 call \
runtime
func (m *MyModule) Example() *dagger.File {
return dag.
EarthlySdk().
Runtime()
}
@function
def example() -> dagger.File:
return (
dag.earthly_sdk()
.runtime()
)
@func()
example(): File {
return dag
.earthlySdk()
.runtime()
}