render

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 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 AferoConvFs added in v0.2.0

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

func (AferoConvFs) Open added in v0.2.0

func (ac AferoConvFs) Open(name string) (fs.File, error)

type RenderingContext

type RenderingContext struct {
	ContextName string
	File        *config_generic.FileToRender
	Secrets     config_generic.SecretsMap
	Configs     config_generic.ConfigMap
}

type RenderingEngine

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

func NewRenderingEngine

func NewRenderingEngine(repository *config_generic.Repository, fsIn afero.Fs, fsOut afero.Fs) *RenderingEngine

func (*RenderingEngine) CreateRenderingContext

func (e *RenderingEngine) CreateRenderingContext(fileToRender *config_generic.FileToRender) (*RenderingContext, error)

CreateRenderingContext creates the context which is used in the templates

func (*RenderingEngine) ExecuteTemplate

func (e *RenderingEngine) ExecuteTemplate(fileToRender *config_generic.FileToRender, writer io.Writer) (usedContext *RenderingContext, err error)

ExecuteTemplate executes the template and creates the rendering context

func (*RenderingEngine) RenderFile

func (e *RenderingEngine) RenderFile(fileToRender *config_generic.FileToRender) (usedContext *RenderingContext, fileContents string, err error)

RenderFile renders the file and returns the rendered contents as string

func (*RenderingEngine) WriteFile

func (e *RenderingEngine) WriteFile(fileToRender *config_generic.FileToRender) (usedContext *RenderingContext, err error)

WriteFile renders the file and writes it to its destination

Jump to

Keyboard shortcuts

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