Documentation ¶
Index ¶
- func NewTextRenderer(readFile func(filename string) ([]byte, error), basePath string, ...) *templateTextRenderer
- func RequiredEnv(name string) (string, error)
- func ToYaml(v interface{}) (string, error)
- type Context
- func (c *Context) Exec(command string, args []interface{}, inputs ...string) (string, error)
- func (c *Context) ReadFile(filename string) (string, error)
- func (c *Context) RenderTemplateToBuffer(s string, data ...interface{}) (*bytes.Buffer, error)
- func (c *Context) Tpl(text string, data interface{}) (string, error)
- type FileRenderer
- func (r *FileRenderer) RenderTemplateContentToBuffer(content []byte) (*bytes.Buffer, error)
- func (r *FileRenderer) RenderTemplateContentToString(content []byte) (string, error)
- func (r *FileRenderer) RenderTemplateFileToBuffer(file string) (*bytes.Buffer, error)
- func (r *FileRenderer) RenderToBytes(path string) ([]byte, error)
- type TextRenderer
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTextRenderer ¶ added in v0.37.0
func RequiredEnv ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) RenderTemplateToBuffer ¶
type FileRenderer ¶ added in v0.25.2
type FileRenderer struct { ReadFile func(string) ([]byte, error) Context *Context Data interface{} }
func NewFileRenderer ¶ added in v0.25.2
func NewFileRenderer(readFile func(filename string) ([]byte, error), basePath string, data interface{}) *FileRenderer
func NewFirstPassRenderer ¶ added in v0.34.0
func NewFirstPassRenderer(basePath string, data interface{}) *FileRenderer
func (*FileRenderer) RenderTemplateContentToBuffer ¶ added in v0.42.0
func (r *FileRenderer) RenderTemplateContentToBuffer(content []byte) (*bytes.Buffer, error)
func (*FileRenderer) RenderTemplateContentToString ¶ added in v0.42.0
func (r *FileRenderer) RenderTemplateContentToString(content []byte) (string, error)
func (*FileRenderer) RenderTemplateFileToBuffer ¶ added in v0.25.2
func (r *FileRenderer) RenderTemplateFileToBuffer(file string) (*bytes.Buffer, error)
func (*FileRenderer) RenderToBytes ¶ added in v0.42.0
func (r *FileRenderer) RenderToBytes(path string) ([]byte, error)
type TextRenderer ¶ added in v0.37.0
Click to show internal directories.
Click to hide internal directories.