Documentation
¶
Overview ¶
Package templates handles rendering and copying bundle templates to a target directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotConfigured = errors.New("templates path not configured: set MASSDRIVER_TEMPLATES_PATH environment variable or templates_path in profile in ~/.config/massdriver/config.yaml. See https://docs.massdriver.cloud/guides/bundle-templates for more info")
ErrNotConfigured is returned when the templates path has not been set via env var or config file.
Functions ¶
func Render ¶
func Render(data *TemplateData) error
Render copies and renders the named template into the output directory specified in data.
Types ¶
type Connection ¶
type Connection struct {
Name string `json:"name"`
ArtifactDefinition string `json:"artifact_definition"`
}
Connection represents a bundle connection with a name and artifact definition reference.
type TemplateData ¶
type TemplateData struct {
Name string `json:"name"`
Description string `json:"description"`
Location string `json:"location"`
TemplateName string `json:"templateName"`
OutputDir string `json:"outputDir"`
Type string `json:"type"`
Connections []Connection `json:"connections"`
Envs map[string]string `json:"envs"`
ParamsSchema string `json:"paramsSchema"`
ExistingParamsPath string `json:"existingParamsPath"`
CloudAbbreviation string `json:"cloudAbbreviation"`
RepoName string `json:"repoName"`
RepoNameEncoded string `json:"repoNameEncoded"`
}
TemplateData holds values used when rendering a bundle template.
Click to show internal directories.
Click to hide internal directories.