dagger-templates
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/dciangot/daggerverse/dagger-templates@0c6a71dccf8a865f3b38c734d1b835fefb1d3ad9
Entrypoint
Return Type
DaggerTemplates !
Example
dagger -m github.com/dciangot/daggerverse/dagger-templates@0c6a71dccf8a865f3b38c734d1b835fefb1d3ad9 call \
func (m *myModule) example() *DaggerTemplates {
return dag.
DaggerTemplates()
}
@function
def example() -> dag.DaggerTemplates:
return (
dag.dagger_templates()
)
@func()
example(): DaggerTemplates {
return dag
.daggerTemplates()
}
Types
DaggerTemplates 🔗
Take a Jinja template and a JSON string Return a File with the compiled template
compileTemplate() 🔗
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
jsonValues | Scalar ! | - | JSON string containing values to be filled in |
templateFile | File ! | - | Jinja template file to be compiled |
Example
dagger -m github.com/dciangot/daggerverse/dagger-templates@0c6a71dccf8a865f3b38c734d1b835fefb1d3ad9 call \
compile-template --template-file file:path
func (m *myModule) example(jsonValues , templateFile *File) *File {
return dag.
DaggerTemplates().
CompileTemplate(jsonValues, templateFile)
}
@function
def example(json_values: , template_file: dagger.File) -> dagger.File:
return (
dag.dagger_templates()
.compile_template(json_values, template_file)
)
@func()
example(jsonValues: , templateFile: File): File {
return dag
.daggerTemplates()
.compileTemplate(jsonValues, templateFile)
}