fileprocessor

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path string
	Data []byte
}

File represents the contents and the path to a file

type FileProcessor

type FileProcessor interface {
	ProcessFile(file File) (File, error)
}

FileProcessor can process a template file and produce an output file

type GoTemplateProcessor

type GoTemplateProcessor struct {
	Params TemplateParameters
}

GoTemplateProcessor is a FileProcessor that executes Go Templates

func (*GoTemplateProcessor) ProcessFile

func (p *GoTemplateProcessor) ProcessFile(file File) (File, error)

ProcessFile takes a template file and executes the template applying the TemplateParameters

type NoOpTemplateProcessor

type NoOpTemplateProcessor struct{}

NoOpTemplateProcessor is a FileProcessor that does no operations on templated files and ignore them from output

func (*NoOpTemplateProcessor) ProcessFile

func (p *NoOpTemplateProcessor) ProcessFile(file File) (File, error)

ProcessFile takes a template file and executes the template applying the TemplateParameters

type TemplateParameters

type TemplateParameters struct {
	ClusterName               string
	Location                  string
	LoadBalancerIP            string
	LoadBalancerResourceGroup string
}

TemplateParameters represents the API variables that can be used to template a profile. This set of variables will be applied to the go template files found. Templates filenames must end in .templ

func NewTemplateParameters

func NewTemplateParameters(clusterConfig *api.ClusterConfig) TemplateParameters

NewTemplateParameters creates a set of variables for templating given a ClusterConfig object

Jump to

Keyboard shortcuts

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