gotemplate

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoTemplateFactory

type GoTemplateFactory struct {
	FuncMap              template.FuncMap
	EnableIncludeFn      bool // allowed to use include function
	EnableIncludeModules bool // allowed to use include modules
	EnableRunner         bool // allowed to use functions for runner
}

func DefaultGoTemplateFactory

func DefaultGoTemplateFactory() *GoTemplateFactory

func (*GoTemplateFactory) NewInstance

func (f *GoTemplateFactory) NewInstance(runner *module.Runner, path string, specFilename string) (module.Instance, error)

type GoTemplateInstance

type GoTemplateInstance struct {
	// contains filtered or unexported fields
}

func (*GoTemplateInstance) LoadSpec

func (i *GoTemplateInstance) LoadSpec() error

func (*GoTemplateInstance) Run

func (i *GoTemplateInstance) Run(workDir string, overrides []string) ([]byte, error)

type GoTemplateModuleSpec

type GoTemplateModuleSpec struct {
	module.SpecHeader `yaml:",inline"`
	Spec              struct {
		Include  []string                `json:",omitempty" yaml:",omitempty"` // include all templates from those modules (if the're go templates)
		Settings *map[string]interface{} `json:",omitempty" yaml:",omitempty"`
		Template *string                 // the template itself to run
	}
}

func GetGoTemplateModuleSpec

func GetGoTemplateModuleSpec(buf []byte) (*GoTemplateModuleSpec, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL