Documentation
¶
Index ¶
- func AddDotForVariablesInConfigProcessor(bytes []byte) []byte
- func AddQuoteForVariablesInConfigProcessor(bytes []byte) []byte
- func ContentGetter(content string) ([]byte, error)
- func LocalFileGetter(filepath string) ([]byte, error)
- func URLGetter(url string) ([]byte, error)
- type RenderAPI
- type TemplateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDotForVariablesInConfigProcessor ¶ added in v0.9.0
AddDotForVariablesInConfigProcessor will add dot before varName this is because our variables' syntax is [[ varName ]] while Go's template is [[ .varName ]]
func AddQuoteForVariablesInConfigProcessor ¶ added in v0.10.1
AddQuoteForVariablesInConfigProcessor will add quote for special varName When [[ ]] has two words and the first word don't contain quota, add quotes to the second word e.g. [[ env GITHUB_TOKEN]] -> [[ env "GITHUB_TOKEN" ]] [[ env 'GITHUB_TOKEN' ]] -> do nothing [[ env "GITHUB_TOKEN" ]] -> do nothing [[ "env" "GITHUB_TOKEN" ]] -> do nothing [[ GITHUB_TOKEN ]] -> do nothing
func ContentGetter ¶ added in v0.9.0
ContentGetter get content bytes from input content
func LocalFileGetter ¶ added in v0.10.3
LocalFileGetter get content bytes from file
Types ¶
type RenderAPI ¶ added in v0.10.3
RenderAPI is a interface with render methods
func NewRenderClient ¶ added in v0.10.3
func NewRenderClient(clientOption *TemplateOption, getter getFunc, processors ...processFunc) RenderAPI
NewRenderClient create template render client with template option, getter and processors