transform

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAzureParametersFile

func BuildAzureParametersFile(content string) (string, error)

BuildAzureParametersFile will add the correct schema and contentversion information

func PrettyPrintArmTemplate

func PrettyPrintArmTemplate(template string) (string, error)

PrettyPrintArmTemplate will pretty print the arm template ensuring ordered by params, vars, resources, and outputs

func PrettyPrintJSON

func PrettyPrintJSON(content string) (string, error)

PrettyPrintJSON will pretty print the json into

Types

type Transformer

type Transformer struct {
	Translator Translator
}

Transformer represents the object that transforms template

func (*Transformer) NormalizeForK8sVMASScalingUp

func (t *Transformer) NormalizeForK8sVMASScalingUp(logger *logrus.Entry, templateMap map[string]interface{}) error

NormalizeForK8sVMASScalingUp takes a template and removes elements that are unwanted in a K8s VMAS scale up/down case

func (*Transformer) NormalizeForVMSSScaling

func (t *Transformer) NormalizeForVMSSScaling(logger *logrus.Entry, templateMap map[string]interface{}) error

NormalizeForVMSSScaling takes a template and removes elements that are unwanted in a VMSS scale up/down case

func (*Transformer) NormalizeMasterResourcesForScaling

func (t *Transformer) NormalizeMasterResourcesForScaling(logger *logrus.Entry, templateMap map[string]interface{}) error

NormalizeMasterResourcesForScaling takes a template and removes elements that are unwanted in any scale up/down case

func (*Transformer) NormalizeResourcesForK8sAgentUpgrade

func (t *Transformer) NormalizeResourcesForK8sAgentUpgrade(logger *logrus.Entry, templateMap map[string]interface{}, isMasterManagedDisk bool, agentPoolsToPreserve map[string]bool) error

NormalizeResourcesForK8sAgentUpgrade takes a template and removes elements that are unwanted in any scale up/down case

func (*Transformer) NormalizeResourcesForK8sMasterUpgrade

func (t *Transformer) NormalizeResourcesForK8sMasterUpgrade(logger *logrus.Entry, templateMap map[string]interface{}, isMasterManagedDisk bool, agentPoolsToPreserve map[string]bool) error

NormalizeResourcesForK8sMasterUpgrade takes a template and removes elements that are unwanted in any scale up/down case

type Translator

type Translator interface {
	// T translates a text string, based on GNU's gettext library.
	T(msgid string, vars ...interface{}) string
	// NT translates a text string into the appropriate plural form, based on GNU's gettext library.
	NT(msgid, msgidPlural string, n int, vars ...interface{}) string
	// Errorf produces an error with a translated error string.
	Errorf(msgid string, vars ...interface{}) error
	// NErrorf produces an error with a translated error string in the appropriate plural form.
	NErrorf(msgid, msgidPlural string, n int, vars ...interface{}) error
}

Translator defines all required interfaces for i18n.Translator.

Jump to

Keyboard shortcuts

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