overlay

package
v0.2.49 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsMatch

func FieldsMatch(props map[string]any, wanted []string, exact bool) bool

FieldsMatch reports whether every name in wanted exists as a key in props. If exact is true, the set must match exactly; otherwise wanted must be a subset. Only key presence is evaluated.

Types

type Overlay

type Overlay struct {
	Match struct {
		Fields []string `json:"fields" yaml:"fields"`
	} `json:"match" yaml:"match"`

	Fields []map[string]interface{} `json:"fields" yaml:"fields"`
}

func All

func All() []*Overlay

All returns the list of overlays loaded from the workspace. The result is cached for the lifetime of the process.

func (*Overlay) Apply

func (o *Overlay) Apply(props map[string]any)

Apply merges the overlay’s field-level overrides into the supplied properties map (which must be the JSON-Schema "properties" object). The map is modified in-place.

Jump to

Keyboard shortcuts

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