valuesfile

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package valuesfile renders a values cue.Value as the source of a package file declaring the top-level `values` field. It is the one renderer behind every place the library writes caller-supplied values into a CUE package (instance synthesis in opm/internal/synth, extra values layered onto an on-disk instance package by Kernel.AcquireInstanceFromDir), so the two paths cannot drift.

It lives under opm/internal/ so it stays out of the library's public SemVer surface while remaining importable from opm/kernel and the kernel's other internals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(pkg string, values cue.Value) ([]byte, error)

Render produces the source of a file in package pkg whose single declaration is `values: <rendered>`. The value is rendered back to canonical CUE via format.Node on the value's syntax, NEVER by string-interpolating raw input, so an attacker-influenced value cannot inject CUE source. It returns (nil, nil) when values does not exist, signalling the caller to omit the file entirely.

Types

This section is empty.

Jump to

Keyboard shortcuts

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