overlay

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Parsing errors
	ErrInvalidOverlay      = errors.New("invalid overlay document")
	ErrMissingOverlayField = errors.New("missing required 'overlay' field")
	ErrMissingInfo         = errors.New("missing required 'info' field")
	ErrMissingActions      = errors.New("missing required 'actions' field")
	ErrEmptyActions        = errors.New("actions array must contain at least one action")

	// JSONPath errors
	ErrInvalidJSONPath = errors.New("invalid JSONPath expression")
	ErrPrimitiveTarget = errors.New("JSONPath target resolved to primitive/null; must be object or array")

	// Application errors
	ErrNoTargetDocument = errors.New("no target document provided")
)

Sentinel errors for overlay operations.

Functions

This section is empty.

Types

type OverlayError

type OverlayError struct {
	Action *highoverlay.Action
	Cause  error
}

OverlayError represents an error that occurred during an overlay application.

func (*OverlayError) Error

func (e *OverlayError) Error() string

func (*OverlayError) Unwrap

func (e *OverlayError) Unwrap() error

type Result

type Result struct {
	// Bytes is the raw YAML/JSON bytes of the modified document.
	Bytes []byte

	// Warnings contains non-fatal issues encountered during application.
	Warnings []*Warning
}

Result represents the result of applying an overlay to a target document.

func Apply

func Apply(targetBytes []byte, overlay *highoverlay.Overlay) (*Result, error)

Apply applies the given overlay to the target document bytes. It returns the modified document bytes and any warnings encountered.

type Warning

type Warning struct {
	Action  *highoverlay.Action
	Target  string
	Message string
}

Warning represents a non-fatal issue encountered during overlay application.

func (*Warning) String

func (w *Warning) String() string

Jump to

Keyboard shortcuts

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