Documentation ¶
Index ¶
Constants ¶
View Source
const (
ShellPath = "/usr/bin/env bash"
)
Variables ¶
View Source
var ( AppName = "dbpaas" AppVersion = "0.0.1" )
Functions ¶
func GetVarsFromTemplate ¶
Gets a list of all variables mentioned in a template
func SafeTemplateFill ¶
SafeTemplateFill passed template string is formatted using its operands and returns the resulting string. It checks that the data was safely initialized
func TrimmedLines ¶
Given a multi-line string, this function removes leading spaces from every line. It also removes the first line, if it is empty
Types ¶
type ScriptDef ¶
type ScriptDef struct {
// contains filtered or unexported fields
}
func NewScriptDef ¶
func NewScriptDef(tmplDesc TemplateDesc, tmplName string, data map[string]interface{}) (scriptDef *ScriptDef, err error)
func (*ScriptDef) GetScriptText ¶
type TemplateCollection ¶
type TemplateCollection struct {
// contains filtered or unexported fields
}
func NewTemplateCollection ¶
func NewTemplateCollection(tds map[string]TemplateDesc) *TemplateCollection
func (*TemplateCollection) GetScriptText ¶
func (t *TemplateCollection) GetScriptText(key string, data map[string]interface{}) (scriptText string, err error)
func (*TemplateCollection) GetTmpl ¶
func (t *TemplateCollection) GetTmpl(key string) TemplateDesc
Click to show internal directories.
Click to hide internal directories.