templates

package
v1.206.3-test.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package templates provides CI summary template loading and rendering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

Loader loads CI templates with layered override support.

func NewLoader

func NewLoader(atmosConfig *schema.AtmosConfiguration) *Loader

NewLoader creates a new template loader.

func (*Loader) Load

func (l *Loader) Load(componentType, command string, defaultTemplates fs.FS) (string, error)

Load returns template content for a component type and command. Override precedence: 1. Explicit file from config (e.g., ci.templates.terraform.plan) 2. Convention-based file from base_path (e.g., {base_path}/terraform/plan.md) 3. Embedded default from provider.

func (*Loader) LoadAndRender

func (l *Loader) LoadAndRender(componentType, command string, defaultTemplates fs.FS, ctx any) (string, error)

LoadAndRender loads a template and renders it with the given context.

func (*Loader) Render

func (l *Loader) Render(templateContent string, ctx any) (string, error)

Render renders a template with the given context.

Jump to

Keyboard shortcuts

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