Documentation ¶
Index ¶
- Constants
- func GetEnvVars(prefix string) map[string]string
- func IsTemplate(data string) bool
- type RenderType
- type TemplateData
- type TemplateRenderer
- func (r *TemplateRenderer) ExecuteConstTemplate(templateString string) ([]byte, error)
- func (r *TemplateRenderer) ExecuteFullTemplate(templateString string) ([]byte, error)
- func (r *TemplateRenderer) ExecuteMaskedTemplate(templateString string) ([]byte, error)
- func (r *TemplateRenderer) ExecuteNonSensitiveTemplate(templateString string) ([]byte, error)
- func (r *TemplateRenderer) Render(templateString string, t RenderType) ([]byte, error)
- type VariableConfig
Constants ¶
View Source
const ( PREFIX = "LULA_VAR_" CONST = "const" VAR = "var" )
Variables ¶
This section is empty.
Functions ¶
func GetEnvVars ¶
get all environment variables with the established prefix
func IsTemplate ¶ added in v0.9.0
IsTemplate checks if the given string contains valid template syntax
Types ¶
type RenderType ¶ added in v0.8.0
type RenderType string
const ( MASKED RenderType = "masked" CONSTANTS RenderType = "constants" NONSENSITIVE RenderType = "non-sensitive" ALL RenderType = "all" )
func ParseRenderType ¶ added in v0.9.0
func ParseRenderType(item string) (RenderType, error)
type TemplateData ¶ added in v0.8.0
type TemplateData struct { Constants map[string]interface{} Variables map[string]string SensitiveVariables map[string]string }
func CollectTemplatingData ¶
func CollectTemplatingData(constants map[string]interface{}, variables []VariableConfig, overrides map[string]string) (*TemplateData, error)
Prepare the templateData object for use in templating
func NewTemplateData ¶ added in v0.8.0
func NewTemplateData() *TemplateData
type TemplateRenderer ¶ added in v0.8.0
type TemplateRenderer struct {
// contains filtered or unexported fields
}
func NewTemplateRenderer ¶ added in v0.8.0
func NewTemplateRenderer(templateData *TemplateData) *TemplateRenderer
func (*TemplateRenderer) ExecuteConstTemplate ¶ added in v0.8.0
func (r *TemplateRenderer) ExecuteConstTemplate(templateString string) ([]byte, error)
ExecuteConstTemplate templates only constants this templates only values in the constants map
func (*TemplateRenderer) ExecuteFullTemplate ¶ added in v0.8.0
func (r *TemplateRenderer) ExecuteFullTemplate(templateString string) ([]byte, error)
ExecuteFullTemplate templates everything
func (*TemplateRenderer) ExecuteMaskedTemplate ¶ added in v0.8.0
func (r *TemplateRenderer) ExecuteMaskedTemplate(templateString string) ([]byte, error)
ExecuteMaskedTemplate templates all values, but masks the sensitive ones for display/printing only
func (*TemplateRenderer) ExecuteNonSensitiveTemplate ¶ added in v0.8.0
func (r *TemplateRenderer) ExecuteNonSensitiveTemplate(templateString string) ([]byte, error)
ExecuteNonSensitiveTemplate templates only constants and non-sensitive variables used for compose operations
func (*TemplateRenderer) Render ¶ added in v0.8.0
func (r *TemplateRenderer) Render(templateString string, t RenderType) ([]byte, error)
type VariableConfig ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.