dagger-templates
This utility module takes a Jinja template and a JSON string Return a File with the compiled templateInstallation
dagger install github.com/dciangot/daggerverse/dagger-templates@f0185187d0832b19d69a0d4cf074029da331f645Entrypoint
Return Type
DaggerTemplates ! Example
dagger -m github.com/dciangot/daggerverse/dagger-templates@f0185187d0832b19d69a0d4cf074029da331f645 call \
func (m *MyModule) Example() *dagger.DaggerTemplates {
return dag.
Daggertemplates()
}@function
def example() -> dagger.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@f0185187d0832b19d69a0d4cf074029da331f645 call \
compile-template --template-file file:pathfunc (m *MyModule) Example(jsonValues , templateFile *dagger.File) *dagger.File {
return dag.
Daggertemplates().
Compiletemplate(jsonValues, templateFile)
}@function
def example(jsonvalues: , templatefile: dagger.File) -> dagger.File:
return (
dag.dagger_templates()
.compiletemplate(jsonvalues, templatefile)
)@func()
example(jsonValues: , templateFile: File): File {
return dag
.daggerTemplates()
.compileTemplate(jsonValues, templateFile)
}