Dagger
Search

dagger-templates

This utility module takes a Jinja template and a JSON string Return a File with the compiled template

Installation

dagger install github.com/dciangot/daggerverse/dagger-templates@f0185187d0832b19d69a0d4cf074029da331f645

Entrypoint

Return Type
DaggerTemplates !
Example
dagger -m github.com/dciangot/daggerverse/dagger-templates@f0185187d0832b19d69a0d4cf074029da331f645 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
NameTypeDefault ValueDescription
jsonValuesScalar !-JSON string containing values to be filled in
templateFileFile !-Jinja template file to be compiled
Example
dagger -m github.com/dciangot/daggerverse/dagger-templates@f0185187d0832b19d69a0d4cf074029da331f645 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)
}