render

package
v1.13.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package render holds generated deployment files in memory and writes them with an ownership manifest so user edits are never overwritten silently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	Files    map[string]File
	Manifest Manifest
}

func New

func New(target, env string) *Bundle

func (*Bundle) Add

func (b *Bundle) Add(path string, content []byte)

func (*Bundle) AddMode

func (b *Bundle) AddMode(path string, content []byte, mode fs.FileMode)

func (*Bundle) Hashes

func (b *Bundle) Hashes() map[string]string

func (*Bundle) Sorted

func (b *Bundle) Sorted() []File

type File

type File struct {
	Path    string
	Content []byte
	Mode    fs.FileMode
}

type Manifest

type Manifest struct {
	Schema    int               `json:"schema"`
	Generated time.Time         `json:"generated"`
	Target    string            `json:"target"`
	Env       string            `json:"env"`
	Files     map[string]string `json:"files"`
}

type WriteOptions

type WriteOptions struct {
	Force           bool
	PreserveMissing bool
}

type WriteResult

type WriteResult struct {
	Written   []string `json:"written"`
	Unchanged []string `json:"unchanged"`
	Skipped   []string `json:"skipped"`
}

func Write

func Write(dir string, b *Bundle, opts WriteOptions) (WriteResult, error)

Write only changes owned artifacts. All paths are anchored inside dir.

Jump to

Keyboard shortcuts

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