Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { GetAllValues() ([]confighelper.Setting, error) SetValues(settings []confighelper.Setting) error Object() interface{} }
Config is an interface for Stencil's config file
type Engine ¶
type Engine interface { ParseAndExecutePath(path string, settings interface{}) (string, error) ParseAndExecuteFile(sourcePath string, settings interface{}, wr io.Writer) error }
Engine is a interface to wrap the functions needed to create a templating engine that Stencil can understand
type IOWrapper ¶
type IOWrapper interface {
GetOverrides(allSettings []confighelper.Setting) ([]confighelper.Setting, error)
}
IOWrapper is a wrapper around the Input / Output for Stencil
type RootHandler ¶
RootHandler is the Handler object for the Root cm
func NewRootHandler ¶
func NewRootHandler(conf Config, templateEngine Engine, io IOWrapper) RootHandler
NewRootHandler creates and returns a new RootHandler instance
func (RootHandler) GetTargetPath ¶
func (h RootHandler) GetTargetPath(templatePath, outputPath, path string, settings interface{}) (string, error)
GetTargetPath Converts a template path into the output path
func (RootHandler) OfferConfigOverrides ¶
func (h RootHandler) OfferConfigOverrides() error
OfferConfigOverrides will take the current configuration and offer the user the ability to override the default values
func (RootHandler) ProcessTemplate ¶
func (h RootHandler) ProcessTemplate(templatePath, outputPath string) error
ProcessTemplate will walk through the Template and Parse it using the existing configuration
Click to show internal directories.
Click to hide internal directories.