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@bbefe24b817386ffcc4b64d6823c05e418d36a60
Entrypoint
Return Type
DaggerTemplates !
Example
dagger -m github.com/dciangot/daggerverse/dagger-templates@bbefe24b817386ffcc4b64d6823c05e418d36a60 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@bbefe24b817386ffcc4b64d6823c05e418d36a60 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)
}