Documentation
¶
Index ¶
Constants ¶
View Source
const PluginName string = "template"
PluginName contains the name/id of the plugin.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(context api.PluginStartupContext) error
Start is invoked by nginx-wrapper to start the plugin.
Types ¶
type PathObject ¶
PathObject represents an object on the file system - either a directory or a file.
func (PathObject) String ¶
func (po PathObject) String() string
type ProcessingError ¶
type ProcessingError struct {
Message string
TemplateFile string
OutputFile string
TemplateName string
IsATemplatingProblem bool
Err error
}
ProcessingError is an error that occurs when templates are being applied to nginx configuration.
func (*ProcessingError) Cause ¶
func (e *ProcessingError) Cause() error
Cause returns the cause of the error - the same as the Unwrap() method.
func (*ProcessingError) Error ¶
func (e *ProcessingError) Error() string
func (*ProcessingError) Unwrap ¶
func (e *ProcessingError) Unwrap() error
type Template ¶
type Template struct {
// map of all template files as keys and output files as values
Files *orderedmap.OrderedMap
}
Template represents a set of files/directories that will be templated or copied.
func (*Template) ApplyTemplating ¶
func (t *Template) ApplyTemplating(settings api.Settings) *ProcessingError
ApplyTemplating runs all templates and performs substitutions using the supplied Viper config instance as a data source.
func (*Template) CleanOutputConfiguration ¶
CleanOutputConfiguration removes the configuration that was already templatized.
Click to show internal directories.
Click to hide internal directories.