templates

package
v0.0.0-...-e27dd8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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 List

func List() ([]string, error)

List returns the names of all available bundle templates.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL